{"text": "[GOAL]\nα : Type u\n⊢ Inhabited (FreeRing α)\n[PROOFSTEP]\ndsimp only [FreeRing]\n[GOAL]\nα : Type u\n⊢ Inhabited (FreeAbelianGroup (FreeMonoid α))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nC : FreeRing α → Prop\nz : FreeRing α\nhn1 : C (-1)\nhb : ∀ (b : α), C (of b)\nha : ∀ (x y : FreeRing α), C x → C y → C (x + y)\nhm : ∀ (x y : FreeRing α), C x → C y → C (x * y)\nhn : ∀ (x : FreeRing α), C x → C (-x)\nh1 : C 1\nm✝ : FreeMonoid α\na : α\nm : List α\nih : C (FreeAbelianGroup.of m)\n⊢ C (FreeAbelianGroup.of (a :: m))\n[PROOFSTEP]\nconvert hm _ _ (hb a) ih\n[GOAL]\ncase h.e'_1\nα : Type u\nC : FreeRing α → Prop\nz : FreeRing α\nhn1 : C (-1)\nhb : ∀ (b : α), C (of b)\nha : ∀ (x y : FreeRing α), C x → C y → C (x + y)\nhm : ∀ (x y : FreeRing α), C x → C y → C (x * y)\nhn : ∀ (x : FreeRing α), C x → C (-x)\nh1 : C 1\nm✝ : FreeMonoid α\na : α\nm : List α\nih : C (FreeAbelianGroup.of m)\n⊢ FreeAbelianGroup.of (a :: m) = of a * FreeAbelianGroup.of m\n[PROOFSTEP]\nrw [of, ← FreeAbelianGroup.of_mul]\n[GOAL]\ncase h.e'_1\nα : Type u\nC : FreeRing α → Prop\nz : FreeRing α\nhn1 : C (-1)\nhb : ∀ (b : α), C (of b)\nha : ∀ (x y : FreeRing α), C x → C y → C (x + y)\nhm : ∀ (x y : FreeRing α), C x → C y → C (x * y)\nhn : ∀ (x : FreeRing α), C x → C (-x)\nh1 : C 1\nm✝ : FreeMonoid α\na : α\nm : List α\nih : C (FreeAbelianGroup.of m)\n⊢ FreeAbelianGroup.of (a :: m) = FreeAbelianGroup.of (FreeMonoid.of a * m)\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.FreeRing", "llama_tokens": 698, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.849971175657575, "lm_q2_score": 0.7057850216484838, "lm_q1q2_score": 0.5998969246120688}} {"text": "[GOAL]\nR✝ : Type u_1\nS : Type u_2\nA✝ : Type u_3\nB : Type u_4\ninst✝¹² : CommSemiring R✝\ninst✝¹¹ : CommSemiring S\ninst✝¹⁰ : Semiring A✝\ninst✝⁹ : Semiring B\ninst✝⁸ : Algebra R✝ S\ninst✝⁷ : Algebra R✝ A✝\ninst✝⁶ : Algebra R✝ B\ninst✝⁵ : Algebra S A✝\ninst✝⁴ : SMulCommClass R✝ S A✝\ninst✝³ : IsScalarTower R✝ S A✝\nR : Type ?u.2035\nA : Type ?u.2038\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nr : R\nx : A\n⊢ ↑(RingHom.toOpposite (algebraMap R A)\n (_ :\n ∀ (x y : R),\n ↑(algebraMap R ((fun x => A) x)) x * ↑(algebraMap R A) y =\n ↑(algebraMap R A) y * ↑(algebraMap R ((fun x => A) x)) x))\n r *\n op x =\n op x *\n ↑(RingHom.toOpposite (algebraMap R A)\n (_ :\n ∀ (x y : R),\n ↑(algebraMap R ((fun x => A) x)) x * ↑(algebraMap R A) y =\n ↑(algebraMap R A) y * ↑(algebraMap R ((fun x => A) x)) x))\n r\n[PROOFSTEP]\nsimp only [RingHom.toOpposite_apply, Function.comp_apply, ← op_mul, Algebra.commutes]\n[GOAL]\nR✝ : Type u_1\nS : Type u_2\nA✝ : Type u_3\nB : Type u_4\ninst✝¹² : CommSemiring R✝\ninst✝¹¹ : CommSemiring S\ninst✝¹⁰ : Semiring A✝\ninst✝⁹ : Semiring B\ninst✝⁸ : Algebra R✝ S\ninst✝⁷ : Algebra R✝ A✝\ninst✝⁶ : Algebra R✝ B\ninst✝⁵ : Algebra S A✝\ninst✝⁴ : SMulCommClass R✝ S A✝\ninst✝³ : IsScalarTower R✝ S A✝\nR : Type ?u.2035\nA : Type ?u.2038\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nc : R\nx : (fun x => Aᵐᵒᵖ) c\n⊢ unop (c • x) =\n unop\n (↑(RingHom.toOpposite (algebraMap R A)\n (_ :\n ∀ (x y : R),\n ↑(algebraMap R ((fun x => A) x)) x * ↑(algebraMap R A) y =\n ↑(algebraMap R A) y * ↑(algebraMap R ((fun x => A) x)) x))\n c *\n x)\n[PROOFSTEP]\nsimp only [unop_smul, RingHom.toOpposite_apply, Function.comp_apply, unop_mul, op_mul, Algebra.smul_def,\n Algebra.commutes, op_unop, unop_op]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Algebra.Opposite", "llama_tokens": 930, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8459424411924674, "lm_q2_score": 0.7090191337850933, "lm_q1q2_score": 0.5997893768863305}} {"text": "[GOAL]\nι : Type u_1\nG : Type u_2\ninst✝³ : Group G\ninst✝² : ConditionallyCompleteLattice G\ninst✝¹ : CovariantClass G G (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : Nonempty ι\nf : ι → G\nhf : BddAbove (range f)\na : G\n⊢ (⨆ (i : ι), f i) / a = ⨆ (i : ι), f i / a\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, ciSup_mul hf]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Bounds", "llama_tokens": 172, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8962513675912912, "lm_q2_score": 0.6688802669716107, "lm_q1q2_score": 0.5994848540281341}} {"text": "[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\nsrc✝¹ : LinearOrderedAddCommMonoidWithTop (WithTop α) := linearOrderedAddCommMonoidWithTop\nsrc✝ : Nontrivial (Option α) := Option.nontrivial\n⊢ ∀ (a : WithTop α), a ≠ ⊤ → a + -a = 0\n[PROOFSTEP]\nrintro (a | a) ha\n[GOAL]\ncase none\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\nsrc✝¹ : LinearOrderedAddCommMonoidWithTop (WithTop α) := linearOrderedAddCommMonoidWithTop\nsrc✝ : Nontrivial (Option α) := Option.nontrivial\nha : none ≠ ⊤\n⊢ none + -none = 0\n[PROOFSTEP]\nexact (ha rfl).elim\n[GOAL]\ncase some\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na✝ b c d : α\nsrc✝¹ : LinearOrderedAddCommMonoidWithTop (WithTop α) := linearOrderedAddCommMonoidWithTop\nsrc✝ : Nontrivial (Option α) := Option.nontrivial\na : α\nha : Option.some a ≠ ⊤\n⊢ Option.some a + -Option.some a = 0\n[PROOFSTEP]\nexact WithTop.coe_add.symm.trans (WithTop.coe_eq_coe.2 (add_neg_self a))\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Group.WithTop", "llama_tokens": 408, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8652240860523328, "lm_q2_score": 0.6926419831347361, "lm_q1q2_score": 0.5992905268192273}} {"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhn : IsPeriodicPt f n x\nhm : IsPeriodicPt f m x\n⊢ IsPeriodicPt f (n + m) x\n[PROOFSTEP]\nrw [IsPeriodicPt, iterate_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhn : IsPeriodicPt f n x\nhm : IsPeriodicPt f m x\n⊢ IsFixedPt (f^[n] ∘ f^[m]) x\n[PROOFSTEP]\nexact hn.comp hm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhn : IsPeriodicPt f (n + m) x\nhm : IsPeriodicPt f m x\n⊢ IsPeriodicPt f n x\n[PROOFSTEP]\nrw [IsPeriodicPt, iterate_add] at hn \n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhn : IsFixedPt (f^[n] ∘ f^[m]) x\nhm : IsPeriodicPt f m x\n⊢ IsPeriodicPt f n x\n[PROOFSTEP]\nexact hn.left_of_comp hm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhn : IsPeriodicPt f (n + m) x\nhm : IsPeriodicPt f n x\n⊢ IsPeriodicPt f m x\n[PROOFSTEP]\nrw [add_comm] at hn \n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhn : IsPeriodicPt f (m + n) x\nhm : IsPeriodicPt f n x\n⊢ IsPeriodicPt f m x\n[PROOFSTEP]\nexact hn.left_of_add hm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhm : IsPeriodicPt f m x\nhn : IsPeriodicPt f n x\n⊢ IsPeriodicPt f (m - n) x\n[PROOFSTEP]\ncases' le_total n m with h h\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhm : IsPeriodicPt f m x\nhn : IsPeriodicPt f n x\nh : n ≤ m\n⊢ IsPeriodicPt f (m - n) x\n[PROOFSTEP]\nrefine' left_of_add _ hn\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhm : IsPeriodicPt f m x\nhn : IsPeriodicPt f n x\nh : n ≤ m\n⊢ IsPeriodicPt f (m - n + n) x\n[PROOFSTEP]\nrwa [tsub_add_cancel_of_le h]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhm : IsPeriodicPt f m x\nhn : IsPeriodicPt f n x\nh : m ≤ n\n⊢ IsPeriodicPt f (m - n) x\n[PROOFSTEP]\nrw [tsub_eq_zero_iff_le.mpr h]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhm : IsPeriodicPt f m x\nhn : IsPeriodicPt f n x\nh : m ≤ n\n⊢ IsPeriodicPt f 0 x\n[PROOFSTEP]\napply isPeriodicPt_zero\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n✝ : ℕ\nhm : IsPeriodicPt f m x\nn : ℕ\n⊢ IsPeriodicPt f (m * n) x\n[PROOFSTEP]\nsimp only [IsPeriodicPt, iterate_mul, hm.isFixedPt.iterate n]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n✝ : ℕ\nhm : IsPeriodicPt f m x\nn : ℕ\n⊢ IsPeriodicPt f (n * m) x\n[PROOFSTEP]\nsimp only [mul_comm n, hm.mul_const n]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm✝ n : ℕ\nhf : IsPeriodicPt f n x\nm : ℕ\n⊢ IsPeriodicPt f^[m] n x\n[PROOFSTEP]\nrw [IsPeriodicPt, ← iterate_mul, mul_comm, iterate_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm✝ n : ℕ\nhf : IsPeriodicPt f n x\nm : ℕ\n⊢ IsFixedPt f^[n]^[m] x\n[PROOFSTEP]\nexact hf.isFixedPt.iterate m\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\ng : α → α\nhco : Function.Commute f g\nhf : IsPeriodicPt f n x\nhg : IsPeriodicPt g n x\n⊢ IsPeriodicPt (f ∘ g) n x\n[PROOFSTEP]\nrw [IsPeriodicPt, hco.comp_iterate]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\ng : α → α\nhco : Function.Commute f g\nhf : IsPeriodicPt f n x\nhg : IsPeriodicPt g n x\n⊢ IsFixedPt (f^[n] ∘ g^[n]) x\n[PROOFSTEP]\nexact IsFixedPt.comp hf hg\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\ng : α → α\nhco : Function.Commute f g\nhfg : IsPeriodicPt (f ∘ g) n x\nhg : IsPeriodicPt g n x\n⊢ IsPeriodicPt f n x\n[PROOFSTEP]\nrw [IsPeriodicPt, hco.comp_iterate] at hfg \n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\ng : α → α\nhco : Function.Commute f g\nhfg : IsFixedPt (f^[n] ∘ g^[n]) x\nhg : IsPeriodicPt g n x\n⊢ IsPeriodicPt f n x\n[PROOFSTEP]\nexact hfg.left_of_comp hg\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm✝ n : ℕ\nh : IsPeriodicPt f n x\nm : ℕ\n⊢ f^[m % n] x = f^[m] x\n[PROOFSTEP]\nconv_rhs => rw [← Nat.mod_add_div m n, iterate_add_apply, (h.mul_const _).eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm✝ n : ℕ\nh : IsPeriodicPt f n x\nm : ℕ\n| f^[m] x\n[PROOFSTEP]\nrw [← Nat.mod_add_div m n, iterate_add_apply, (h.mul_const _).eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm✝ n : ℕ\nh : IsPeriodicPt f n x\nm : ℕ\n| f^[m] x\n[PROOFSTEP]\nrw [← Nat.mod_add_div m n, iterate_add_apply, (h.mul_const _).eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm✝ n : ℕ\nh : IsPeriodicPt f n x\nm : ℕ\n| f^[m] x\n[PROOFSTEP]\nrw [← Nat.mod_add_div m n, iterate_add_apply, (h.mul_const _).eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhm : IsPeriodicPt f m x\nhn : IsPeriodicPt f n x\n⊢ IsPeriodicPt f (Nat.gcd m n) x\n[PROOFSTEP]\nrevert hm hn\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\n⊢ IsPeriodicPt f m x → IsPeriodicPt f n x → IsPeriodicPt f (Nat.gcd m n) x\n[PROOFSTEP]\nrefine' Nat.gcd.induction m n (fun n _ hn => _) fun m n _ ih hm hn => _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n✝ n : ℕ\nx✝ : IsPeriodicPt f 0 x\nhn : IsPeriodicPt f n x\n⊢ IsPeriodicPt f (Nat.gcd 0 n) x\n[PROOFSTEP]\nrwa [Nat.gcd_zero_left]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm✝ n✝ m n : ℕ\nx✝ : 0 < m\nih : IsPeriodicPt f (n % m) x → IsPeriodicPt f m x → IsPeriodicPt f (Nat.gcd (n % m) m) x\nhm : IsPeriodicPt f m x\nhn : IsPeriodicPt f n x\n⊢ IsPeriodicPt f (Nat.gcd m n) x\n[PROOFSTEP]\nrw [Nat.gcd_rec]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm✝ n✝ m n : ℕ\nx✝ : 0 < m\nih : IsPeriodicPt f (n % m) x → IsPeriodicPt f m x → IsPeriodicPt f (Nat.gcd (n % m) m) x\nhm : IsPeriodicPt f m x\nhn : IsPeriodicPt f n x\n⊢ IsPeriodicPt f (Nat.gcd (n % m) m) x\n[PROOFSTEP]\nexact ih (hn.mod hm) hm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhx : IsPeriodicPt f n x\nhy : IsPeriodicPt f n y\nhn : 0 < n\nh : f x = f y\n⊢ x = y\n[PROOFSTEP]\nrw [← hx.eq, ← hy.eq, ← iterate_pred_comp_of_pos f hn, comp_apply, comp_apply, h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n✝ : ℕ\nf : α → α\nn : ℕ\nhn : 0 < n\nx : α\nhx : x ∈ ptsOfPeriod f n\n⊢ f (f^[Nat.pred n] x) = x\n[PROOFSTEP]\nrw [← comp_apply (f := f), comp_iterate_pred_of_pos f hn, hx.eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhx : x ∈ periodicPts f\nhm : IsPeriodicPt f m (f^[n] x)\n⊢ IsPeriodicPt f m x\n[PROOFSTEP]\nrcases hx with ⟨r, hr, hr'⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhm : IsPeriodicPt f m (f^[n] x)\nr : ℕ\nhr : r > 0\nhr' : IsPeriodicPt f r x\n⊢ IsPeriodicPt f m x\n[PROOFSTEP]\nsuffices n ≤ (n / r + 1) * r by\n -- porting note: convert used to unfold IsPeriodicPt\n change _ = _\n convert (hm.apply_iterate ((n / r + 1) * r - n)).eq <;>\n rw [← iterate_add_apply, Nat.sub_add_cancel this, iterate_mul, (hr'.iterate _).eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhm : IsPeriodicPt f m (f^[n] x)\nr : ℕ\nhr : r > 0\nhr' : IsPeriodicPt f r x\nthis : n ≤ (n / r + 1) * r\n⊢ IsPeriodicPt f m x\n[PROOFSTEP]\nchange _ = _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhm : IsPeriodicPt f m (f^[n] x)\nr : ℕ\nhr : r > 0\nhr' : IsPeriodicPt f r x\nthis : n ≤ (n / r + 1) * r\n⊢ f^[m] x = x\n[PROOFSTEP]\nconvert (hm.apply_iterate ((n / r + 1) * r - n)).eq\n[GOAL]\ncase h.e'_2.h.e'_4\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhm : IsPeriodicPt f m (f^[n] x)\nr : ℕ\nhr : r > 0\nhr' : IsPeriodicPt f r x\nthis : n ≤ (n / r + 1) * r\n⊢ x = f^[(n / r + 1) * r - n] (f^[n] x)\n[PROOFSTEP]\nrw [← iterate_add_apply, Nat.sub_add_cancel this, iterate_mul, (hr'.iterate _).eq]\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhm : IsPeriodicPt f m (f^[n] x)\nr : ℕ\nhr : r > 0\nhr' : IsPeriodicPt f r x\nthis : n ≤ (n / r + 1) * r\n⊢ x = f^[(n / r + 1) * r - n] (f^[n] x)\n[PROOFSTEP]\nrw [← iterate_add_apply, Nat.sub_add_cancel this, iterate_mul, (hr'.iterate _).eq]\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhm : IsPeriodicPt f m (f^[n] x)\nr : ℕ\nhr : r > 0\nhr' : IsPeriodicPt f r x\n⊢ n ≤ (n / r + 1) * r\n[PROOFSTEP]\nrw [add_mul, one_mul]\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhm : IsPeriodicPt f m (f^[n] x)\nr : ℕ\nhr : r > 0\nhr' : IsPeriodicPt f r x\n⊢ n ≤ n / r * r + r\n[PROOFSTEP]\nexact (Nat.lt_div_mul_add hr).le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nx : α\n⊢ x ∈ ⋃ (n : ℕ) (_ : n > 0), ptsOfPeriod f n ↔ x ∈ periodicPts f\n[PROOFSTEP]\nsimp [mem_periodicPts]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nf : α → α\nx : α\n⊢ IsPeriodicPt f (minimalPeriod f x) x\n[PROOFSTEP]\ndelta minimalPeriod\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nf : α → α\nx : α\n⊢ IsPeriodicPt f (if h : x ∈ periodicPts f then Nat.find h else 0) x\n[PROOFSTEP]\nsplit_ifs with hx\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nf : α → α\nx : α\nhx : x ∈ periodicPts f\n⊢ IsPeriodicPt f (Nat.find hx) x\n[PROOFSTEP]\nexact (Nat.find_spec hx).2\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nf : α → α\nx : α\nhx : ¬x ∈ periodicPts f\n⊢ IsPeriodicPt f 0 x\n[PROOFSTEP]\nexact isPeriodicPt_zero f x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\n⊢ f^[n + minimalPeriod f x] x = f^[n] x\n[PROOFSTEP]\nrw [iterate_add_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\n⊢ f^[n] (f^[minimalPeriod f x] x) = f^[n] x\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\n⊢ f^[minimalPeriod f x] x = x\n[PROOFSTEP]\nexact isPeriodicPt_minimalPeriod f x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhx : x ∈ periodicPts f\n⊢ 0 < minimalPeriod f x\n[PROOFSTEP]\nsimp only [minimalPeriod, dif_pos hx, (Nat.find_spec hx).1.lt]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhx : ¬x ∈ periodicPts f\n⊢ minimalPeriod f x = 0\n[PROOFSTEP]\nsimp only [minimalPeriod, dif_neg hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nh : ¬x ∈ periodicPts f\n⊢ ¬0 < minimalPeriod f x\n[PROOFSTEP]\nsimp only [minimalPeriod, dif_neg h, lt_irrefl 0, not_false_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\n⊢ minimalPeriod f x = 0 ↔ ¬x ∈ periodicPts f\n[PROOFSTEP]\nrw [← minimalPeriod_pos_iff_mem_periodicPts, not_lt, nonpos_iff_eq_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhn : 0 < n\nhx : IsPeriodicPt f n x\n⊢ minimalPeriod f x ≤ n\n[PROOFSTEP]\nrw [minimalPeriod, dif_pos (mk_mem_periodicPts hn hx)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhn : 0 < n\nhx : IsPeriodicPt f n x\n⊢ Nat.find (_ : x ∈ periodicPts f) ≤ n\n[PROOFSTEP]\nexact Nat.find_min' (mk_mem_periodicPts hn hx) ⟨hn, hx⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n✝ : ℕ\nhx : x ∈ periodicPts f\nn : ℕ\n⊢ minimalPeriod f (f^[n] x) = minimalPeriod f x\n[PROOFSTEP]\napply\n (IsPeriodicPt.minimalPeriod_le (minimalPeriod_pos_of_mem_periodicPts hx) _).antisymm\n ((isPeriodicPt_of_mem_periodicPts_of_isPeriodicPt_iterate hx (isPeriodicPt_minimalPeriod f _)).minimalPeriod_le\n (minimalPeriod_pos_of_mem_periodicPts _))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n✝ : ℕ\nhx : x ∈ periodicPts f\nn : ℕ\n⊢ IsPeriodicPt f (minimalPeriod f x) (f^[n] x)\n[PROOFSTEP]\nexact (isPeriodicPt_minimalPeriod f x).apply_iterate n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n✝ : ℕ\nhx : x ∈ periodicPts f\nn : ℕ\n⊢ f^[n] x ∈ periodicPts f\n[PROOFSTEP]\nrcases hx with ⟨m, hm, hx⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm✝ n✝ n m : ℕ\nhm : m > 0\nhx : IsPeriodicPt f m x\n⊢ f^[n] x ∈ periodicPts f\n[PROOFSTEP]\nexact ⟨m, hm, hx.apply_iterate n⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm✝ n✝ m n : ℕ\nhm : m < minimalPeriod f x\nhmn : f^[m] x = f^[n] x\n⊢ m ≤ n\n[PROOFSTEP]\nby_contra' hmn'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm✝ n✝ m n : ℕ\nhm : m < minimalPeriod f x\nhmn : f^[m] x = f^[n] x\nhmn' : n < m\n⊢ False\n[PROOFSTEP]\nrw [← Nat.add_sub_of_le hmn'.le, add_comm, iterate_add_apply] at hmn \n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm✝ n✝ m n : ℕ\nhm : m < minimalPeriod f x\nhmn : f^[m - n] (f^[n] x) = f^[n] x\nhmn' : n < m\n⊢ False\n[PROOFSTEP]\nexact\n ((IsPeriodicPt.minimalPeriod_le (tsub_pos_of_lt hmn')\n (isPeriodicPt_of_mem_periodicPts_of_isPeriodicPt_iterate\n (minimalPeriod_pos_iff_mem_periodicPts.1 ((zero_le m).trans_lt hm)) hmn)).trans\n (Nat.sub_le m n)).not_lt\n hm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\n⊢ minimalPeriod f x = 1 ↔ IsFixedPt f x\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nh : minimalPeriod f x = 1\n⊢ IsFixedPt f x\n[PROOFSTEP]\nrw [← iterate_one f]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nh : minimalPeriod f x = 1\n⊢ IsFixedPt f^[1] x\n[PROOFSTEP]\nrefine' Function.IsPeriodicPt.isFixedPt _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nh : minimalPeriod f x = 1\n⊢ IsPeriodicPt f 1 x\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nh : minimalPeriod f x = 1\n⊢ IsPeriodicPt f (minimalPeriod f x) x\n[PROOFSTEP]\nexact isPeriodicPt_minimalPeriod f x\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nh : IsFixedPt f x\n⊢ minimalPeriod f x = 1\n[PROOFSTEP]\nexact\n ((h.isPeriodicPt 1).minimalPeriod_le Nat.one_pos).antisymm\n (Nat.succ_le_of_lt ((h.isPeriodicPt 1).minimalPeriod_pos Nat.one_pos))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y✝ : α\nm n : ℕ\ng : β → β\ny : β\n⊢ minimalPeriod f x = minimalPeriod g y ↔ ∀ (n : ℕ), IsPeriodicPt f n x ↔ IsPeriodicPt g n y\n[PROOFSTEP]\nsimp_rw [isPeriodicPt_iff_minimalPeriod_dvd, dvd_right_iff_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n p k : ℕ\nhp : Fact (Nat.Prime p)\nhk : ¬IsPeriodicPt f (p ^ k) x\nhk1 : IsPeriodicPt f (p ^ (k + 1)) x\n⊢ minimalPeriod f x = p ^ (k + 1)\n[PROOFSTEP]\napply Nat.eq_prime_pow_of_dvd_least_prime_pow hp.out\n[GOAL]\ncase h₁\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n p k : ℕ\nhp : Fact (Nat.Prime p)\nhk : ¬IsPeriodicPt f (p ^ k) x\nhk1 : IsPeriodicPt f (p ^ (k + 1)) x\n⊢ ¬minimalPeriod f x ∣ p ^ k\n[PROOFSTEP]\nrwa [← isPeriodicPt_iff_minimalPeriod_dvd]\n[GOAL]\ncase h₂\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n p k : ℕ\nhp : Fact (Nat.Prime p)\nhk : ¬IsPeriodicPt f (p ^ k) x\nhk1 : IsPeriodicPt f (p ^ (k + 1)) x\n⊢ minimalPeriod f x ∣ p ^ (k + 1)\n[PROOFSTEP]\nrwa [← isPeriodicPt_iff_minimalPeriod_dvd]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\ng : α → α\nh : Function.Commute f g\n⊢ minimalPeriod (f ∘ g) x ∣ lcm (minimalPeriod f x) (minimalPeriod g x)\n[PROOFSTEP]\nrw [← isPeriodicPt_iff_minimalPeriod_dvd]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\ng : α → α\nh : Function.Commute f g\n⊢ IsPeriodicPt (f ∘ g) (lcm (minimalPeriod f x) (minimalPeriod g x)) x\n[PROOFSTEP]\nexact (isPeriodicPt_minimalPeriod f x).comp_lcm h (isPeriodicPt_minimalPeriod g x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\ng : α → α\nh : Function.Commute f g\nhco : coprime (minimalPeriod f x) (minimalPeriod g x)\n⊢ minimalPeriod (f ∘ g) x = minimalPeriod f x * minimalPeriod g x\n[PROOFSTEP]\napply h.minimalPeriod_of_comp_dvd_mul.antisymm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\ng : α → α\nh : Function.Commute f g\nhco : coprime (minimalPeriod f x) (minimalPeriod g x)\n⊢ minimalPeriod f x * minimalPeriod g x ∣ minimalPeriod (f ∘ g) x\n[PROOFSTEP]\nsuffices :\n ∀ {f g : α → α},\n Commute f g → coprime (minimalPeriod f x) (minimalPeriod g x) → minimalPeriod f x ∣ minimalPeriod (f ∘ g) x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\ng : α → α\nh : Function.Commute f g\nhco : coprime (minimalPeriod f x) (minimalPeriod g x)\nthis :\n ∀ {f g : α → α},\n Function.Commute f g → coprime (minimalPeriod f x) (minimalPeriod g x) → minimalPeriod f x ∣ minimalPeriod (f ∘ g) x\n⊢ minimalPeriod f x * minimalPeriod g x ∣ minimalPeriod (f ∘ g) x\n[PROOFSTEP]\nexact hco.mul_dvd_of_dvd_of_dvd (this h hco) (h.comp_eq.symm ▸ this h.symm hco.symm)\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\ng : α → α\nh : Function.Commute f g\nhco : coprime (minimalPeriod f x) (minimalPeriod g x)\n⊢ ∀ {f g : α → α},\n Function.Commute f g → coprime (minimalPeriod f x) (minimalPeriod g x) → minimalPeriod f x ∣ minimalPeriod (f ∘ g) x\n[PROOFSTEP]\nintro f g h hco\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\ng✝ : α → α\nh✝ : Function.Commute f✝ g✝\nhco✝ : coprime (minimalPeriod f✝ x) (minimalPeriod g✝ x)\nf g : α → α\nh : Function.Commute f g\nhco : coprime (minimalPeriod f x) (minimalPeriod g x)\n⊢ minimalPeriod f x ∣ minimalPeriod (f ∘ g) x\n[PROOFSTEP]\nrefine' hco.dvd_of_dvd_mul_left (IsPeriodicPt.left_of_comp h _ _).minimalPeriod_dvd\n[GOAL]\ncase this.refine'_1\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\ng✝ : α → α\nh✝ : Function.Commute f✝ g✝\nhco✝ : coprime (minimalPeriod f✝ x) (minimalPeriod g✝ x)\nf g : α → α\nh : Function.Commute f g\nhco : coprime (minimalPeriod f x) (minimalPeriod g x)\n⊢ IsPeriodicPt (f ∘ g) (minimalPeriod g x * minimalPeriod (f ∘ g) x) x\n[PROOFSTEP]\nexact (isPeriodicPt_minimalPeriod _ _).const_mul _\n[GOAL]\ncase this.refine'_2\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\ng✝ : α → α\nh✝ : Function.Commute f✝ g✝\nhco✝ : coprime (minimalPeriod f✝ x) (minimalPeriod g✝ x)\nf g : α → α\nh : Function.Commute f g\nhco : coprime (minimalPeriod f x) (minimalPeriod g x)\n⊢ IsPeriodicPt g (minimalPeriod g x * minimalPeriod (f ∘ g) x) x\n[PROOFSTEP]\nexact (isPeriodicPt_minimalPeriod _ _).mul_const _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nh : 0 < gcd (minimalPeriod f x) n\n⊢ minimalPeriod f^[n] x = minimalPeriod f x / gcd (minimalPeriod f x) n\n[PROOFSTEP]\napply Nat.dvd_antisymm\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nh : 0 < gcd (minimalPeriod f x) n\n⊢ minimalPeriod f^[n] x ∣ minimalPeriod f x / gcd (minimalPeriod f x) n\n[PROOFSTEP]\napply IsPeriodicPt.minimalPeriod_dvd\n[GOAL]\ncase a.hx\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nh : 0 < gcd (minimalPeriod f x) n\n⊢ IsPeriodicPt f^[n] (minimalPeriod f x / gcd (minimalPeriod f x) n) x\n[PROOFSTEP]\nrw [IsPeriodicPt, IsFixedPt, ← iterate_mul, ← Nat.mul_div_assoc _ (gcd_dvd_left _ _), mul_comm,\n Nat.mul_div_assoc _ (gcd_dvd_right _ _), mul_comm, iterate_mul]\n[GOAL]\ncase a.hx\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nh : 0 < gcd (minimalPeriod f x) n\n⊢ f^[n / gcd (minimalPeriod f x) n]^[minimalPeriod f x] x = x\n[PROOFSTEP]\nexact (isPeriodicPt_minimalPeriod f x).iterate _\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nh : 0 < gcd (minimalPeriod f x) n\n⊢ minimalPeriod f x / gcd (minimalPeriod f x) n ∣ minimalPeriod f^[n] x\n[PROOFSTEP]\napply coprime.dvd_of_dvd_mul_right (coprime_div_gcd_div_gcd h)\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nh : 0 < gcd (minimalPeriod f x) n\n⊢ minimalPeriod f x / gcd (minimalPeriod f x) n ∣ minimalPeriod f^[n] x * (n / gcd (minimalPeriod f x) n)\n[PROOFSTEP]\napply Nat.dvd_of_mul_dvd_mul_right h\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nh : 0 < gcd (minimalPeriod f x) n\n⊢ minimalPeriod f x / gcd (minimalPeriod f x) n * gcd (minimalPeriod f x) n ∣\n minimalPeriod f^[n] x * (n / gcd (minimalPeriod f x) n) * gcd (minimalPeriod f x) n\n[PROOFSTEP]\nrw [Nat.div_mul_cancel (gcd_dvd_left _ _), mul_assoc, Nat.div_mul_cancel (gcd_dvd_right _ _), mul_comm]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nh : 0 < gcd (minimalPeriod f x) n\n⊢ minimalPeriod f x ∣ n * minimalPeriod f^[n] x\n[PROOFSTEP]\napply IsPeriodicPt.minimalPeriod_dvd\n[GOAL]\ncase a.hx\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nh : 0 < gcd (minimalPeriod f x) n\n⊢ IsPeriodicPt f (n * minimalPeriod f^[n] x) x\n[PROOFSTEP]\nrw [IsPeriodicPt, IsFixedPt, iterate_mul]\n[GOAL]\ncase a.hx\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nh : 0 < gcd (minimalPeriod f x) n\n⊢ f^[n]^[minimalPeriod f^[n] x] x = x\n[PROOFSTEP]\nexact isPeriodicPt_minimalPeriod _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\n⊢ Cycle.length (periodicOrbit f x) = minimalPeriod f x\n[PROOFSTEP]\nrw [periodicOrbit, Cycle.length_coe, List.length_map, List.length_range]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\n⊢ periodicOrbit f x = Cycle.nil ↔ ¬x ∈ periodicPts f\n[PROOFSTEP]\nsimp [periodicOrbit]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\n⊢ minimalPeriod f x = 0 ↔ ¬x ∈ periodicPts f\n[PROOFSTEP]\nexact minimalPeriod_eq_zero_iff_nmem_periodicPts\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhx : x ∈ periodicPts f\n⊢ y ∈ periodicOrbit f x ↔ ∃ n, f^[n] x = y\n[PROOFSTEP]\nsimp only [periodicOrbit, Cycle.mem_coe_iff, List.mem_map, List.mem_range]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhx : x ∈ periodicPts f\n⊢ (∃ a, a < minimalPeriod f x ∧ f^[a] x = y) ↔ ∃ n, f^[n] x = y\n[PROOFSTEP]\nuse fun ⟨a, _, ha'⟩ => ⟨a, ha'⟩\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\nhx : x ∈ periodicPts f\n⊢ (∃ n, f^[n] x = y) → ∃ a, a < minimalPeriod f x ∧ f^[a] x = y\n[PROOFSTEP]\nrintro ⟨n, rfl⟩\n[GOAL]\ncase mpr.intro\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx : α\nm n✝ : ℕ\nhx : x ∈ periodicPts f\nn : ℕ\n⊢ ∃ a, a < minimalPeriod f x ∧ f^[a] x = f^[n] x\n[PROOFSTEP]\nuse n % minimalPeriod f x, mod_lt _ (minimalPeriod_pos_of_mem_periodicPts hx)\n[GOAL]\ncase right\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx : α\nm n✝ : ℕ\nhx : x ∈ periodicPts f\nn : ℕ\n⊢ f^[n % minimalPeriod f x] x = f^[n] x\n[PROOFSTEP]\nrw [iterate_mod_minimalPeriod_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\n⊢ Cycle.Nodup (periodicOrbit f x)\n[PROOFSTEP]\nrw [periodicOrbit, Cycle.nodup_coe_iff, List.nodup_map_iff_inj_on (List.nodup_range _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n : ℕ\n⊢ ∀ (x_1 : ℕ),\n x_1 ∈ List.range (minimalPeriod f x) → ∀ (y : ℕ), y ∈ List.range (minimalPeriod f x) → f^[x_1] x = f^[y] x → x_1 = y\n[PROOFSTEP]\nintro m hm n hn hmn\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm✝ n✝ m : ℕ\nhm : m ∈ List.range (minimalPeriod f x)\nn : ℕ\nhn : n ∈ List.range (minimalPeriod f x)\nhmn : f^[m] x = f^[n] x\n⊢ m = n\n[PROOFSTEP]\nrw [List.mem_range] at hm hn \n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm✝ n✝ m : ℕ\nhm : m < minimalPeriod f x\nn : ℕ\nhn : n < minimalPeriod f x\nhmn : f^[m] x = f^[n] x\n⊢ m = n\n[PROOFSTEP]\nrwa [eq_iff_lt_minimalPeriod_of_iterate_eq hm hn] at hmn \n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n✝ : ℕ\nhx : x ∈ periodicPts f\nn : ℕ\n⊢ List.rotate (List.map (fun n => f^[n] x) (List.range (minimalPeriod f x))) n =\n List.map (fun n_1 => f^[n_1] (f^[n] x)) (List.range (minimalPeriod f (f^[n] x)))\n[PROOFSTEP]\napply List.ext_nthLe _ fun m _ _ => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n✝ : ℕ\nhx : x ∈ periodicPts f\nn : ℕ\n⊢ List.length (List.rotate (List.map (fun n => f^[n] x) (List.range (minimalPeriod f x))) n) =\n List.length (List.map (fun n_1 => f^[n_1] (f^[n] x)) (List.range (minimalPeriod f (f^[n] x))))\n[PROOFSTEP]\nsimp [minimalPeriod_apply_iterate hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf fa : α → α\nfb : β → β\nx y : α\nm n✝ : ℕ\nhx : x ∈ periodicPts f\nn : ℕ\n⊢ ∀ (m : ℕ) (x_1 : m < List.length (List.rotate (List.map (fun n => f^[n] x) (List.range (minimalPeriod f x))) n))\n (x_2 : m < List.length (List.map (fun n_1 => f^[n_1] (f^[n] x)) (List.range (minimalPeriod f (f^[n] x))))),\n List.nthLe (List.rotate (List.map (fun n => f^[n] x) (List.range (minimalPeriod f x))) n) m x_1 =\n List.nthLe (List.map (fun n_1 => f^[n_1] (f^[n] x)) (List.range (minimalPeriod f (f^[n] x)))) m x_2\n[PROOFSTEP]\nsimp [List.nthLe_rotate, iterate_add_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nr : α → α → Prop\nf : α → α\nx : α\n⊢ Cycle.Chain r (periodicOrbit f x) ↔ ∀ (n : ℕ), n < minimalPeriod f x → r (f^[n] x) (f^[n + 1] x)\n[PROOFSTEP]\nby_cases hx : x ∈ periodicPts f\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nr : α → α → Prop\nf : α → α\nx : α\nhx : x ∈ periodicPts f\n⊢ Cycle.Chain r (periodicOrbit f x) ↔ ∀ (n : ℕ), n < minimalPeriod f x → r (f^[n] x) (f^[n + 1] x)\n[PROOFSTEP]\nhave hx' := minimalPeriod_pos_of_mem_periodicPts hx\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nr : α → α → Prop\nf : α → α\nx : α\nhx : x ∈ periodicPts f\nhx' : 0 < minimalPeriod f x\n⊢ Cycle.Chain r (periodicOrbit f x) ↔ ∀ (n : ℕ), n < minimalPeriod f x → r (f^[n] x) (f^[n + 1] x)\n[PROOFSTEP]\nhave hM := Nat.sub_add_cancel (succ_le_iff.2 hx')\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nr : α → α → Prop\nf : α → α\nx : α\nhx : x ∈ periodicPts f\nhx' : 0 < minimalPeriod f x\nhM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x\n⊢ Cycle.Chain r (periodicOrbit f x) ↔ ∀ (n : ℕ), n < minimalPeriod f x → r (f^[n] x) (f^[n + 1] x)\n[PROOFSTEP]\nrw [periodicOrbit, ← Cycle.map_coe, Cycle.chain_map, ← hM, Cycle.chain_range_succ]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nr : α → α → Prop\nf : α → α\nx : α\nhx : x ∈ periodicPts f\nhx' : 0 < minimalPeriod f x\nhM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x\n⊢ (r (f^[minimalPeriod f x - succ 0] x) (f^[0] x) ∧\n ∀ (m : ℕ), m < minimalPeriod f x - succ 0 → r (f^[m] x) (f^[succ m] x)) ↔\n ∀ (n : ℕ), n < minimalPeriod f x - succ 0 + succ 0 → r (f^[n] x) (f^[n + 1] x)\n[PROOFSTEP]\nrefine' ⟨_, fun H => ⟨_, fun m hm => H _ (hm.trans (Nat.lt_succ_self _))⟩⟩\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nr : α → α → Prop\nf : α → α\nx : α\nhx : x ∈ periodicPts f\nhx' : 0 < minimalPeriod f x\nhM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x\n⊢ (r (f^[minimalPeriod f x - succ 0] x) (f^[0] x) ∧\n ∀ (m : ℕ), m < minimalPeriod f x - succ 0 → r (f^[m] x) (f^[succ m] x)) →\n ∀ (n : ℕ), n < minimalPeriod f x - succ 0 + succ 0 → r (f^[n] x) (f^[n + 1] x)\n[PROOFSTEP]\nrintro ⟨hr, H⟩ n hn\n[GOAL]\ncase pos.refine'_1.intro\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n✝ : ℕ\nr : α → α → Prop\nf : α → α\nx : α\nhx : x ∈ periodicPts f\nhx' : 0 < minimalPeriod f x\nhM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x\nhr : r (f^[minimalPeriod f x - succ 0] x) (f^[0] x)\nH : ∀ (m : ℕ), m < minimalPeriod f x - succ 0 → r (f^[m] x) (f^[succ m] x)\nn : ℕ\nhn : n < minimalPeriod f x - succ 0 + succ 0\n⊢ r (f^[n] x) (f^[n + 1] x)\n[PROOFSTEP]\ncases' eq_or_lt_of_le (lt_succ_iff.1 hn) with hM' hM'\n[GOAL]\ncase pos.refine'_1.intro.inl\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n✝ : ℕ\nr : α → α → Prop\nf : α → α\nx : α\nhx : x ∈ periodicPts f\nhx' : 0 < minimalPeriod f x\nhM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x\nhr : r (f^[minimalPeriod f x - succ 0] x) (f^[0] x)\nH : ∀ (m : ℕ), m < minimalPeriod f x - succ 0 → r (f^[m] x) (f^[succ m] x)\nn : ℕ\nhn : n < minimalPeriod f x - succ 0 + succ 0\nhM' : n = minimalPeriod f x - succ 0\n⊢ r (f^[n] x) (f^[n + 1] x)\n[PROOFSTEP]\nrwa [hM', hM, iterate_minimalPeriod]\n[GOAL]\ncase pos.refine'_1.intro.inr\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n✝ : ℕ\nr : α → α → Prop\nf : α → α\nx : α\nhx : x ∈ periodicPts f\nhx' : 0 < minimalPeriod f x\nhM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x\nhr : r (f^[minimalPeriod f x - succ 0] x) (f^[0] x)\nH : ∀ (m : ℕ), m < minimalPeriod f x - succ 0 → r (f^[m] x) (f^[succ m] x)\nn : ℕ\nhn : n < minimalPeriod f x - succ 0 + succ 0\nhM' : n < minimalPeriod f x - succ 0\n⊢ r (f^[n] x) (f^[n + 1] x)\n[PROOFSTEP]\nexact H _ hM'\n[GOAL]\ncase pos.refine'_2\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nr : α → α → Prop\nf : α → α\nx : α\nhx : x ∈ periodicPts f\nhx' : 0 < minimalPeriod f x\nhM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x\nH : ∀ (n : ℕ), n < minimalPeriod f x - succ 0 + succ 0 → r (f^[n] x) (f^[n + 1] x)\n⊢ r (f^[minimalPeriod f x - succ 0] x) (f^[0] x)\n[PROOFSTEP]\nrw [iterate_zero_apply]\n[GOAL]\ncase pos.refine'_2\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nr : α → α → Prop\nf : α → α\nx : α\nhx : x ∈ periodicPts f\nhx' : 0 < minimalPeriod f x\nhM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x\nH : ∀ (n : ℕ), n < minimalPeriod f x - succ 0 + succ 0 → r (f^[n] x) (f^[n + 1] x)\n⊢ r (f^[minimalPeriod f x - succ 0] x) x\n[PROOFSTEP]\nnth_rw 3 [← @iterate_minimalPeriod α f x]\n[GOAL]\ncase pos.refine'_2\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nr : α → α → Prop\nf : α → α\nx : α\nhx : x ∈ periodicPts f\nhx' : 0 < minimalPeriod f x\nhM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x\nH : ∀ (n : ℕ), n < minimalPeriod f x - succ 0 + succ 0 → r (f^[n] x) (f^[n + 1] x)\n⊢ r (f^[minimalPeriod f x - succ 0] x) (f^[minimalPeriod f x] x)\n[PROOFSTEP]\nnth_rw 2 [← hM]\n[GOAL]\ncase pos.refine'_2\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nr : α → α → Prop\nf : α → α\nx : α\nhx : x ∈ periodicPts f\nhx' : 0 < minimalPeriod f x\nhM : minimalPeriod f x - succ 0 + succ 0 = minimalPeriod f x\nH : ∀ (n : ℕ), n < minimalPeriod f x - succ 0 + succ 0 → r (f^[n] x) (f^[n + 1] x)\n⊢ r (f^[minimalPeriod f x - succ 0] x) (f^[minimalPeriod f x - succ 0 + succ 0] x)\n[PROOFSTEP]\nexact H _ (Nat.lt_succ_self _)\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nr : α → α → Prop\nf : α → α\nx : α\nhx : ¬x ∈ periodicPts f\n⊢ Cycle.Chain r (periodicOrbit f x) ↔ ∀ (n : ℕ), n < minimalPeriod f x → r (f^[n] x) (f^[n + 1] x)\n[PROOFSTEP]\nrw [periodicOrbit_eq_nil_of_not_periodic_pt hx, minimalPeriod_eq_zero_of_nmem_periodicPts hx]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nr : α → α → Prop\nf : α → α\nx : α\nhx : ¬x ∈ periodicPts f\n⊢ Cycle.Chain r Cycle.nil ↔ ∀ (n : ℕ), n < 0 → r (f^[n] x) (f^[n + 1] x)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nr : α → α → Prop\nf : α → α\nx : α\nhx : x ∈ periodicPts f\n⊢ Cycle.Chain r (periodicOrbit f x) ↔ ∀ (n : ℕ), r (f^[n] x) (f^[n + 1] x)\n[PROOFSTEP]\nrw [periodicOrbit_chain r]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n : ℕ\nr : α → α → Prop\nf : α → α\nx : α\nhx : x ∈ periodicPts f\n⊢ (∀ (n : ℕ), n < minimalPeriod f x → r (f^[n] x) (f^[n + 1] x)) ↔ ∀ (n : ℕ), r (f^[n] x) (f^[n + 1] x)\n[PROOFSTEP]\nrefine' ⟨fun H n => _, fun H n _ => H n⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n✝ : ℕ\nr : α → α → Prop\nf : α → α\nx : α\nhx : x ∈ periodicPts f\nH : ∀ (n : ℕ), n < minimalPeriod f x → r (f^[n] x) (f^[n + 1] x)\nn : ℕ\n⊢ r (f^[n] x) (f^[n + 1] x)\n[PROOFSTEP]\nrw [iterate_succ_apply, ← iterate_mod_minimalPeriod_eq, ← iterate_mod_minimalPeriod_eq (n := n), ← iterate_succ_apply,\n minimalPeriod_apply hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf✝ fa : α → α\nfb : β → β\nx✝ y : α\nm n✝ : ℕ\nr : α → α → Prop\nf : α → α\nx : α\nhx : x ∈ periodicPts f\nH : ∀ (n : ℕ), n < minimalPeriod f x → r (f^[n] x) (f^[n + 1] x)\nn : ℕ\n⊢ r (f^[n % minimalPeriod f x] x) (f^[succ (n % minimalPeriod f x)] x)\n[PROOFSTEP]\nexact H _ (mod_lt _ (minimalPeriod_pos_of_mem_periodicPts hx))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf✝ : α → α\ng✝ : β → β\nx : α × β\na : α\nb : β\nm n✝ : ℕ\nf : α → α\ng : β → β\nn : ℕ\n⊢ (Prod.map f g)^[n] = Prod.map f^[n] g^[n]\n[PROOFSTEP]\ninduction n\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nf✝ : α → α\ng✝ : β → β\nx : α × β\na : α\nb : β\nm n : ℕ\nf : α → α\ng : β → β\n⊢ (Prod.map f g)^[Nat.zero] = Prod.map f^[Nat.zero] g^[Nat.zero]\n[PROOFSTEP]\nsimp [*, Prod.map_comp_map]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nf✝ : α → α\ng✝ : β → β\nx : α × β\na : α\nb : β\nm n : ℕ\nf : α → α\ng : β → β\nn✝ : ℕ\nn_ih✝ : (Prod.map f g)^[n✝] = Prod.map f^[n✝] g^[n✝]\n⊢ (Prod.map f g)^[Nat.succ n✝] = Prod.map f^[Nat.succ n✝] g^[Nat.succ n✝]\n[PROOFSTEP]\nsimp [*, Prod.map_comp_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → α\ng : β → β\nx✝ : α × β\na : α\nb : β\nm n : ℕ\nx : α × β\n⊢ IsPeriodicPt (Prod.map f g) n x ↔ IsPeriodicPt f n x.fst ∧ IsPeriodicPt g n x.snd\n[PROOFSTEP]\nsimp [IsPeriodicPt]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf✝ : α → α\ng✝ : β → β\nx✝ : α × β\na : α\nb : β\nm n : ℕ\nf : α → α\ng : β → β\nx : α × β\n⊢ ∀ (c : ℕ), minimalPeriod (Prod.map f g) x ∣ c ↔ Nat.lcm (minimalPeriod f x.fst) (minimalPeriod g x.snd) ∣ c\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nf✝ : α → α\ng✝ : β → β\nx : α × β\na : α\nb : β\nm n : ℕ\nf : α → α\ng : β → β\nfst✝ : α\nsnd✝ : β\n⊢ ∀ (c : ℕ),\n minimalPeriod (Prod.map f g) (fst✝, snd✝) ∣ c ↔\n Nat.lcm (minimalPeriod f (fst✝, snd✝).fst) (minimalPeriod g (fst✝, snd✝).snd) ∣ c\n[PROOFSTEP]\nsimp [← isPeriodicPt_iff_minimalPeriod_dvd, Nat.lcm_dvd_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → α\ng : β → β\nx : α × β\na : α\nb : β\nm n : ℕ\n⊢ minimalPeriod f x.fst ∣ minimalPeriod (Prod.map f g) x\n[PROOFSTEP]\nrw [minimalPeriod_prod_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → α\ng : β → β\nx : α × β\na : α\nb : β\nm n : ℕ\n⊢ minimalPeriod f x.fst ∣ Nat.lcm (minimalPeriod f x.fst) (minimalPeriod g x.snd)\n[PROOFSTEP]\nexact Nat.dvd_lcm_left _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → α\ng : β → β\nx : α × β\na : α\nb : β\nm n : ℕ\n⊢ minimalPeriod g x.snd ∣ minimalPeriod (Prod.map f g) x\n[PROOFSTEP]\nrw [minimalPeriod_prod_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → α\ng : β → β\nx : α × β\na : α\nb : β\nm n : ℕ\n⊢ minimalPeriod g x.snd ∣ Nat.lcm (minimalPeriod f x.fst) (minimalPeriod g x.snd)\n[PROOFSTEP]\nexact Nat.dvd_lcm_right _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Group α\ninst✝ : MulAction α β\na : α\nb : β\nn : ℕ\n⊢ a ^ n • b = b ↔ minimalPeriod ((fun x x_1 => x • x_1) a) b ∣ n\n[PROOFSTEP]\nrw [← isPeriodicPt_iff_minimalPeriod_dvd, IsPeriodicPt, IsFixedPt, smul_iterate]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Group α\ninst✝ : MulAction α β\na : α\nb : β\nn : ℤ\n⊢ a ^ n • b = b ↔ ↑(minimalPeriod ((fun x x_1 => x • x_1) a) b) ∣ n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase ofNat\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Group α\ninst✝ : MulAction α β\na : α\nb : β\na✝ : ℕ\n⊢ a ^ Int.ofNat a✝ • b = b ↔ ↑(minimalPeriod ((fun x x_1 => x • x_1) a) b) ∣ Int.ofNat a✝\n[PROOFSTEP]\nrw [Int.ofNat_eq_coe, zpow_ofNat, Int.coe_nat_dvd, pow_smul_eq_iff_minimalPeriod_dvd]\n[GOAL]\ncase negSucc\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Group α\ninst✝ : MulAction α β\na : α\nb : β\na✝ : ℕ\n⊢ a ^ Int.negSucc a✝ • b = b ↔ ↑(minimalPeriod ((fun x x_1 => x • x_1) a) b) ∣ Int.negSucc a✝\n[PROOFSTEP]\nrw [Int.negSucc_coe, zpow_neg, zpow_ofNat, inv_smul_eq_iff, eq_comm, dvd_neg, Int.coe_nat_dvd,\n pow_smul_eq_iff_minimalPeriod_dvd]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Group α\ninst✝ : MulAction α β\na : α\nb : β\nn : ℕ\n⊢ a ^ (n % minimalPeriod ((fun x x_1 => x • x_1) a) b) • b = a ^ n • b\n[PROOFSTEP]\nconv_rhs =>\n rw [← Nat.mod_add_div n (minimalPeriod ((· • ·) a) b), pow_add, mul_smul,\n pow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Group α\ninst✝ : MulAction α β\na : α\nb : β\nn : ℕ\n| a ^ n • b\n[PROOFSTEP]\nrw [← Nat.mod_add_div n (minimalPeriod ((· • ·) a) b), pow_add, mul_smul,\n pow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Group α\ninst✝ : MulAction α β\na : α\nb : β\nn : ℕ\n| a ^ n • b\n[PROOFSTEP]\nrw [← Nat.mod_add_div n (minimalPeriod ((· • ·) a) b), pow_add, mul_smul,\n pow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Group α\ninst✝ : MulAction α β\na : α\nb : β\nn : ℕ\n| a ^ n • b\n[PROOFSTEP]\nrw [← Nat.mod_add_div n (minimalPeriod ((· • ·) a) b), pow_add, mul_smul,\n pow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Group α\ninst✝ : MulAction α β\na : α\nb : β\nn : ℤ\n⊢ a ^ (n % ↑(minimalPeriod ((fun x x_1 => x • x_1) a) b)) • b = a ^ n • b\n[PROOFSTEP]\nconv_rhs =>\n rw [← Int.emod_add_ediv n (minimalPeriod ((a • ·)) b), zpow_add, mul_smul,\n zpow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Group α\ninst✝ : MulAction α β\na : α\nb : β\nn : ℤ\n| a ^ n • b\n[PROOFSTEP]\nrw [← Int.emod_add_ediv n (minimalPeriod ((a • ·)) b), zpow_add, mul_smul,\n zpow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Group α\ninst✝ : MulAction α β\na : α\nb : β\nn : ℤ\n| a ^ n • b\n[PROOFSTEP]\nrw [← Int.emod_add_ediv n (minimalPeriod ((a • ·)) b), zpow_add, mul_smul,\n zpow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Group α\ninst✝ : MulAction α β\na : α\nb : β\nn : ℤ\n| a ^ n • b\n[PROOFSTEP]\nrw [← Int.emod_add_ediv n (minimalPeriod ((a • ·)) b), zpow_add, mul_smul,\n zpow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]\n", "meta": {"mathlib_filename": "Mathlib.Dynamics.PeriodicPts", "llama_tokens": 20096, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8104789178257653, "lm_q2_score": 0.7371581684030623, "lm_q1q2_score": 0.5974511545937372}} {"text": "[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasShift C ℤ\nT₁ T₂ T₃ A B : Triangle C\niso₁ : A.obj₁ ≅ B.obj₁\niso₂ : A.obj₂ ≅ B.obj₂\niso₃ : A.obj₃ ≅ B.obj₃\ncomm₁ : autoParam (A.mor₁ ≫ iso₂.hom = iso₁.hom ≫ B.mor₁) _auto✝\ncomm₂ : autoParam (A.mor₂ ≫ iso₃.hom = iso₂.hom ≫ B.mor₂) _auto✝\ncomm₃ : autoParam (A.mor₃ ≫ (shiftFunctor C 1).map iso₁.hom = iso₃.hom ≫ B.mor₃) _auto✝\n⊢ B.mor₁ ≫ iso₂.inv = iso₁.inv ≫ A.mor₁\n[PROOFSTEP]\nsimp only [← cancel_mono iso₂.hom, assoc, Iso.inv_hom_id, comp_id, comm₁, Iso.inv_hom_id_assoc]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasShift C ℤ\nT₁ T₂ T₃ A B : Triangle C\niso₁ : A.obj₁ ≅ B.obj₁\niso₂ : A.obj₂ ≅ B.obj₂\niso₃ : A.obj₃ ≅ B.obj₃\ncomm₁ : autoParam (A.mor₁ ≫ iso₂.hom = iso₁.hom ≫ B.mor₁) _auto✝\ncomm₂ : autoParam (A.mor₂ ≫ iso₃.hom = iso₂.hom ≫ B.mor₂) _auto✝\ncomm₃ : autoParam (A.mor₃ ≫ (shiftFunctor C 1).map iso₁.hom = iso₃.hom ≫ B.mor₃) _auto✝\n⊢ B.mor₂ ≫ iso₃.inv = iso₂.inv ≫ A.mor₂\n[PROOFSTEP]\nsimp only [← cancel_mono iso₃.hom, assoc, Iso.inv_hom_id, comp_id, comm₂, Iso.inv_hom_id_assoc]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasShift C ℤ\nT₁ T₂ T₃ A B : Triangle C\niso₁ : A.obj₁ ≅ B.obj₁\niso₂ : A.obj₂ ≅ B.obj₂\niso₃ : A.obj₃ ≅ B.obj₃\ncomm₁ : autoParam (A.mor₁ ≫ iso₂.hom = iso₁.hom ≫ B.mor₁) _auto✝\ncomm₂ : autoParam (A.mor₂ ≫ iso₃.hom = iso₂.hom ≫ B.mor₂) _auto✝\ncomm₃ : autoParam (A.mor₃ ≫ (shiftFunctor C 1).map iso₁.hom = iso₃.hom ≫ B.mor₃) _auto✝\n⊢ B.mor₃ ≫ (shiftFunctor C 1).map iso₁.inv = iso₃.inv ≫ A.mor₃\n[PROOFSTEP]\nsimp only [← cancel_mono (iso₁.hom⟦(1 : ℤ)⟧'), Category.assoc, comm₃, Iso.inv_hom_id_assoc, ← Functor.map_comp,\n Iso.inv_hom_id, Functor.map_id, Category.comp_id]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Triangulated.Basic", "llama_tokens": 915, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8006920020959544, "lm_q2_score": 0.7461389817407016, "lm_q1q2_score": 0.5974275151317991}} {"text": "[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝ : DivisionRing R\nn : ℕ\n⊢ ↑(-↑n) = -↑n\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : DivisionRing α\nm n : ℤ\nn_dvd : n ∣ m\nn_nonzero : ↑n ≠ 0\n⊢ ↑(m / n) = ↑m / ↑n\n[PROOFSTEP]\nrcases n_dvd with ⟨k, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : DivisionRing α\nn : ℤ\nn_nonzero : ↑n ≠ 0\nk : ℤ\n⊢ ↑(n * k / n) = ↑(n * k) / ↑n\n[PROOFSTEP]\nhave : n ≠ 0 := by\n rintro rfl\n simp at n_nonzero \n[GOAL]\nα : Type u_1\ninst✝ : DivisionRing α\nn : ℤ\nn_nonzero : ↑n ≠ 0\nk : ℤ\n⊢ n ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝ : DivisionRing α\nk : ℤ\nn_nonzero : ↑0 ≠ 0\n⊢ False\n[PROOFSTEP]\nsimp at n_nonzero \n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : DivisionRing α\nn : ℤ\nn_nonzero : ↑n ≠ 0\nk : ℤ\nthis : n ≠ 0\n⊢ ↑(n * k / n) = ↑(n * k) / ↑n\n[PROOFSTEP]\nrw [Int.mul_ediv_cancel_left _ this, mul_comm n k, Int.cast_mul, mul_div_cancel _ n_nonzero]\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.Cast.Field", "llama_tokens": 495, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8311430645886584, "lm_q2_score": 0.7185943805178139, "lm_q1q2_score": 0.5972547356197644}} {"text": "[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nx✝² x✝¹ : Opens α\ncarrier✝¹ : Set α\nis_open'✝¹ : IsOpen carrier✝¹\ncarrier✝ : Set α\nis_open'✝ : IsOpen carrier✝\nx✝ : { carrier := carrier✝¹, is_open' := is_open'✝¹ }.carrier = { carrier := carrier✝, is_open' := is_open'✝ }.carrier\n⊢ { carrier := carrier✝¹, is_open' := is_open'✝¹ } = { carrier := carrier✝, is_open' := is_open'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nι : Sort u_5\ns : ι → Opens α\n⊢ ↑(⨆ (i : ι), s i) = ⋃ (i : ι), ↑(s i)\n[PROOFSTEP]\nsimp [iSup]\n[GOAL]\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nι : Sort u_5\nx : α\ns : ι → Opens α\n⊢ x ∈ iSup s ↔ ∃ i, x ∈ s i\n[PROOFSTEP]\nrw [← SetLike.mem_coe]\n[GOAL]\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nι : Sort u_5\nx : α\ns : ι → Opens α\n⊢ x ∈ ↑(iSup s) ↔ ∃ i, x ∈ s i\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nUs : Set (Opens α)\nx : α\n⊢ x ∈ sSup Us ↔ ∃ u, u ∈ Us ∧ x ∈ u\n[PROOFSTEP]\nsimp_rw [sSup_eq_iSup, mem_iSup, exists_prop]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nsrc✝ : CompleteLattice (Opens α) := inferInstanceAs (CompleteLattice (Opens α))\na : Opens α\ns : Set (Opens α)\n⊢ ↑(a ⊓ sSup s) = ↑(⨆ (b : Opens α) (_ : b ∈ s), a ⊓ b)\n[PROOFSTEP]\nsimp only [coe_inf, coe_iSup, coe_sSup, Set.inter_iUnion₂]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nU V : Opens α\ni : U ≤ V\n⊢ IsOpen (range (inclusion (_ : ↑U ⊆ ↑V)))\n[PROOFSTEP]\nrw [Set.range_inclusion i]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nU V : Opens α\ni : U ≤ V\n⊢ IsOpen {x | ↑x ∈ ↑U}\n[PROOFSTEP]\nexact U.isOpen.preimage continuous_subtype_val\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nU : Opens α\n⊢ ¬Set.Nonempty ↑U ↔ U = ⊥\n[PROOFSTEP]\nrw [← coe_inj, coe_bot, ← Set.not_nonempty_iff_eq_empty]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nU : Opens α\n⊢ U ≠ ⊥ ↔ Set.Nonempty ↑U\n[PROOFSTEP]\nrw [Ne.def, ← not_nonempty_iff_eq_bot, not_not]\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α✝\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nα : Type u_5\nt : TopologicalSpace α\nh : t = ⊤\nU : Opens α\n⊢ U = ⊥ ∨ U = ⊤\n[PROOFSTEP]\nsubst h\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α✝\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nα : Type u_5\nU : Opens α\n⊢ U = ⊥ ∨ U = ⊤\n[PROOFSTEP]\nletI : TopologicalSpace α := ⊤\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α✝\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nα : Type u_5\nU : Opens α\nthis : TopologicalSpace α := ⊤\n⊢ U = ⊥ ∨ U = ⊤\n[PROOFSTEP]\nrw [← coe_eq_empty, ← coe_eq_univ, ← isOpen_top_iff]\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α✝\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nα : Type u_5\nU : Opens α\nthis : TopologicalSpace α := ⊤\n⊢ IsOpen ↑U\n[PROOFSTEP]\nexact U.2\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\n⊢ IsBasis B ↔ ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\n⊢ IsBasis B → ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\n⊢ (∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U) → IsBasis B\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nh : IsBasis B\n⊢ ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U\n[PROOFSTEP]\nrintro ⟨sU, hU⟩ x hx\n[GOAL]\ncase mp.mk\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nh : IsBasis B\nsU : Set α\nhU : IsOpen sU\nx : α\nhx : x ∈ { carrier := sU, is_open' := hU }\n⊢ ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ { carrier := sU, is_open' := hU }\n[PROOFSTEP]\nrcases h.mem_nhds_iff.mp (IsOpen.mem_nhds hU hx) with ⟨sV, ⟨⟨V, H₁, H₂⟩, hsV⟩⟩\n[GOAL]\ncase mp.mk.intro.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nh : IsBasis B\nsU : Set α\nhU : IsOpen sU\nx : α\nhx : x ∈ { carrier := sU, is_open' := hU }\nsV : Set α\nhsV : x ∈ sV ∧ sV ⊆ sU\nV : Opens α\nH₁ : V ∈ B\nH₂ : ↑V = sV\n⊢ ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ { carrier := sU, is_open' := hU }\n[PROOFSTEP]\nrefine' ⟨V, H₁, _⟩\n[GOAL]\ncase mp.mk.intro.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nh : IsBasis B\nsU : Set α\nhU : IsOpen sU\nx : α\nhx : x ∈ { carrier := sU, is_open' := hU }\nsV : Set α\nhsV : x ∈ sV ∧ sV ⊆ sU\nV : Opens α\nH₁ : V ∈ B\nH₂ : ↑V = sV\n⊢ x ∈ V ∧ V ≤ { carrier := sU, is_open' := hU }\n[PROOFSTEP]\ncases V\n[GOAL]\ncase mp.mk.intro.intro.intro.intro.mk\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nh : IsBasis B\nsU : Set α\nhU : IsOpen sU\nx : α\nhx : x ∈ { carrier := sU, is_open' := hU }\nsV : Set α\nhsV : x ∈ sV ∧ sV ⊆ sU\ncarrier✝ : Set α\nis_open'✝ : IsOpen carrier✝\nH₁ : { carrier := carrier✝, is_open' := is_open'✝ } ∈ B\nH₂ : ↑{ carrier := carrier✝, is_open' := is_open'✝ } = sV\n⊢ x ∈ { carrier := carrier✝, is_open' := is_open'✝ } ∧\n { carrier := carrier✝, is_open' := is_open'✝ } ≤ { carrier := sU, is_open' := hU }\n[PROOFSTEP]\ndsimp at H₂ \n[GOAL]\ncase mp.mk.intro.intro.intro.intro.mk\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nh : IsBasis B\nsU : Set α\nhU : IsOpen sU\nx : α\nhx : x ∈ { carrier := sU, is_open' := hU }\nsV : Set α\nhsV : x ∈ sV ∧ sV ⊆ sU\ncarrier✝ : Set α\nis_open'✝ : IsOpen carrier✝\nH₁ : { carrier := carrier✝, is_open' := is_open'✝ } ∈ B\nH₂ : carrier✝ = sV\n⊢ x ∈ { carrier := carrier✝, is_open' := is_open'✝ } ∧\n { carrier := carrier✝, is_open' := is_open'✝ } ≤ { carrier := sU, is_open' := hU }\n[PROOFSTEP]\nsubst H₂\n[GOAL]\ncase mp.mk.intro.intro.intro.intro.mk\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nh : IsBasis B\nsU : Set α\nhU : IsOpen sU\nx : α\nhx : x ∈ { carrier := sU, is_open' := hU }\ncarrier✝ : Set α\nis_open'✝ : IsOpen carrier✝\nH₁ : { carrier := carrier✝, is_open' := is_open'✝ } ∈ B\nhsV : x ∈ carrier✝ ∧ carrier✝ ⊆ sU\n⊢ x ∈ { carrier := carrier✝, is_open' := is_open'✝ } ∧\n { carrier := carrier✝, is_open' := is_open'✝ } ≤ { carrier := sU, is_open' := hU }\n[PROOFSTEP]\nexact hsV\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nh : ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U\n⊢ IsBasis B\n[PROOFSTEP]\nrefine' isTopologicalBasis_of_open_of_nhds _ _\n[GOAL]\ncase mpr.refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nh : ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U\n⊢ ∀ (u : Set α), u ∈ SetLike.coe '' B → IsOpen u\n[PROOFSTEP]\nrintro sU ⟨U, -, rfl⟩\n[GOAL]\ncase mpr.refine'_1.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nh : ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U\nU : Opens α\n⊢ IsOpen ↑U\n[PROOFSTEP]\nexact U.2\n[GOAL]\ncase mpr.refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nh : ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U\n⊢ ∀ (a : α) (u : Set α), a ∈ u → IsOpen u → ∃ v, v ∈ SetLike.coe '' B ∧ a ∈ v ∧ v ⊆ u\n[PROOFSTEP]\nintro x sU hx hsU\n[GOAL]\ncase mpr.refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nh : ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U\nx : α\nsU : Set α\nhx : x ∈ sU\nhsU : IsOpen sU\n⊢ ∃ v, v ∈ SetLike.coe '' B ∧ x ∈ v ∧ v ⊆ sU\n[PROOFSTEP]\nrcases@h ⟨sU, hsU⟩ x hx with ⟨V, hV, H⟩\n[GOAL]\ncase mpr.refine'_2.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nh : ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U\nx : α\nsU : Set α\nhx : x ∈ sU\nhsU : IsOpen sU\nV : Opens α\nhV : V ∈ B\nH : x ∈ V ∧ V ≤ { carrier := sU, is_open' := hsU }\n⊢ ∃ v, v ∈ SetLike.coe '' B ∧ x ∈ v ∧ v ⊆ sU\n[PROOFSTEP]\nexact ⟨V, ⟨V, hV, rfl⟩, H⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\n⊢ IsBasis B ↔ ∀ (U : Opens α), ∃ Us, Us ⊆ B ∧ U = sSup Us\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\n⊢ IsBasis B → ∀ (U : Opens α), ∃ Us, Us ⊆ B ∧ U = sSup Us\n[PROOFSTEP]\nintro hB U\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nhB : IsBasis B\nU : Opens α\n⊢ ∃ Us, Us ⊆ B ∧ U = sSup Us\n[PROOFSTEP]\nrefine ⟨{V : Opens α | V ∈ B ∧ V ≤ U}, fun U hU => hU.left, ext ?_⟩\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nhB : IsBasis B\nU : Opens α\n⊢ ↑U = ↑(sSup {V | V ∈ B ∧ V ≤ U})\n[PROOFSTEP]\nrw [coe_sSup, hB.open_eq_sUnion' U.isOpen]\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nhB : IsBasis B\nU : Opens α\n⊢ ⋃₀ {s | s ∈ SetLike.coe '' B ∧ s ⊆ ↑U} = ⋃ (i : Opens α) (_ : i ∈ {V | V ∈ B ∧ V ≤ U}), ↑i\n[PROOFSTEP]\nsimp_rw [sUnion_eq_biUnion, iUnion, mem_setOf_eq, iSup_and, iSup_image]\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nhB : IsBasis B\nU : Opens α\n⊢ ⨆ (b : Opens α) (_ : b ∈ B) (_ : ↑b ⊆ ↑U), ↑b = ⨆ (i : Opens α) (_ : i ∈ B) (_ : i ≤ U), ↑i\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\n⊢ (∀ (U : Opens α), ∃ Us, Us ⊆ B ∧ U = sSup Us) → IsBasis B\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nh : ∀ (U : Opens α), ∃ Us, Us ⊆ B ∧ U = sSup Us\n⊢ IsBasis B\n[PROOFSTEP]\nrw [isBasis_iff_nbhd]\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nh : ∀ (U : Opens α), ∃ Us, Us ⊆ B ∧ U = sSup Us\n⊢ ∀ {U : Opens α} {x : α}, x ∈ U → ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U\n[PROOFSTEP]\nintro U x hx\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nh : ∀ (U : Opens α), ∃ Us, Us ⊆ B ∧ U = sSup Us\nU : Opens α\nx : α\nhx : x ∈ U\n⊢ ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ U\n[PROOFSTEP]\nrcases h U with ⟨Us, hUs, rfl⟩\n[GOAL]\ncase mpr.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nh : ∀ (U : Opens α), ∃ Us, Us ⊆ B ∧ U = sSup Us\nx : α\nUs : Set (Opens α)\nhUs : Us ⊆ B\nhx : x ∈ sSup Us\n⊢ ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ sSup Us\n[PROOFSTEP]\nrcases mem_sSup.1 hx with ⟨U, Us, xU⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nB : Set (Opens α)\nh : ∀ (U : Opens α), ∃ Us, Us ⊆ B ∧ U = sSup Us\nx : α\nUs✝ : Set (Opens α)\nhUs : Us✝ ⊆ B\nhx : x ∈ sSup Us✝\nU : Opens α\nUs : U ∈ Us✝\nxU : x ∈ U\n⊢ ∃ U', U' ∈ B ∧ x ∈ U' ∧ U' ≤ sSup Us✝\n[PROOFSTEP]\nexact ⟨U, hUs Us, xU, le_sSup Us⟩\n[GOAL]\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nι : Type u_5\nb : ι → Opens α\nhb : IsBasis (range b)\nhb' : ∀ (i : ι), IsCompact ↑(b i)\nU : Set α\n⊢ IsCompact U ∧ IsOpen U ↔ ∃ s, Set.Finite s ∧ U = ⋃ (i : ι) (_ : i ∈ s), ↑(b i)\n[PROOFSTEP]\napply isCompact_open_iff_eq_finite_iUnion_of_isTopologicalBasis fun i : ι => (b i).1\n[GOAL]\ncase hb\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nι : Type u_5\nb : ι → Opens α\nhb : IsBasis (range b)\nhb' : ∀ (i : ι), IsCompact ↑(b i)\nU : Set α\n⊢ IsTopologicalBasis (range fun i => (b i).carrier)\n[PROOFSTEP]\nconvert (config := { transparency := .default }) hb\n[GOAL]\ncase h.e'_3\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nι : Type u_5\nb : ι → Opens α\nhb : IsBasis (range b)\nhb' : ∀ (i : ι), IsCompact ↑(b i)\nU : Set α\n⊢ (range fun i => (b i).carrier) = SetLike.coe '' range b\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_3.h\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nι : Type u_5\nb : ι → Opens α\nhb : IsBasis (range b)\nhb' : ∀ (i : ι), IsCompact ↑(b i)\nU x✝ : Set α\n⊢ (x✝ ∈ range fun i => (b i).carrier) ↔ x✝ ∈ SetLike.coe '' range b\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hb'\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nι : Type u_5\nb : ι → Opens α\nhb : IsBasis (range b)\nhb' : ∀ (i : ι), IsCompact ↑(b i)\nU : Set α\n⊢ ∀ (i : ι), IsCompact (b i).carrier\n[PROOFSTEP]\nexact hb'\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Opens α\n⊢ CompleteLattice.IsCompactElement s ↔ IsCompact ↑s\n[PROOFSTEP]\nrw [isCompact_iff_finite_subcover, CompleteLattice.isCompactElement_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Opens α\n⊢ (∀ (ι : Type u_2) (s_1 : ι → Opens α), s ≤ iSup s_1 → ∃ t, s ≤ Finset.sup t s_1) ↔\n ∀ {ι : Type u_2} (U : ι → Set α),\n (∀ (i : ι), IsOpen (U i)) → ↑s ⊆ ⋃ (i : ι), U i → ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i\n[PROOFSTEP]\nrefine' ⟨_, fun H ι U hU => _⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Opens α\n⊢ (∀ (ι : Type u_2) (s_1 : ι → Opens α), s ≤ iSup s_1 → ∃ t, s ≤ Finset.sup t s_1) →\n ∀ {ι : Type u_2} (U : ι → Set α),\n (∀ (i : ι), IsOpen (U i)) → ↑s ⊆ ⋃ (i : ι), U i → ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i\n[PROOFSTEP]\nintrov H hU hU'\n[GOAL]\ncase refine'_1\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Opens α\nH : ∀ (ι : Type u_2) (s_1 : ι → Opens α), s ≤ iSup s_1 → ∃ t, s ≤ Finset.sup t s_1\nι : Type u_2\nU : ι → Set α\nhU : ∀ (i : ι), IsOpen (U i)\nhU' : ↑s ⊆ ⋃ (i : ι), U i\n⊢ ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i\n[PROOFSTEP]\nobtain ⟨t, ht⟩ := H ι (fun i => ⟨U i, hU i⟩) (by simpa)\n[GOAL]\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Opens α\nH : ∀ (ι : Type u_2) (s_1 : ι → Opens α), s ≤ iSup s_1 → ∃ t, s ≤ Finset.sup t s_1\nι : Type u_2\nU : ι → Set α\nhU : ∀ (i : ι), IsOpen (U i)\nhU' : ↑s ⊆ ⋃ (i : ι), U i\n⊢ s ≤ ⨆ (i : ι), { carrier := U i, is_open' := (_ : IsOpen (U i)) }\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase refine'_1.intro\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Opens α\nH : ∀ (ι : Type u_2) (s_1 : ι → Opens α), s ≤ iSup s_1 → ∃ t, s ≤ Finset.sup t s_1\nι : Type u_2\nU : ι → Set α\nhU : ∀ (i : ι), IsOpen (U i)\nhU' : ↑s ⊆ ⋃ (i : ι), U i\nt : Finset ι\nht : s ≤ Finset.sup t fun i => { carrier := U i, is_open' := (_ : IsOpen (U i)) }\n⊢ ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i\n[PROOFSTEP]\nrefine' ⟨t, Set.Subset.trans ht _⟩\n[GOAL]\ncase refine'_1.intro\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Opens α\nH : ∀ (ι : Type u_2) (s_1 : ι → Opens α), s ≤ iSup s_1 → ∃ t, s ≤ Finset.sup t s_1\nι : Type u_2\nU : ι → Set α\nhU : ∀ (i : ι), IsOpen (U i)\nhU' : ↑s ⊆ ⋃ (i : ι), U i\nt : Finset ι\nht : s ≤ Finset.sup t fun i => { carrier := U i, is_open' := (_ : IsOpen (U i)) }\n⊢ ↑(Finset.sup t fun i => { carrier := U i, is_open' := (_ : IsOpen (U i)) }) ⊆ ⋃ (i : ι) (_ : i ∈ t), U i\n[PROOFSTEP]\nrw [coe_finset_sup, Finset.sup_eq_iSup]\n[GOAL]\ncase refine'_1.intro\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Opens α\nH : ∀ (ι : Type u_2) (s_1 : ι → Opens α), s ≤ iSup s_1 → ∃ t, s ≤ Finset.sup t s_1\nι : Type u_2\nU : ι → Set α\nhU : ∀ (i : ι), IsOpen (U i)\nhU' : ↑s ⊆ ⋃ (i : ι), U i\nt : Finset ι\nht : s ≤ Finset.sup t fun i => { carrier := U i, is_open' := (_ : IsOpen (U i)) }\n⊢ ⨆ (a : ι) (_ : a ∈ t), (SetLike.coe ∘ fun i => { carrier := U i, is_open' := (_ : IsOpen (U i)) }) a ⊆\n ⋃ (i : ι) (_ : i ∈ t), U i\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Opens α\nH :\n ∀ {ι : Type u_2} (U : ι → Set α),\n (∀ (i : ι), IsOpen (U i)) → ↑s ⊆ ⋃ (i : ι), U i → ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i\nι : Type u_2\nU : ι → Opens α\nhU : s ≤ iSup U\n⊢ ∃ t, s ≤ Finset.sup t U\n[PROOFSTEP]\nobtain ⟨t, ht⟩ := H (fun i => U i) (fun i => (U i).isOpen) (by simpa using show (s : Set α) ⊆ ↑(iSup U) from hU)\n[GOAL]\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Opens α\nH :\n ∀ {ι : Type u_2} (U : ι → Set α),\n (∀ (i : ι), IsOpen (U i)) → ↑s ⊆ ⋃ (i : ι), U i → ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i\nι : Type u_2\nU : ι → Opens α\nhU : s ≤ iSup U\n⊢ ↑s ⊆ ⋃ (i : ι), (fun i => ↑(U i)) i\n[PROOFSTEP]\nsimpa using show (s : Set α) ⊆ ↑(iSup U) from hU\n[GOAL]\ncase refine'_2.intro\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Opens α\nH :\n ∀ {ι : Type u_2} (U : ι → Set α),\n (∀ (i : ι), IsOpen (U i)) → ↑s ⊆ ⋃ (i : ι), U i → ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i\nι : Type u_2\nU : ι → Opens α\nhU : s ≤ iSup U\nt : Finset ι\nht : ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(U i)\n⊢ ∃ t, s ≤ Finset.sup t U\n[PROOFSTEP]\nrefine' ⟨t, Set.Subset.trans ht _⟩\n[GOAL]\ncase refine'_2.intro\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Opens α\nH :\n ∀ {ι : Type u_2} (U : ι → Set α),\n (∀ (i : ι), IsOpen (U i)) → ↑s ⊆ ⋃ (i : ι), U i → ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i\nι : Type u_2\nU : ι → Opens α\nhU : s ≤ iSup U\nt : Finset ι\nht : ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(U i)\n⊢ ⋃ (i : ι) (_ : i ∈ t), ↑(U i) ⊆ ↑(Finset.sup t U)\n[PROOFSTEP]\nsimp only [Set.iUnion_subset_iff]\n[GOAL]\ncase refine'_2.intro\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Opens α\nH :\n ∀ {ι : Type u_2} (U : ι → Set α),\n (∀ (i : ι), IsOpen (U i)) → ↑s ⊆ ⋃ (i : ι), U i → ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i\nι : Type u_2\nU : ι → Opens α\nhU : s ≤ iSup U\nt : Finset ι\nht : ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(U i)\n⊢ ∀ (i : ι), i ∈ t → ↑(U i) ⊆ ↑(Finset.sup t U)\n[PROOFSTEP]\nshow ∀ i ∈ t, U i ≤ t.sup U\n[GOAL]\ncase refine'_2.intro\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Opens α\nH :\n ∀ {ι : Type u_2} (U : ι → Set α),\n (∀ (i : ι), IsOpen (U i)) → ↑s ⊆ ⋃ (i : ι), U i → ∃ t, ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), U i\nι : Type u_2\nU : ι → Opens α\nhU : s ≤ iSup U\nt : Finset ι\nht : ↑s ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(U i)\n⊢ ∀ (i : ι), i ∈ t → U i ≤ Finset.sup t U\n[PROOFSTEP]\nexact fun i => Finset.le_sup\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : C(α, β)\ns : Set (Opens β)\n⊢ ↑(InfHom.toFun\n {\n toInfHom :=\n { toFun := fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) },\n map_inf' :=\n (_ :\n ∀ (a b : Opens β),\n (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) }) (a ⊓ b) =\n (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) }) (a ⊓ b)) },\n map_top' :=\n (_ :\n InfHom.toFun\n { toFun := fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) },\n map_inf' :=\n (_ :\n ∀ (a b : Opens β),\n (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) }) (a ⊓ b) =\n (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) })\n (a ⊓ b)) }\n ⊤ =\n InfHom.toFun\n { toFun := fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) },\n map_inf' :=\n (_ :\n ∀ (a b : Opens β),\n (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) }) (a ⊓ b) =\n (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) })\n (a ⊓ b)) }\n ⊤) }.toInfHom\n (sSup s)) =\n ↑(sSup\n ({\n toInfHom :=\n { toFun := fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) },\n map_inf' :=\n (_ :\n ∀ (a b : Opens β),\n (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) }) (a ⊓ b) =\n (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) }) (a ⊓ b)) },\n map_top' :=\n (_ :\n InfHom.toFun\n { toFun := fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) },\n map_inf' :=\n (_ :\n ∀ (a b : Opens β),\n (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) })\n (a ⊓ b) =\n (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) })\n (a ⊓ b)) }\n ⊤ =\n InfHom.toFun\n { toFun := fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) },\n map_inf' :=\n (_ :\n ∀ (a b : Opens β),\n (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) })\n (a ⊓ b) =\n (fun s => { carrier := ↑f ⁻¹' ↑s, is_open' := (_ : IsOpen (↑f ⁻¹' s.carrier)) })\n (a ⊓ b)) }\n ⊤) }.toInfHom.toFun ''\n s))\n[PROOFSTEP]\nsimp only [coe_sSup, preimage_iUnion, biUnion_image, coe_mk]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : α ≃ₜ β\n⊢ ∀ {a b : Opens α},\n ↑{ toFun := ↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f))),\n invFun := ↑(comap (Homeomorph.toContinuousMap f)),\n left_inv :=\n (_ :\n ∀ (U : Opens α),\n ↑(comap (Homeomorph.toContinuousMap f))\n (↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f))) U) =\n U),\n right_inv :=\n (_ :\n ∀ (U : Opens β),\n ↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f)))\n (↑(comap (Homeomorph.toContinuousMap f)) U) =\n U) }\n a ≤\n ↑{ toFun := ↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f))),\n invFun := ↑(comap (Homeomorph.toContinuousMap f)),\n left_inv :=\n (_ :\n ∀ (U : Opens α),\n ↑(comap (Homeomorph.toContinuousMap f))\n (↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f))) U) =\n U),\n right_inv :=\n (_ :\n ∀ (U : Opens β),\n ↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f)))\n (↑(comap (Homeomorph.toContinuousMap f)) U) =\n U) }\n b ↔\n a ≤ b\n[PROOFSTEP]\nsimp only [← SetLike.coe_subset_coe]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : α ≃ₜ β\n⊢ ∀ {a b : Opens α},\n ↑(↑{ toFun := ↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f))),\n invFun := ↑(comap (Homeomorph.toContinuousMap f)),\n left_inv :=\n (_ :\n ∀ (U : Opens α),\n ↑(comap (Homeomorph.toContinuousMap f))\n (↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f))) U) =\n U),\n right_inv :=\n (_ :\n ∀ (U : Opens β),\n ↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f)))\n (↑(comap (Homeomorph.toContinuousMap f)) U) =\n U) }\n a) ⊆\n ↑(↑{ toFun := ↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f))),\n invFun := ↑(comap (Homeomorph.toContinuousMap f)),\n left_inv :=\n (_ :\n ∀ (U : Opens α),\n ↑(comap (Homeomorph.toContinuousMap f))\n (↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f))) U) =\n U),\n right_inv :=\n (_ :\n ∀ (U : Opens β),\n ↑(comap (Homeomorph.toContinuousMap (Homeomorph.symm f)))\n (↑(comap (Homeomorph.toContinuousMap f)) U) =\n U) }\n b) ↔\n ↑a ⊆ ↑b\n[PROOFSTEP]\nexact f.symm.surjective.preimage_subset_preimage_iff\n", "meta": {"mathlib_filename": "Mathlib.Topology.Sets.Opens", "llama_tokens": 14218, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.831143031127974, "lm_q2_score": 0.7185943925708561, "lm_q1q2_score": 0.5972547215929067}} {"text": "[GOAL]\n⊢ ↑LinearMap.det (AlgEquiv.toLinearMap conjAe) = -1\n[PROOFSTEP]\nrw [← LinearMap.det_toMatrix basisOneI, toMatrix_conjAe, Matrix.det_fin_two_of]\n[GOAL]\n⊢ 1 * -1 - 0 * 0 = -1\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ ↑LinearEquiv.det (AlgEquiv.toLinearEquiv conjAe) = -1\n[PROOFSTEP]\nrw [← Units.eq_iff, LinearEquiv.coe_det, AlgEquiv.toLinearEquiv_toLinearMap, det_conjAe, Units.coe_neg_one]\n", "meta": {"mathlib_filename": "Mathlib.Data.Complex.Determinant", "llama_tokens": 183, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8539127529517042, "lm_q2_score": 0.6992544335934766, "lm_q1q2_score": 0.5971022784034903}} {"text": "[GOAL]\nm n : ℕ\n⊢ ↑m - ↑n ≤ ↑(m - n)\n[PROOFSTEP]\nby_cases h : m ≥ n\n[GOAL]\ncase pos\nm n : ℕ\nh : m ≥ n\n⊢ ↑m - ↑n ≤ ↑(m - n)\n[PROOFSTEP]\nexact le_of_eq (Int.ofNat_sub h).symm\n[GOAL]\ncase neg\nm n : ℕ\nh : ¬m ≥ n\n⊢ ↑m - ↑n ≤ ↑(m - n)\n[PROOFSTEP]\nsimp [le_of_not_ge h, ofNat_le]\n[GOAL]\nn : ℕ\n⊢ 0 ≤ ↑n\n[PROOFSTEP]\nsimp\n[GOAL]\na✝ b✝ : ℤ\nn : ℕ\na b : ℤ\n⊢ natAbs a = natAbs b ↔ a ^ 2 = b ^ 2\n[PROOFSTEP]\nrw [sq, sq]\n[GOAL]\na✝ b✝ : ℤ\nn : ℕ\na b : ℤ\n⊢ natAbs a = natAbs b ↔ a * a = b * b\n[PROOFSTEP]\nexact natAbs_eq_iff_mul_self_eq\n[GOAL]\na✝ b✝ : ℤ\nn : ℕ\na b : ℤ\n⊢ natAbs a < natAbs b ↔ a ^ 2 < b ^ 2\n[PROOFSTEP]\nrw [sq, sq]\n[GOAL]\na✝ b✝ : ℤ\nn : ℕ\na b : ℤ\n⊢ natAbs a < natAbs b ↔ a * a < b * b\n[PROOFSTEP]\nexact natAbs_lt_iff_mul_self_lt\n[GOAL]\na✝ b✝ : ℤ\nn : ℕ\na b : ℤ\n⊢ natAbs a ≤ natAbs b ↔ a ^ 2 ≤ b ^ 2\n[PROOFSTEP]\nrw [sq, sq]\n[GOAL]\na✝ b✝ : ℤ\nn : ℕ\na b : ℤ\n⊢ natAbs a ≤ natAbs b ↔ a * a ≤ b * b\n[PROOFSTEP]\nexact natAbs_le_iff_mul_self_le\n[GOAL]\na✝ b✝ : ℤ\nn : ℕ\na b : ℤ\nha : 0 ≤ a\nhb : 0 ≤ b\n⊢ natAbs a = natAbs b ↔ a = b\n[PROOFSTEP]\nrw [← sq_eq_sq ha hb, ← natAbs_eq_iff_sq_eq]\n[GOAL]\na✝ b✝ : ℤ\nn : ℕ\na b : ℤ\nha : a ≤ 0\nhb : b ≤ 0\n⊢ natAbs a = natAbs b ↔ a = b\n[PROOFSTEP]\nsimpa only [Int.natAbs_neg, neg_inj] using\n natAbs_inj_of_nonneg_of_nonneg (neg_nonneg_of_nonpos ha) (neg_nonneg_of_nonpos hb)\n[GOAL]\na✝ b✝ : ℤ\nn : ℕ\na b : ℤ\nha : 0 ≤ a\nhb : b ≤ 0\n⊢ natAbs a = natAbs b ↔ a = -b\n[PROOFSTEP]\nsimpa only [Int.natAbs_neg] using natAbs_inj_of_nonneg_of_nonneg ha (neg_nonneg_of_nonpos hb)\n[GOAL]\na✝ b✝ : ℤ\nn : ℕ\na b : ℤ\nha : a ≤ 0\nhb : 0 ≤ b\n⊢ natAbs a = natAbs b ↔ -a = b\n[PROOFSTEP]\nsimpa only [Int.natAbs_neg] using natAbs_inj_of_nonneg_of_nonneg (neg_nonneg_of_nonpos ha) hb\n[GOAL]\na✝ b✝ : ℤ\nn : ℕ\na : ℤ\nx✝ : a ∈ Iic 0\nb : ℤ\nhb : b ∈ Iic 0\nhab : a < b\n⊢ natAbs b < natAbs a\n[PROOFSTEP]\nsimpa [Int.natAbs_neg] using natAbs_lt_natAbs_of_nonneg_of_lt (Right.nonneg_neg_iff.mpr hb) (neg_lt_neg_iff.mpr hab)\n[GOAL]\na b : ℤ\nn✝ n : ℕ\nh : ↑(n + 1) ≤ 0\n⊢ 0 < ↑(n + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\na b✝ : ℤ\nn✝ : ℕ\nb : Bool\nn : ℤ\n⊢ div2 (bit b n) = n\n[PROOFSTEP]\nrw [bit_val, div2_val, add_comm, Int.add_mul_ediv_left, (_ : (_ / 2 : ℤ) = 0), zero_add]\n[GOAL]\na b✝ : ℤ\nn✝ : ℕ\nb : Bool\nn : ℤ\n⊢ (bif b then 1 else 0) / 2 = 0\ncase H a b✝ : ℤ n✝ : ℕ b : Bool n : ℤ ⊢ 2 ≠ 0\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\na b : ℤ\nn✝ : ℕ\nn : ℤ\n⊢ (bif false then 1 else 0) / 2 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true\na b : ℤ\nn✝ : ℕ\nn : ℤ\n⊢ (bif true then 1 else 0) / 2 = 0\n[PROOFSTEP]\nshow ofNat _ = _\n[GOAL]\ncase true\na b : ℤ\nn✝ : ℕ\nn : ℤ\n⊢ ofNat (1 / 2) = 0\n[PROOFSTEP]\nrw [Nat.div_eq_zero]\n[GOAL]\ncase true\na b : ℤ\nn✝ : ℕ\nn : ℤ\n⊢ ofNat 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true\na b : ℤ\nn✝ : ℕ\nn : ℤ\n⊢ 1 < 2\n[PROOFSTEP]\nsimp\n[GOAL]\ncase H\na b✝ : ℤ\nn✝ : ℕ\nb : Bool\nn : ℤ\n⊢ 2 ≠ 0\n[PROOFSTEP]\ndecide\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.Lemmas", "llama_tokens": 1778, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.853912760387131, "lm_q2_score": 0.6992544147913993, "lm_q1q2_score": 0.5971022675474117}} {"text": "[GOAL]\nM : Type u_1\nG : Type u_2\nα : Type u_3\ninst✝⁵ : Monoid M\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace α\ninst✝² : MulAction M α\ninst✝¹ : MulAction G α\ninst✝ : ContinuousConstSMul M α\n⊢ IsMinimal M α ↔ ∀ (s : Set α), IsClosed s → (∀ (c : M), c • s ⊆ s) → s = ∅ ∨ s = univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nM : Type u_1\nG : Type u_2\nα : Type u_3\ninst✝⁵ : Monoid M\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace α\ninst✝² : MulAction M α\ninst✝¹ : MulAction G α\ninst✝ : ContinuousConstSMul M α\n⊢ IsMinimal M α → ∀ (s : Set α), IsClosed s → (∀ (c : M), c • s ⊆ s) → s = ∅ ∨ s = univ\n[PROOFSTEP]\nintro _ _\n[GOAL]\ncase mp\nM : Type u_1\nG : Type u_2\nα : Type u_3\ninst✝⁵ : Monoid M\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace α\ninst✝² : MulAction M α\ninst✝¹ : MulAction G α\ninst✝ : ContinuousConstSMul M α\na✝ : IsMinimal M α\ns✝ : Set α\n⊢ IsClosed s✝ → (∀ (c : M), c • s✝ ⊆ s✝) → s✝ = ∅ ∨ s✝ = univ\n[PROOFSTEP]\nexact eq_empty_or_univ_of_smul_invariant_closed M\n[GOAL]\ncase mpr\nM : Type u_1\nG : Type u_2\nα : Type u_3\ninst✝⁵ : Monoid M\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace α\ninst✝² : MulAction M α\ninst✝¹ : MulAction G α\ninst✝ : ContinuousConstSMul M α\n⊢ (∀ (s : Set α), IsClosed s → (∀ (c : M), c • s ⊆ s) → s = ∅ ∨ s = univ) → IsMinimal M α\n[PROOFSTEP]\nrefine' fun H ↦ ⟨fun _ ↦ dense_iff_closure_eq.2 <| (H _ _ _).resolve_left _⟩\n[GOAL]\ncase mpr.refine'_1\nM : Type u_1\nG : Type u_2\nα : Type u_3\ninst✝⁵ : Monoid M\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace α\ninst✝² : MulAction M α\ninst✝¹ : MulAction G α\ninst✝ : ContinuousConstSMul M α\nH : ∀ (s : Set α), IsClosed s → (∀ (c : M), c • s ⊆ s) → s = ∅ ∨ s = univ\nx✝ : α\n⊢ IsClosed (closure (orbit M x✝))\ncase mpr.refine'_2\nM : Type u_1\nG : Type u_2\nα : Type u_3\ninst✝⁵ : Monoid M\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace α\ninst✝² : MulAction M α\ninst✝¹ : MulAction G α\ninst✝ : ContinuousConstSMul M α\nH : ∀ (s : Set α), IsClosed s → (∀ (c : M), c • s ⊆ s) → s = ∅ ∨ s = univ\nx✝ : α\n⊢ ∀ (c : M), c • closure (orbit M x✝) ⊆ closure (orbit M x✝)\ncase mpr.refine'_3\nM : Type u_1\nG : Type u_2\nα : Type u_3\ninst✝⁵ : Monoid M\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace α\ninst✝² : MulAction M α\ninst✝¹ : MulAction G α\ninst✝ : ContinuousConstSMul M α\nH : ∀ (s : Set α), IsClosed s → (∀ (c : M), c • s ⊆ s) → s = ∅ ∨ s = univ\nx✝ : α\n⊢ ¬closure (orbit M x✝) = ∅\n[PROOFSTEP]\nexacts [isClosed_closure, fun _ ↦ smul_closure_orbit_subset _ _, (orbit_nonempty _).closure.ne_empty]\n", "meta": {"mathlib_filename": "Mathlib.Dynamics.Minimal", "llama_tokens": 1232, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8539127492339909, "lm_q2_score": 0.6992544210587585, "lm_q1q2_score": 0.5971022651003071}} {"text": "[GOAL]\nq : ℚ\n⊢ sqrt (q * q) = |q|\n[PROOFSTEP]\nrw [sqrt, mul_self_num, mul_self_den, Int.sqrt_eq, Nat.sqrt_eq, abs_def, divInt_ofNat]\n[GOAL]\nx : ℚ\nx✝ : ∃ q, q * q = x\nn : ℚ\nhn : n * n = x\n⊢ sqrt x * sqrt x = x\n[PROOFSTEP]\nrw [← hn, sqrt_eq, abs_mul_abs_self]\n", "meta": {"mathlib_filename": "Mathlib.Data.Rat.Sqrt", "llama_tokens": 146, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8918110511888303, "lm_q2_score": 0.6688802669716107, "lm_q1q2_score": 0.5965148140074176}} {"text": "[GOAL]\nm : Type u_1\nn : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝³ : DecidableEq m\ninst✝² : Fintype m\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\n⊢ det (mvPolynomialX m m R) ≠ 0\n[PROOFSTEP]\nintro h_det\n[GOAL]\nm : Type u_1\nn : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝³ : DecidableEq m\ninst✝² : Fintype m\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nh_det : det (mvPolynomialX m m R) = 0\n⊢ False\n[PROOFSTEP]\nhave := congr_arg Matrix.det (mvPolynomialX_mapMatrix_eval (1 : Matrix m m R))\n[GOAL]\nm : Type u_1\nn : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝³ : DecidableEq m\ninst✝² : Fintype m\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nh_det : det (mvPolynomialX m m R) = 0\nthis : det (↑(RingHom.mapMatrix (MvPolynomial.eval fun p => OfNat.ofNat 1 p.fst p.snd)) (mvPolynomialX m m R)) = det 1\n⊢ False\n[PROOFSTEP]\nrw [det_one, ← RingHom.map_det, h_det, RingHom.map_zero] at this \n[GOAL]\nm : Type u_1\nn : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝³ : DecidableEq m\ninst✝² : Fintype m\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nh_det : det (mvPolynomialX m m R) = 0\nthis : 0 = 1\n⊢ False\n[PROOFSTEP]\nexact zero_ne_one this\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.MvPolynomial", "llama_tokens": 549, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8479677430095496, "lm_q2_score": 0.7025300636233416, "lm_q1q2_score": 0.5957228324470403}} {"text": "[GOAL]\nα : Type u\nβ : Type v\nφ : Ultrafilter α\ninst✝ : GroupWithZero β\nsrc✝¹ : DivInvMonoid (Germ (↑φ) β) := divInvMonoid\nsrc✝ : MonoidWithZero (Germ (↑φ) β) := monoidWithZero\n⊢ ((fun x x_1 => x ∘ x_1) Inv.inv fun x => 0) =ᶠ[↑φ] fun x => 0\n[PROOFSTEP]\nsimp only [Function.comp, inv_zero]\n[GOAL]\nα : Type u\nβ : Type v\nφ : Ultrafilter α\ninst✝ : GroupWithZero β\nsrc✝¹ : DivInvMonoid (Germ (↑φ) β) := divInvMonoid\nsrc✝ : MonoidWithZero (Germ (↑φ) β) := monoidWithZero\n⊢ (fun x => 0) =ᶠ[↑φ] fun x => 0\n[PROOFSTEP]\nexact EventuallyEq.refl _ fun _ => 0\n[GOAL]\nα : Type u\nβ : Type v\nφ : Ultrafilter α\ninst✝ : Preorder β\nf g : α → β\n⊢ ↑f < ↑g ↔ ∀* (x : α), f x < g x\n[PROOFSTEP]\nsimp only [lt_iff_le_not_le, eventually_and, coe_le, eventually_not, EventuallyLE]\n[GOAL]\nα : Type u\nβ : Type v\nφ : Ultrafilter α\ninst✝ : Preorder β\n⊢ (fun x x_1 => x < x_1) = LiftRel fun x x_1 => x < x_1\n[PROOFSTEP]\next ⟨f⟩ ⟨g⟩\n[GOAL]\ncase h.mk.h.mk.a\nα : Type u\nβ : Type v\nφ : Ultrafilter α\ninst✝ : Preorder β\nx✝¹ : Germ (↑φ) β\nf : α → β\nx✝ : Germ (↑φ) β\ng : α → β\n⊢ Quot.mk Setoid.r f < Quot.mk Setoid.r g ↔ LiftRel (fun x x_1 => x < x_1) (Quot.mk Setoid.r f) (Quot.mk Setoid.r g)\n[PROOFSTEP]\nexact coe_lt\n[GOAL]\nα : Type u\nβ : Type v\nφ : Ultrafilter α\ninst✝ : LinearOrder β\nx y : Germ (↑φ) β\na b : α → β\n⊢ max ↑a ↑b = map₂ max ↑a ↑b\n[PROOFSTEP]\ncases' le_total (a : β*) b with h h\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nφ : Ultrafilter α\ninst✝ : LinearOrder β\nx y : Germ (↑φ) β\na b : α → β\nh : ↑a ≤ ↑b\n⊢ max ↑a ↑b = map₂ max ↑a ↑b\n[PROOFSTEP]\nrw [max_eq_right h, map₂_coe, coe_eq]\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nφ : Ultrafilter α\ninst✝ : LinearOrder β\nx y : Germ (↑φ) β\na b : α → β\nh : ↑a ≤ ↑b\n⊢ b =ᶠ[↑φ] fun x => max (a x) (b x)\n[PROOFSTEP]\nexact h.mono fun i hi => (max_eq_right hi).symm\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nφ : Ultrafilter α\ninst✝ : LinearOrder β\nx y : Germ (↑φ) β\na b : α → β\nh : ↑b ≤ ↑a\n⊢ max ↑a ↑b = map₂ max ↑a ↑b\n[PROOFSTEP]\nrw [max_eq_left h, map₂_coe, coe_eq]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nφ : Ultrafilter α\ninst✝ : LinearOrder β\nx y : Germ (↑φ) β\na b : α → β\nh : ↑b ≤ ↑a\n⊢ a =ᶠ[↑φ] fun x => max (a x) (b x)\n[PROOFSTEP]\nexact h.mono fun i hi => (max_eq_left hi).symm\n[GOAL]\nα : Type u\nβ : Type v\nφ : Ultrafilter α\nK : LinearOrder β\nx y : Germ (↑φ) β\na b : α → β\n⊢ min ↑a ↑b = map₂ min ↑a ↑b\n[PROOFSTEP]\ncases' le_total (a : β*) b with h h\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nφ : Ultrafilter α\nK : LinearOrder β\nx y : Germ (↑φ) β\na b : α → β\nh : ↑a ≤ ↑b\n⊢ min ↑a ↑b = map₂ min ↑a ↑b\n[PROOFSTEP]\nrw [min_eq_left h, map₂_coe, coe_eq]\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nφ : Ultrafilter α\nK : LinearOrder β\nx y : Germ (↑φ) β\na b : α → β\nh : ↑a ≤ ↑b\n⊢ a =ᶠ[↑φ] fun x => min (a x) (b x)\n[PROOFSTEP]\nexact h.mono fun i hi => (min_eq_left hi).symm\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nφ : Ultrafilter α\nK : LinearOrder β\nx y : Germ (↑φ) β\na b : α → β\nh : ↑b ≤ ↑a\n⊢ min ↑a ↑b = map₂ min ↑a ↑b\n[PROOFSTEP]\nrw [min_eq_right h, map₂_coe, coe_eq]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nφ : Ultrafilter α\nK : LinearOrder β\nx y : Germ (↑φ) β\na b : α → β\nh : ↑b ≤ ↑a\n⊢ b =ᶠ[↑φ] fun x => min (a x) (b x)\n[PROOFSTEP]\nexact h.mono fun i hi => (min_eq_right hi).symm\n[GOAL]\nα : Type u\nβ : Type v\nφ : Ultrafilter α\ninst✝ : LinearOrder β\nx y : β\n⊢ ↑(max x y) = max ↑x ↑y\n[PROOFSTEP]\nrw [max_def, map₂_const]\n[GOAL]\nα : Type u\nβ : Type v\nφ : Ultrafilter α\ninst✝ : LinearOrder β\nx y : β\n⊢ ↑(min x y) = min ↑x ↑y\n[PROOFSTEP]\nrw [min_def, map₂_const]\n[GOAL]\nα : Type u\nβ : Type v\nφ : Ultrafilter α\ninst✝ : LinearOrderedAddCommGroup β\nx : β\n⊢ ↑|x| = |↑x|\n[PROOFSTEP]\nrw [abs_def, map_const]\n", "meta": {"mathlib_filename": "Mathlib.Order.Filter.FilterProduct", "llama_tokens": 1923, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8289388167733099, "lm_q2_score": 0.7185943985973773, "lm_q1q2_score": 0.5956707905132381}} {"text": "[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nx : E\n⊢ sqrt (1 + ‖x‖ ^ 2) ≤ 1 + ‖x‖\n[PROOFSTEP]\nrw [sqrt_le_left (by positivity)]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nx : E\n⊢ 0 ≤ 1 + ‖x‖\n[PROOFSTEP]\npositivity\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nx : E\n⊢ 1 + ‖x‖ ^ 2 ≤ (1 + ‖x‖) ^ 2\n[PROOFSTEP]\nsimp [add_sq]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nx : E\n⊢ 1 + ‖x‖ ≤ sqrt 2 * sqrt (1 + ‖x‖ ^ 2)\n[PROOFSTEP]\nrw [← sqrt_mul zero_le_two]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nx : E\n⊢ 1 + ‖x‖ ≤ sqrt (2 * (1 + ‖x‖ ^ 2))\n[PROOFSTEP]\nhave := sq_nonneg (‖x‖ - 1)\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nx : E\nthis : 0 ≤ (‖x‖ - 1) ^ 2\n⊢ 1 + ‖x‖ ≤ sqrt (2 * (1 + ‖x‖ ^ 2))\n[PROOFSTEP]\napply le_sqrt_of_sq_le\n[GOAL]\ncase h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nx : E\nthis : 0 ≤ (‖x‖ - 1) ^ 2\n⊢ (1 + ‖x‖) ^ 2 ≤ 2 * (1 + ‖x‖ ^ 2)\n[PROOFSTEP]\nlinarith\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nr : ℝ\nx : E\nhr : 0 < r\n⊢ (1 + ‖x‖ ^ 2) ^ (-r / 2) = 2 ^ (r / 2) * ((sqrt 2 * sqrt (1 + ‖x‖ ^ 2)) ^ r)⁻¹\n[PROOFSTEP]\nrw [rpow_div_two_eq_sqrt, rpow_div_two_eq_sqrt, mul_rpow, mul_inv, rpow_neg, mul_inv_cancel_left₀]\n[GOAL]\ncase h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nr : ℝ\nx : E\nhr : 0 < r\n⊢ sqrt 2 ^ r ≠ 0\n[PROOFSTEP]\npositivity\n[GOAL]\ncase hx\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nr : ℝ\nx : E\nhr : 0 < r\n⊢ 0 ≤ sqrt (1 + ‖x‖ ^ 2)\n[PROOFSTEP]\npositivity\n[GOAL]\ncase h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nr : ℝ\nx : E\nhr : 0 < r\n⊢ 0 ≤ sqrt 2\n[PROOFSTEP]\npositivity\n[GOAL]\ncase h₁\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nr : ℝ\nx : E\nhr : 0 < r\n⊢ 0 ≤ sqrt (1 + ‖x‖ ^ 2)\n[PROOFSTEP]\npositivity\n[GOAL]\ncase hx\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nr : ℝ\nx : E\nhr : 0 < r\n⊢ 0 ≤ 2\n[PROOFSTEP]\npositivity\n[GOAL]\ncase hx\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nr : ℝ\nx : E\nhr : 0 < r\n⊢ 0 ≤ 1 + ‖x‖ ^ 2\n[PROOFSTEP]\npositivity\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nr : ℝ\nx : E\nhr : 0 < r\n⊢ 2 ^ (r / 2) * ((sqrt 2 * sqrt (1 + ‖x‖ ^ 2)) ^ r)⁻¹ ≤ 2 ^ (r / 2) * ((1 + ‖x‖) ^ r)⁻¹\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.h.h₁\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nr : ℝ\nx : E\nhr : 0 < r\n⊢ 1 + ‖x‖ ≤ sqrt 2 * sqrt (1 + ‖x‖ ^ 2)\n[PROOFSTEP]\napply one_add_norm_le_sqrt_two_mul_sqrt\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nr : ℝ\nx : E\nhr : 0 < r\n⊢ 2 ^ (r / 2) * ((1 + ‖x‖) ^ r)⁻¹ = 2 ^ (r / 2) * (1 + ‖x‖) ^ (-r)\n[PROOFSTEP]\nrw [rpow_neg]\n[GOAL]\ncase hx\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nr : ℝ\nx : E\nhr : 0 < r\n⊢ 0 ≤ 1 + ‖x‖\n[PROOFSTEP]\npositivity\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nr t : ℝ\nhr : 0 < r\nht : 0 < t\nx : E\n⊢ t ≤ (1 + ‖x‖) ^ (-r) ↔ ‖x‖ ≤ t ^ (-r⁻¹) - 1\n[PROOFSTEP]\nrw [le_sub_iff_add_le', neg_inv]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nr t : ℝ\nhr : 0 < r\nht : 0 < t\nx : E\n⊢ t ≤ (1 + ‖x‖) ^ (-r) ↔ 1 + ‖x‖ ≤ t ^ (-r)⁻¹\n[PROOFSTEP]\nexact (Real.le_rpow_inv_iff_of_neg (by positivity) ht (neg_lt_zero.mpr hr)).symm\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nr t : ℝ\nhr : 0 < r\nht : 0 < t\nx : E\n⊢ 0 < 1 + ‖x‖\n[PROOFSTEP]\npositivity\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nr t : ℝ\nhr : 0 < r\nht : 1 < t\n⊢ Metric.closedBall 0 (t ^ (-r⁻¹) - 1) = ∅\n[PROOFSTEP]\nrw [Metric.closedBall_eq_empty, sub_neg]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nr t : ℝ\nhr : 0 < r\nht : 1 < t\n⊢ t ^ (-r⁻¹) < 1\n[PROOFSTEP]\nexact Real.rpow_lt_one_of_one_lt_of_neg ht (by simp only [hr, Right.neg_neg_iff, inv_pos])\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nr t : ℝ\nhr : 0 < r\nht : 1 < t\n⊢ -r⁻¹ < 0\n[PROOFSTEP]\nsimp only [hr, Right.neg_neg_iff, inv_pos]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nr : ℝ\nn : ℕ\nhnr : ↑n < r\n⊢ ∫⁻ (x : ℝ) in Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) < ⊤\n[PROOFSTEP]\nhave hr : 0 < r := lt_of_le_of_lt n.cast_nonneg hnr\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nr : ℝ\nn : ℕ\nhnr : ↑n < r\nhr : 0 < r\n⊢ ∫⁻ (x : ℝ) in Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) < ⊤\n[PROOFSTEP]\nhave h_int : ∀ x : ℝ, x ∈ Ioc (0 : ℝ) 1 → ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * n))) :=\n fun x hx ↦ by\n apply ENNReal.ofReal_le_ofReal\n rw [← neg_mul, rpow_mul hx.1.le, rpow_nat_cast]\n refine' pow_le_pow_of_le_left _ (by simp only [sub_le_self_iff, zero_le_one]) n\n rw [le_sub_iff_add_le', add_zero]\n refine' Real.one_le_rpow_of_pos_of_le_one_of_nonpos hx.1 hx.2 _\n rw [Right.neg_nonpos_iff, inv_nonneg]\n exact hr.le\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nr : ℝ\nn : ℕ\nhnr : ↑n < r\nhr : 0 < r\nx : ℝ\nhx : x ∈ Ioc 0 1\n⊢ ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))\n[PROOFSTEP]\napply ENNReal.ofReal_le_ofReal\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nr : ℝ\nn : ℕ\nhnr : ↑n < r\nhr : 0 < r\nx : ℝ\nhx : x ∈ Ioc 0 1\n⊢ (x ^ (-r⁻¹) - 1) ^ n ≤ x ^ (-(r⁻¹ * ↑n))\n[PROOFSTEP]\nrw [← neg_mul, rpow_mul hx.1.le, rpow_nat_cast]\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nr : ℝ\nn : ℕ\nhnr : ↑n < r\nhr : 0 < r\nx : ℝ\nhx : x ∈ Ioc 0 1\n⊢ (x ^ (-r⁻¹) - 1) ^ n ≤ (x ^ (-r⁻¹)) ^ n\n[PROOFSTEP]\nrefine' pow_le_pow_of_le_left _ (by simp only [sub_le_self_iff, zero_le_one]) n\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nr : ℝ\nn : ℕ\nhnr : ↑n < r\nhr : 0 < r\nx : ℝ\nhx : x ∈ Ioc 0 1\n⊢ x ^ (-r⁻¹) - 1 ≤ x ^ (-r⁻¹)\n[PROOFSTEP]\nsimp only [sub_le_self_iff, zero_le_one]\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nr : ℝ\nn : ℕ\nhnr : ↑n < r\nhr : 0 < r\nx : ℝ\nhx : x ∈ Ioc 0 1\n⊢ 0 ≤ x ^ (-r⁻¹) - 1\n[PROOFSTEP]\nrw [le_sub_iff_add_le', add_zero]\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nr : ℝ\nn : ℕ\nhnr : ↑n < r\nhr : 0 < r\nx : ℝ\nhx : x ∈ Ioc 0 1\n⊢ 1 ≤ x ^ (-r⁻¹)\n[PROOFSTEP]\nrefine' Real.one_le_rpow_of_pos_of_le_one_of_nonpos hx.1 hx.2 _\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nr : ℝ\nn : ℕ\nhnr : ↑n < r\nhr : 0 < r\nx : ℝ\nhx : x ∈ Ioc 0 1\n⊢ -r⁻¹ ≤ 0\n[PROOFSTEP]\nrw [Right.neg_nonpos_iff, inv_nonneg]\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nr : ℝ\nn : ℕ\nhnr : ↑n < r\nhr : 0 < r\nx : ℝ\nhx : x ∈ Ioc 0 1\n⊢ 0 ≤ r\n[PROOFSTEP]\nexact hr.le\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nr : ℝ\nn : ℕ\nhnr : ↑n < r\nhr : 0 < r\nh_int : ∀ (x : ℝ), x ∈ Ioc 0 1 → ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))\n⊢ ∫⁻ (x : ℝ) in Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) < ⊤\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (set_lintegral_mono' measurableSet_Ioc h_int) _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nr : ℝ\nn : ℕ\nhnr : ↑n < r\nhr : 0 < r\nh_int : ∀ (x : ℝ), x ∈ Ioc 0 1 → ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))\n⊢ ∫⁻ (x : ℝ) in Ioc 0 1, ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n))) < ⊤\n[PROOFSTEP]\nrefine' IntegrableOn.set_lintegral_lt_top _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nr : ℝ\nn : ℕ\nhnr : ↑n < r\nhr : 0 < r\nh_int : ∀ (x : ℝ), x ∈ Ioc 0 1 → ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))\n⊢ IntegrableOn (fun x => x ^ (-(r⁻¹ * ↑n))) (Ioc 0 1)\n[PROOFSTEP]\nrw [← intervalIntegrable_iff_integrable_Ioc_of_le zero_le_one]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nr : ℝ\nn : ℕ\nhnr : ↑n < r\nhr : 0 < r\nh_int : ∀ (x : ℝ), x ∈ Ioc 0 1 → ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))\n⊢ IntervalIntegrable (fun x => x ^ (-(r⁻¹ * ↑n))) volume 0 1\n[PROOFSTEP]\napply intervalIntegral.intervalIntegrable_rpow'\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nr : ℝ\nn : ℕ\nhnr : ↑n < r\nhr : 0 < r\nh_int : ∀ (x : ℝ), x ∈ Ioc 0 1 → ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))\n⊢ -1 < -(r⁻¹ * ↑n)\n[PROOFSTEP]\nrwa [neg_lt_neg_iff, inv_mul_lt_iff' hr, one_mul]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\n⊢ ∫⁻ (x : E), ENNReal.ofReal ((1 + ‖x‖) ^ (-r)) < ⊤\n[PROOFSTEP]\nhave hr : 0 < r := lt_of_le_of_lt (finrank ℝ E).cast_nonneg hnr\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\n⊢ ∫⁻ (x : E), ENNReal.ofReal ((1 + ‖x‖) ^ (-r)) < ⊤\n[PROOFSTEP]\nhave h_meas : Measurable fun ω : E => (1 + ‖ω‖) ^ (-r) :=\n -- porting note: was `by measurability`(measurable_norm.const_add _).pow_const _\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\n⊢ ∫⁻ (x : E), ENNReal.ofReal ((1 + ‖x‖) ^ (-r)) < ⊤\n[PROOFSTEP]\nhave h_pos : ∀ x : E, 0 ≤ (1 + ‖x‖) ^ (-r) := fun x ↦ by positivity\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nx : E\n⊢ 0 ≤ (1 + ‖x‖) ^ (-r)\n[PROOFSTEP]\npositivity\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\n⊢ ∫⁻ (x : E), ENNReal.ofReal ((1 + ‖x‖) ^ (-r)) < ⊤\n[PROOFSTEP]\nrw [lintegral_eq_lintegral_meas_le volume h_pos h_meas]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\n⊢ ∫⁻ (t : ℝ) in Ioi 0, ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} < ⊤\n[PROOFSTEP]\nhave h_int : ∀ t, 0 < t → volume {a : E | t ≤ (1 + ‖a‖) ^ (-r)} = volume (Metric.closedBall (0 : E) (t ^ (-r⁻¹) - 1)) :=\n fun t ht ↦ by\n congr 1\n ext x\n simp only [mem_setOf_eq, mem_closedBall_zero_iff]\n exact le_rpow_one_add_norm_iff_norm_le hr (mem_Ioi.mp ht) x\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nt : ℝ\nht : 0 < t\n⊢ ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nt : ℝ\nht : 0 < t\n⊢ {a | t ≤ (1 + ‖a‖) ^ (-r)} = Metric.closedBall 0 (t ^ (-r⁻¹) - 1)\n[PROOFSTEP]\next x\n[GOAL]\ncase e_a.h\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nt : ℝ\nht : 0 < t\nx : E\n⊢ x ∈ {a | t ≤ (1 + ‖a‖) ^ (-r)} ↔ x ∈ Metric.closedBall 0 (t ^ (-r⁻¹) - 1)\n[PROOFSTEP]\nsimp only [mem_setOf_eq, mem_closedBall_zero_iff]\n[GOAL]\ncase e_a.h\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nt : ℝ\nht : 0 < t\nx : E\n⊢ t ≤ (1 + ‖x‖) ^ (-r) ↔ ‖x‖ ≤ t ^ (-r⁻¹) - 1\n[PROOFSTEP]\nexact le_rpow_one_add_norm_iff_norm_le hr (mem_Ioi.mp ht) x\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nh_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\n⊢ ∫⁻ (t : ℝ) in Ioi 0, ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} < ⊤\n[PROOFSTEP]\nrw [set_lintegral_congr_fun measurableSet_Ioi (eventually_of_forall h_int)]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nh_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\n⊢ ∫⁻ (x : ℝ) in Ioi 0, ↑↑volume (Metric.closedBall 0 (x ^ (-r⁻¹) - 1)) < ⊤\n[PROOFSTEP]\nset f := fun t : ℝ ↦ volume (Metric.closedBall (0 : E) (t ^ (-r⁻¹) - 1))\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nh_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nf : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\n⊢ lintegral (Measure.restrict volume (Ioi 0)) f < ⊤\n[PROOFSTEP]\nset mB :=\n volume\n (Metric.ball (0 : E) 1)\n -- the next two inequalities are in fact equalities but we don't need that\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nh_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nf : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nmB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)\n⊢ lintegral (Measure.restrict volume (Ioi 0)) f < ⊤\n[PROOFSTEP]\ncalc\n ∫⁻ t in Ioi 0, f t ≤ ∫⁻ t in Ioc 0 1 ∪ Ioi 1, f t := lintegral_mono_set Ioi_subset_Ioc_union_Ioi\n _ ≤ (∫⁻ t in Ioc 0 1, f t) + ∫⁻ t in Ioi 1, f t := (lintegral_union_le _ _ _)\n _ < ∞ := ENNReal.add_lt_top.2 ⟨?_, ?_⟩\n[GOAL]\ncase calc_1\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nh_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nf : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nmB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)\n⊢ ∫⁻ (t : ℝ) in Ioc 0 1, f t < ⊤\n[PROOFSTEP]\nhave h_int' : ∀ t ∈ Ioc (0 : ℝ) 1, f t = ENNReal.ofReal ((t ^ (-r⁻¹) - 1) ^ finrank ℝ E) * mB := fun t ht ↦\n by\n refine' volume.addHaar_closedBall (0 : E) _\n rw [sub_nonneg]\n exact Real.one_le_rpow_of_pos_of_le_one_of_nonpos ht.1 ht.2 (by simp [hr.le])\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nh_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nf : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nmB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)\nt : ℝ\nht : t ∈ Ioc 0 1\n⊢ f t = ENNReal.ofReal ((t ^ (-r⁻¹) - 1) ^ finrank ℝ E) * mB\n[PROOFSTEP]\nrefine' volume.addHaar_closedBall (0 : E) _\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nh_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nf : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nmB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)\nt : ℝ\nht : t ∈ Ioc 0 1\n⊢ 0 ≤ t ^ (-r⁻¹) - 1\n[PROOFSTEP]\nrw [sub_nonneg]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nh_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nf : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nmB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)\nt : ℝ\nht : t ∈ Ioc 0 1\n⊢ 1 ≤ t ^ (-r⁻¹)\n[PROOFSTEP]\nexact Real.one_le_rpow_of_pos_of_le_one_of_nonpos ht.1 ht.2 (by simp [hr.le])\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nh_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nf : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nmB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)\nt : ℝ\nht : t ∈ Ioc 0 1\n⊢ -r⁻¹ ≤ 0\n[PROOFSTEP]\nsimp [hr.le]\n[GOAL]\ncase calc_1\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nh_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nf : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nmB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)\nh_int' : ∀ (t : ℝ), t ∈ Ioc 0 1 → f t = ENNReal.ofReal ((t ^ (-r⁻¹) - 1) ^ finrank ℝ E) * mB\n⊢ ∫⁻ (t : ℝ) in Ioc 0 1, f t < ⊤\n[PROOFSTEP]\nrw [set_lintegral_congr_fun measurableSet_Ioc (ae_of_all _ h_int'), lintegral_mul_const' _ _ measure_ball_lt_top.ne]\n[GOAL]\ncase calc_1\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nh_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nf : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nmB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)\nh_int' : ∀ (t : ℝ), t ∈ Ioc 0 1 → f t = ENNReal.ofReal ((t ^ (-r⁻¹) - 1) ^ finrank ℝ E) * mB\n⊢ (∫⁻ (a : ℝ) in Ioc 0 1, ENNReal.ofReal ((a ^ (-r⁻¹) - 1) ^ finrank ℝ E)) * ↑↑volume (Metric.ball 0 1) < ⊤\n[PROOFSTEP]\nexact ENNReal.mul_lt_top (finite_integral_rpow_sub_one_pow_aux (finrank ℝ E) hnr).ne measure_ball_lt_top.ne\n[GOAL]\ncase calc_2\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nh_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nf : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nmB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)\n⊢ ∫⁻ (t : ℝ) in Ioi 1, f t < ⊤\n[PROOFSTEP]\nhave h_int'' : ∀ t ∈ Ioi (1 : ℝ), f t = 0 := fun t ht => by\n simp only [closedBall_rpow_sub_one_eq_empty_aux E hr ht, measure_empty]\n -- The integral over the constant zero function is finite:\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nh_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nf : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nmB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)\nt : ℝ\nht : t ∈ Ioi 1\n⊢ f t = 0\n[PROOFSTEP]\nsimp only [closedBall_rpow_sub_one_eq_empty_aux E hr ht, measure_empty]\n -- The integral over the constant zero function is finite:\n[GOAL]\ncase calc_2\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nh_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nf : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nmB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)\nh_int'' : ∀ (t : ℝ), t ∈ Ioi 1 → f t = 0\n⊢ ∫⁻ (t : ℝ) in Ioi 1, f t < ⊤\n[PROOFSTEP]\nrw [set_lintegral_congr_fun measurableSet_Ioi (ae_of_all volume <| h_int''), lintegral_const 0, zero_mul]\n[GOAL]\ncase calc_2\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nh_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)\nh_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)\nh_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nf : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))\nmB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)\nh_int'' : ∀ (t : ℝ), t ∈ Ioi 1 → f t = 0\n⊢ 0 < ⊤\n[PROOFSTEP]\nexact WithTop.zero_lt_top\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\n⊢ Integrable fun x => (1 + ‖x‖) ^ (-r)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\n⊢ AEStronglyMeasurable (fun x => (1 + ‖x‖) ^ (-r)) volume\n[PROOFSTEP]\nexact ((measurable_norm.const_add _).pow_const _).aestronglyMeasurable\n[GOAL]\ncase right\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\n⊢ HasFiniteIntegral fun x => (1 + ‖x‖) ^ (-r)\n[PROOFSTEP]\nhave : (∫⁻ a : E, ‖(1 + ‖a‖) ^ (-r)‖₊) = ∫⁻ a : E, ENNReal.ofReal ((1 + ‖a‖) ^ (-r)) :=\n lintegral_nnnorm_eq_of_nonneg fun _ => rpow_nonneg_of_nonneg (by positivity) _\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nx✝ : E\n⊢ 0 ≤ 1 + ‖x✝‖\n[PROOFSTEP]\npositivity\n[GOAL]\ncase right\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nthis : ∫⁻ (a : E), ↑‖(1 + ‖a‖) ^ (-r)‖₊ = ∫⁻ (a : E), ENNReal.ofReal ((1 + ‖a‖) ^ (-r))\n⊢ HasFiniteIntegral fun x => (1 + ‖x‖) ^ (-r)\n[PROOFSTEP]\nrw [HasFiniteIntegral, this]\n[GOAL]\ncase right\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nthis : ∫⁻ (a : E), ↑‖(1 + ‖a‖) ^ (-r)‖₊ = ∫⁻ (a : E), ENNReal.ofReal ((1 + ‖a‖) ^ (-r))\n⊢ ∫⁻ (a : E), ENNReal.ofReal ((1 + ‖a‖) ^ (-r)) < ⊤\n[PROOFSTEP]\nexact finite_integral_one_add_norm hnr\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\n⊢ Integrable fun x => (1 + ‖x‖ ^ 2) ^ (-r / 2)\n[PROOFSTEP]\nhave hr : 0 < r := lt_of_le_of_lt (finrank ℝ E).cast_nonneg hnr\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\n⊢ Integrable fun x => (1 + ‖x‖ ^ 2) ^ (-r / 2)\n[PROOFSTEP]\nrefine ((integrable_one_add_norm hnr).const_mul <| (2 : ℝ) ^ (r / 2)).mono' ?_ (eventually_of_forall fun x => ?_)\n[GOAL]\ncase refine_1\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\n⊢ AEStronglyMeasurable (fun x => (1 + ‖x‖ ^ 2) ^ (-r / 2)) volume\n[PROOFSTEP]\nexact (((measurable_id.norm.pow_const _).const_add _).pow_const _).aestronglyMeasurable\n[GOAL]\ncase refine_2\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nx : E\n⊢ ‖(1 + ‖x‖ ^ 2) ^ (-r / 2)‖ ≤ 2 ^ (r / 2) * (1 + ‖x‖) ^ (-r)\n[PROOFSTEP]\nrefine (abs_of_pos ?_).trans_le (rpow_neg_one_add_norm_sq_le x hr)\n[GOAL]\ncase refine_2\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasureSpace E\ninst✝¹ : BorelSpace E\ninst✝ : Measure.IsAddHaarMeasure volume\nr : ℝ\nhnr : ↑(finrank ℝ E) < r\nhr : 0 < r\nx : E\n⊢ 0 < (1 + ‖x‖ ^ 2) ^ (-r / 2)\n[PROOFSTEP]\npositivity\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.JapaneseBracket", "llama_tokens": 15060, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8438950947024555, "lm_q2_score": 0.7057850216484838, "lm_q1q2_score": 0.5956085176836218}} {"text": "[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nas : List α\n⊢ length ((a :: as) {0 ↦ a✝}) = max (length (a :: as)) (0 + 1)\n[PROOFSTEP]\nrw [max_eq_left]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nas : List α\n⊢ length ((a :: as) {0 ↦ a✝}) = length (a :: as)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nas : List α\n⊢ 0 + 1 ≤ length (a :: as)\n[PROOFSTEP]\nsimp [Nat.le_add_right]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nas : List α\n⊢ 1 ≤ Nat.succ (length as)\n[PROOFSTEP]\nexact Nat.succ_le_succ (Nat.zero_le _)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nm : ℕ\n⊢ length ([] {m + 1 ↦ a}) = max (length []) (m + 1 + 1)\n[PROOFSTEP]\nhave := @length_set m []\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nm : ℕ\nthis : length ([] {m ↦ a}) = max (length []) (m + 1)\n⊢ length ([] {m + 1 ↦ a}) = max (length []) (m + 1 + 1)\n[PROOFSTEP]\nsimp [set, length, @length_set m, Nat.zero_max]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nm : ℕ\nhead✝ : α\nas : List α\n⊢ length ((head✝ :: as) {m + 1 ↦ a}) = max (length (head✝ :: as)) (m + 1 + 1)\n[PROOFSTEP]\nsimp [set, length, @length_set m, Nat.max_succ_succ]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nk : ℕ\n⊢ get k [] = default\n[PROOFSTEP]\ncases k\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\n⊢ get Nat.zero [] = default\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nn✝ : ℕ\n⊢ get (Nat.succ n✝) [] = default\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nas : List α\nh1 : length (a :: as) ≤ 0\n⊢ get 0 (a :: as) = default\n[PROOFSTEP]\ncases h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nk : ℕ\nhead✝ : α\nas : List α\nh1 : length (head✝ :: as) ≤ k + 1\n⊢ get (k + 1) (head✝ :: as) = default\n[PROOFSTEP]\napply get_eq_default_of_le k\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nk : ℕ\nhead✝ : α\nas : List α\nh1 : length (head✝ :: as) ≤ k + 1\n⊢ length as ≤ k\n[PROOFSTEP]\nrw [← Nat.succ_le_succ_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nk : ℕ\nhead✝ : α\nas : List α\nh1 : length (head✝ :: as) ≤ k + 1\n⊢ Nat.succ (length as) ≤ Nat.succ k\n[PROOFSTEP]\napply h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nas : List α\n⊢ get 0 (as {0 ↦ a}) = a\n[PROOFSTEP]\ncases as\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\n⊢ get 0 ([] {0 ↦ a}) = a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na head✝ : α\ntail✝ : List α\n⊢ get 0 ((head✝ :: tail✝) {0 ↦ a}) = a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nas : List α\n⊢ get (k + 1) (as {k + 1 ↦ a}) = a\n[PROOFSTEP]\ncases as\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\n⊢ get (k + 1) ([] {k + 1 ↦ a}) = a\n[PROOFSTEP]\nsimp [get_set]\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nhead✝ : α\ntail✝ : List α\n⊢ get (k + 1) ((head✝ :: tail✝) {k + 1 ↦ a}) = a\n[PROOFSTEP]\nsimp [get_set]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nh : a ∈ []\n⊢ ∃ n, a = get n []\n[PROOFSTEP]\ncases h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na b : α\nas : List α\nh : a ∈ b :: as\n⊢ ∃ n, a = get n (b :: as)\n[PROOFSTEP]\nrw [mem_cons] at h \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na b : α\nas : List α\nh : a = b ∨ a ∈ as\n⊢ ∃ n, a = get n (b :: as)\n[PROOFSTEP]\ncases h with\n| inl h => exact ⟨0, h⟩\n| inr h =>\n rcases eq_get_of_mem h with ⟨n, h⟩\n exact ⟨n + 1, h⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na b : α\nas : List α\nh : a = b ∨ a ∈ as\n⊢ ∃ n, a = get n (b :: as)\n[PROOFSTEP]\ncases h with\n| inl h => exact ⟨0, h⟩\n| inr h =>\n rcases eq_get_of_mem h with ⟨n, h⟩\n exact ⟨n + 1, h⟩\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na b : α\nas : List α\nh : a = b\n⊢ ∃ n, a = get n (b :: as)\n[PROOFSTEP]\n\n| inl h => exact ⟨0, h⟩\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na b : α\nas : List α\nh : a = b\n⊢ ∃ n, a = get n (b :: as)\n[PROOFSTEP]\nexact ⟨0, h⟩\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na b : α\nas : List α\nh : a ∈ as\n⊢ ∃ n, a = get n (b :: as)\n[PROOFSTEP]\n\n| inr h =>\n rcases eq_get_of_mem h with ⟨n, h⟩\n exact ⟨n + 1, h⟩\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na b : α\nas : List α\nh : a ∈ as\n⊢ ∃ n, a = get n (b :: as)\n[PROOFSTEP]\nrcases eq_get_of_mem h with ⟨n, h⟩\n[GOAL]\ncase inr.intro\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na b : α\nas : List α\nh✝ : a ∈ as\nn : ℕ\nh : a = get n as\n⊢ ∃ n, a = get n (b :: as)\n[PROOFSTEP]\nexact ⟨n + 1, h⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nx✝ : ℕ\nh1 : x✝ < length []\n⊢ get x✝ [] ∈ []\n[PROOFSTEP]\ncases h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nas : List α\nx✝ : 0 < length (a :: as)\n⊢ get 0 (a :: as) ∈ a :: as\n[PROOFSTEP]\nrw [mem_cons]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nas : List α\nx✝ : 0 < length (a :: as)\n⊢ get 0 (a :: as) = a ∨ get 0 (a :: as) ∈ as\n[PROOFSTEP]\nexact Or.inl rfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nn : ℕ\na : α\nas : List α\nh1 : n + 1 < length (a :: as)\n⊢ get (n + 1) (a :: as) ∈ a :: as\n[PROOFSTEP]\nrw [mem_cons]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nn : ℕ\na : α\nas : List α\nh1 : n + 1 < length (a :: as)\n⊢ get (n + 1) (a :: as) = a ∨ get (n + 1) (a :: as) ∈ as\n[PROOFSTEP]\napply Or.inr\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nn : ℕ\na : α\nas : List α\nh1 : n + 1 < length (a :: as)\n⊢ get (n + 1) (a :: as) ∈ as\n[PROOFSTEP]\nunfold get\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nn : ℕ\na : α\nas : List α\nh1 : n + 1 < length (a :: as)\n⊢ get (Nat.add n 0) as ∈ as\n[PROOFSTEP]\napply mem_get_of_le\n[GOAL]\ncase h.a\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nn : ℕ\na : α\nas : List α\nh1 : n + 1 < length (a :: as)\n⊢ Nat.add n 0 < length as\n[PROOFSTEP]\napply Nat.lt_of_succ_lt_succ h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nx✝ : ℕ\nh1 : get x✝ [] ≠ default\n⊢ get x✝ [] ∈ []\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nx✝ : ℕ\nh1 : get x✝ [] ≠ default\n⊢ False\n[PROOFSTEP]\napply h1\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nx✝ : ℕ\nh1 : get x✝ [] ≠ default\n⊢ get x✝ [] = default\n[PROOFSTEP]\nrw [get_nil]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nas : List α\nx✝ : get 0 (a :: as) ≠ default\n⊢ get 0 (a :: as) ∈ a :: as\n[PROOFSTEP]\nrw [mem_cons]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nas : List α\nx✝ : get 0 (a :: as) ≠ default\n⊢ get 0 (a :: as) = a ∨ get 0 (a :: as) ∈ as\n[PROOFSTEP]\nexact Or.inl rfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nn : ℕ\na : α\nas : List α\nh1 : get (n + 1) (a :: as) ≠ default\n⊢ get (n + 1) (a :: as) ∈ a :: as\n[PROOFSTEP]\nrw [mem_cons]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nn : ℕ\na : α\nas : List α\nh1 : get (n + 1) (a :: as) ≠ default\n⊢ get (n + 1) (a :: as) = a ∨ get (n + 1) (a :: as) ∈ as\n[PROOFSTEP]\nunfold get\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nn : ℕ\na : α\nas : List α\nh1 : get (n + 1) (a :: as) ≠ default\n⊢ get (Nat.add n 0) as = a ∨ get (Nat.add n 0) as ∈ as\n[PROOFSTEP]\napply Or.inr (mem_get_of_ne_zero _)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nn : ℕ\na : α\nas : List α\nh1 : get (n + 1) (a :: as) ≠ default\n⊢ get (Nat.add n 0) as ≠ default\n[PROOFSTEP]\napply h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nas : List α\nm : ℕ\nh1 : m ≠ 0\n⊢ get m (as {0 ↦ a}) = get m as\n[PROOFSTEP]\ncases m\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nas : List α\nh1 : Nat.zero ≠ 0\n⊢ get Nat.zero (as {0 ↦ a}) = get Nat.zero as\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nas : List α\nn✝ : ℕ\nh1 : Nat.succ n✝ ≠ 0\n⊢ get (Nat.succ n✝) (as {0 ↦ a}) = get (Nat.succ n✝) as\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nas : List α\nn✝ : ℕ\nh1 : Nat.succ n✝ ≠ 0\n⊢ get (Nat.succ n✝) (as {0 ↦ a}) = get (Nat.succ n✝) as\n[PROOFSTEP]\ncases as\n[GOAL]\ncase succ.nil\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nn✝ : ℕ\nh1 : Nat.succ n✝ ≠ 0\n⊢ get (Nat.succ n✝) ([] {0 ↦ a}) = get (Nat.succ n✝) []\n[PROOFSTEP]\nsimp only [set, get, get_nil]\n[GOAL]\ncase succ.cons\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nn✝ : ℕ\nh1 : Nat.succ n✝ ≠ 0\nhead✝ : α\ntail✝ : List α\n⊢ get (Nat.succ n✝) ((head✝ :: tail✝) {0 ↦ a}) = get (Nat.succ n✝) (head✝ :: tail✝)\n[PROOFSTEP]\nsimp only [set, get, get_nil]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nas : List α\nk m : ℕ\nh1 : m ≠ k + 1\n⊢ get m (as {k + 1 ↦ a}) = get m as\n[PROOFSTEP]\ncases as\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk m : ℕ\nh1 : m ≠ k + 1\n⊢ get m ([] {k + 1 ↦ a}) = get m []\n[PROOFSTEP]\ncases m\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk m : ℕ\nh1 : m ≠ k + 1\nhead✝ : α\ntail✝ : List α\n⊢ get m ((head✝ :: tail✝) {k + 1 ↦ a}) = get m (head✝ :: tail✝)\n[PROOFSTEP]\ncases m\n[GOAL]\ncase nil.zero\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nh1 : Nat.zero ≠ k + 1\n⊢ get Nat.zero ([] {k + 1 ↦ a}) = get Nat.zero []\ncase nil.succ\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk n✝ : ℕ\nh1 : Nat.succ n✝ ≠ k + 1\n⊢ get (Nat.succ n✝) ([] {k + 1 ↦ a}) = get (Nat.succ n✝) []\ncase cons.zero\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nhead✝ : α\ntail✝ : List α\nh1 : Nat.zero ≠ k + 1\n⊢ get Nat.zero ((head✝ :: tail✝) {k + 1 ↦ a}) = get Nat.zero (head✝ :: tail✝)\ncase cons.succ\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nhead✝ : α\ntail✝ : List α\nn✝ : ℕ\nh1 : Nat.succ n✝ ≠ k + 1\n⊢ get (Nat.succ n✝) ((head✝ :: tail✝) {k + 1 ↦ a}) = get (Nat.succ n✝) (head✝ :: tail✝)\n[PROOFSTEP]\ncase nil => simp only [set, get]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nh1 : Nat.zero ≠ k + 1\n⊢ get Nat.zero ([] {k + 1 ↦ a}) = get Nat.zero []\n[PROOFSTEP]\ncase nil => simp only [set, get]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nh1 : Nat.zero ≠ k + 1\n⊢ get Nat.zero ([] {k + 1 ↦ a}) = get Nat.zero []\n[PROOFSTEP]\nsimp only [set, get]\n[GOAL]\ncase nil.succ\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk n✝ : ℕ\nh1 : Nat.succ n✝ ≠ k + 1\n⊢ get (Nat.succ n✝) ([] {k + 1 ↦ a}) = get (Nat.succ n✝) []\ncase cons.zero\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nhead✝ : α\ntail✝ : List α\nh1 : Nat.zero ≠ k + 1\n⊢ get Nat.zero ((head✝ :: tail✝) {k + 1 ↦ a}) = get Nat.zero (head✝ :: tail✝)\ncase cons.succ\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nhead✝ : α\ntail✝ : List α\nn✝ : ℕ\nh1 : Nat.succ n✝ ≠ k + 1\n⊢ get (Nat.succ n✝) ((head✝ :: tail✝) {k + 1 ↦ a}) = get (Nat.succ n✝) (head✝ :: tail✝)\n[PROOFSTEP]\ncase nil\n m =>\n have h3 : get m (nil {k ↦ a}) = default :=\n by\n rw [get_set_eq_of_ne k m, get_nil]\n intro hc\n apply h1\n simp [hc]\n apply h3\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk m : ℕ\nh1 : Nat.succ m ≠ k + 1\n⊢ get (Nat.succ m) ([] {k + 1 ↦ a}) = get (Nat.succ m) []\n[PROOFSTEP]\ncase nil\n m =>\n have h3 : get m (nil {k ↦ a}) = default :=\n by\n rw [get_set_eq_of_ne k m, get_nil]\n intro hc\n apply h1\n simp [hc]\n apply h3\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk m : ℕ\nh1 : Nat.succ m ≠ k + 1\n⊢ get (Nat.succ m) ([] {k + 1 ↦ a}) = get (Nat.succ m) []\n[PROOFSTEP]\nhave h3 : get m (nil {k ↦ a}) = default :=\n by\n rw [get_set_eq_of_ne k m, get_nil]\n intro hc\n apply h1\n simp [hc]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk m : ℕ\nh1 : Nat.succ m ≠ k + 1\n⊢ get m ([] {k ↦ a}) = default\n[PROOFSTEP]\nrw [get_set_eq_of_ne k m, get_nil]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk m : ℕ\nh1 : Nat.succ m ≠ k + 1\n⊢ m ≠ k\n[PROOFSTEP]\nintro hc\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk m : ℕ\nh1 : Nat.succ m ≠ k + 1\nhc : m = k\n⊢ False\n[PROOFSTEP]\napply h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk m : ℕ\nh1 : Nat.succ m ≠ k + 1\nhc : m = k\n⊢ Nat.succ m = k + 1\n[PROOFSTEP]\nsimp [hc]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk m : ℕ\nh1 : Nat.succ m ≠ k + 1\nh3 : get m ([] {k ↦ a}) = default\n⊢ get (Nat.succ m) ([] {k + 1 ↦ a}) = get (Nat.succ m) []\n[PROOFSTEP]\napply h3\n[GOAL]\ncase cons.zero\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nhead✝ : α\ntail✝ : List α\nh1 : Nat.zero ≠ k + 1\n⊢ get Nat.zero ((head✝ :: tail✝) {k + 1 ↦ a}) = get Nat.zero (head✝ :: tail✝)\ncase cons.succ\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nhead✝ : α\ntail✝ : List α\nn✝ : ℕ\nh1 : Nat.succ n✝ ≠ k + 1\n⊢ get (Nat.succ n✝) ((head✝ :: tail✝) {k + 1 ↦ a}) = get (Nat.succ n✝) (head✝ :: tail✝)\n[PROOFSTEP]\ncase zero => simp only [set, get]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nhead✝ : α\ntail✝ : List α\nh1 : Nat.zero ≠ k + 1\n⊢ get Nat.zero ((head✝ :: tail✝) {k + 1 ↦ a}) = get Nat.zero (head✝ :: tail✝)\n[PROOFSTEP]\ncase zero => simp only [set, get]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nhead✝ : α\ntail✝ : List α\nh1 : Nat.zero ≠ k + 1\n⊢ get Nat.zero ((head✝ :: tail✝) {k + 1 ↦ a}) = get Nat.zero (head✝ :: tail✝)\n[PROOFSTEP]\nsimp only [set, get]\n[GOAL]\ncase cons.succ\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nhead✝ : α\ntail✝ : List α\nn✝ : ℕ\nh1 : Nat.succ n✝ ≠ k + 1\n⊢ get (Nat.succ n✝) ((head✝ :: tail✝) {k + 1 ↦ a}) = get (Nat.succ n✝) (head✝ :: tail✝)\n[PROOFSTEP]\ncase _ _ m =>\n apply get_set_eq_of_ne k m\n intro hc\n apply h1\n simp [hc]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nhead✝ : α\ntail✝ : List α\nm : ℕ\nh1 : Nat.succ m ≠ k + 1\n⊢ get (Nat.succ m) ((head✝ :: tail✝) {k + 1 ↦ a}) = get (Nat.succ m) (head✝ :: tail✝)\n[PROOFSTEP]\ncase _ _ m =>\n apply get_set_eq_of_ne k m\n intro hc\n apply h1\n simp [hc]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nhead✝ : α\ntail✝ : List α\nm : ℕ\nh1 : Nat.succ m ≠ k + 1\n⊢ get (Nat.succ m) ((head✝ :: tail✝) {k + 1 ↦ a}) = get (Nat.succ m) (head✝ :: tail✝)\n[PROOFSTEP]\napply get_set_eq_of_ne k m\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nhead✝ : α\ntail✝ : List α\nm : ℕ\nh1 : Nat.succ m ≠ k + 1\n⊢ m ≠ k\n[PROOFSTEP]\nintro hc\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nhead✝ : α\ntail✝ : List α\nm : ℕ\nh1 : Nat.succ m ≠ k + 1\nhc : m = k\n⊢ False\n[PROOFSTEP]\napply h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na : α\nk : ℕ\nhead✝ : α\ntail✝ : List α\nm : ℕ\nh1 : Nat.succ m ≠ k + 1\nhc : m = k\n⊢ Nat.succ m = k + 1\n[PROOFSTEP]\nsimp [hc]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nf : α → β\nx✝ : ℕ\nh : x✝ < length []\n⊢ get x✝ (map f []) = f (get x✝ [])\n[PROOFSTEP]\ncases h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nf : α → β\nn : ℕ\nhead✝ : α\nas : List α\nh1 : n + 1 < length (head✝ :: as)\n⊢ get (n + 1) (map f (head✝ :: as)) = f (get (n + 1) (head✝ :: as))\n[PROOFSTEP]\nhave h2 : n < length as := by\n rw [← Nat.succ_le_iff, ← Nat.lt_succ_iff]\n apply h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nf : α → β\nn : ℕ\nhead✝ : α\nas : List α\nh1 : n + 1 < length (head✝ :: as)\n⊢ n < length as\n[PROOFSTEP]\nrw [← Nat.succ_le_iff, ← Nat.lt_succ_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nf : α → β\nn : ℕ\nhead✝ : α\nas : List α\nh1 : n + 1 < length (head✝ :: as)\n⊢ Nat.succ n < Nat.succ (length as)\n[PROOFSTEP]\napply h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nf : α → β\nn : ℕ\nhead✝ : α\nas : List α\nh1 : n + 1 < length (head✝ :: as)\nh2 : n < length as\n⊢ get (n + 1) (map f (head✝ :: as)) = f (get (n + 1) (head✝ :: as))\n[PROOFSTEP]\napply get_map h2\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nf : α → β\nn : ℕ\nas : List α\n⊢ f default = default → get n (map f as) = f (get n as)\n[PROOFSTEP]\nintro h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nf : α → β\nn : ℕ\nas : List α\nh1 : f default = default\n⊢ get n (map f as) = f (get n as)\n[PROOFSTEP]\nby_cases h2 : n < as.length\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nf : α → β\nn : ℕ\nas : List α\nh1 : f default = default\nh2 : n < length as\n⊢ get n (map f as) = f (get n as)\n[PROOFSTEP]\napply get_map h2\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nf : α → β\nn : ℕ\nas : List α\nh1 : f default = default\nh2 : ¬n < length as\n⊢ get n (map f as) = f (get n as)\n[PROOFSTEP]\nrw [not_lt] at h2 \n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nf : α → β\nn : ℕ\nas : List α\nh1 : f default = default\nh2 : length as ≤ n\n⊢ get n (map f as) = f (get n as)\n[PROOFSTEP]\nrw [get_eq_default_of_le _ h2, get_eq_default_of_le, h1]\n[GOAL]\ncase neg.a\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nf : α → β\nn : ℕ\nas : List α\nh1 : f default = default\nh2 : length as ≤ n\n⊢ length (map f as) ≤ n\n[PROOFSTEP]\nrw [length_map]\n[GOAL]\ncase neg.a\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nf : α → β\nn : ℕ\nas : List α\nh1 : f default = default\nh2 : length as ≤ n\n⊢ length as ≤ n\n[PROOFSTEP]\napply h2\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nas : List α\np : α → Prop\n⊢ p default → (∀ (x : α), x ∈ as → p x) → ∀ (n : ℕ), p (get n as)\n[PROOFSTEP]\nintro h1 h2 n\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nas : List α\np : α → Prop\nh1 : p default\nh2 : ∀ (x : α), x ∈ as → p x\nn : ℕ\n⊢ p (get n as)\n[PROOFSTEP]\nby_cases h3 : n < as.length\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nas : List α\np : α → Prop\nh1 : p default\nh2 : ∀ (x : α), x ∈ as → p x\nn : ℕ\nh3 : n < length as\n⊢ p (get n as)\n[PROOFSTEP]\napply h2 _ (mem_get_of_le h3)\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nas : List α\np : α → Prop\nh1 : p default\nh2 : ∀ (x : α), x ∈ as → p x\nn : ℕ\nh3 : ¬n < length as\n⊢ p (get n as)\n[PROOFSTEP]\nrw [not_lt] at h3 \n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nas : List α\np : α → Prop\nh1 : p default\nh2 : ∀ (x : α), x ∈ as → p x\nn : ℕ\nh3 : length as ≤ n\n⊢ p (get n as)\n[PROOFSTEP]\nrw [get_eq_default_of_le _ h3]\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas✝ as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nas : List α\np : α → Prop\nh1 : p default\nh2 : ∀ (x : α), x ∈ as → p x\nn : ℕ\nh3 : length as ≤ n\n⊢ p default\n[PROOFSTEP]\napply h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\n⊢ as1 = as2 → Equiv as1 as2\n[PROOFSTEP]\nintro h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nh1 : as1 = as2\n⊢ Equiv as1 as2\n[PROOFSTEP]\nrw [h1]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nh1 : as1 = as2\n⊢ Equiv as2 as2\n[PROOFSTEP]\napply equiv_refl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nhead✝ : α\ntail✝ : List α\nh1 : length (head✝ :: tail✝) = length []\nx✝ : Equiv (head✝ :: tail✝) []\n⊢ head✝ :: tail✝ = []\n[PROOFSTEP]\ncases h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1 as2 as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nhead✝ : α\ntail✝ : List α\nh1 : length [] = length (head✝ :: tail✝)\nx✝ : Equiv [] (head✝ :: tail✝)\n⊢ [] = head✝ :: tail✝\n[PROOFSTEP]\ncases h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1✝ as2✝ as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na1 : α\nas1 : List α\na2 : α\nas2 : List α\nh1 : length (a1 :: as1) = length (a2 :: as2)\nh2 : Equiv (a1 :: as1) (a2 :: as2)\n⊢ a1 :: as1 = a2 :: as2\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_head\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1✝ as2✝ as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na1 : α\nas1 : List α\na2 : α\nas2 : List α\nh1 : length (a1 :: as1) = length (a2 :: as2)\nh2 : Equiv (a1 :: as1) (a2 :: as2)\n⊢ a1 = a2\n[PROOFSTEP]\napply h2 0\n[GOAL]\ncase e_tail\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1✝ as2✝ as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na1 : α\nas1 : List α\na2 : α\nas2 : List α\nh1 : length (a1 :: as1) = length (a2 :: as2)\nh2 : Equiv (a1 :: as1) (a2 :: as2)\n⊢ as1 = as2\n[PROOFSTEP]\nhave h3 : as1.length = as2.length := by simpa [add_left_inj, add_comm, length] using h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1✝ as2✝ as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na1 : α\nas1 : List α\na2 : α\nas2 : List α\nh1 : length (a1 :: as1) = length (a2 :: as2)\nh2 : Equiv (a1 :: as1) (a2 :: as2)\n⊢ length as1 = length as2\n[PROOFSTEP]\nsimpa [add_left_inj, add_comm, length] using h1\n[GOAL]\ncase e_tail\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1✝ as2✝ as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na1 : α\nas1 : List α\na2 : α\nas2 : List α\nh1 : length (a1 :: as1) = length (a2 :: as2)\nh2 : Equiv (a1 :: as1) (a2 :: as2)\nh3 : length as1 = length as2\n⊢ as1 = as2\n[PROOFSTEP]\napply eq_of_equiv h3\n[GOAL]\ncase e_tail\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1✝ as2✝ as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na1 : α\nas1 : List α\na2 : α\nas2 : List α\nh1 : length (a1 :: as1) = length (a2 :: as2)\nh2 : Equiv (a1 :: as1) (a2 :: as2)\nh3 : length as1 = length as2\n⊢ Equiv as1 as2\n[PROOFSTEP]\nintro m\n[GOAL]\ncase e_tail\nα : Type u\nβ : Type v\nγ : Type w\na : α\nas as1✝ as2✝ as3 : List α\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\na1 : α\nas1 : List α\na2 : α\nas2 : List α\nh1 : length (a1 :: as1) = length (a2 :: as2)\nh2 : Equiv (a1 :: as1) (a2 :: as2)\nh3 : length as1 = length as2\nm : ℕ\n⊢ get m as1 = get m as2\n[PROOFSTEP]\napply h2 (m + 1)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : AddGroup α\nk : ℕ\nas : List α\n⊢ get k (neg as) = -get k as\n[PROOFSTEP]\nunfold neg\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : AddGroup α\nk : ℕ\nas : List α\n⊢ get k (map (fun a => -a) as) = -get k as\n[PROOFSTEP]\nrw [@get_map' α α ⟨0⟩ ⟨0⟩]\n -- porting note: had to add a `⟨0⟩` b/c of instance troubles\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : AddGroup α\nk : ℕ\nas : List α\n⊢ -default = default\n[PROOFSTEP]\napply neg_zero\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Neg α\nas : List α\n⊢ length (neg as) = length as\n[PROOFSTEP]\nsimp only [neg, length_map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nf : α → β → γ\nb : β\nbs : List β\n⊢ pointwise f [] (b :: bs) = map (f default) (b :: bs)\n[PROOFSTEP]\nsimp only [nil_pointwise bs, pointwise, eq_self_iff_true, and_self_iff, map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nf : α → β → γ\na : α\nas : List α\n⊢ pointwise f (a :: as) [] = map (fun a => f a default) (a :: as)\n[PROOFSTEP]\nsimp only [pointwise_nil as, pointwise, eq_self_iff_true, and_self_iff, List.map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : Inhabited α\ninst✝¹ : Inhabited β\ninst✝ : Inhabited γ\nf : α → β → γ\nh1 : f default default = default\nk : ℕ\n⊢ get k (pointwise f [] []) = f (get k []) (get k [])\n[PROOFSTEP]\nsimp only [h1, get_nil, pointwise, get]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : Inhabited α\ninst✝¹ : Inhabited β\ninst✝ : Inhabited γ\nf : α → β → γ\nh1 : f default default = default\nb : β\ntail✝ : List β\n⊢ get 0 (pointwise f [] (b :: tail✝)) = f (get 0 []) (get 0 (b :: tail✝))\n[PROOFSTEP]\nsimp only [get_pointwise, get_nil, pointwise, get, Nat.zero_eq, map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : Inhabited α\ninst✝¹ : Inhabited β\ninst✝ : Inhabited γ\nf : α → β → γ\nh1 : f default default = default\nk : ℕ\nb : β\nbs : List β\n⊢ get (k + 1) (pointwise f [] (b :: bs)) = f (get (k + 1) []) (get (k + 1) (b :: bs))\n[PROOFSTEP]\nhave : get k (map (f default) bs) = f default (get k bs) := by\n simpa [nil_pointwise, get_nil] using get_pointwise h1 k [] bs\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : Inhabited α\ninst✝¹ : Inhabited β\ninst✝ : Inhabited γ\nf : α → β → γ\nh1 : f default default = default\nk : ℕ\nb : β\nbs : List β\n⊢ get k (map (f default) bs) = f default (get k bs)\n[PROOFSTEP]\nsimpa [nil_pointwise, get_nil] using get_pointwise h1 k [] bs\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : Inhabited α\ninst✝¹ : Inhabited β\ninst✝ : Inhabited γ\nf : α → β → γ\nh1 : f default default = default\nk : ℕ\nb : β\nbs : List β\nthis : get k (map (f default) bs) = f default (get k bs)\n⊢ get (k + 1) (pointwise f [] (b :: bs)) = f (get (k + 1) []) (get (k + 1) (b :: bs))\n[PROOFSTEP]\nsimpa [get, get_nil, pointwise, map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : Inhabited α\ninst✝¹ : Inhabited β\ninst✝ : Inhabited γ\nf : α → β → γ\nh1 : f default default = default\na : α\ntail✝ : List α\n⊢ get 0 (pointwise f (a :: tail✝) []) = f (get 0 (a :: tail✝)) (get 0 [])\n[PROOFSTEP]\nsimp only [get_pointwise, get_nil, pointwise, get, Nat.zero_eq, map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : Inhabited α\ninst✝¹ : Inhabited β\ninst✝ : Inhabited γ\nf : α → β → γ\nh1 : f default default = default\nk : ℕ\na : α\nas : List α\n⊢ get (k + 1) (pointwise f (a :: as) []) = f (get (k + 1) (a :: as)) (get (k + 1) [])\n[PROOFSTEP]\nsimpa [get, get_nil, pointwise, map, pointwise_nil, get_nil] using get_pointwise h1 k as []\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : Inhabited α\ninst✝¹ : Inhabited β\ninst✝ : Inhabited γ\nf : α → β → γ\nh1 : f default default = default\na : α\ntail✝¹ : List α\nb : β\ntail✝ : List β\n⊢ get 0 (pointwise f (a :: tail✝¹) (b :: tail✝)) = f (get 0 (a :: tail✝¹)) (get 0 (b :: tail✝))\n[PROOFSTEP]\nsimp only [pointwise, get]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : Inhabited α\ninst✝¹ : Inhabited β\ninst✝ : Inhabited γ\nf : α → β → γ\nh1 : f default default = default\nk : ℕ\nhead✝¹ : α\nas : List α\nhead✝ : β\nbs : List β\n⊢ get (k + 1) (pointwise f (head✝¹ :: as) (head✝ :: bs)) = f (get (k + 1) (head✝¹ :: as)) (get (k + 1) (head✝ :: bs))\n[PROOFSTEP]\nsimp only [get, Nat.add_eq, add_zero, get_pointwise h1 k as bs]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nf : α → β → γ\nhead✝ : β\nbs : List β\n⊢ length (pointwise f [] (head✝ :: bs)) = max (length []) (length (head✝ :: bs))\n[PROOFSTEP]\nsimp only [pointwise, length, length_map, max_eq_right (Nat.zero_le (length bs + 1))]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nf : α → β → γ\nhead✝ : α\nas : List α\n⊢ length (pointwise f (head✝ :: as) []) = max (length (head✝ :: as)) (length [])\n[PROOFSTEP]\nsimp only [pointwise, length, length_map, max_eq_left (Nat.zero_le (length as + 1))]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : Inhabited α\ninst✝ : Inhabited β\nf : α → β → γ\nhead✝¹ : α\nas : List α\nhead✝ : β\nbs : List β\n⊢ length (pointwise f (head✝¹ :: as) (head✝ :: bs)) = max (length (head✝¹ :: as)) (length (head✝ :: bs))\n[PROOFSTEP]\nsimp only [pointwise, length, Nat.max_succ_succ, @length_pointwise _ as bs]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nk : ℕ\nxs ys : List α\n⊢ get k (add xs ys) = get k xs + get k ys\n[PROOFSTEP]\napply @get_pointwise _ _ _ ⟨0⟩ ⟨0⟩ ⟨0⟩\n[GOAL]\ncase h1\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nk : ℕ\nxs ys : List α\n⊢ default + default = default\n[PROOFSTEP]\napply zero_add\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nas : List α\n⊢ add [] as = as\n[PROOFSTEP]\nrw [add, @nil_pointwise α α α ⟨0⟩ ⟨0⟩]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nas : List α\n⊢ map (fun x => default + x) as = as\n[PROOFSTEP]\napply Eq.trans _ (map_id as)\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nas : List α\n⊢ map (fun x => default + x) as = map id as\n[PROOFSTEP]\ncongr with x\n[GOAL]\ncase e_f.h\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nas : List α\nx : α\n⊢ default + x = id x\n[PROOFSTEP]\nexact zero_add x\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nas : List α\n⊢ add as [] = as\n[PROOFSTEP]\nrw [add, @pointwise_nil α α α ⟨0⟩ ⟨0⟩]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nas : List α\n⊢ map (fun a => a + default) as = as\n[PROOFSTEP]\napply Eq.trans _ (map_id as)\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nas : List α\n⊢ map (fun a => a + default) as = map id as\n[PROOFSTEP]\ncongr with x\n[GOAL]\ncase e_f.h\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nas : List α\nx : α\n⊢ x + default = id x\n[PROOFSTEP]\nexact add_zero x\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\n⊢ add (map f as) (map g as) = map (fun x => f x + g x) as\n[PROOFSTEP]\napply @eq_of_equiv _ (⟨0⟩ : Inhabited α)\n[GOAL]\ncase a\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\n⊢ length (add (map f as) (map g as)) = length (map (fun x => f x + g x) as)\n[PROOFSTEP]\nrw [length_map, length_add, max_eq_left, length_map]\n[GOAL]\ncase a\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\n⊢ length (map g as) ≤ length (map f as)\n[PROOFSTEP]\napply le_of_eq\n[GOAL]\ncase a.a\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\n⊢ length (map g as) = length (map f as)\n[PROOFSTEP]\nrw [length_map, length_map]\n[GOAL]\ncase a\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\n⊢ Equiv (add (map f as) (map g as)) (map (fun x => f x + g x) as)\n[PROOFSTEP]\nintro m\n[GOAL]\ncase a\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\n⊢ get m (add (map f as) (map g as)) = get m (map (fun x => f x + g x) as)\n[PROOFSTEP]\nrw [get_add]\n[GOAL]\ncase a\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\n⊢ get m (map f as) + get m (map g as) = get m (map (fun x => f x + g x) as)\n[PROOFSTEP]\nby_cases h : m < length as\n[GOAL]\ncase pos\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : m < length as\n⊢ get m (map f as) + get m (map g as) = get m (map (fun x => f x + g x) as)\n[PROOFSTEP]\nrepeat' rw [@get_map α α ⟨0⟩ ⟨0⟩ _ _ _ h]\n[GOAL]\ncase pos\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : m < length as\n⊢ get m (map f as) + get m (map g as) = get m (map (fun x => f x + g x) as)\n[PROOFSTEP]\nrw [@get_map α α ⟨0⟩ ⟨0⟩ _ _ _ h]\n[GOAL]\ncase pos\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : m < length as\n⊢ f (get m as) + get m (map g as) = get m (map (fun x => f x + g x) as)\n[PROOFSTEP]\nrw [@get_map α α ⟨0⟩ ⟨0⟩ _ _ _ h]\n[GOAL]\ncase pos\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : m < length as\n⊢ f (get m as) + g (get m as) = get m (map (fun x => f x + g x) as)\n[PROOFSTEP]\nrw [@get_map α α ⟨0⟩ ⟨0⟩ _ _ _ h]\n[GOAL]\ncase neg\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : ¬m < length as\n⊢ get m (map f as) + get m (map g as) = get m (map (fun x => f x + g x) as)\n[PROOFSTEP]\nrw [not_lt] at h \n[GOAL]\ncase neg\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ get m (map f as) + get m (map g as) = get m (map (fun x => f x + g x) as)\n[PROOFSTEP]\nrepeat' rw [@get_eq_default_of_le _ ⟨0⟩ m] <;> try rw [length_map]; apply h\n[GOAL]\ncase neg\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ get m (map f as) + get m (map g as) = get m (map (fun x => f x + g x) as)\n[PROOFSTEP]\nrw [@get_eq_default_of_le _ ⟨0⟩ m]\n[GOAL]\ncase neg\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ default + get m (map g as) = get m (map (fun x => f x + g x) as)\n[PROOFSTEP]\ntry rw [length_map]; apply h\n[GOAL]\ncase neg\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ default + get m (map g as) = get m (map (fun x => f x + g x) as)\n[PROOFSTEP]\nrw [length_map]\n[GOAL]\ncase neg.a\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ length (map f as) ≤ m\n[PROOFSTEP]\ntry rw [length_map]; apply h\n[GOAL]\ncase neg.a\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ length (map f as) ≤ m\n[PROOFSTEP]\nrw [length_map]\n[GOAL]\ncase neg.a\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ length as ≤ m\n[PROOFSTEP]\napply h\n[GOAL]\ncase neg\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ default + get m (map g as) = get m (map (fun x => f x + g x) as)\n[PROOFSTEP]\nrw [@get_eq_default_of_le _ ⟨0⟩ m]\n[GOAL]\ncase neg\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ default + default = get m (map (fun x => f x + g x) as)\n[PROOFSTEP]\ntry rw [length_map]; apply h\n[GOAL]\ncase neg\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ default + default = get m (map (fun x => f x + g x) as)\n[PROOFSTEP]\nrw [length_map]\n[GOAL]\ncase neg.a\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ length (map g as) ≤ m\n[PROOFSTEP]\ntry rw [length_map]; apply h\n[GOAL]\ncase neg.a\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ length (map g as) ≤ m\n[PROOFSTEP]\nrw [length_map]\n[GOAL]\ncase neg.a\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ length as ≤ m\n[PROOFSTEP]\napply h\n[GOAL]\ncase neg\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ default + default = get m (map (fun x => f x + g x) as)\n[PROOFSTEP]\nrw [@get_eq_default_of_le _ ⟨0⟩ m]\n[GOAL]\ncase neg\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ default + default = default\n[PROOFSTEP]\ntry rw [length_map]; apply h\n[GOAL]\ncase neg\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ default + default = default\n[PROOFSTEP]\nrw [length_map]\n[GOAL]\ncase neg.a\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ length (map (fun x => f x + g x) as) ≤ m\n[PROOFSTEP]\ntry rw [length_map]; apply h\n[GOAL]\ncase neg.a\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ length (map (fun x => f x + g x) as) ≤ m\n[PROOFSTEP]\nrw [length_map]\n[GOAL]\ncase neg.a\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ length as ≤ m\n[PROOFSTEP]\napply h\n[GOAL]\ncase neg\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ default + default = default\n[PROOFSTEP]\nrw [@get_eq_default_of_le _ ⟨0⟩ m]\n[GOAL]\ncase neg\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddMonoid α\nf g : α → α\nas : List α\nm : ℕ\nh : length as ≤ m\n⊢ default + default = default\n[PROOFSTEP]\nexact zero_add _\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddGroup α\nk : ℕ\nxs ys : List α\n⊢ get k (sub xs ys) = get k xs - get k ys\n[PROOFSTEP]\napply @get_pointwise _ _ _ ⟨0⟩ ⟨0⟩ ⟨0⟩\n[GOAL]\ncase h1\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u\ninst✝ : AddGroup α\nk : ℕ\nxs ys : List α\n⊢ Sub.sub default default = default\n[PROOFSTEP]\napply sub_zero\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\ninst✝ : AddGroup α\nas : List α\n⊢ sub [] as = neg as\n[PROOFSTEP]\nrw [sub, @nil_pointwise _ _ _ ⟨0⟩ ⟨0⟩]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\ninst✝ : AddGroup α\nas : List α\n⊢ map (Sub.sub default) as = neg as\n[PROOFSTEP]\ncongr with x\n[GOAL]\ncase e_f.h\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\ninst✝ : AddGroup α\nas : List α\nx : α\n⊢ Sub.sub default x = -x\n[PROOFSTEP]\nexact zero_sub x\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\ninst✝ : AddGroup α\nas : List α\n⊢ sub as [] = as\n[PROOFSTEP]\nrw [sub, @pointwise_nil _ _ _ ⟨0⟩ ⟨0⟩]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\ninst✝ : AddGroup α\nas : List α\n⊢ map (fun a => Sub.sub a default) as = as\n[PROOFSTEP]\napply Eq.trans _ (map_id as)\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\ninst✝ : AddGroup α\nas : List α\n⊢ map (fun a => Sub.sub a default) as = map id as\n[PROOFSTEP]\ncongr with x\n[GOAL]\ncase e_f.h\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\ninst✝ : AddGroup α\nas : List α\nx : α\n⊢ Sub.sub x default = id x\n[PROOFSTEP]\nexact sub_zero x\n", "meta": {"mathlib_filename": "Mathlib.Data.List.Func", "llama_tokens": 22237, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8596637505099167, "lm_q2_score": 0.6926419704455588, "lm_q1q2_score": 0.595439194073808}} {"text": "[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : NormedAddCommGroup V\ninst✝² : NormedSpace 𝕜 V\ninst✝¹ : NormedAddCommGroup W\ninst✝ : NormedSpace 𝕜 W\nn : ℕ∞\nf : V →A[𝕜] W\n⊢ ContDiff 𝕜 n ↑f\n[PROOFSTEP]\nrw [f.decomp]\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : NormedAddCommGroup V\ninst✝² : NormedSpace 𝕜 V\ninst✝¹ : NormedAddCommGroup W\ninst✝ : NormedSpace 𝕜 W\nn : ℕ∞\nf : V →A[𝕜] W\n⊢ ContDiff 𝕜 n (↑(contLinear f) + Function.const V (↑f 0))\n[PROOFSTEP]\napply f.contLinear.contDiff.add\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : NormedAddCommGroup V\ninst✝² : NormedSpace 𝕜 V\ninst✝¹ : NormedAddCommGroup W\ninst✝ : NormedSpace 𝕜 W\nn : ℕ∞\nf : V →A[𝕜] W\n⊢ ContDiff 𝕜 n fun x => Function.const V (↑f 0) x\n[PROOFSTEP]\nsimp only\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : NormedAddCommGroup V\ninst✝² : NormedSpace 𝕜 V\ninst✝¹ : NormedAddCommGroup W\ninst✝ : NormedSpace 𝕜 W\nn : ℕ∞\nf : V →A[𝕜] W\n⊢ ContDiff 𝕜 n fun x => Function.const V (↑f 0) x\n[PROOFSTEP]\nexact contDiff_const\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.AffineMap", "llama_tokens": 574, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8397339676722393, "lm_q2_score": 0.7090191214879991, "lm_q1q2_score": 0.5953874400426029}} {"text": "[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na✝ b✝ c d a b : α\n⊢ min a b = a ∧ a ≤ b ∨ min a b = b ∧ b < a\n[PROOFSTEP]\nby_cases h : a ≤ b\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na✝ b✝ c d a b : α\nh : a ≤ b\n⊢ min a b = a ∧ a ≤ b ∨ min a b = b ∧ b < a\n[PROOFSTEP]\nleft\n[GOAL]\ncase pos.h\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na✝ b✝ c d a b : α\nh : a ≤ b\n⊢ min a b = a ∧ a ≤ b\n[PROOFSTEP]\nexact ⟨min_eq_left h, h⟩\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na✝ b✝ c d a b : α\nh : ¬a ≤ b\n⊢ min a b = a ∧ a ≤ b ∨ min a b = b ∧ b < a\n[PROOFSTEP]\nright\n[GOAL]\ncase neg.h\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na✝ b✝ c d a b : α\nh : ¬a ≤ b\n⊢ min a b = b ∧ b < a\n[PROOFSTEP]\nexact ⟨min_eq_right (le_of_lt (not_le.mp h)), not_le.mp h⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\n⊢ min a b = c ↔ a = c ∧ a ≤ b ∨ b = c ∧ b ≤ a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\n⊢ min a b = c → a = c ∧ a ≤ b ∨ b = c ∧ b ≤ a\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\nh : min a b = c\n⊢ a = c ∧ a ≤ b ∨ b = c ∧ b ≤ a\n[PROOFSTEP]\nrefine' Or.imp (fun h' => _) (fun h' => _) (le_total a b)\n[GOAL]\ncase mp.refine'_1\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\nh : min a b = c\nh' : a ≤ b\n⊢ a = c ∧ a ≤ b\n[PROOFSTEP]\nexact ⟨by simpa [h'] using h, h'⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\nh : min a b = c\nh' : a ≤ b\n⊢ a = c\n[PROOFSTEP]\nsimpa [h'] using h\n[GOAL]\ncase mp.refine'_2\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\nh : min a b = c\nh' : b ≤ a\n⊢ b = c ∧ b ≤ a\n[PROOFSTEP]\nexact ⟨by simpa [h'] using h, h'⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\nh : min a b = c\nh' : b ≤ a\n⊢ b = c\n[PROOFSTEP]\nsimpa [h'] using h\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\n⊢ a = c ∧ a ≤ b ∨ b = c ∧ b ≤ a → min a b = c\n[PROOFSTEP]\nrintro (⟨rfl, h⟩ | ⟨rfl, h⟩)\n[GOAL]\ncase mpr.inl.intro\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b d : α\nh : a ≤ b\n⊢ min a b = a\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase mpr.inr.intro\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b d : α\nh : b ≤ a\n⊢ min a b = b\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\n⊢ min a c < min b c ↔ a < b ∧ a < c\n[PROOFSTEP]\nsimp_rw [lt_min_iff, min_lt_iff, or_iff_left (lt_irrefl _)]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\n⊢ (a < b ∨ c < b) ∧ a < c ↔ a < b ∧ a < c\n[PROOFSTEP]\nexact and_congr_left fun h => or_iff_left_of_imp h.trans\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\n⊢ min a b < min a c ↔ b < c ∧ b < a\n[PROOFSTEP]\nsimp_rw [min_comm a, min_lt_min_left_iff]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\n⊢ ∀ (a : α), max a a = a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\n⊢ ∀ (a : α), min a a = a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\nhf : MonotoneOn f s\nha : a ∈ s\nhb : b ∈ s\n⊢ f (max a b) = max (f a) (f b)\n[PROOFSTEP]\ncases' le_total a b with h h\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\nhf : MonotoneOn f s\nha : a ∈ s\nhb : b ∈ s\nh : a ≤ b\n⊢ f (max a b) = max (f a) (f b)\n[PROOFSTEP]\nsimp only [max_eq_right, max_eq_left, hf ha hb, hf hb ha, h]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\nhf : MonotoneOn f s\nha : a ∈ s\nhb : b ∈ s\nh : b ≤ a\n⊢ f (max a b) = max (f a) (f b)\n[PROOFSTEP]\nsimp only [max_eq_right, max_eq_left, hf ha hb, hf hb ha, h]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\nhf : Monotone f\n⊢ f (max a b) = max (f a) (f b)\n[PROOFSTEP]\ncases' le_total a b with h h\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\nhf : Monotone f\nh : a ≤ b\n⊢ f (max a b) = max (f a) (f b)\n[PROOFSTEP]\nsimp [h, hf h]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\nhf : Monotone f\nh : b ≤ a\n⊢ f (max a b) = max (f a) (f b)\n[PROOFSTEP]\nsimp [h, hf h]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\nhf : Antitone f\n⊢ f (max a b) = min (f a) (f b)\n[PROOFSTEP]\ncases' le_total a b with h h\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\nhf : Antitone f\nh : a ≤ b\n⊢ f (max a b) = min (f a) (f b)\n[PROOFSTEP]\nsimp [h, hf h]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na b c d : α\nhf : Antitone f\nh : b ≤ a\n⊢ f (max a b) = min (f a) (f b)\n[PROOFSTEP]\nsimp [h, hf h]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na✝ b✝ c d a b : α\n⊢ min a b = a ∨ min a b = b\n[PROOFSTEP]\ncases le_total a b\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na✝ b✝ c d a b : α\nh✝ : a ≤ b\n⊢ min a b = a ∨ min a b = b\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : LinearOrder β\nf : α → β\ns : Set α\na✝ b✝ c d a b : α\nh✝ : b ≤ a\n⊢ min a b = a ∨ min a b = b\n[PROOFSTEP]\nsimp [*]\n", "meta": {"mathlib_filename": "Mathlib.Order.MinMax", "llama_tokens": 3352, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.785308580887758, "lm_q2_score": 0.7577943767446202, "lm_q1q2_score": 0.5951024266060407}} {"text": "[GOAL]\nK✝ : Type u_1\ninst✝⁴ : DivisionRing K✝\ninst✝³ : TopologicalSpace K✝\nα : Type u_2\ninst✝² : Field α\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalDivisionRing α\nK : Subfield α\nsrc✝ : Subring α := Subring.topologicalClosure K.toSubring\nx : α\nhx :\n x ∈\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := _root_.closure ↑K,\n mul_mem' := (_ : ∀ {a b : α}, a ∈ src✝.carrier → b ∈ src✝.carrier → a * b ∈ src✝.carrier) },\n one_mem' := (_ : 1 ∈ src✝.carrier) },\n add_mem' := (_ : ∀ {a b : α}, a ∈ src✝.carrier → b ∈ src✝.carrier → a + b ∈ src✝.carrier),\n zero_mem' := (_ : 0 ∈ src✝.carrier) },\n neg_mem' :=\n (_ : ∀ {x : α}, x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n⊢ x⁻¹ ∈\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := _root_.closure ↑K,\n mul_mem' := (_ : ∀ {a b : α}, a ∈ src✝.carrier → b ∈ src✝.carrier → a * b ∈ src✝.carrier) },\n one_mem' := (_ : 1 ∈ src✝.carrier) },\n add_mem' := (_ : ∀ {a b : α}, a ∈ src✝.carrier → b ∈ src✝.carrier → a + b ∈ src✝.carrier),\n zero_mem' := (_ : 0 ∈ src✝.carrier) },\n neg_mem' :=\n (_ : ∀ {x : α}, x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\ndsimp only at hx ⊢\n[GOAL]\nK✝ : Type u_1\ninst✝⁴ : DivisionRing K✝\ninst✝³ : TopologicalSpace K✝\nα : Type u_2\ninst✝² : Field α\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalDivisionRing α\nK : Subfield α\nsrc✝ : Subring α := Subring.topologicalClosure K.toSubring\nx : α\nhx : x ∈ _root_.closure ↑K\n⊢ x⁻¹ ∈ _root_.closure ↑K\n[PROOFSTEP]\nrcases eq_or_ne x 0 with (rfl | h)\n[GOAL]\ncase inl\nK✝ : Type u_1\ninst✝⁴ : DivisionRing K✝\ninst✝³ : TopologicalSpace K✝\nα : Type u_2\ninst✝² : Field α\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalDivisionRing α\nK : Subfield α\nsrc✝ : Subring α := Subring.topologicalClosure K.toSubring\nhx : 0 ∈ _root_.closure ↑K\n⊢ 0⁻¹ ∈ _root_.closure ↑K\n[PROOFSTEP]\nrwa [inv_zero]\n[GOAL]\ncase inr\nK✝ : Type u_1\ninst✝⁴ : DivisionRing K✝\ninst✝³ : TopologicalSpace K✝\nα : Type u_2\ninst✝² : Field α\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalDivisionRing α\nK : Subfield α\nsrc✝ : Subring α := Subring.topologicalClosure K.toSubring\nx : α\nhx : x ∈ _root_.closure ↑K\nh : x ≠ 0\n⊢ x⁻¹ ∈ _root_.closure ↑K\n[PROOFSTEP]\nrw [← @inv_coe_set α (Subfield α) _ _ SubfieldClass.toInvMemClass K, ← Set.image_inv]\n[GOAL]\ncase inr\nK✝ : Type u_1\ninst✝⁴ : DivisionRing K✝\ninst✝³ : TopologicalSpace K✝\nα : Type u_2\ninst✝² : Field α\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalDivisionRing α\nK : Subfield α\nsrc✝ : Subring α := Subring.topologicalClosure K.toSubring\nx : α\nhx : x ∈ _root_.closure ↑K\nh : x ≠ 0\n⊢ x⁻¹ ∈ _root_.closure (Inv.inv '' ↑K)\n[PROOFSTEP]\nexact mem_closure_image (continuousAt_inv₀ h) hx\n[GOAL]\nK : Type u_1\ninst✝⁴ : DivisionRing K\ninst✝³ : TopologicalSpace K\n𝕜 : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : TopologicalRing 𝕜\na b : 𝕜\nh : a ≠ 0\nx : 𝕜\n⊢ (fun y => (y - b) / a) ((fun x => a * x + b) x) = x\n[PROOFSTEP]\nsimp only [add_sub_cancel]\n[GOAL]\nK : Type u_1\ninst✝⁴ : DivisionRing K\ninst✝³ : TopologicalSpace K\n𝕜 : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : TopologicalRing 𝕜\na b : 𝕜\nh : a ≠ 0\nx : 𝕜\n⊢ a * x / a = x\n[PROOFSTEP]\nexact mul_div_cancel_left x h\n[GOAL]\nK : Type u_1\ninst✝⁴ : DivisionRing K\ninst✝³ : TopologicalSpace K\n𝕜 : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : TopologicalRing 𝕜\na b : 𝕜\nh : a ≠ 0\ny : 𝕜\n⊢ (fun x => a * x + b) ((fun y => (y - b) / a) y) = y\n[PROOFSTEP]\nsimp [mul_div_cancel' _ h]\n[GOAL]\nK : Type u_1\ninst✝³ : DivisionRing K\ninst✝² : TopologicalSpace K\nα : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : LinearOrderedSemifield β\na✝ : α\nf : α → β\na : α\nh1 : IsLocalMin f a\nh2 : ∀ᶠ (z : α) in 𝓝 a, 0 < f z\n⊢ IsLocalMax f⁻¹ a\n[PROOFSTEP]\nfilter_upwards [h1, h2] with z h3 h4 using (inv_le_inv h4 h2.self_of_nhds).mpr h3\n[GOAL]\nK : Type u_1\ninst✝⁶ : DivisionRing K\ninst✝⁵ : TopologicalSpace K\nα : Type u_2\n𝕜 : Type u_3\nf g : α → 𝕜\nS : Set α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace 𝕜\ninst✝² : T1Space 𝕜\ninst✝¹ : Ring 𝕜\ninst✝ : NoZeroDivisors 𝕜\nhS : IsPreconnected S\nhf : ContinuousOn f S\nhsq : EqOn (f ^ 2) 1 S\n⊢ EqOn f 1 S ∨ EqOn f (-1) S\n[PROOFSTEP]\nhave : DiscreteTopology ({1, -1} : Set 𝕜) := discrete_of_t1_of_finite\n[GOAL]\nK : Type u_1\ninst✝⁶ : DivisionRing K\ninst✝⁵ : TopologicalSpace K\nα : Type u_2\n𝕜 : Type u_3\nf g : α → 𝕜\nS : Set α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace 𝕜\ninst✝² : T1Space 𝕜\ninst✝¹ : Ring 𝕜\ninst✝ : NoZeroDivisors 𝕜\nhS : IsPreconnected S\nhf : ContinuousOn f S\nhsq : EqOn (f ^ 2) 1 S\nthis : DiscreteTopology ↑{1, -1}\n⊢ EqOn f 1 S ∨ EqOn f (-1) S\n[PROOFSTEP]\nhave hmaps : MapsTo f S {1, -1}\n[GOAL]\ncase hmaps\nK : Type u_1\ninst✝⁶ : DivisionRing K\ninst✝⁵ : TopologicalSpace K\nα : Type u_2\n𝕜 : Type u_3\nf g : α → 𝕜\nS : Set α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace 𝕜\ninst✝² : T1Space 𝕜\ninst✝¹ : Ring 𝕜\ninst✝ : NoZeroDivisors 𝕜\nhS : IsPreconnected S\nhf : ContinuousOn f S\nhsq : EqOn (f ^ 2) 1 S\nthis : DiscreteTopology ↑{1, -1}\n⊢ MapsTo f S {1, -1}\n[PROOFSTEP]\nsimpa only [EqOn, Pi.one_apply, Pi.pow_apply, sq_eq_one_iff] using hsq\n[GOAL]\nK : Type u_1\ninst✝⁶ : DivisionRing K\ninst✝⁵ : TopologicalSpace K\nα : Type u_2\n𝕜 : Type u_3\nf g : α → 𝕜\nS : Set α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace 𝕜\ninst✝² : T1Space 𝕜\ninst✝¹ : Ring 𝕜\ninst✝ : NoZeroDivisors 𝕜\nhS : IsPreconnected S\nhf : ContinuousOn f S\nhsq : EqOn (f ^ 2) 1 S\nthis : DiscreteTopology ↑{1, -1}\nhmaps : MapsTo f S {1, -1}\n⊢ EqOn f 1 S ∨ EqOn f (-1) S\n[PROOFSTEP]\nsimpa using hS.eqOn_const_of_mapsTo hf hmaps\n[GOAL]\nK : Type u_1\ninst✝⁷ : DivisionRing K\ninst✝⁶ : TopologicalSpace K\nα : Type u_2\n𝕜 : Type u_3\nf g : α → 𝕜\nS : Set α\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : T1Space 𝕜\ninst✝² : Field 𝕜\ninst✝¹ : HasContinuousInv₀ 𝕜\ninst✝ : ContinuousMul 𝕜\nhS : IsPreconnected S\nhf : ContinuousOn f S\nhg : ContinuousOn g S\nhsq : EqOn (f ^ 2) (g ^ 2) S\nhg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0\n⊢ EqOn f g S ∨ EqOn f (-g) S\n[PROOFSTEP]\nhave hsq : EqOn ((f / g) ^ 2) 1 S := fun x hx => by simpa [div_eq_one_iff_eq (pow_ne_zero _ (hg_ne hx))] using hsq hx\n[GOAL]\nK : Type u_1\ninst✝⁷ : DivisionRing K\ninst✝⁶ : TopologicalSpace K\nα : Type u_2\n𝕜 : Type u_3\nf g : α → 𝕜\nS : Set α\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : T1Space 𝕜\ninst✝² : Field 𝕜\ninst✝¹ : HasContinuousInv₀ 𝕜\ninst✝ : ContinuousMul 𝕜\nhS : IsPreconnected S\nhf : ContinuousOn f S\nhg : ContinuousOn g S\nhsq : EqOn (f ^ 2) (g ^ 2) S\nhg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0\nx : α\nhx : x ∈ S\n⊢ ((f / g) ^ 2) x = OfNat.ofNat 1 x\n[PROOFSTEP]\nsimpa [div_eq_one_iff_eq (pow_ne_zero _ (hg_ne hx))] using hsq hx\n[GOAL]\nK : Type u_1\ninst✝⁷ : DivisionRing K\ninst✝⁶ : TopologicalSpace K\nα : Type u_2\n𝕜 : Type u_3\nf g : α → 𝕜\nS : Set α\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : T1Space 𝕜\ninst✝² : Field 𝕜\ninst✝¹ : HasContinuousInv₀ 𝕜\ninst✝ : ContinuousMul 𝕜\nhS : IsPreconnected S\nhf : ContinuousOn f S\nhg : ContinuousOn g S\nhsq✝ : EqOn (f ^ 2) (g ^ 2) S\nhg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0\nhsq : EqOn ((f / g) ^ 2) 1 S\n⊢ EqOn f g S ∨ EqOn f (-g) S\n[PROOFSTEP]\nsimpa (config := { contextual := true }) [EqOn, div_eq_iff (hg_ne _)] using\n hS.eq_one_or_eq_neg_one_of_sq_eq (hf.div hg fun z => hg_ne) hsq\n[GOAL]\nK : Type u_1\ninst✝⁷ : DivisionRing K\ninst✝⁶ : TopologicalSpace K\nα : Type u_2\n𝕜 : Type u_3\nf g : α → 𝕜\nS : Set α\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : T1Space 𝕜\ninst✝² : Field 𝕜\ninst✝¹ : HasContinuousInv₀ 𝕜\ninst✝ : ContinuousMul 𝕜\nhS : IsPreconnected S\nhf : ContinuousOn f S\nhg : ContinuousOn g S\nhsq : EqOn (f ^ 2) (g ^ 2) S\nhg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0\ny : α\nhy : y ∈ S\nhy' : f y = g y\nx : α\nhx : x ∈ S\n⊢ f x = g x\n[PROOFSTEP]\nrcases hS.eq_or_eq_neg_of_sq_eq hf hg @hsq @hg_ne with (h | h)\n[GOAL]\ncase inl\nK : Type u_1\ninst✝⁷ : DivisionRing K\ninst✝⁶ : TopologicalSpace K\nα : Type u_2\n𝕜 : Type u_3\nf g : α → 𝕜\nS : Set α\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : T1Space 𝕜\ninst✝² : Field 𝕜\ninst✝¹ : HasContinuousInv₀ 𝕜\ninst✝ : ContinuousMul 𝕜\nhS : IsPreconnected S\nhf : ContinuousOn f S\nhg : ContinuousOn g S\nhsq : EqOn (f ^ 2) (g ^ 2) S\nhg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0\ny : α\nhy : y ∈ S\nhy' : f y = g y\nx : α\nhx : x ∈ S\nh : EqOn f g S\n⊢ f x = g x\n[PROOFSTEP]\nexact h hx\n[GOAL]\ncase inr\nK : Type u_1\ninst✝⁷ : DivisionRing K\ninst✝⁶ : TopologicalSpace K\nα : Type u_2\n𝕜 : Type u_3\nf g : α → 𝕜\nS : Set α\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : T1Space 𝕜\ninst✝² : Field 𝕜\ninst✝¹ : HasContinuousInv₀ 𝕜\ninst✝ : ContinuousMul 𝕜\nhS : IsPreconnected S\nhf : ContinuousOn f S\nhg : ContinuousOn g S\nhsq : EqOn (f ^ 2) (g ^ 2) S\nhg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0\ny : α\nhy : y ∈ S\nhy' : f y = g y\nx : α\nhx : x ∈ S\nh : EqOn f (-g) S\n⊢ f x = g x\n[PROOFSTEP]\nrw [h _, Pi.neg_apply, neg_eq_iff_add_eq_zero, ← two_mul, mul_eq_zero, iff_false_iff.2 (hg_ne _)] at hy' ⊢\n[GOAL]\ncase inr\nK : Type u_1\ninst✝⁷ : DivisionRing K\ninst✝⁶ : TopologicalSpace K\nα : Type u_2\n𝕜 : Type u_3\nf g : α → 𝕜\nS : Set α\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : T1Space 𝕜\ninst✝² : Field 𝕜\ninst✝¹ : HasContinuousInv₀ 𝕜\ninst✝ : ContinuousMul 𝕜\nhS : IsPreconnected S\nhf : ContinuousOn f S\nhg : ContinuousOn g S\nhsq : EqOn (f ^ 2) (g ^ 2) S\nhg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0\ny : α\nhy : y ∈ S\nhy' : 2 = 0 ∨ False\nx : α\nhx : x ∈ S\nh : EqOn f (-g) S\n⊢ 2 = 0 ∨ False\n[PROOFSTEP]\nassumption\n[GOAL]\nK : Type u_1\ninst✝⁷ : DivisionRing K\ninst✝⁶ : TopologicalSpace K\nα : Type u_2\n𝕜 : Type u_3\nf g : α → 𝕜\nS : Set α\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : T1Space 𝕜\ninst✝² : Field 𝕜\ninst✝¹ : HasContinuousInv₀ 𝕜\ninst✝ : ContinuousMul 𝕜\nhS : IsPreconnected S\nhf : ContinuousOn f S\nhg : ContinuousOn g S\nhsq : EqOn (f ^ 2) (g ^ 2) S\nhg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0\ny : α\nhy : y ∈ S\nhy' : 2 = 0 ∨ False\nx : α\nhx : x ∈ S\nh : EqOn f (-g) S\n⊢ x ∈ S\n[PROOFSTEP]\nassumption\n[GOAL]\nK : Type u_1\ninst✝⁷ : DivisionRing K\ninst✝⁶ : TopologicalSpace K\nα : Type u_2\n𝕜 : Type u_3\nf g : α → 𝕜\nS : Set α\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : T1Space 𝕜\ninst✝² : Field 𝕜\ninst✝¹ : HasContinuousInv₀ 𝕜\ninst✝ : ContinuousMul 𝕜\nhS : IsPreconnected S\nhf : ContinuousOn f S\nhg : ContinuousOn g S\nhsq : EqOn (f ^ 2) (g ^ 2) S\nhg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0\ny : α\nhy : y ∈ S\nhy' : 2 = 0 ∨ g y = 0\nx : α\nhx : x ∈ S\nh : EqOn f (-g) S\n⊢ y ∈ S\n[PROOFSTEP]\nassumption\n[GOAL]\nK : Type u_1\ninst✝⁷ : DivisionRing K\ninst✝⁶ : TopologicalSpace K\nα : Type u_2\n𝕜 : Type u_3\nf g : α → 𝕜\nS : Set α\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : T1Space 𝕜\ninst✝² : Field 𝕜\ninst✝¹ : HasContinuousInv₀ 𝕜\ninst✝ : ContinuousMul 𝕜\nhS : IsPreconnected S\nhf : ContinuousOn f S\nhg : ContinuousOn g S\nhsq : EqOn (f ^ 2) (g ^ 2) S\nhg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0\ny : α\nhy : y ∈ S\nhy' : (-g) y = g y\nx : α\nhx : x ∈ S\nh : EqOn f (-g) S\n⊢ x ∈ S\n[PROOFSTEP]\nassumption\n[GOAL]\nK : Type u_1\ninst✝⁷ : DivisionRing K\ninst✝⁶ : TopologicalSpace K\nα : Type u_2\n𝕜 : Type u_3\nf g : α → 𝕜\nS : Set α\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : T1Space 𝕜\ninst✝² : Field 𝕜\ninst✝¹ : HasContinuousInv₀ 𝕜\ninst✝ : ContinuousMul 𝕜\nhS : IsPreconnected S\nhf : ContinuousOn f S\nhg : ContinuousOn g S\nhsq : EqOn (f ^ 2) (g ^ 2) S\nhg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0\ny : α\nhy : y ∈ S\nhy' : f y = g y\nx : α\nhx : x ∈ S\nh : EqOn f (-g) S\n⊢ y ∈ S\n[PROOFSTEP]\nassumption\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Field", "llama_tokens": 5935, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7879311956428947, "lm_q2_score": 0.7549149868676283, "lm_q1q2_score": 0.5948210682113505}} {"text": "[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedSemiring α\na : α\ninst✝ : Invertible a\n⊢ 0 < a * ⅟a\n[PROOFSTEP]\nsimp only [mul_invOf_self, zero_lt_one]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedSemiring α\na : α\ninst✝ : Invertible a\n⊢ ⅟a ≤ 0 ↔ a ≤ 0\n[PROOFSTEP]\nsimp only [← not_lt, invOf_pos]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedSemiring α\na : α\ninst✝ : Invertible a\n⊢ 0 < a * ⅟a\n[PROOFSTEP]\nsimp only [mul_invOf_self, zero_lt_one]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedSemiring α\na : α\ninst✝ : Invertible a\n⊢ ⅟a < 0 ↔ a < 0\n[PROOFSTEP]\nsimp only [← not_le, invOf_nonneg]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Invertible", "llama_tokens": 306, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8757870046160257, "lm_q2_score": 0.6791786991753929, "lm_q1q2_score": 0.5948158785498261}} {"text": "[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\ninst✝ : Invertible (det A)\n⊢ ⅟(det A) • adjugate A * A = 1\n[PROOFSTEP]\nrw [smul_mul_assoc, adjugate_mul, smul_smul, invOf_mul_self, one_smul]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\ninst✝ : Invertible (det A)\n⊢ A * ⅟(det A) • adjugate A = 1\n[PROOFSTEP]\nrw [mul_smul_comm, mul_adjugate, smul_smul, invOf_mul_self, one_smul]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA B : Matrix n n α\ninst✝¹ : Invertible (det A)\ninst✝ : Invertible A\n⊢ ⅟A = ⅟(det A) • adjugate A\n[PROOFSTEP]\nletI := invertibleOfDetInvertible A\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA B : Matrix n n α\ninst✝¹ : Invertible (det A)\ninst✝ : Invertible A\nthis : Invertible A := invertibleOfDetInvertible A\n⊢ ⅟A = ⅟(det A) • adjugate A\n[PROOFSTEP]\nconvert (rfl : ⅟A = _)\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : B * A = 1\n⊢ det B * det A = 1\n[PROOFSTEP]\nrw [← det_mul, h, det_one]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : B * A = 1\n⊢ det A * det B = 1\n[PROOFSTEP]\nrw [mul_comm, ← det_mul, h, det_one]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : A * B = 1\n⊢ det B * det A = 1\n[PROOFSTEP]\nrw [mul_comm, ← det_mul, h, det_one]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : A * B = 1\n⊢ det A * det B = 1\n[PROOFSTEP]\nrw [← det_mul, h, det_one]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA B : Matrix n n α\ninst✝¹ : Invertible A\ninst✝ : Invertible (det A)\n⊢ det ⅟A = ⅟(det A)\n[PROOFSTEP]\nletI := detInvertibleOfInvertible A\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA B : Matrix n n α\ninst✝¹ : Invertible A\ninst✝ : Invertible (det A)\nthis : Invertible (det A) := detInvertibleOfInvertible A\n⊢ det ⅟A = ⅟(det A)\n[PROOFSTEP]\nconvert (rfl : _ = ⅟A.det)\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B✝ A B : Matrix n n α\nh : A * B = 1\n⊢ B * A = 1\n[PROOFSTEP]\nletI : Invertible B.det := detInvertibleOfLeftInverse _ _ h\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B✝ A B : Matrix n n α\nh : A * B = 1\nthis : Invertible (det B) := detInvertibleOfLeftInverse B A h\n⊢ B * A = 1\n[PROOFSTEP]\nletI : Invertible B := invertibleOfDetInvertible B\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B✝ A B : Matrix n n α\nh : A * B = 1\nthis✝ : Invertible (det B) := detInvertibleOfLeftInverse B A h\nthis : Invertible B := invertibleOfDetInvertible B\n⊢ B * A = 1\n[PROOFSTEP]\ncalc\n B * A = B * A * (B * ⅟B) := by rw [mul_invOf_self, Matrix.mul_one]\n _ = B * (A * B * ⅟B) := by simp only [Matrix.mul_assoc]\n _ = B * ⅟B := by rw [h, Matrix.one_mul]\n _ = 1 := mul_invOf_self B\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B✝ A B : Matrix n n α\nh : A * B = 1\nthis✝ : Invertible (det B) := detInvertibleOfLeftInverse B A h\nthis : Invertible B := invertibleOfDetInvertible B\n⊢ B * A = B * A * (B * ⅟B)\n[PROOFSTEP]\nrw [mul_invOf_self, Matrix.mul_one]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B✝ A B : Matrix n n α\nh : A * B = 1\nthis✝ : Invertible (det B) := detInvertibleOfLeftInverse B A h\nthis : Invertible B := invertibleOfDetInvertible B\n⊢ B * A * (B * ⅟B) = B * (A * B * ⅟B)\n[PROOFSTEP]\nsimp only [Matrix.mul_assoc]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B✝ A B : Matrix n n α\nh : A * B = 1\nthis✝ : Invertible (det B) := detInvertibleOfLeftInverse B A h\nthis : Invertible B := invertibleOfDetInvertible B\n⊢ B * (A * B * ⅟B) = B * ⅟B\n[PROOFSTEP]\nrw [h, Matrix.one_mul]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\ninst✝ : Invertible A\n⊢ Invertible (det Aᵀ)\n[PROOFSTEP]\nsimpa using detInvertibleOfInvertible A\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\ninst✝ : Invertible Aᵀ\n⊢ Invertible A\n[PROOFSTEP]\nrw [← transpose_transpose A]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\ninst✝ : Invertible Aᵀ\n⊢ Invertible Aᵀᵀ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA B : Matrix n n α\ninst✝¹ : StarRing α\ninst✝ : Invertible Aᴴ\n⊢ Invertible A\n[PROOFSTEP]\nrw [← conjTranspose_conjTranspose A, ← star_eq_conjTranspose]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA B : Matrix n n α\ninst✝¹ : StarRing α\ninst✝ : Invertible Aᴴ\n⊢ Invertible (star Aᴴ)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ IsUnit A ↔ IsUnit (det A)\n[PROOFSTEP]\nsimp only [← nonempty_invertible_iff_isUnit, (invertibleEquivDetInvertible A).nonempty_congr]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : IsUnit (det A)\n⊢ IsUnit (det Aᵀ)\n[PROOFSTEP]\nrw [det_transpose]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : IsUnit (det A)\n⊢ IsUnit (det A)\n[PROOFSTEP]\nexact h\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : ¬IsUnit (det A)\n⊢ A⁻¹ = 0\n[PROOFSTEP]\nrw [inv_def, Ring.inverse_non_unit _ h, zero_smul]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : IsUnit (det A)\n⊢ A⁻¹ = ↑(IsUnit.unit h)⁻¹ • adjugate A\n[PROOFSTEP]\nrw [inv_def, ← Ring.inverse_unit h.unit, IsUnit.unit_spec]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\ninst✝ : Invertible A\n⊢ ⅟A = A⁻¹\n[PROOFSTEP]\nletI := detInvertibleOfInvertible A\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\ninst✝ : Invertible A\nthis : Invertible (det A) := detInvertibleOfInvertible A\n⊢ ⅟A = A⁻¹\n[PROOFSTEP]\nrw [inv_def, Ring.inverse_invertible, invOf_eq]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B : Matrix n n α\nA : (Matrix n n α)ˣ\n⊢ ↑A⁻¹ = (↑A)⁻¹\n[PROOFSTEP]\nletI := A.invertible\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B : Matrix n n α\nA : (Matrix n n α)ˣ\nthis : Invertible ↑A := Units.invertible A\n⊢ ↑A⁻¹ = (↑A)⁻¹\n[PROOFSTEP]\nrw [← invOf_eq_nonsing_inv, invOf_units]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ A⁻¹ = Ring.inverse A\n[PROOFSTEP]\nby_cases h_det : IsUnit A.det\n[GOAL]\ncase pos\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh_det : IsUnit (det A)\n⊢ A⁻¹ = Ring.inverse A\n[PROOFSTEP]\ncases (A.isUnit_iff_isUnit_det.mpr h_det).nonempty_invertible\n[GOAL]\ncase pos.intro\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh_det : IsUnit (det A)\nval✝ : Invertible A\n⊢ A⁻¹ = Ring.inverse A\n[PROOFSTEP]\nrw [← invOf_eq_nonsing_inv, Ring.inverse_invertible]\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh_det : ¬IsUnit (det A)\n⊢ A⁻¹ = Ring.inverse A\n[PROOFSTEP]\nhave h := mt A.isUnit_iff_isUnit_det.mp h_det\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh_det : ¬IsUnit (det A)\nh : ¬IsUnit A\n⊢ A⁻¹ = Ring.inverse A\n[PROOFSTEP]\nrw [Ring.inverse_non_unit _ h, nonsing_inv_apply_not_isUnit A h_det]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ A⁻¹ᵀ = Aᵀ⁻¹\n[PROOFSTEP]\nrw [inv_def, inv_def, transpose_smul, det_transpose, adjugate_transpose]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\ninst✝ : StarRing α\n⊢ A⁻¹ᴴ = Aᴴ⁻¹\n[PROOFSTEP]\nrw [inv_def, inv_def, conjTranspose_smul, det_conjTranspose, adjugate_conjTranspose, Ring.inverse_star]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : IsUnit (det A)\n⊢ A * A⁻¹ = 1\n[PROOFSTEP]\ncases (A.isUnit_iff_isUnit_det.mpr h).nonempty_invertible\n[GOAL]\ncase intro\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : IsUnit (det A)\nval✝ : Invertible A\n⊢ A * A⁻¹ = 1\n[PROOFSTEP]\nrw [← invOf_eq_nonsing_inv, mul_invOf_self]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : IsUnit (det A)\n⊢ A⁻¹ * A = 1\n[PROOFSTEP]\ncases (A.isUnit_iff_isUnit_det.mpr h).nonempty_invertible\n[GOAL]\ncase intro\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : IsUnit (det A)\nval✝ : Invertible A\n⊢ A⁻¹ * A = 1\n[PROOFSTEP]\nrw [← invOf_eq_nonsing_inv, invOf_mul_self]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\ninst✝ : Invertible A\n⊢ Invertible A⁻¹\n[PROOFSTEP]\nrw [← invOf_eq_nonsing_inv]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\ninst✝ : Invertible A\n⊢ Invertible ⅟A\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\ninst✝ : Invertible A\n⊢ A⁻¹⁻¹ = A\n[PROOFSTEP]\nsimp only [← invOf_eq_nonsing_inv, invOf_invOf]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B✝ : Matrix n n α\nB : Matrix m n α\nh : IsUnit (det A)\n⊢ B * A * A⁻¹ = B\n[PROOFSTEP]\nsimp [Matrix.mul_assoc, mul_nonsing_inv A h]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B✝ : Matrix n n α\nB : Matrix n m α\nh : IsUnit (det A)\n⊢ A * (A⁻¹ * B) = B\n[PROOFSTEP]\nsimp [← Matrix.mul_assoc, mul_nonsing_inv A h]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B✝ : Matrix n n α\nB : Matrix m n α\nh : IsUnit (det A)\n⊢ B * A⁻¹ * A = B\n[PROOFSTEP]\nsimp [Matrix.mul_assoc, nonsing_inv_mul A h]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B✝ : Matrix n n α\nB : Matrix n m α\nh : IsUnit (det A)\n⊢ A⁻¹ * (A * B) = B\n[PROOFSTEP]\nsimp [← Matrix.mul_assoc, nonsing_inv_mul A h]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA✝ B✝ A B C : Matrix n n α\ninst✝ : Invertible A\nh : A⁻¹ * B = C\n⊢ B = A * C\n[PROOFSTEP]\nrw [← h, mul_inv_cancel_left_of_invertible]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA✝ B✝ A B C : Matrix n n α\ninst✝ : Invertible A\nh : B = A * C\n⊢ A⁻¹ * B = C\n[PROOFSTEP]\nrw [h, inv_mul_cancel_left_of_invertible]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA✝ B✝ A B C : Matrix n n α\ninst✝ : Invertible A\nh : B * A⁻¹ = C\n⊢ B = C * A\n[PROOFSTEP]\nrw [← h, inv_mul_cancel_right_of_invertible]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA✝ B✝ A B C : Matrix n n α\ninst✝ : Invertible A\nh : B = C * A\n⊢ B * A⁻¹ = C\n[PROOFSTEP]\nrw [h, mul_inv_cancel_right_of_invertible]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\ninst✝ : Invertible A\nx✝¹ x✝ : Matrix n m α\nh : (fun x => A * x) x✝¹ = (fun x => A * x) x✝\n⊢ x✝¹ = x✝\n[PROOFSTEP]\nsimpa only [inv_mul_cancel_left_of_invertible] using congr_arg (A⁻¹ * ·) h\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\ninst✝ : Invertible A\na x : Matrix m n α\nhax : (fun x => x * A) a = (fun x => x * A) x\n⊢ a = x\n[PROOFSTEP]\nsimpa only [mul_inv_cancel_right_of_invertible] using congr_arg (· * A⁻¹) hax\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ A⁻¹ * A = 1 ∧ A * A⁻¹ = 1 ∨ A⁻¹ = 0\n[PROOFSTEP]\nby_cases h : IsUnit A.det\n[GOAL]\ncase pos\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : IsUnit (det A)\n⊢ A⁻¹ * A = 1 ∧ A * A⁻¹ = 1 ∨ A⁻¹ = 0\n[PROOFSTEP]\nexact Or.inl ⟨nonsing_inv_mul _ h, mul_nonsing_inv _ h⟩\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : ¬IsUnit (det A)\n⊢ A⁻¹ * A = 1 ∧ A * A⁻¹ = 1 ∨ A⁻¹ = 0\n[PROOFSTEP]\nexact Or.inr (nonsing_inv_apply_not_isUnit _ h)\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : IsUnit (det A)\n⊢ det A⁻¹ * det A = 1\n[PROOFSTEP]\nrw [← det_mul, A.nonsing_inv_mul h, det_one]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ det A⁻¹ = Ring.inverse (det A)\n[PROOFSTEP]\nby_cases h : IsUnit A.det\n[GOAL]\ncase pos\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : IsUnit (det A)\n⊢ det A⁻¹ = Ring.inverse (det A)\n[PROOFSTEP]\ncases h.nonempty_invertible\n[GOAL]\ncase pos.intro\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : IsUnit (det A)\nval✝ : Invertible (det A)\n⊢ det A⁻¹ = Ring.inverse (det A)\n[PROOFSTEP]\nletI := invertibleOfDetInvertible A\n[GOAL]\ncase pos.intro\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : IsUnit (det A)\nval✝ : Invertible (det A)\nthis : Invertible A := invertibleOfDetInvertible A\n⊢ det A⁻¹ = Ring.inverse (det A)\n[PROOFSTEP]\nrw [Ring.inverse_invertible, ← invOf_eq_nonsing_inv, det_invOf]\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : ¬IsUnit (det A)\n⊢ det A⁻¹ = Ring.inverse (det A)\n[PROOFSTEP]\ncases isEmpty_or_nonempty n\n[GOAL]\ncase neg.inl\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : ¬IsUnit (det A)\nh✝ : IsEmpty n\n⊢ det A⁻¹ = Ring.inverse (det A)\n[PROOFSTEP]\nrw [det_isEmpty, det_isEmpty, Ring.inverse_one]\n[GOAL]\ncase neg.inr\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : ¬IsUnit (det A)\nh✝ : Nonempty n\n⊢ det A⁻¹ = Ring.inverse (det A)\n[PROOFSTEP]\nrw [Ring.inverse_non_unit _ h, nonsing_inv_apply_not_isUnit _ h, det_zero ‹_›]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : IsUnit (det A)\n⊢ A⁻¹⁻¹ = 1 * A⁻¹⁻¹\n[PROOFSTEP]\nrw [Matrix.one_mul]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : IsUnit (det A)\n⊢ 1 * A⁻¹⁻¹ = A * A⁻¹ * A⁻¹⁻¹\n[PROOFSTEP]\nrw [A.mul_nonsing_inv h]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nh : IsUnit (det A)\n⊢ A * A⁻¹ * A⁻¹⁻¹ = A\n[PROOFSTEP]\nrw [Matrix.mul_assoc, A⁻¹.mul_nonsing_inv (A.isUnit_nonsing_inv_det h), Matrix.mul_one]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B A : Matrix n n α\n⊢ IsUnit (det A⁻¹) ↔ IsUnit (det A)\n[PROOFSTEP]\nrw [Matrix.det_nonsing_inv, isUnit_ring_inverse]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\ninst✝ : Invertible (det A)\n⊢ unitOfDetInvertible A = nonsingInvUnit A (_ : IsUnit (det A))\n[PROOFSTEP]\next\n[GOAL]\ncase a.a.h\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\ninst✝ : Invertible (det A)\ni✝ x✝ : n\n⊢ ↑(unitOfDetInvertible A) i✝ x✝ = ↑(nonsingInvUnit A (_ : IsUnit (det A))) i✝ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B C : Matrix n n α\nh : B * A = 1\ng : C * A = 1\n⊢ B = C\n[PROOFSTEP]\nrw [← inv_eq_left_inv h, ← inv_eq_left_inv g]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B C : Matrix n n α\nh : A * B = 1\ng : A * C = 1\n⊢ B = C\n[PROOFSTEP]\nrw [← inv_eq_right_inv h, ← inv_eq_right_inv g]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B C : Matrix n n α\nh : A * B = 1\ng : C * A = 1\n⊢ B = C\n[PROOFSTEP]\nrw [← inv_eq_right_inv h, ← inv_eq_left_inv g]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B C : Matrix n n α\nh : A⁻¹ = B⁻¹\nh' : IsUnit (det A)\n⊢ A = B\n[PROOFSTEP]\nrefine' left_inv_eq_left_inv (mul_nonsing_inv _ h') _\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B C : Matrix n n α\nh : A⁻¹ = B⁻¹\nh' : IsUnit (det A)\n⊢ B * A⁻¹ = 1\n[PROOFSTEP]\nrw [h]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B C : Matrix n n α\nh : A⁻¹ = B⁻¹\nh' : IsUnit (det A)\n⊢ B * B⁻¹ = 1\n[PROOFSTEP]\nrefine' mul_nonsing_inv _ _\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B C : Matrix n n α\nh : A⁻¹ = B⁻¹\nh' : IsUnit (det A)\n⊢ IsUnit (det B)\n[PROOFSTEP]\nrwa [← isUnit_nonsing_inv_det_iff, ← h, isUnit_nonsing_inv_det_iff]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ 0⁻¹ = 0\n[PROOFSTEP]\ncases' subsingleton_or_nontrivial α with ht ht\n[GOAL]\ncase inl\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nht : Subsingleton α\n⊢ 0⁻¹ = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nht : Nontrivial α\n⊢ 0⁻¹ = 0\n[PROOFSTEP]\ncases' (Fintype.card n).zero_le.eq_or_lt with hc hc\n[GOAL]\ncase inr.inl\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nht : Nontrivial α\nhc : 0 = Fintype.card n\n⊢ 0⁻¹ = 0\n[PROOFSTEP]\nrw [eq_comm, Fintype.card_eq_zero_iff] at hc \n[GOAL]\ncase inr.inl\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nht : Nontrivial α\nhc : IsEmpty n\n⊢ 0⁻¹ = 0\n[PROOFSTEP]\nhaveI := hc\n[GOAL]\ncase inr.inl\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nht : Nontrivial α\nhc this : IsEmpty n\n⊢ 0⁻¹ = 0\n[PROOFSTEP]\next i\n[GOAL]\ncase inr.inl.a.h\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nht : Nontrivial α\nhc this : IsEmpty n\ni x✝ : n\n⊢ 0⁻¹ i x✝ = OfNat.ofNat 0 i x✝\n[PROOFSTEP]\nexact (IsEmpty.false i).elim\n[GOAL]\ncase inr.inr\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nht : Nontrivial α\nhc : 0 < Fintype.card n\n⊢ 0⁻¹ = 0\n[PROOFSTEP]\nhave hn : Nonempty n := Fintype.card_pos_iff.mp hc\n[GOAL]\ncase inr.inr\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nht : Nontrivial α\nhc : 0 < Fintype.card n\nhn : Nonempty n\n⊢ 0⁻¹ = 0\n[PROOFSTEP]\nrefine' nonsing_inv_apply_not_isUnit _ _\n[GOAL]\ncase inr.inr\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nht : Nontrivial α\nhc : 0 < Fintype.card n\nhn : Nonempty n\n⊢ ¬IsUnit (det 0)\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nsrc✝¹ : One (Matrix n n α) := one\nsrc✝ : Inv (Matrix n n α) := inv\n⊢ 1 * 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\nk : α\ninst✝ : Invertible k\nh : IsUnit (det A)\n⊢ ⅟k • A⁻¹ * k • A = 1\n[PROOFSTEP]\nsimp [h, smul_smul]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nk : αˣ\nh : IsUnit (det A)\n⊢ k⁻¹ • A⁻¹ * k • A = 1\n[PROOFSTEP]\nsimp [h, smul_smul]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B A : Matrix n n α\nh : IsUnit (det A)\n⊢ (adjugate A)⁻¹ = (IsUnit.unit h)⁻¹ • A\n[PROOFSTEP]\nrefine' inv_eq_left_inv _\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B A : Matrix n n α\nh : IsUnit (det A)\n⊢ (IsUnit.unit h)⁻¹ • A * adjugate A = 1\n[PROOFSTEP]\nrw [smul_mul, mul_adjugate, Units.smul_def, smul_smul, h.val_inv_mul, one_smul]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα✝ : Type v\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq n\ninst✝³ : CommRing α✝\nA B : Matrix n n α✝\nα : Type u_2\ninst✝² : Semiring α\nv : n → α\ninst✝¹ : Invertible v\ninst✝ : Invertible (diagonal v)\n⊢ ⅟(diagonal v) = diagonal ⅟v\n[PROOFSTEP]\nletI := diagonalInvertible v\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα✝ : Type v\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq n\ninst✝³ : CommRing α✝\nA B : Matrix n n α✝\nα : Type u_2\ninst✝² : Semiring α\nv : n → α\ninst✝¹ : Invertible v\ninst✝ : Invertible (diagonal v)\nthis : Invertible (diagonal v) := diagonalInvertible v\n⊢ ⅟(diagonal v) = diagonal ⅟v\n[PROOFSTEP]\nconvert (rfl : ⅟(diagonal v) = _)\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\nv : n → α\ninst✝ : Invertible (diagonal v)\ni : n\n⊢ (diag ⅟(diagonal v) * v) i = OfNat.ofNat 1 i\n[PROOFSTEP]\nletI : Invertible (diagonal v).det := detInvertibleOfInvertible _\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\nv : n → α\ninst✝ : Invertible (diagonal v)\ni : n\nthis : Invertible (det (diagonal v)) := detInvertibleOfInvertible (diagonal v)\n⊢ (diag ⅟(diagonal v) * v) i = OfNat.ofNat 1 i\n[PROOFSTEP]\nrw [invOf_eq, diag_smul, adjugate_diagonal, diag_diagonal]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\nv : n → α\ninst✝ : Invertible (diagonal v)\ni : n\nthis : Invertible (det (diagonal v)) := detInvertibleOfInvertible (diagonal v)\n⊢ ((⅟(det (diagonal v)) • fun i => ∏ j in erase univ i, v j) * v) i = OfNat.ofNat 1 i\n[PROOFSTEP]\ndsimp\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\nv : n → α\ninst✝ : Invertible (diagonal v)\ni : n\nthis : Invertible (det (diagonal v)) := detInvertibleOfInvertible (diagonal v)\n⊢ (⅟(det (diagonal v)) * ∏ j in erase univ i, v j) * v i = 1\n[PROOFSTEP]\nrw [mul_assoc, prod_erase_mul _ _ (Finset.mem_univ _), ← det_diagonal]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\nv : n → α\ninst✝ : Invertible (diagonal v)\ni : n\nthis : Invertible (det (diagonal v)) := detInvertibleOfInvertible (diagonal v)\n⊢ ⅟(det (diagonal v)) * det (diagonal fun x => v x) = 1\n[PROOFSTEP]\nexact mul_invOf_self _\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\nv : n → α\ninst✝ : Invertible (diagonal v)\ni : n\n⊢ (v * diag ⅟(diagonal v)) i = OfNat.ofNat 1 i\n[PROOFSTEP]\nletI : Invertible (diagonal v).det := detInvertibleOfInvertible _\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\nv : n → α\ninst✝ : Invertible (diagonal v)\ni : n\nthis : Invertible (det (diagonal v)) := detInvertibleOfInvertible (diagonal v)\n⊢ (v * diag ⅟(diagonal v)) i = OfNat.ofNat 1 i\n[PROOFSTEP]\nrw [invOf_eq, diag_smul, adjugate_diagonal, diag_diagonal]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\nv : n → α\ninst✝ : Invertible (diagonal v)\ni : n\nthis : Invertible (det (diagonal v)) := detInvertibleOfInvertible (diagonal v)\n⊢ (v * ⅟(det (diagonal v)) • fun i => ∏ j in erase univ i, v j) i = OfNat.ofNat 1 i\n[PROOFSTEP]\ndsimp\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\nv : n → α\ninst✝ : Invertible (diagonal v)\ni : n\nthis : Invertible (det (diagonal v)) := detInvertibleOfInvertible (diagonal v)\n⊢ v i * (⅟(det (diagonal v)) * ∏ j in erase univ i, v j) = 1\n[PROOFSTEP]\nrw [mul_left_comm, mul_prod_erase _ _ (Finset.mem_univ _), ← det_diagonal]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA B : Matrix n n α\nv : n → α\ninst✝ : Invertible (diagonal v)\ni : n\nthis : Invertible (det (diagonal v)) := detInvertibleOfInvertible (diagonal v)\n⊢ ⅟(det (diagonal v)) * det (diagonal fun x => v x) = 1\n[PROOFSTEP]\nexact mul_invOf_self _\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nv : n → α\n⊢ IsUnit (diagonal v) ↔ IsUnit v\n[PROOFSTEP]\nsimp only [← nonempty_invertible_iff_isUnit, (diagonalInvertibleEquivInvertible v).nonempty_congr]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nv : n → α\n⊢ (diagonal v)⁻¹ = diagonal (Ring.inverse v)\n[PROOFSTEP]\nrw [nonsing_inv_eq_ring_inverse]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nv : n → α\n⊢ Ring.inverse (diagonal v) = diagonal (Ring.inverse v)\n[PROOFSTEP]\nby_cases h : IsUnit v\n[GOAL]\ncase pos\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nv : n → α\nh : IsUnit v\n⊢ Ring.inverse (diagonal v) = diagonal (Ring.inverse v)\n[PROOFSTEP]\nhave := isUnit_diagonal.mpr h\n[GOAL]\ncase pos\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nv : n → α\nh : IsUnit v\nthis : IsUnit (diagonal v)\n⊢ Ring.inverse (diagonal v) = diagonal (Ring.inverse v)\n[PROOFSTEP]\ncases this.nonempty_invertible\n[GOAL]\ncase pos.intro\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nv : n → α\nh : IsUnit v\nthis : IsUnit (diagonal v)\nval✝ : Invertible (diagonal v)\n⊢ Ring.inverse (diagonal v) = diagonal (Ring.inverse v)\n[PROOFSTEP]\ncases h.nonempty_invertible\n[GOAL]\ncase pos.intro.intro\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nv : n → α\nh : IsUnit v\nthis : IsUnit (diagonal v)\nval✝¹ : Invertible (diagonal v)\nval✝ : Invertible v\n⊢ Ring.inverse (diagonal v) = diagonal (Ring.inverse v)\n[PROOFSTEP]\nrw [Ring.inverse_invertible, Ring.inverse_invertible, invOf_diagonal_eq]\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nv : n → α\nh : ¬IsUnit v\n⊢ Ring.inverse (diagonal v) = diagonal (Ring.inverse v)\n[PROOFSTEP]\nhave := isUnit_diagonal.not.mpr h\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\nv : n → α\nh : ¬IsUnit v\nthis : ¬IsUnit (diagonal v)\n⊢ Ring.inverse (diagonal v) = diagonal (Ring.inverse v)\n[PROOFSTEP]\nrw [Ring.inverse_non_unit _ h, Pi.zero_def, diagonal_zero, Ring.inverse_non_unit _ this]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B A : Matrix n n α\n⊢ A⁻¹⁻¹⁻¹ = A⁻¹\n[PROOFSTEP]\nby_cases h : IsUnit A.det\n[GOAL]\ncase pos\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B A : Matrix n n α\nh : IsUnit (det A)\n⊢ A⁻¹⁻¹⁻¹ = A⁻¹\n[PROOFSTEP]\nrw [nonsing_inv_nonsing_inv _ h]\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B A : Matrix n n α\nh : ¬IsUnit (det A)\n⊢ A⁻¹⁻¹⁻¹ = A⁻¹\n[PROOFSTEP]\nsimp [nonsing_inv_apply_not_isUnit _ h]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B✝ A B : Matrix n n α\n⊢ (A * B)⁻¹ = B⁻¹ * A⁻¹\n[PROOFSTEP]\nsimp only [inv_def]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B✝ A B : Matrix n n α\n⊢ Ring.inverse (det (A * B)) • adjugate (A * B) = Ring.inverse (det B) • adjugate B * Ring.inverse (det A) • adjugate A\n[PROOFSTEP]\nrw [Matrix.smul_mul, Matrix.mul_smul, smul_smul, det_mul, adjugate_mul_distrib, Ring.mul_inverse_rev]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ (List.prod [])⁻¹ = List.prod (List.map Inv.inv (List.reverse []))\n[PROOFSTEP]\nrw [List.reverse_nil, List.map_nil, List.prod_nil, inv_one]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B A : Matrix n n α\nXs : List (Matrix n n α)\n⊢ (List.prod (A :: Xs))⁻¹ = List.prod (List.map Inv.inv (List.reverse (A :: Xs)))\n[PROOFSTEP]\nrw [List.reverse_cons', List.map_concat, List.prod_concat, List.prod_cons, mul_inv_rev, list_prod_inv_reverse Xs]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B A : Matrix n n α\nb : n → α\nh : IsUnit (det A)\n⊢ det A • mulVec A⁻¹ b = ↑(cramer A) b\n[PROOFSTEP]\nrw [cramer_eq_adjugate_mulVec, A.nonsing_inv_apply h, ← smul_mulVec_assoc, smul_smul, h.mul_val_inv, one_smul]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA✝ B A : Matrix n n α\nb : n → α\nh : IsUnit (det A)\n⊢ det A • vecMul b A⁻¹ = ↑(cramer Aᵀ) b\n[PROOFSTEP]\nrw [← A⁻¹.transpose_transpose, vecMul_transpose, transpose_nonsing_inv, ← det_transpose,\n Aᵀ.det_smul_inv_mulVec_eq_cramer _ (isUnit_det_transpose A h)]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq n\ninst✝³ : CommRing α\nA✝ B : Matrix n n α\ninst✝² : Fintype m\ninst✝¹ : DecidableEq m\nA : Matrix m m α\ne₁ e₂ : n ≃ m\ninst✝ : Invertible A\n⊢ submatrix A ↑e₁ ↑e₂ * submatrix ⅟A ↑e₂ ↑e₁ = 1\n[PROOFSTEP]\nrw [Matrix.submatrix_mul_equiv, mul_invOf_self, submatrix_one_equiv]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq n\ninst✝³ : CommRing α\nA✝ B : Matrix n n α\ninst✝² : Fintype m\ninst✝¹ : DecidableEq m\nA : Matrix m m α\ne₁ e₂ : n ≃ m\ninst✝ : Invertible (submatrix A ↑e₁ ↑e₂)\n⊢ A * submatrix ⅟(submatrix A ↑e₁ ↑e₂) ↑e₂.symm ↑e₁.symm = 1\n[PROOFSTEP]\nhave : A = (A.submatrix e₁ e₂).submatrix e₁.symm e₂.symm := by\n simp\n -- Porting note: was\n -- conv in _ * _ =>\n -- congr\n -- rw [this]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq n\ninst✝³ : CommRing α\nA✝ B : Matrix n n α\ninst✝² : Fintype m\ninst✝¹ : DecidableEq m\nA : Matrix m m α\ne₁ e₂ : n ≃ m\ninst✝ : Invertible (submatrix A ↑e₁ ↑e₂)\n⊢ A = submatrix (submatrix A ↑e₁ ↑e₂) ↑e₁.symm ↑e₂.symm\n[PROOFSTEP]\nsimp\n -- Porting note: was\n -- conv in _ * _ =>\n -- congr\n -- rw [this]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq n\ninst✝³ : CommRing α\nA✝ B : Matrix n n α\ninst✝² : Fintype m\ninst✝¹ : DecidableEq m\nA : Matrix m m α\ne₁ e₂ : n ≃ m\ninst✝ : Invertible (submatrix A ↑e₁ ↑e₂)\nthis : A = submatrix (submatrix A ↑e₁ ↑e₂) ↑e₁.symm ↑e₂.symm\n⊢ A * submatrix ⅟(submatrix A ↑e₁ ↑e₂) ↑e₂.symm ↑e₁.symm = 1\n[PROOFSTEP]\nrw [congr_arg₂ (· * ·) this rfl]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq n\ninst✝³ : CommRing α\nA✝ B : Matrix n n α\ninst✝² : Fintype m\ninst✝¹ : DecidableEq m\nA : Matrix m m α\ne₁ e₂ : n ≃ m\ninst✝ : Invertible (submatrix A ↑e₁ ↑e₂)\nthis : A = submatrix (submatrix A ↑e₁ ↑e₂) ↑e₁.symm ↑e₂.symm\n⊢ submatrix (submatrix A ↑e₁ ↑e₂) ↑e₁.symm ↑e₂.symm * submatrix ⅟(submatrix A ↑e₁ ↑e₂) ↑e₂.symm ↑e₁.symm = 1\n[PROOFSTEP]\nrw [Matrix.submatrix_mul_equiv, mul_invOf_self, submatrix_one_equiv]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing α\nA✝ B : Matrix n n α\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\nA : Matrix m m α\ne₁ e₂ : n ≃ m\ninst✝¹ : Invertible A\ninst✝ : Invertible (submatrix A ↑e₁ ↑e₂)\n⊢ ⅟(submatrix A ↑e₁ ↑e₂) = submatrix ⅟A ↑e₂ ↑e₁\n[PROOFSTEP]\nletI := submatrixEquivInvertible A e₁ e₂\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing α\nA✝ B : Matrix n n α\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\nA : Matrix m m α\ne₁ e₂ : n ≃ m\ninst✝¹ : Invertible A\ninst✝ : Invertible (submatrix A ↑e₁ ↑e₂)\nthis : Invertible (submatrix A ↑e₁ ↑e₂) := submatrixEquivInvertible A e₁ e₂\n⊢ ⅟(submatrix A ↑e₁ ↑e₂) = submatrix ⅟A ↑e₂ ↑e₁\n[PROOFSTEP]\nconvert (rfl : ⅟(A.submatrix e₁ e₂) = _)\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA✝ B : Matrix n n α\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m α\ne₁ e₂ : n ≃ m\n⊢ IsUnit (submatrix A ↑e₁ ↑e₂) ↔ IsUnit A\n[PROOFSTEP]\nsimp only [← nonempty_invertible_iff_isUnit, (submatrixEquivInvertibleEquivInvertible A _ _).nonempty_congr]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA✝ B : Matrix n n α\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m α\ne₁ e₂ : n ≃ m\n⊢ (submatrix A ↑e₁ ↑e₂)⁻¹ = submatrix A⁻¹ ↑e₂ ↑e₁\n[PROOFSTEP]\nby_cases h : IsUnit A\n[GOAL]\ncase pos\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA✝ B : Matrix n n α\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m α\ne₁ e₂ : n ≃ m\nh : IsUnit A\n⊢ (submatrix A ↑e₁ ↑e₂)⁻¹ = submatrix A⁻¹ ↑e₂ ↑e₁\n[PROOFSTEP]\ncases h.nonempty_invertible\n[GOAL]\ncase pos.intro\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA✝ B : Matrix n n α\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m α\ne₁ e₂ : n ≃ m\nh : IsUnit A\nval✝ : Invertible A\n⊢ (submatrix A ↑e₁ ↑e₂)⁻¹ = submatrix A⁻¹ ↑e₂ ↑e₁\n[PROOFSTEP]\nletI := submatrixEquivInvertible A e₁ e₂\n[GOAL]\ncase pos.intro\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA✝ B : Matrix n n α\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m α\ne₁ e₂ : n ≃ m\nh : IsUnit A\nval✝ : Invertible A\nthis : Invertible (submatrix A ↑e₁ ↑e₂) := submatrixEquivInvertible A e₁ e₂\n⊢ (submatrix A ↑e₁ ↑e₂)⁻¹ = submatrix A⁻¹ ↑e₂ ↑e₁\n[PROOFSTEP]\nrw [← invOf_eq_nonsing_inv, ← invOf_eq_nonsing_inv, invOf_submatrix_equiv_eq A]\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA✝ B : Matrix n n α\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m α\ne₁ e₂ : n ≃ m\nh : ¬IsUnit A\n⊢ (submatrix A ↑e₁ ↑e₂)⁻¹ = submatrix A⁻¹ ↑e₂ ↑e₁\n[PROOFSTEP]\nhave := (isUnit_submatrix_equiv e₁ e₂).not.mpr h\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA✝ B : Matrix n n α\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m α\ne₁ e₂ : n ≃ m\nh : ¬IsUnit A\nthis : ¬IsUnit (submatrix A ↑e₁ ↑e₂)\n⊢ (submatrix A ↑e₁ ↑e₂)⁻¹ = submatrix A⁻¹ ↑e₂ ↑e₁\n[PROOFSTEP]\nsimp_rw [nonsing_inv_eq_ring_inverse, Ring.inverse_non_unit _ h, Ring.inverse_non_unit _ this, submatrix_zero,\n Pi.zero_apply]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA B : Matrix n n α\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nM : Matrix m m α\nh : IsUnit M\nN : Matrix m m α\n⊢ det (M * N * M⁻¹) = det N\n[PROOFSTEP]\nrw [← h.unit_spec, ← coe_units_inv, det_units_conj]\n[GOAL]\nl : Type u_1\nm : Type u\nn : Type u'\nα : Type v\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA B : Matrix n n α\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nM : Matrix m m α\nh : IsUnit M\nN : Matrix m m α\n⊢ det (M⁻¹ * N * M) = det N\n[PROOFSTEP]\nrw [← h.unit_spec, ← coe_units_inv, det_units_conj']\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.NonsingularInverse", "llama_tokens": 19973, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8311430562234878, "lm_q2_score": 0.7154239957834733, "lm_q1q2_score": 0.5946196863510956}} {"text": "[GOAL]\nM : Type u_1\ninst✝³ : MeasurableSpace M\nα : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nf✝ g : α → M\nδ : Type u_3\ninst✝² : MeasurableSpace δ\ninst✝¹ : SemilatticeSup α\ninst✝ : MeasurableSup₂ α\nf : ℕ → δ → α\nn : ℕ\nhf : ∀ (k : ℕ), k ≤ n → Measurable (f k)\n⊢ Measurable (sup' (range (n + 1)) (_ : Finset.Nonempty (range (n + 1))) f)\n[PROOFSTEP]\nsimp_rw [← Nat.lt_succ_iff] at hf \n[GOAL]\nM : Type u_1\ninst✝³ : MeasurableSpace M\nα : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nf✝ g : α → M\nδ : Type u_3\ninst✝² : MeasurableSpace δ\ninst✝¹ : SemilatticeSup α\ninst✝ : MeasurableSup₂ α\nf : ℕ → δ → α\nn : ℕ\nhf : ∀ (k : ℕ), k < Nat.succ n → Measurable (f k)\n⊢ Measurable (sup' (range (n + 1)) (_ : Finset.Nonempty (range (n + 1))) f)\n[PROOFSTEP]\nrefine' Finset.measurable_sup' _ _\n[GOAL]\nM : Type u_1\ninst✝³ : MeasurableSpace M\nα : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nf✝ g : α → M\nδ : Type u_3\ninst✝² : MeasurableSpace δ\ninst✝¹ : SemilatticeSup α\ninst✝ : MeasurableSup₂ α\nf : ℕ → δ → α\nn : ℕ\nhf : ∀ (k : ℕ), k < Nat.succ n → Measurable (f k)\n⊢ ∀ (n_1 : ℕ), n_1 ∈ range (n + 1) → Measurable (f n_1)\n[PROOFSTEP]\nsimpa [Finset.mem_range]\n[GOAL]\nM : Type u_1\ninst✝³ : MeasurableSpace M\nα : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nf✝ g : α → M\nδ : Type u_3\ninst✝² : MeasurableSpace δ\ninst✝¹ : SemilatticeSup α\ninst✝ : MeasurableSup₂ α\nf : ℕ → δ → α\nn : ℕ\nhf : ∀ (k : ℕ), k ≤ n → Measurable (f k)\n⊢ Measurable fun x => sup' (range (n + 1)) (_ : Finset.Nonempty (range (n + 1))) fun k => f k x\n[PROOFSTEP]\nconvert Finset.measurable_range_sup' hf using 1\n[GOAL]\ncase h.e'_5\nM : Type u_1\ninst✝³ : MeasurableSpace M\nα : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nf✝ g : α → M\nδ : Type u_3\ninst✝² : MeasurableSpace δ\ninst✝¹ : SemilatticeSup α\ninst✝ : MeasurableSup₂ α\nf : ℕ → δ → α\nn : ℕ\nhf : ∀ (k : ℕ), k ≤ n → Measurable (f k)\n⊢ (fun x => sup' (range (n + 1)) (_ : Finset.Nonempty (range (n + 1))) fun k => f k x) =\n sup' (range (n + 1)) (_ : Finset.Nonempty (range (n + 1))) fun k => f k\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_5.h\nM : Type u_1\ninst✝³ : MeasurableSpace M\nα : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nf✝ g : α → M\nδ : Type u_3\ninst✝² : MeasurableSpace δ\ninst✝¹ : SemilatticeSup α\ninst✝ : MeasurableSup₂ α\nf : ℕ → δ → α\nn : ℕ\nhf : ∀ (k : ℕ), k ≤ n → Measurable (f k)\nx : δ\n⊢ (sup' (range (n + 1)) (_ : Finset.Nonempty (range (n + 1))) fun k => f k x) =\n sup' (range (n + 1)) (_ : Finset.Nonempty (range (n + 1))) (fun k => f k) x\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Lattice", "llama_tokens": 1258, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8198933315126791, "lm_q2_score": 0.724870282120402, "lm_q1q2_score": 0.594316310522232}} {"text": "[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na a' b b' : E\nr r' : k\nha : a ≤ a'\nhr : r ≤ 1\n⊢ ↑(lineMap a b) r ≤ ↑(lineMap a' b) r\n[PROOFSTEP]\nsimp only [lineMap_apply_module]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na a' b b' : E\nr r' : k\nha : a ≤ a'\nhr : r ≤ 1\n⊢ (1 - r) • a + r • b ≤ (1 - r) • a' + r • b\n[PROOFSTEP]\nexact add_le_add_right (smul_le_smul_of_nonneg ha (sub_nonneg.2 hr)) _\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na a' b b' : E\nr r' : k\nha : a < a'\nhr : r < 1\n⊢ ↑(lineMap a b) r < ↑(lineMap a' b) r\n[PROOFSTEP]\nsimp only [lineMap_apply_module]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na a' b b' : E\nr r' : k\nha : a < a'\nhr : r < 1\n⊢ (1 - r) • a + r • b < (1 - r) • a' + r • b\n[PROOFSTEP]\nexact add_lt_add_right (smul_lt_smul_of_pos ha (sub_pos.2 hr)) _\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na a' b b' : E\nr r' : k\nhb : b ≤ b'\nhr : 0 ≤ r\n⊢ ↑(lineMap a b) r ≤ ↑(lineMap a b') r\n[PROOFSTEP]\nsimp only [lineMap_apply_module]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na a' b b' : E\nr r' : k\nhb : b ≤ b'\nhr : 0 ≤ r\n⊢ (1 - r) • a + r • b ≤ (1 - r) • a + r • b'\n[PROOFSTEP]\nexact add_le_add_left (smul_le_smul_of_nonneg hb hr) _\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na a' b b' : E\nr r' : k\nhb : b < b'\nhr : 0 < r\n⊢ ↑(lineMap a b) r < ↑(lineMap a b') r\n[PROOFSTEP]\nsimp only [lineMap_apply_module]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na a' b b' : E\nr r' : k\nhb : b < b'\nhr : 0 < r\n⊢ (1 - r) • a + r • b < (1 - r) • a + r • b'\n[PROOFSTEP]\nexact add_lt_add_left (smul_lt_smul_of_pos hb hr) _\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na a' b b' : E\nr r' : k\nha : a < a'\nhb : b < b'\nh₀ : 0 ≤ r\nh₁ : r ≤ 1\n⊢ ↑(lineMap a b) r < ↑(lineMap a' b') r\n[PROOFSTEP]\nrcases h₀.eq_or_lt with (rfl | h₀)\n[GOAL]\ncase inl\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na a' b b' : E\nr' : k\nha : a < a'\nhb : b < b'\nh₀ : 0 ≤ 0\nh₁ : 0 ≤ 1\n⊢ ↑(lineMap a b) 0 < ↑(lineMap a' b') 0\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase inr\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na a' b b' : E\nr r' : k\nha : a < a'\nhb : b < b'\nh₀✝ : 0 ≤ r\nh₁ : r ≤ 1\nh₀ : 0 < r\n⊢ ↑(lineMap a b) r < ↑(lineMap a' b') r\n[PROOFSTEP]\nexact (lineMap_mono_left ha.le h₁).trans_lt (lineMap_strict_mono_right hb h₀)\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na a' b b' : E\nr r' : k\nh : r < r'\n⊢ ↑(lineMap a b) r < ↑(lineMap a b) r' ↔ a < b\n[PROOFSTEP]\nsimp only [lineMap_apply_module]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na a' b b' : E\nr r' : k\nh : r < r'\n⊢ (1 - r) • a + r • b < (1 - r') • a + r' • b ↔ a < b\n[PROOFSTEP]\nrw [← lt_sub_iff_add_lt, add_sub_assoc, ← sub_lt_iff_lt_add', ← sub_smul, ← sub_smul, sub_sub_sub_cancel_left,\n smul_lt_smul_iff_of_pos (sub_pos.2 h)]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na a' b b' : E\nr r' : k\nh : 0 < r\n⊢ a < ↑(lineMap a b) r ↔ ↑(lineMap a b) 0 < ↑(lineMap a b) r\n[PROOFSTEP]\nrw [lineMap_apply_zero]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na a' b b' : E\nr r' : k\nh : r < 1\n⊢ ↑(lineMap a b) r < b ↔ ↑(lineMap a b) r < ↑(lineMap a b) 1\n[PROOFSTEP]\nrw [lineMap_apply_one]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na b : E\nr r' : k\nh : r < r'\n⊢ ↑(lineMap a b) r ≤ ↑(lineMap a b) r' ↔ a ≤ b\n[PROOFSTEP]\nsimp only [lineMap_apply_module]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na b : E\nr r' : k\nh : r < r'\n⊢ (1 - r) • a + r • b ≤ (1 - r') • a + r' • b ↔ a ≤ b\n[PROOFSTEP]\nrw [← le_sub_iff_add_le, add_sub_assoc, ← sub_le_iff_le_add', ← sub_smul, ← sub_smul, sub_sub_sub_cancel_left,\n smul_le_smul_iff_of_pos (sub_pos.2 h)]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na b : E\nr r' : k\nh : 0 < r\n⊢ a ≤ ↑(lineMap a b) r ↔ ↑(lineMap a b) 0 ≤ ↑(lineMap a b) r\n[PROOFSTEP]\nrw [lineMap_apply_zero]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\na b : E\nr r' : k\nh : r < 1\n⊢ ↑(lineMap a b) r ≤ b ↔ ↑(lineMap a b) r ≤ ↑(lineMap a b) 1\n[PROOFSTEP]\nrw [lineMap_apply_one]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\nf : k → E\na b r : k\nh : 0 < r * (b - a)\n⊢ f (↑(lineMap a b) r) ≤ ↑(lineMap (f a) (f b)) r ↔ slope f a (↑(lineMap a b) r) ≤ slope f a b\n[PROOFSTEP]\nrw [lineMap_apply, lineMap_apply, slope, slope, vsub_eq_sub, vsub_eq_sub, vsub_eq_sub, vadd_eq_add, vadd_eq_add,\n smul_eq_mul, add_sub_cancel, smul_sub, smul_sub, smul_sub, sub_le_iff_le_add, mul_inv_rev, mul_smul, mul_smul, ←\n smul_sub, ← smul_sub, ← smul_add, smul_smul, ← mul_inv_rev, inv_smul_le_iff h, smul_smul,\n mul_inv_cancel_right₀ (right_ne_zero_of_mul h.ne'), smul_add, smul_inv_smul₀ (left_ne_zero_of_mul h.ne')]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\nf : k → E\na b r : k\nh : 0 < (1 - r) * (b - a)\n⊢ f (↑(lineMap a b) r) ≤ ↑(lineMap (f a) (f b)) r ↔ slope f a b ≤ slope f (↑(lineMap a b) r) b\n[PROOFSTEP]\nrw [← lineMap_apply_one_sub, ← lineMap_apply_one_sub _ _ r]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\nf : k → E\na b r : k\nh : 0 < (1 - r) * (b - a)\n⊢ f (↑(lineMap b a) (1 - r)) ≤ ↑(lineMap (f b) (f a)) (1 - r) ↔ slope f a b ≤ slope f (↑(lineMap b a) (1 - r)) b\n[PROOFSTEP]\nrevert h\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\nf : k → E\na b r : k\n⊢ 0 < (1 - r) * (b - a) →\n (f (↑(lineMap b a) (1 - r)) ≤ ↑(lineMap (f b) (f a)) (1 - r) ↔ slope f a b ≤ slope f (↑(lineMap b a) (1 - r)) b)\n[PROOFSTEP]\ngeneralize 1 - r = r'\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\nf : k → E\na b r r' : k\n⊢ 0 < r' * (b - a) → (f (↑(lineMap b a) r') ≤ ↑(lineMap (f b) (f a)) r' ↔ slope f a b ≤ slope f (↑(lineMap b a) r') b)\n[PROOFSTEP]\nclear! r\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\nf : k → E\na b r' : k\n⊢ 0 < r' * (b - a) → (f (↑(lineMap b a) r') ≤ ↑(lineMap (f b) (f a)) r' ↔ slope f a b ≤ slope f (↑(lineMap b a) r') b)\n[PROOFSTEP]\nintro h\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\nf : k → E\na b r' : k\nh : 0 < r' * (b - a)\n⊢ f (↑(lineMap b a) r') ≤ ↑(lineMap (f b) (f a)) r' ↔ slope f a b ≤ slope f (↑(lineMap b a) r') b\n[PROOFSTEP]\nsimp_rw [lineMap_apply, slope, vsub_eq_sub, vadd_eq_add, smul_eq_mul]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\nf : k → E\na b r' : k\nh : 0 < r' * (b - a)\n⊢ f (r' * (a - b) + b) ≤ r' • (f a - f b) + f b ↔\n (b - a)⁻¹ • (f b - f a) ≤ (b - (r' * (a - b) + b))⁻¹ • (f b - f (r' * (a - b) + b))\n[PROOFSTEP]\nrw [sub_add_eq_sub_sub_swap, sub_self, zero_sub, neg_mul_eq_mul_neg, neg_sub, le_inv_smul_iff h, smul_smul,\n mul_inv_cancel_right₀, le_sub_comm, ← neg_sub (f b), smul_neg, neg_add_eq_sub]\n[GOAL]\ncase h\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\nf : k → E\na b r' : k\nh : 0 < r' * (b - a)\n⊢ b - a ≠ 0\n[PROOFSTEP]\nexact right_ne_zero_of_mul h.ne'\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup E\ninst✝¹ : Module k E\ninst✝ : OrderedSMul k E\nf : k → E\na b r : k\nhab : a < b\nh₀ : 0 < r\nh₁ : r < 1\n⊢ f (↑(lineMap a b) r) ≤ ↑(lineMap (f a) (f b)) r ↔ slope f a (↑(lineMap a b) r) ≤ slope f (↑(lineMap a b) r) b\n[PROOFSTEP]\nrw [map_le_lineMap_iff_slope_le_slope_left (mul_pos h₀ (sub_pos.2 hab)), ← lineMap_slope_lineMap_slope_lineMap f a b r,\n right_le_lineMap_iff_le h₁]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.AffineSpace.Ordered", "llama_tokens": 5152, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8198933447152498, "lm_q2_score": 0.7248702702332475, "lm_q1q2_score": 0.5943163103461843}} {"text": "[GOAL]\nR : Type u_1\nS✝ : Type u_2\nM✝ : Type u_3\nA : Type u_4\ninst✝⁴ : Semiring S✝\ninst✝³ : AddCommMonoid M✝\ninst✝² : CommSemiring R\ninst✝¹ : Algebra R S✝\ninst✝ : Module S✝ M✝\nr : R\nS : S✝\nM : RestrictScalars R S✝ M✝\n⊢ (r • S) • M = r • S • M\n[PROOFSTEP]\nrw [Algebra.smul_def, mul_smul]\n[GOAL]\nR : Type u_1\nS✝ : Type u_2\nM✝ : Type u_3\nA : Type u_4\ninst✝⁴ : Semiring S✝\ninst✝³ : AddCommMonoid M✝\ninst✝² : CommSemiring R\ninst✝¹ : Algebra R S✝\ninst✝ : Module S✝ M✝\nr : R\nS : S✝\nM : RestrictScalars R S✝ M✝\n⊢ ↑(algebraMap R S✝) r • S • M = r • S • M\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\nA : Type u_4\ninst✝⁴ : AddCommMonoid M\ninst✝³ : CommSemiring R\ninst✝² : Semiring S\ninst✝¹ : Algebra R S\ninst✝ : Module S M\nr : R\ns : S\nx : M\n⊢ ↑(AddEquiv.symm (addEquiv R S M)) ((r • s) • x) = r • ↑(AddEquiv.symm (addEquiv R S M)) (s • x)\n[PROOFSTEP]\nrw [Algebra.smul_def, mul_smul]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\nA : Type u_4\ninst✝⁴ : AddCommMonoid M\ninst✝³ : CommSemiring R\ninst✝² : Semiring S\ninst✝¹ : Algebra R S\ninst✝ : Module S M\nr : R\ns : S\nx : M\n⊢ ↑(AddEquiv.symm (addEquiv R S M)) (↑(algebraMap R S) r • s • x) = r • ↑(AddEquiv.symm (addEquiv R S M)) (s • x)\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Algebra.RestrictScalars", "llama_tokens": 683, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8459424450764199, "lm_q2_score": 0.7025300573952054, "lm_q1q2_score": 0.5942999944925776}} {"text": "[GOAL]\nX✝ Y✝ : CompHaus\na₁✝ a₂✝ : X✝ ⟶ Y✝\nh : (compHausToTop ⋙ topToLocale).map a₁✝ = (compHausToTop ⋙ topToLocale).map a₂✝\n⊢ a₁✝ = a₂✝\n[PROOFSTEP]\ndsimp at h \n[GOAL]\nX✝ Y✝ : CompHaus\na₁✝ a₂✝ : X✝ ⟶ Y✝\nh : (Opens.comap a₁✝).op = (Opens.comap a₂✝).op\n⊢ a₁✝ = a₂✝\n[PROOFSTEP]\nexact Opens.comap_injective (Quiver.Hom.op_inj h)\n", "meta": {"mathlib_filename": "Mathlib.Topology.Category.Locale", "llama_tokens": 226, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8615382165412808, "lm_q2_score": 0.689305616785446, "lm_q1q2_score": 0.5938631317372207}} {"text": "[GOAL]\nα : Type u_1\ninst✝ : Monoid α\na b : α\nh : a = b\n⊢ a ∣ b\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\ninst✝ : CommSemigroup α\na b c✝ c : α\nh : c * a = b\n⊢ a * ?m.8269 c h = b\n[PROOFSTEP]\nrw [mul_comm] at h \n[GOAL]\nα : Type u_1\ninst✝ : CommSemigroup α\na b c✝ c : α\nh✝ : c * a = b\nh : a * c = b\n⊢ a * ?m.8269 c h✝ = b\n[PROOFSTEP]\napply h\n[GOAL]\nα : Type u_1\ninst✝ : CommSemigroup α\na b c : α\n⊢ (∃ c, b = c * a) → a ∣ b\n[PROOFSTEP]\nrintro ⟨c, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : CommSemigroup α\na c✝ c : α\n⊢ a ∣ c * a\n[PROOFSTEP]\nexact ⟨c, mul_comm _ _⟩\n[GOAL]\nα : Type u_1\ninst✝ : CommSemigroup α\na b c✝ : α\nh : a ∣ b\nc : α\n⊢ a ∣ c * b\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nα : Type u_1\ninst✝ : CommSemigroup α\na b c✝ : α\nh : a ∣ b\nc : α\n⊢ a ∣ b * c\n[PROOFSTEP]\nexact h.mul_right _\n[GOAL]\nα : Type u_1\ninst✝ : CommSemigroup α\na✝ b c✝ a c e f : α\n⊢ a * e * (c * f) = a * c * (e * f)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : CommSemigroup α\na b c : α\nh : a * b ∣ c\nd : α\nceq : c = a * b * d\n⊢ b * (a * d) = c\n[PROOFSTEP]\nsimp [ceq]\n[GOAL]\nα : Type u_1\ninst✝ : CommMonoid α\na✝ b✝ a b : α\nh : a ∣ b\n⊢ a ^ 0 ∣ b ^ 0\n[PROOFSTEP]\nrw [pow_zero, pow_zero]\n[GOAL]\nα : Type u_1\ninst✝ : CommMonoid α\na✝ b✝ a b : α\nh : a ∣ b\nn : ℕ\n⊢ a ^ (n + 1) ∣ b ^ (n + 1)\n[PROOFSTEP]\nrw [pow_succ, pow_succ]\n[GOAL]\nα : Type u_1\ninst✝ : CommMonoid α\na✝ b✝ a b : α\nh : a ∣ b\nn : ℕ\n⊢ a * a ^ n ∣ b * b ^ n\n[PROOFSTEP]\nexact mul_dvd_mul h (pow_dvd_pow_of_dvd h n)\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Divisibility.Basic", "llama_tokens": 862, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7718434978390746, "lm_q2_score": 0.7690802423634961, "lm_q1q2_score": 0.5936095843847641}} {"text": "[GOAL]\na b : ℤ\n⊢ natAbs a = natAbs b ↔ Associated a b\n[PROOFSTEP]\nrefine' Int.natAbs_eq_natAbs_iff.trans _\n[GOAL]\na b : ℤ\n⊢ a = b ∨ a = -b ↔ Associated a b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\na b : ℤ\n⊢ a = b ∨ a = -b → Associated a b\n[PROOFSTEP]\nrintro (rfl | rfl)\n[GOAL]\ncase mp.inl\na : ℤ\n⊢ Associated a a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mp.inr\nb : ℤ\n⊢ Associated (-b) b\n[PROOFSTEP]\nexact ⟨-1, by simp⟩\n[GOAL]\nb : ℤ\n⊢ -b * ↑(-1) = b\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\na b : ℤ\n⊢ Associated a b → a = b ∨ a = -b\n[PROOFSTEP]\nrintro ⟨u, rfl⟩\n[GOAL]\ncase mpr.intro\na : ℤ\nu : ℤˣ\n⊢ a = a * ↑u ∨ a = -(a * ↑u)\n[PROOFSTEP]\nobtain rfl | rfl := Int.units_eq_one_or u\n[GOAL]\ncase mpr.intro.inl\na : ℤ\n⊢ a = a * ↑1 ∨ a = -(a * ↑1)\n[PROOFSTEP]\nexact Or.inl (by simp)\n[GOAL]\na : ℤ\n⊢ a = a * ↑1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr.intro.inr\na : ℤ\n⊢ a = a * ↑(-1) ∨ a = -(a * ↑(-1))\n[PROOFSTEP]\nexact Or.inr (by simp)\n[GOAL]\na : ℤ\n⊢ a = -(a * ↑(-1))\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.Associated", "llama_tokens": 538, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7690802264851919, "lm_q2_score": 0.7718434978390747, "lm_q1q2_score": 0.5936095721291983}} {"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf fab : α → β\nfbc : β → γ\nga ga' : α → α\ngb gb' : β → β\ngc gc' : γ → γ\nh : Semiconj f ga gb\nh' : Semiconj f ga' gb'\nx : α\n⊢ f ((ga ∘ ga') x) = (gb ∘ gb') (f x)\n[PROOFSTEP]\nsimp only [comp_apply, h.eq, h'.eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf fab : α → β\nfbc : β → γ\nga ga' : α → α\ngb gb' : β → β\ngc gc' : γ → γ\nhab : Semiconj fab ga gb\nhbc : Semiconj fbc gb gc\nx : α\n⊢ (fbc ∘ fab) (ga x) = gc ((fbc ∘ fab) x)\n[PROOFSTEP]\nsimp only [comp_apply, hab.eq, hbc.eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf fab : α → β\nfbc : β → γ\nga ga' : α → α\ngb gb' : β → β\ngc gc' : γ → γ\nh : Semiconj f ga gb\nha : RightInverse ga' ga\nhb : LeftInverse gb' gb\nx : α\n⊢ f (ga' x) = gb' (f x)\n[PROOFSTEP]\nrw [← hb (f (ga' x)), ← h.eq, ha x]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nga : α → α → α\ngb : β → β → β\nf' : β → γ\ngc : γ → γ → γ\nhf' : Semiconj₂ f' gb gc\nhf : Semiconj₂ f ga gb\nx y : α\n⊢ (f' ∘ f) (ga x y) = gc ((f' ∘ f) x) ((f' ∘ f) y)\n[PROOFSTEP]\nsimp only [hf'.eq, hf.eq, comp_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nga : α → α → α\ngb : β → β → β\ninst✝ : IsAssociative α ga\nh : Semiconj₂ f ga gb\nh_surj : Surjective f\nx₁ x₂ x₃ : α\n⊢ gb (gb (f x₁) (f x₂)) (f x₃) = gb (f x₁) (gb (f x₂) (f x₃))\n[PROOFSTEP]\nsimp only [← h.eq, @IsAssociative.assoc _ ga]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nga : α → α → α\ngb : β → β → β\ninst✝ : IsAssociative β gb\nh : Semiconj₂ f ga gb\nh_inj : Injective f\nx₁ x₂ x₃ : α\n⊢ f (ga (ga x₁ x₂) x₃) = f (ga x₁ (ga x₂ x₃))\n[PROOFSTEP]\nsimp only [h.eq, @IsAssociative.assoc _ gb]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nga : α → α → α\ngb : β → β → β\ninst✝ : IsIdempotent α ga\nh : Semiconj₂ f ga gb\nh_surj : Surjective f\nx : α\n⊢ gb (f x) (f x) = f x\n[PROOFSTEP]\nsimp only [← h.eq, @IsIdempotent.idempotent _ ga]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nga : α → α → α\ngb : β → β → β\ninst✝ : IsIdempotent β gb\nh : Semiconj₂ f ga gb\nh_inj : Injective f\nx : α\n⊢ f (ga x x) = f x\n[PROOFSTEP]\nrw [h.eq, @IsIdempotent.idempotent _ gb]\n", "meta": {"mathlib_filename": "Mathlib.Logic.Function.Conjugate", "llama_tokens": 1186, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8152324938410784, "lm_q2_score": 0.7279754430043072, "lm_q1q2_score": 0.5934692358554652}} {"text": "[GOAL]\nσ : Type u\nR : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Nonempty σ\ninst✝ : Nontrivial R\n⊢ max (lift #(σ →₀ ℕ)) (lift #R) = max (max (lift #R) (lift #σ)) ℵ₀\n[PROOFSTEP]\nrw [mk_finsupp_nat, max_assoc, lift_max, lift_aleph0, max_comm]\n[GOAL]\nσ✝ : Type u\nR✝ : Type v\ninst✝¹ : CommSemiring R✝\nσ : Type u\nR : Type v\ninst✝ : CommSemiring R\n⊢ #(MvPolynomial σ R) ≤ max (max (lift #R) (lift #σ)) ℵ₀\n[PROOFSTEP]\ncases subsingleton_or_nontrivial R\n[GOAL]\ncase inl\nσ✝ : Type u\nR✝ : Type v\ninst✝¹ : CommSemiring R✝\nσ : Type u\nR : Type v\ninst✝ : CommSemiring R\nh✝ : Subsingleton R\n⊢ #(MvPolynomial σ R) ≤ max (max (lift #R) (lift #σ)) ℵ₀\n[PROOFSTEP]\nexact (mk_eq_one _).trans_le (le_max_of_le_right one_le_aleph0)\n[GOAL]\ncase inr\nσ✝ : Type u\nR✝ : Type v\ninst✝¹ : CommSemiring R✝\nσ : Type u\nR : Type v\ninst✝ : CommSemiring R\nh✝ : Nontrivial R\n⊢ #(MvPolynomial σ R) ≤ max (max (lift #R) (lift #σ)) ℵ₀\n[PROOFSTEP]\ncases isEmpty_or_nonempty σ\n[GOAL]\ncase inr.inl\nσ✝ : Type u\nR✝ : Type v\ninst✝¹ : CommSemiring R✝\nσ : Type u\nR : Type v\ninst✝ : CommSemiring R\nh✝¹ : Nontrivial R\nh✝ : IsEmpty σ\n⊢ #(MvPolynomial σ R) ≤ max (max (lift #R) (lift #σ)) ℵ₀\n[PROOFSTEP]\nexact cardinal_mk_eq_lift.trans_le (le_max_of_le_left <| le_max_left _ _)\n[GOAL]\ncase inr.inr\nσ✝ : Type u\nR✝ : Type v\ninst✝¹ : CommSemiring R✝\nσ : Type u\nR : Type v\ninst✝ : CommSemiring R\nh✝¹ : Nontrivial R\nh✝ : Nonempty σ\n⊢ #(MvPolynomial σ R) ≤ max (max (lift #R) (lift #σ)) ℵ₀\n[PROOFSTEP]\nexact cardinal_mk_eq_max_lift.le\n[GOAL]\nσ R : Type u\ninst✝² : CommSemiring R\ninst✝¹ : Nonempty σ\ninst✝ : Nontrivial R\n⊢ #(MvPolynomial σ R) = max (max #R #σ) ℵ₀\n[PROOFSTEP]\nsimp\n[GOAL]\nσ R : Type u\ninst✝ : CommSemiring R\n⊢ max (max (lift #R) (lift #σ)) ℵ₀ ≤ max (max #R #σ) ℵ₀\n[PROOFSTEP]\nrw [lift_id, lift_id]\n", "meta": {"mathlib_filename": "Mathlib.Data.MvPolynomial.Cardinal", "llama_tokens": 940, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8479677622198946, "lm_q2_score": 0.6992544147913994, "lm_q1q2_score": 0.5929452013330448}} {"text": "[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni j : ℕ\na : (⨂[R]^i) M\nb : (⨂[R]^j) M\n⊢ ↑toTensorAlgebra (GradedMonoid.GMul.mul a b) = ↑toTensorAlgebra a * ↑toTensorAlgebra b\n[PROOFSTEP]\nrw [TensorPower.gMul_eq_coe_linearMap, ← LinearMap.compr₂_apply, ← @LinearMap.mul_apply' R, ← LinearMap.compl₂_apply, ←\n LinearMap.comp_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni j : ℕ\na : (⨂[R]^i) M\nb : (⨂[R]^j) M\n⊢ ↑(↑(LinearMap.compr₂ (LinearMap.compr₂ (TensorProduct.mk R ((⨂[R]^i) M) ((⨂[R]^j) M)) ↑mulEquiv) toTensorAlgebra) a)\n b =\n ↑(↑(LinearMap.comp (LinearMap.compl₂ (LinearMap.mul R ((fun x => TensorAlgebra R M) a)) toTensorAlgebra)\n toTensorAlgebra)\n a)\n b\n[PROOFSTEP]\nrefine' LinearMap.congr_fun (LinearMap.congr_fun _ a) b\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni j : ℕ\na : (⨂[R]^i) M\nb : (⨂[R]^j) M\n⊢ LinearMap.compr₂ (LinearMap.compr₂ (TensorProduct.mk R ((⨂[R]^i) M) ((⨂[R]^j) M)) ↑mulEquiv) toTensorAlgebra =\n LinearMap.comp (LinearMap.compl₂ (LinearMap.mul R ((fun x => TensorAlgebra R M) a)) toTensorAlgebra) toTensorAlgebra\n[PROOFSTEP]\nclear! a b\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni j : ℕ\na : (⨂[R]^i) M\n⊢ LinearMap.compr₂ (LinearMap.compr₂ (TensorProduct.mk R ((⨂[R]^i) M) ((⨂[R]^j) M)) ↑mulEquiv) toTensorAlgebra =\n LinearMap.comp (LinearMap.compl₂ (LinearMap.mul R ((fun x => TensorAlgebra R M) a)) toTensorAlgebra) toTensorAlgebra\n[PROOFSTEP]\next\n (a b)\n -- Porting note: pulled the next two lines out of the long `simp only` below.\n[GOAL]\ncase H.H.H.H\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni j : ℕ\na✝ : (⨂[R]^i) M\na : Fin i → M\nb : Fin j → M\n⊢ ↑(LinearMap.compMultilinearMap\n (↑(LinearMap.compMultilinearMap\n (LinearMap.compr₂ (LinearMap.compr₂ (TensorProduct.mk R ((⨂[R]^i) M) ((⨂[R]^j) M)) ↑mulEquiv)\n toTensorAlgebra)\n (PiTensorProduct.tprod R))\n a)\n (PiTensorProduct.tprod R))\n b =\n ↑(LinearMap.compMultilinearMap\n (↑(LinearMap.compMultilinearMap\n (LinearMap.comp (LinearMap.compl₂ (LinearMap.mul R ((fun x => TensorAlgebra R M) a✝)) toTensorAlgebra)\n toTensorAlgebra)\n (PiTensorProduct.tprod R))\n a)\n (PiTensorProduct.tprod R))\n b\n[PROOFSTEP]\nsimp only [LinearMap.compMultilinearMap_apply]\n[GOAL]\ncase H.H.H.H\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni j : ℕ\na✝ : (⨂[R]^i) M\na : Fin i → M\nb : Fin j → M\n⊢ ↑(↑(LinearMap.compr₂ (LinearMap.compr₂ (TensorProduct.mk R ((⨂[R]^i) M) ((⨂[R]^j) M)) ↑mulEquiv) toTensorAlgebra)\n (↑(PiTensorProduct.tprod R) a))\n (↑(PiTensorProduct.tprod R) b) =\n ↑(↑(LinearMap.comp (LinearMap.compl₂ (LinearMap.mul R ((fun x => TensorAlgebra R M) a✝)) toTensorAlgebra)\n toTensorAlgebra)\n (↑(PiTensorProduct.tprod R) a))\n (↑(PiTensorProduct.tprod R) b)\n[PROOFSTEP]\nrw [LinearMap.compr₂_apply, ← gMul_eq_coe_linearMap]\n[GOAL]\ncase H.H.H.H\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni j : ℕ\na✝ : (⨂[R]^i) M\na : Fin i → M\nb : Fin j → M\n⊢ ↑toTensorAlgebra (GradedMonoid.GMul.mul (↑(PiTensorProduct.tprod R) a) (↑(PiTensorProduct.tprod R) b)) =\n ↑(↑(LinearMap.comp (LinearMap.compl₂ (LinearMap.mul R ((fun x => TensorAlgebra R M) a✝)) toTensorAlgebra)\n toTensorAlgebra)\n (↑(PiTensorProduct.tprod R) a))\n (↑(PiTensorProduct.tprod R) b)\n[PROOFSTEP]\nsimp only [LinearMap.compr₂_apply, LinearMap.mul_apply', LinearMap.compl₂_apply, LinearMap.comp_apply,\n LinearMap.compMultilinearMap_apply, PiTensorProduct.lift.tprod, TensorPower.tprod_mul_tprod,\n TensorPower.toTensorAlgebra_tprod, TensorAlgebra.tprod_apply, ← gMul_eq_coe_linearMap]\n[GOAL]\ncase H.H.H.H\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni j : ℕ\na✝ : (⨂[R]^i) M\na : Fin i → M\nb : Fin j → M\n⊢ List.prod (List.ofFn fun i_1 => ↑(TensorAlgebra.ι R) (Fin.append a b i_1)) =\n List.prod (List.ofFn fun i => ↑(TensorAlgebra.ι R) (a i)) *\n List.prod (List.ofFn fun i => ↑(TensorAlgebra.ι R) (b i))\n[PROOFSTEP]\nrefine' Eq.trans _ List.prod_append\n[GOAL]\ncase H.H.H.H\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni j : ℕ\na✝ : (⨂[R]^i) M\na : Fin i → M\nb : Fin j → M\n⊢ List.prod (List.ofFn fun i_1 => ↑(TensorAlgebra.ι R) (Fin.append a b i_1)) =\n List.prod ((List.ofFn fun i => ↑(TensorAlgebra.ι R) (a i)) ++ List.ofFn fun i => ↑(TensorAlgebra.ι R) (b i))\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase H.H.H.H.h\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni j : ℕ\na✝ : (⨂[R]^i) M\na : Fin i → M\nb : Fin j → M\n⊢ (List.ofFn fun i_1 => ↑(TensorAlgebra.ι R) (Fin.append a b i_1)) =\n (List.ofFn fun i => ↑(TensorAlgebra.ι R) (a i)) ++ List.ofFn fun i => ↑(TensorAlgebra.ι R) (b i)\n[PROOFSTEP]\nerw [← List.map_ofFn _ (TensorAlgebra.ι R), ← List.map_ofFn _ (TensorAlgebra.ι R), ←\n List.map_ofFn _ (TensorAlgebra.ι R), ← List.map_append, List.ofFn_fin_append]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nr : R\n⊢ ↑toTensorAlgebra (↑DirectSum.GAlgebra.toFun r) = ↑(algebraMap R (TensorAlgebra R M)) r\n[PROOFSTEP]\nrw [TensorPower.galgebra_toFun_def, TensorPower.algebraMap₀_eq_smul_one, LinearMap.map_smul,\n TensorPower.toTensorAlgebra_gOne, Algebra.algebraMap_eq_smul_one]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\n⊢ AlgHom.comp ofDirectSum toDirectSum = AlgHom.id R (TensorAlgebra R M)\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx✝ : M\n⊢ ↑(LinearMap.comp (AlgHom.toLinearMap (AlgHom.comp ofDirectSum toDirectSum)) (ι R)) x✝ =\n ↑(LinearMap.comp (AlgHom.toLinearMap (AlgHom.id R (TensorAlgebra R M))) (ι R)) x✝\n[PROOFSTEP]\nsimp [DirectSum.lof_eq_of, tprod_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn m : ℕ\nh : n = m\nx : (⨂[R]^n) M\n⊢ GradedMonoid.mk m (↑(PiTensorProduct.reindex R M (Fin.castIso h).toEquiv) x) = GradedMonoid.mk n x\n[PROOFSTEP]\nrw [Fin.castIso_to_equiv, mk_reindex_cast h]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn : ℕ\nx : Fin n → M\n⊢ List.prod (List.map (fun a => GradedMonoid.mk 1 (⨂ₜ[R] (x_1 : Fin 1), x a)) (List.finRange n)) =\n GradedMonoid.mk n (↑(PiTensorProduct.tprod R) x)\n[PROOFSTEP]\nrefine' Fin.consInduction _ _ x\n[GOAL]\ncase refine'_1\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn : ℕ\nx : Fin n → M\n⊢ List.prod (List.map (fun a => GradedMonoid.mk 1 (⨂ₜ[R] (x : Fin 1), Fin.elim0 a)) (List.finRange 0)) =\n GradedMonoid.mk 0 (↑(PiTensorProduct.tprod R) Fin.elim0)\n[PROOFSTEP]\nclear x\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn : ℕ\nx : Fin n → M\n⊢ ∀ {n : ℕ} (x₀ : M) (x : Fin n → M),\n List.prod (List.map (fun a => GradedMonoid.mk 1 (⨂ₜ[R] (x_1 : Fin 1), x a)) (List.finRange n)) =\n GradedMonoid.mk n (↑(PiTensorProduct.tprod R) x) →\n List.prod (List.map (fun a => GradedMonoid.mk 1 (⨂ₜ[R] (x_1 : Fin 1), Fin.cons x₀ x a)) (List.finRange (n + 1))) =\n GradedMonoid.mk (n + 1) (↑(PiTensorProduct.tprod R) (Fin.cons x₀ x))\n[PROOFSTEP]\nclear x\n[GOAL]\ncase refine'_1\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn : ℕ\n⊢ List.prod (List.map (fun a => GradedMonoid.mk 1 (⨂ₜ[R] (x : Fin 1), Fin.elim0 a)) (List.finRange 0)) =\n GradedMonoid.mk 0 (↑(PiTensorProduct.tprod R) Fin.elim0)\n[PROOFSTEP]\nrw [List.finRange_zero, List.map_nil, List.prod_nil]\n[GOAL]\ncase refine'_1\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn : ℕ\n⊢ 1 = GradedMonoid.mk 0 (↑(PiTensorProduct.tprod R) Fin.elim0)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn : ℕ\n⊢ ∀ {n : ℕ} (x₀ : M) (x : Fin n → M),\n List.prod (List.map (fun a => GradedMonoid.mk 1 (⨂ₜ[R] (x_1 : Fin 1), x a)) (List.finRange n)) =\n GradedMonoid.mk n (↑(PiTensorProduct.tprod R) x) →\n List.prod (List.map (fun a => GradedMonoid.mk 1 (⨂ₜ[R] (x_1 : Fin 1), Fin.cons x₀ x a)) (List.finRange (n + 1))) =\n GradedMonoid.mk (n + 1) (↑(PiTensorProduct.tprod R) (Fin.cons x₀ x))\n[PROOFSTEP]\nintro n x₀ x ih\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn✝ n : ℕ\nx₀ : M\nx : Fin n → M\nih :\n List.prod (List.map (fun a => GradedMonoid.mk 1 (⨂ₜ[R] (x_1 : Fin 1), x a)) (List.finRange n)) =\n GradedMonoid.mk n (↑(PiTensorProduct.tprod R) x)\n⊢ List.prod (List.map (fun a => GradedMonoid.mk 1 (⨂ₜ[R] (x_1 : Fin 1), Fin.cons x₀ x a)) (List.finRange (n + 1))) =\n GradedMonoid.mk (n + 1) (↑(PiTensorProduct.tprod R) (Fin.cons x₀ x))\n[PROOFSTEP]\nrw [List.finRange_succ_eq_map, List.map_cons, List.prod_cons, List.map_map]\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn✝ n : ℕ\nx₀ : M\nx : Fin n → M\nih :\n List.prod (List.map (fun a => GradedMonoid.mk 1 (⨂ₜ[R] (x_1 : Fin 1), x a)) (List.finRange n)) =\n GradedMonoid.mk n (↑(PiTensorProduct.tprod R) x)\n⊢ GradedMonoid.mk 1 (⨂ₜ[R] (x_1 : Fin 1), Fin.cons x₀ x 0) *\n List.prod\n (List.map ((fun a => GradedMonoid.mk 1 (⨂ₜ[R] (x_1 : Fin 1), Fin.cons x₀ x a)) ∘ Fin.succ) (List.finRange n)) =\n GradedMonoid.mk (n + 1) (↑(PiTensorProduct.tprod R) (Fin.cons x₀ x))\n[PROOFSTEP]\nsimp_rw [Function.comp, Fin.cons_zero, Fin.cons_succ]\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn✝ n : ℕ\nx₀ : M\nx : Fin n → M\nih :\n List.prod (List.map (fun a => GradedMonoid.mk 1 (⨂ₜ[R] (x_1 : Fin 1), x a)) (List.finRange n)) =\n GradedMonoid.mk n (↑(PiTensorProduct.tprod R) x)\n⊢ GradedMonoid.mk 1 (⨂ₜ[R] (x : Fin 1), x₀) *\n List.prod (List.map (fun x_1 => GradedMonoid.mk 1 (⨂ₜ[R] (x_2 : Fin 1), x x_1)) (List.finRange n)) =\n GradedMonoid.mk (n + 1) (↑(PiTensorProduct.tprod R) (Fin.cons x₀ x))\n[PROOFSTEP]\nrw [ih, GradedMonoid.mk_mul_mk, TensorPower.tprod_mul_tprod]\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn✝ n : ℕ\nx₀ : M\nx : Fin n → M\nih :\n List.prod (List.map (fun a => GradedMonoid.mk 1 (⨂ₜ[R] (x_1 : Fin 1), x a)) (List.finRange n)) =\n GradedMonoid.mk n (↑(PiTensorProduct.tprod R) x)\n⊢ GradedMonoid.mk (1 + n) (↑(PiTensorProduct.tprod R) (Fin.append (fun x => x₀) x)) =\n GradedMonoid.mk (n + 1) (↑(PiTensorProduct.tprod R) (Fin.cons x₀ x))\n[PROOFSTEP]\nrefine' TensorPower.gradedMonoid_eq_of_cast (add_comm _ _) _\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn✝ n : ℕ\nx₀ : M\nx : Fin n → M\nih :\n List.prod (List.map (fun a => GradedMonoid.mk 1 (⨂ₜ[R] (x_1 : Fin 1), x a)) (List.finRange n)) =\n GradedMonoid.mk n (↑(PiTensorProduct.tprod R) x)\n⊢ ↑(TensorPower.cast R M (_ : 1 + n = n + 1))\n (GradedMonoid.mk (1 + n) (↑(PiTensorProduct.tprod R) (Fin.append (fun x => x₀) x))).snd =\n (GradedMonoid.mk (n + 1) (↑(PiTensorProduct.tprod R) (Fin.cons x₀ x))).snd\n[PROOFSTEP]\ndsimp only [GradedMonoid.mk]\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn✝ n : ℕ\nx₀ : M\nx : Fin n → M\nih :\n List.prod (List.map (fun a => GradedMonoid.mk 1 (⨂ₜ[R] (x_1 : Fin 1), x a)) (List.finRange n)) =\n GradedMonoid.mk n (↑(PiTensorProduct.tprod R) x)\n⊢ ↑(TensorPower.cast R M (_ : 1 + n = n + 1)) (↑(PiTensorProduct.tprod R) (Fin.append (fun x => x₀) x)) =\n ↑(PiTensorProduct.tprod R) (Fin.cons x₀ x)\n[PROOFSTEP]\nrw [TensorPower.cast_tprod]\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn✝ n : ℕ\nx₀ : M\nx : Fin n → M\nih :\n List.prod (List.map (fun a => GradedMonoid.mk 1 (⨂ₜ[R] (x_1 : Fin 1), x a)) (List.finRange n)) =\n GradedMonoid.mk n (↑(PiTensorProduct.tprod R) x)\n⊢ ↑(PiTensorProduct.tprod R) (Fin.append (fun x => x₀) x ∘ ↑(Fin.castIso (_ : n + 1 = 1 + n))) =\n ↑(PiTensorProduct.tprod R) (Fin.cons x₀ x)\n[PROOFSTEP]\nsimp_rw [Fin.append_left_eq_cons, Function.comp]\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn✝ n : ℕ\nx₀ : M\nx : Fin n → M\nih :\n List.prod (List.map (fun a => GradedMonoid.mk 1 (⨂ₜ[R] (x_1 : Fin 1), x a)) (List.finRange n)) =\n GradedMonoid.mk n (↑(PiTensorProduct.tprod R) x)\n⊢ (⨂ₜ[R] (x_1 : Fin (n + 1)),\n Fin.cons x₀ x (↑(Fin.castIso (_ : 1 + n = n + 1)) (↑(Fin.castIso (_ : n + 1 = 1 + n)) x_1))) =\n ↑(PiTensorProduct.tprod R) (Fin.cons x₀ x)\n[PROOFSTEP]\ncongr 1 with i\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn : ℕ\nx : Fin n → M\n⊢ ↑toDirectSum (↑(tprod R M n) x) = ↑(DirectSum.of (fun i => (⨂[R]^i) M) n) (↑(PiTensorProduct.tprod R) x)\n[PROOFSTEP]\nrw [tprod_apply, AlgHom.map_list_prod, List.map_ofFn]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn : ℕ\nx : Fin n → M\n⊢ List.prod (List.ofFn (↑toDirectSum ∘ fun i => ↑(ι R) (x i))) =\n ↑(DirectSum.of (fun i => (⨂[R]^i) M) n) (↑(PiTensorProduct.tprod R) x)\n[PROOFSTEP]\nsimp_rw [Function.comp, toDirectSum_ι]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn : ℕ\nx : Fin n → M\n⊢ List.prod (List.ofFn fun x_1 => ↑(DirectSum.of (fun n => (⨂[R]^n) M) 1) (⨂ₜ[R] (x_2 : Fin 1), x x_1)) =\n ↑(DirectSum.of (fun i => (⨂[R]^i) M) n) (↑(PiTensorProduct.tprod R) x)\n[PROOFSTEP]\nrw [DirectSum.list_prod_ofFn_of_eq_dProd]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn : ℕ\nx : Fin n → M\n⊢ ↑(DirectSum.of (fun n => (⨂[R]^n) M) (List.dProdIndex (List.finRange n) fun x => 1))\n (List.dProd (List.finRange n) (fun x => 1) fun x_1 => ⨂ₜ[R] (x_2 : Fin 1), x x_1) =\n ↑(DirectSum.of (fun i => (⨂[R]^i) M) n) (↑(PiTensorProduct.tprod R) x)\n[PROOFSTEP]\napply DirectSum.of_eq_of_gradedMonoid_eq\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn : ℕ\nx : Fin n → M\n⊢ GradedMonoid.mk (List.dProdIndex (List.finRange n) fun x => 1)\n (List.dProd (List.finRange n) (fun x => 1) fun x_1 => ⨂ₜ[R] (x_2 : Fin 1), x x_1) =\n GradedMonoid.mk n (↑(PiTensorProduct.tprod R) x)\n[PROOFSTEP]\nrw [GradedMonoid.mk_list_dProd]\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nn : ℕ\nx : Fin n → M\n⊢ List.prod (List.map (fun a => GradedMonoid.mk 1 (⨂ₜ[R] (x_1 : Fin 1), x a)) (List.finRange n)) =\n GradedMonoid.mk n (↑(PiTensorProduct.tprod R) x)\n[PROOFSTEP]\nrw [TensorPower.list_prod_gradedMonoid_mk_single]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\n⊢ AlgHom.comp toDirectSum ofDirectSum = AlgHom.id R (⨁ (n : ℕ), (⨂[R]^n) M)\n[PROOFSTEP]\next\n[GOAL]\ncase h.H.H\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni✝ : ℕ\nx✝ : Fin i✝ → M\n⊢ ↑(LinearMap.compMultilinearMap\n (LinearMap.comp (AlgHom.toLinearMap (AlgHom.comp toDirectSum ofDirectSum))\n (DirectSum.lof R ℕ (fun i => (⨂[R]^i) M) i✝))\n (PiTensorProduct.tprod R))\n x✝ =\n ↑(LinearMap.compMultilinearMap\n (LinearMap.comp (AlgHom.toLinearMap (AlgHom.id R (⨁ (n : ℕ), (⨂[R]^n) M)))\n (DirectSum.lof R ℕ (fun i => (⨂[R]^i) M) i✝))\n (PiTensorProduct.tprod R))\n x✝\n[PROOFSTEP]\nsimp [DirectSum.lof_eq_of, -tprod_apply, toDirectSum_tensorPower_tprod]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.TensorAlgebra.ToTensorPower", "llama_tokens": 8041, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8479677468516187, "lm_q2_score": 0.6992544273261175, "lm_q1q2_score": 0.5929452012157468}} {"text": "[GOAL]\nx y : ℕ\n⊢ gcd x y = if x = 0 then y else gcd (y % x) x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase zero\ny : ℕ\n⊢ gcd zero y = if zero = 0 then y else gcd (y % zero) zero\n[PROOFSTEP]\nsimp [Nat.gcd_succ]\n[GOAL]\ncase succ\ny n✝ : ℕ\n⊢ gcd (succ n✝) y = if succ n✝ = 0 then y else gcd (y % succ n✝) (succ n✝)\n[PROOFSTEP]\nsimp [Nat.gcd_succ]\n", "meta": {"mathlib_filename": "Mathlib.Init.Data.Nat.GCD", "llama_tokens": 180, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8856314798554445, "lm_q2_score": 0.6688802603710086, "lm_q1q2_score": 0.5923814148384714}} {"text": "[GOAL]\nα : Type u\nb : Bool\na : α\n⊢ (bif b then a else a) = a\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\nα : Type u\na : α\n⊢ (bif false then a else a) = a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase true\nα : Type u\na : α\n⊢ (bif true then a else a) = a\n[PROOFSTEP]\nrfl\n[GOAL]\nb : Bool\n⊢ xor b b = false\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\n⊢ xor false false = false\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true\n⊢ xor true true = false\n[PROOFSTEP]\nsimp\n[GOAL]\nb : Bool\n⊢ xor b true = !b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\n⊢ xor false true = !false\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true\n⊢ xor true true = !true\n[PROOFSTEP]\nsimp\n[GOAL]\nb : Bool\n⊢ xor b false = b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\n⊢ xor false false = false\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true\n⊢ xor true false = true\n[PROOFSTEP]\nsimp\n[GOAL]\nb : Bool\n⊢ xor true b = !b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\n⊢ xor true false = !false\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true\n⊢ xor true true = !true\n[PROOFSTEP]\nsimp\n[GOAL]\nb : Bool\n⊢ xor false b = b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\n⊢ xor false false = false\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true\n⊢ xor false true = true\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ ¬true = false\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ¬false = true\n[PROOFSTEP]\ndecide\n[GOAL]\nb : Bool\n⊢ (¬b = true) = (b = false)\n[PROOFSTEP]\nsimp\n[GOAL]\nb : Bool\n⊢ (¬b = false) = (b = true)\n[PROOFSTEP]\nsimp\n[GOAL]\na b : Bool\n⊢ ((a && b) = true) = (a = true ∧ b = true)\n[PROOFSTEP]\nsimp\n[GOAL]\na b : Bool\n⊢ ((a || b) = true) = (a = true ∨ b = true)\n[PROOFSTEP]\nsimp\n[GOAL]\na : Bool\n⊢ ((!a) = true) = (a = false)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\n⊢ ((!false) = true) = (false = false)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true\n⊢ ((!true) = true) = (true = false)\n[PROOFSTEP]\nsimp\n[GOAL]\na b : Bool\n⊢ ((a && b) = false) = (a = false ∨ b = false)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\nb : Bool\n⊢ ((false && b) = false) = (false = false ∨ b = false)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase true\nb : Bool\n⊢ ((true && b) = false) = (true = false ∨ b = false)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false.false\n⊢ ((false && false) = false) = (false = false ∨ false = false)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase false.true\n⊢ ((false && true) = false) = (false = false ∨ true = false)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true.false\n⊢ ((true && false) = false) = (true = false ∨ false = false)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true.true\n⊢ ((true && true) = false) = (true = false ∨ true = false)\n[PROOFSTEP]\nsimp\n[GOAL]\na b : Bool\n⊢ ((a || b) = false) = (a = false ∧ b = false)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\nb : Bool\n⊢ ((false || b) = false) = (false = false ∧ b = false)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase true\nb : Bool\n⊢ ((true || b) = false) = (true = false ∧ b = false)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false.false\n⊢ ((false || false) = false) = (false = false ∧ false = false)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase false.true\n⊢ ((false || true) = false) = (false = false ∧ true = false)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true.false\n⊢ ((true || false) = false) = (true = false ∧ false = false)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true.true\n⊢ ((true || true) = false) = (true = false ∧ true = false)\n[PROOFSTEP]\nsimp\n[GOAL]\na : Bool\n⊢ ((!a) = false) = (a = true)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\n⊢ ((!false) = false) = (false = true)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true\n⊢ ((!true) = false) = (true = true)\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ (false = true) = False\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ (true = true) = True\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ (false = true) = False\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ (true = true) = True\n[PROOFSTEP]\nsimp\n[GOAL]\np : Prop\nd : Decidable p\n⊢ decide p = true ↔ p\n[PROOFSTEP]\nsimp\n[GOAL]\nb : Bool\n⊢ ¬b = true ↔ b = false\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\n⊢ ¬false = true ↔ false = false\n[PROOFSTEP]\nexact by decide\n[GOAL]\n⊢ ¬false = true ↔ false = false\n[PROOFSTEP]\ndecide\n[GOAL]\ncase true\n⊢ ¬true = true ↔ true = false\n[PROOFSTEP]\nexact by decide\n[GOAL]\n⊢ ¬true = true ↔ true = false\n[PROOFSTEP]\ndecide\n[GOAL]\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh : p ↔ q\n⊢ decide p = decide q\n[PROOFSTEP]\ncases h' : decide q with\n| false => exact decide_false (mt h.1 <| of_decide_false h')\n| true => exact decide_true (h.2 <| of_decide_true h')\n[GOAL]\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh : p ↔ q\nx✝ : Bool\nh' : decide q = x✝\n⊢ decide p = x✝\n[PROOFSTEP]\ncases h' : decide q with\n| false => exact decide_false (mt h.1 <| of_decide_false h')\n| true => exact decide_true (h.2 <| of_decide_true h')\n[GOAL]\ncase false\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh : p ↔ q\nh' : decide q = false\n⊢ decide p = false\n[PROOFSTEP]\n\n| false => exact decide_false (mt h.1 <| of_decide_false h')\n[GOAL]\ncase false\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh : p ↔ q\nh' : decide q = false\n⊢ decide p = false\n[PROOFSTEP]\nexact decide_false (mt h.1 <| of_decide_false h')\n[GOAL]\ncase true\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh : p ↔ q\nh' : decide q = true\n⊢ decide p = true\n[PROOFSTEP]\n\n| true => exact decide_true (h.2 <| of_decide_true h')\n[GOAL]\ncase true\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh : p ↔ q\nh' : decide q = true\n⊢ decide p = true\n[PROOFSTEP]\nexact decide_true (h.2 <| of_decide_true h')\n[GOAL]\na b : Bool\n⊢ (a || b) = true ↔ a = true ∨ b = true\n[PROOFSTEP]\nsimp\n[GOAL]\na b : Bool\n⊢ (a && b) = true ↔ a = true ∧ b = true\n[PROOFSTEP]\nsimp\n[GOAL]\na b : Bool\n⊢ xor a b = true ↔ Xor' (a = true) (b = true)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\nb : Bool\n⊢ xor false b = true ↔ Xor' (false = true) (b = true)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase true\nb : Bool\n⊢ xor true b = true ↔ Xor' (true = true) (b = true)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false.false\n⊢ xor false false = true ↔ Xor' (false = true) (false = true)\n[PROOFSTEP]\nexact by decide\n[GOAL]\n⊢ xor false false = true ↔ Xor' (false = true) (false = true)\n[PROOFSTEP]\ndecide\n[GOAL]\ncase false.true\n⊢ xor false true = true ↔ Xor' (false = true) (true = true)\n[PROOFSTEP]\nexact by decide\n[GOAL]\n⊢ xor false true = true ↔ Xor' (false = true) (true = true)\n[PROOFSTEP]\ndecide\n[GOAL]\ncase true.false\n⊢ xor true false = true ↔ Xor' (true = true) (false = true)\n[PROOFSTEP]\nexact by decide\n[GOAL]\n⊢ xor true false = true ↔ Xor' (true = true) (false = true)\n[PROOFSTEP]\ndecide\n[GOAL]\ncase true.true\n⊢ xor true true = true ↔ Xor' (true = true) (true = true)\n[PROOFSTEP]\nexact by decide\n[GOAL]\n⊢ xor true true = true ↔ Xor' (true = true) (true = true)\n[PROOFSTEP]\ndecide\n[GOAL]\nc : Prop\ninst✝ : Decidable c\na b : Bool\n⊢ ((if c then a else b) = true) = if c then a = true else b = true\n[PROOFSTEP]\nby_cases c\n[GOAL]\nc : Prop\ninst✝ : Decidable c\na b : Bool\n⊢ ((if c then a else b) = true) = if c then a = true else b = true\n[PROOFSTEP]\nby_cases c\n[GOAL]\ncase pos\nc : Prop\ninst✝ : Decidable c\na b : Bool\nh : c\n⊢ ((if c then a else b) = true) = if c then a = true else b = true\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\nc : Prop\ninst✝ : Decidable c\na b : Bool\nh : ¬c\n⊢ ((if c then a else b) = true) = if c then a = true else b = true\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nc : Prop\ninst✝ : Decidable c\na b : Bool\n⊢ ((if c then a else b) = false) = if c then a = false else b = false\n[PROOFSTEP]\nby_cases c\n[GOAL]\nc : Prop\ninst✝ : Decidable c\na b : Bool\n⊢ ((if c then a else b) = false) = if c then a = false else b = false\n[PROOFSTEP]\nby_cases c\n[GOAL]\ncase pos\nc : Prop\ninst✝ : Decidable c\na b : Bool\nh : c\n⊢ ((if c then a else b) = false) = if c then a = false else b = false\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\nc : Prop\ninst✝ : Decidable c\na b : Bool\nh : ¬c\n⊢ ((if c then a else b) = false) = if c then a = false else b = false\n[PROOFSTEP]\nsimp [*]\n", "meta": {"mathlib_filename": "Mathlib.Init.Data.Bool.Lemmas", "llama_tokens": 3364, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.793105941403651, "lm_q2_score": 0.7461389873857264, "lm_q1q2_score": 0.5917672640085234}} {"text": "[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : AddMonoid R\nl : List R\n⊢ trop (sum l) = prod (map trop l)\n[PROOFSTEP]\ninduction' l with hd tl IH\n[GOAL]\ncase nil\nR : Type u_1\nS : Type u_2\ninst✝ : AddMonoid R\n⊢ trop (sum []) = prod (map trop [])\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nR : Type u_1\nS : Type u_2\ninst✝ : AddMonoid R\nhd : R\ntl : List R\nIH : trop (sum tl) = prod (map trop tl)\n⊢ trop (sum (hd :: tl)) = prod (map trop (hd :: tl))\n[PROOFSTEP]\nsimp [← IH]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : AddCommMonoid R\ns : Multiset R\n⊢ ∀ (a : List R), trop (sum (Quotient.mk (List.isSetoid R) a)) = prod (map trop (Quotient.mk (List.isSetoid R) a))\n[PROOFSTEP]\nsimpa using List.trop_sum\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : AddCommMonoid R\ns : Finset S\nf : S → R\n⊢ trop (∑ i in s, f i) = ∏ i in s, trop (f i)\n[PROOFSTEP]\nconvert Multiset.trop_sum (s.val.map f)\n[GOAL]\ncase h.e'_3\nR : Type u_1\nS : Type u_2\ninst✝ : AddCommMonoid R\ns : Finset S\nf : S → R\n⊢ ∏ i in s, trop (f i) = Multiset.prod (Multiset.map trop (Multiset.map f s.val))\n[PROOFSTEP]\nsimp only [Multiset.map_map, Function.comp_apply]\n[GOAL]\ncase h.e'_3\nR : Type u_1\nS : Type u_2\ninst✝ : AddCommMonoid R\ns : Finset S\nf : S → R\n⊢ ∏ i in s, trop (f i) = Multiset.prod (Multiset.map (fun i => trop (f i)) s.val)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : AddMonoid R\nl : List (Tropical R)\n⊢ untrop (prod l) = sum (map untrop l)\n[PROOFSTEP]\ninduction' l with hd tl IH\n[GOAL]\ncase nil\nR : Type u_1\nS : Type u_2\ninst✝ : AddMonoid R\n⊢ untrop (prod []) = sum (map untrop [])\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nR : Type u_1\nS : Type u_2\ninst✝ : AddMonoid R\nhd : Tropical R\ntl : List (Tropical R)\nIH : untrop (prod tl) = sum (map untrop tl)\n⊢ untrop (prod (hd :: tl)) = sum (map untrop (hd :: tl))\n[PROOFSTEP]\nsimp [← IH]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : AddCommMonoid R\ns : Multiset (Tropical R)\n⊢ ∀ (a : List (Tropical R)),\n untrop (prod (Quotient.mk (List.isSetoid (Tropical R)) a)) =\n sum (map untrop (Quotient.mk (List.isSetoid (Tropical R)) a))\n[PROOFSTEP]\nsimpa using List.untrop_prod\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : AddCommMonoid R\ns : Finset S\nf : S → Tropical R\n⊢ untrop (∏ i in s, f i) = ∑ i in s, untrop (f i)\n[PROOFSTEP]\nconvert Multiset.untrop_prod (s.val.map f)\n[GOAL]\ncase h.e'_3\nR : Type u_1\nS : Type u_2\ninst✝ : AddCommMonoid R\ns : Finset S\nf : S → Tropical R\n⊢ ∑ i in s, untrop (f i) = Multiset.sum (Multiset.map untrop (Multiset.map f s.val))\n[PROOFSTEP]\nsimp only [Multiset.map_map, Function.comp_apply]\n[GOAL]\ncase h.e'_3\nR : Type u_1\nS : Type u_2\ninst✝ : AddCommMonoid R\ns : Finset S\nf : S → Tropical R\n⊢ ∑ i in s, untrop (f i) = Multiset.sum (Multiset.map (fun i => untrop (f i)) s.val)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : LinearOrder R\nl : List R\n⊢ trop (minimum l) = sum (map (trop ∘ WithTop.some) l)\n[PROOFSTEP]\ninduction' l with hd tl IH\n[GOAL]\ncase nil\nR : Type u_1\nS : Type u_2\ninst✝ : LinearOrder R\n⊢ trop (minimum []) = sum (map (trop ∘ WithTop.some) [])\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nR : Type u_1\nS : Type u_2\ninst✝ : LinearOrder R\nhd : R\ntl : List R\nIH : trop (minimum tl) = sum (map (trop ∘ WithTop.some) tl)\n⊢ trop (minimum (hd :: tl)) = sum (map (trop ∘ WithTop.some) (hd :: tl))\n[PROOFSTEP]\nsimp [List.minimum_cons, ← IH]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : LinearOrder R\ninst✝ : OrderTop R\ns : Multiset R\n⊢ trop (inf s) = sum (map trop s)\n[PROOFSTEP]\ninduction' s using Multiset.induction with s x IH\n[GOAL]\ncase empty\nR : Type u_1\nS : Type u_2\ninst✝¹ : LinearOrder R\ninst✝ : OrderTop R\n⊢ trop (inf 0) = sum (map trop 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nR : Type u_1\nS : Type u_2\ninst✝¹ : LinearOrder R\ninst✝ : OrderTop R\ns : R\nx : Multiset R\nIH : trop (inf x) = sum (map trop x)\n⊢ trop (inf (s ::ₘ x)) = sum (map trop (s ::ₘ x))\n[PROOFSTEP]\nsimp [← IH]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : LinearOrder R\ninst✝ : OrderTop R\ns : Finset S\nf : S → R\n⊢ trop (inf s f) = ∑ i in s, trop (f i)\n[PROOFSTEP]\nconvert Multiset.trop_inf (s.val.map f)\n[GOAL]\ncase h.e'_3\nR : Type u_1\nS : Type u_2\ninst✝¹ : LinearOrder R\ninst✝ : OrderTop R\ns : Finset S\nf : S → R\n⊢ ∑ i in s, trop (f i) = Multiset.sum (Multiset.map trop (Multiset.map f s.val))\n[PROOFSTEP]\nsimp only [Multiset.map_map, Function.comp_apply]\n[GOAL]\ncase h.e'_3\nR : Type u_1\nS : Type u_2\ninst✝¹ : LinearOrder R\ninst✝ : OrderTop R\ns : Finset S\nf : S → R\n⊢ ∑ i in s, trop (f i) = Multiset.sum (Multiset.map (fun i => trop (f i)) s.val)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\ns : Finset S\nf : S → WithTop R\n⊢ trop (sInf (f '' ↑s)) = ∑ i in s, trop (f i)\n[PROOFSTEP]\nrcases s.eq_empty_or_nonempty with (rfl | h)\n[GOAL]\ncase inl\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\nf : S → WithTop R\n⊢ trop (sInf (f '' ↑∅)) = ∑ i in ∅, trop (f i)\n[PROOFSTEP]\nsimp only [Set.image_empty, coe_empty, sum_empty, WithTop.sInf_empty, trop_top]\n[GOAL]\ncase inr\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\ns : Finset S\nf : S → WithTop R\nh : Finset.Nonempty s\n⊢ trop (sInf (f '' ↑s)) = ∑ i in s, trop (f i)\n[PROOFSTEP]\nrw [← inf'_eq_csInf_image _ h, inf'_eq_inf, s.trop_inf]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : ConditionallyCompleteLinearOrder R\ninst✝ : Fintype S\nf : S → WithTop R\n⊢ trop (⨅ (i : S), f i) = ∑ i : S, trop (f i)\n[PROOFSTEP]\nrw [iInf, ← Set.image_univ, ← coe_univ, trop_sInf_image]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : LinearOrder R\ninst✝ : OrderTop R\ns : Multiset (Tropical R)\n⊢ untrop (sum s) = inf (map untrop s)\n[PROOFSTEP]\ninduction' s using Multiset.induction with s x IH\n[GOAL]\ncase empty\nR : Type u_1\nS : Type u_2\ninst✝¹ : LinearOrder R\ninst✝ : OrderTop R\n⊢ untrop (sum 0) = inf (map untrop 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nR : Type u_1\nS : Type u_2\ninst✝¹ : LinearOrder R\ninst✝ : OrderTop R\ns : Tropical R\nx : Multiset (Tropical R)\nIH : untrop (sum x) = inf (map untrop x)\n⊢ untrop (sum (s ::ₘ x)) = inf (map untrop (s ::ₘ x))\n[PROOFSTEP]\nsimp only [sum_cons, ge_iff_le, untrop_add, untrop_le_iff, map_cons, inf_cons, ← IH]\n[GOAL]\ncase cons\nR : Type u_1\nS : Type u_2\ninst✝¹ : LinearOrder R\ninst✝ : OrderTop R\ns : Tropical R\nx : Multiset (Tropical R)\nIH : untrop (sum x) = inf (map untrop x)\n⊢ min (untrop s) (untrop (sum x)) = untrop s ⊓ untrop (sum x)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : LinearOrder R\ninst✝ : OrderTop R\ns : Finset S\nf : S → Tropical R\n⊢ untrop (∑ i in s, f i) = inf s (untrop ∘ f)\n[PROOFSTEP]\nconvert Multiset.untrop_sum (s.val.map f)\n[GOAL]\ncase h.e'_3\nR : Type u_1\nS : Type u_2\ninst✝¹ : LinearOrder R\ninst✝ : OrderTop R\ns : Finset S\nf : S → Tropical R\n⊢ inf s (untrop ∘ f) = Multiset.inf (Multiset.map untrop (Multiset.map f s.val))\n[PROOFSTEP]\nsimp only [Multiset.map_map, Function.comp_apply]\n[GOAL]\ncase h.e'_3\nR : Type u_1\nS : Type u_2\ninst✝¹ : LinearOrder R\ninst✝ : OrderTop R\ns : Finset S\nf : S → Tropical R\n⊢ inf s (untrop ∘ f) = Multiset.inf (Multiset.map (fun x => untrop (f x)) s.val)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\ns : Finset S\nf : S → Tropical (WithTop R)\n⊢ untrop (∑ i in s, f i) = sInf (untrop ∘ f '' ↑s)\n[PROOFSTEP]\nrcases s.eq_empty_or_nonempty with (rfl | h)\n[GOAL]\ncase inl\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\nf : S → Tropical (WithTop R)\n⊢ untrop (∑ i in ∅, f i) = sInf (untrop ∘ f '' ↑∅)\n[PROOFSTEP]\nsimp only [Set.image_empty, coe_empty, sum_empty, WithTop.sInf_empty, untrop_zero]\n[GOAL]\ncase inr\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\ns : Finset S\nf : S → Tropical (WithTop R)\nh : Finset.Nonempty s\n⊢ untrop (∑ i in s, f i) = sInf (untrop ∘ f '' ↑s)\n[PROOFSTEP]\nrw [← inf'_eq_csInf_image _ h, inf'_eq_inf, Finset.untrop_sum']\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : ConditionallyCompleteLinearOrder R\ninst✝ : Fintype S\nf : S → Tropical (WithTop R)\n⊢ untrop (∑ i : S, f i) = ⨅ (i : S), untrop (f i)\n[PROOFSTEP]\nrw [iInf, ← Set.image_univ, ← coe_univ, untrop_sum_eq_sInf_image]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : ConditionallyCompleteLinearOrder R\ninst✝ : Fintype S\nf : S → Tropical (WithTop R)\n⊢ sInf ((untrop ∘ fun i => f i) '' ↑univ) = sInf ((fun i => untrop (f i)) '' ↑univ)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\ns : Finset S\nf : S → Tropical (WithTop R)\n⊢ untrop (∑ i in s, f i) = ⨅ (i : { x // x ∈ s }), untrop (f ↑i)\n[PROOFSTEP]\nsimpa [← _root_.untrop_sum] using sum_attach.symm\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Tropical.BigOperators", "llama_tokens": 4070, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8499711680567799, "lm_q2_score": 0.6959583250334526, "lm_q1q2_score": 0.5915445104475238}} {"text": "[GOAL]\nn m : ℕ\n⊢ succ n * m = 0 → succ n = 0 ∨ m = 0\n[PROOFSTEP]\nrw [succ_mul]\n[GOAL]\nn m : ℕ\n⊢ n * m + m = 0 → succ n = 0 ∨ m = 0\n[PROOFSTEP]\nintro h\n[GOAL]\nn m : ℕ\nh : n * m + m = 0\n⊢ succ n = 0 ∨ m = 0\n[PROOFSTEP]\nexact Or.inr (Nat.eq_zero_of_add_eq_zero_left h)\n[GOAL]\nm : ℕ\nh : bit0 0 = bit0 (m + 1)\n⊢ 0 = m + 1\n[PROOFSTEP]\ncontradiction\n[GOAL]\nn : ℕ\nh : bit0 (n + 1) = bit0 0\n⊢ n + 1 = 0\n[PROOFSTEP]\ncontradiction\n[GOAL]\nn m : ℕ\nh : bit0 (n + 1) = bit0 (m + 1)\n⊢ n + 1 = m + 1\n[PROOFSTEP]\nhave : succ (succ (n + n)) = succ (succ (m + m)) :=\n by\n unfold bit0 at h ; simp [add_one, add_succ, succ_add] at h \n have aux : n + n = m + m := h; rw [aux]\n[GOAL]\nn m : ℕ\nh : bit0 (n + 1) = bit0 (m + 1)\n⊢ succ (succ (n + n)) = succ (succ (m + m))\n[PROOFSTEP]\nunfold bit0 at h \n[GOAL]\nn m : ℕ\nh : n + 1 + (n + 1) = m + 1 + (m + 1)\n⊢ succ (succ (n + n)) = succ (succ (m + m))\n[PROOFSTEP]\nsimp [add_one, add_succ, succ_add] at h \n[GOAL]\nn m : ℕ\nh : n + n = m + m\n⊢ succ (succ (n + n)) = succ (succ (m + m))\n[PROOFSTEP]\nhave aux : n + n = m + m := h\n[GOAL]\nn m : ℕ\nh aux : n + n = m + m\n⊢ succ (succ (n + n)) = succ (succ (m + m))\n[PROOFSTEP]\nrw [aux]\n[GOAL]\nn m : ℕ\nh : bit0 (n + 1) = bit0 (m + 1)\nthis : succ (succ (n + n)) = succ (succ (m + m))\n⊢ n + 1 = m + 1\n[PROOFSTEP]\nhave : n + n = m + m := by repeat injection this with this\n[GOAL]\nn m : ℕ\nh : bit0 (n + 1) = bit0 (m + 1)\nthis : succ (succ (n + n)) = succ (succ (m + m))\n⊢ n + n = m + m\n[PROOFSTEP]\nrepeat injection this with this\n[GOAL]\nn m : ℕ\nh : bit0 (n + 1) = bit0 (m + 1)\nthis : succ (succ (n + n)) = succ (succ (m + m))\n⊢ n + n = m + m\n[PROOFSTEP]\ninjection this with this\n[GOAL]\nn m : ℕ\nh : bit0 (n + 1) = bit0 (m + 1)\nthis : succ (n + n) = succ (m + m)\n⊢ n + n = m + m\n[PROOFSTEP]\ninjection this with this\n[GOAL]\n\n[PROOFSTEP]\ninjection this with this\n[GOAL]\nn m : ℕ\nh : bit0 (n + 1) = bit0 (m + 1)\nthis✝ : succ (succ (n + n)) = succ (succ (m + m))\nthis : n + n = m + m\n⊢ n + 1 = m + 1\n[PROOFSTEP]\nhave : n = m := Nat.bit0_inj this\n[GOAL]\nn m : ℕ\nh : bit0 (n + 1) = bit0 (m + 1)\nthis✝¹ : succ (succ (n + n)) = succ (succ (m + m))\nthis✝ : n + n = m + m\nthis : n = m\n⊢ n + 1 = m + 1\n[PROOFSTEP]\nrw [this]\n[GOAL]\nn m : ℕ\nh : bit1 n = bit1 m\n⊢ succ (bit0 n) = succ (bit0 m)\n[PROOFSTEP]\nsimp [Nat.bit1_eq_succ_bit0] at h \n[GOAL]\nn m : ℕ\nh : bit0 n = bit0 m\n⊢ succ (bit0 n) = succ (bit0 m)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nn m : ℕ\nh : bit1 n = bit1 m\nthis : succ (bit0 n) = succ (bit0 m)\n⊢ bit0 n = bit0 m\n[PROOFSTEP]\ninjection this\n[GOAL]\nh : 0 ≠ 0\n⊢ 1 < bit1 0\n[PROOFSTEP]\ncontradiction\n[GOAL]\nn : ℕ\n_h : succ n ≠ 0\n⊢ 1 < bit1 (succ n)\n[PROOFSTEP]\nrw [Nat.bit1_succ_eq]\n[GOAL]\nn : ℕ\n_h : succ n ≠ 0\n⊢ 1 < succ (succ (bit1 n))\n[PROOFSTEP]\napply succ_lt_succ\n[GOAL]\ncase a\nn : ℕ\n_h : succ n ≠ 0\n⊢ 0 < bit1 n + 1\n[PROOFSTEP]\napply zero_lt_succ\n[GOAL]\nh : 0 ≠ 0\n⊢ 1 < bit0 0\n[PROOFSTEP]\ncontradiction\n[GOAL]\nn : ℕ\n_h : succ n ≠ 0\n⊢ 1 < bit0 (succ n)\n[PROOFSTEP]\nrw [Nat.bit0_succ_eq]\n[GOAL]\nn : ℕ\n_h : succ n ≠ 0\n⊢ 1 < succ (succ (bit0 n))\n[PROOFSTEP]\napply succ_lt_succ\n[GOAL]\ncase a\nn : ℕ\n_h : succ n ≠ 0\n⊢ 0 < bit0 n + 1\n[PROOFSTEP]\napply zero_lt_succ\n[GOAL]\nn m : ℕ\nh : n < succ m\nthis✝ : n ≤ m\nthis : succ (n + n) ≤ succ (m + m)\n⊢ succ (n + n) ≤ succ m + m\n[PROOFSTEP]\nrw [succ_add]\n[GOAL]\nn m : ℕ\nh : n < succ m\nthis✝ : n ≤ m\nthis : succ (n + n) ≤ succ (m + m)\n⊢ succ (n + n) ≤ succ (m + m)\n[PROOFSTEP]\nassumption\n[GOAL]\nB : Sort u\nn : ℕ\nH1 : n = 0 → B\nH2 : (m : ℕ) → n = succ m → B\n⊢ B\n[PROOFSTEP]\ninduction' h : n\n[GOAL]\ncase zero\nB : Sort u\nn : ℕ\nH1 : n = 0 → B\nH2 : (m : ℕ) → n = succ m → B\nx✝ : ℕ\nh✝ : n = x✝\nh : n = zero\n⊢ B\n[PROOFSTEP]\nexact H1 h\n[GOAL]\ncase succ\nB : Sort u\nn : ℕ\nH1 : n = 0 → B\nH2 : (m : ℕ) → n = succ m → B\nx✝ : ℕ\nh✝ : n = x✝\nn✝ : ℕ\nn_ih✝ : n = n✝ → B\nh : n = succ n✝\n⊢ B\n[PROOFSTEP]\nexact H2 _ h\n[GOAL]\nx y k : ℕ\nh : k ≤ y\n⊢ x ≤ y - k ↔ x + k ≤ y\n[PROOFSTEP]\nrw [← Nat.add_sub_cancel x k, Nat.sub_le_sub_iff_right h, Nat.add_sub_cancel]\n[GOAL]\nm n k : ℕ\n⊢ m - n - k = m - k - n\n[PROOFSTEP]\nrw [Nat.sub_sub, Nat.sub_sub, Nat.add_comm]\n[GOAL]\nx : ℕ\nd : Decidable (x % 2 = 1)\n⊢ (bif decide (x % 2 = 1) then 1 else 0) = x % 2\n[PROOFSTEP]\nby_cases h : x % 2 = 1\n[GOAL]\ncase pos\nx : ℕ\nd : Decidable (x % 2 = 1)\nh : x % 2 = 1\n⊢ (bif decide (x % 2 = 1) then 1 else 0) = x % 2\n[PROOFSTEP]\nsimp! [*]\n[GOAL]\ncase neg\nx : ℕ\nd : Decidable (x % 2 = 1)\nh : ¬x % 2 = 1\n⊢ (bif decide (x % 2 = 1) then 1 else 0) = x % 2\n[PROOFSTEP]\ncases mod_two_eq_zero_or_one x\n[GOAL]\ncase neg.inl\nx : ℕ\nd : Decidable (x % 2 = 1)\nh : ¬x % 2 = 1\nh✝ : x % 2 = 0\n⊢ (bif decide (x % 2 = 1) then 1 else 0) = x % 2\n[PROOFSTEP]\nsimp! [*, Nat.zero_ne_one]\n[GOAL]\ncase neg.inr\nx : ℕ\nd : Decidable (x % 2 = 1)\nh : ¬x % 2 = 1\nh✝ : x % 2 = 1\n⊢ (bif decide (x % 2 = 1) then 1 else 0) = x % 2\n[PROOFSTEP]\nsimp! [*, Nat.zero_ne_one]\n[GOAL]\nm n k : ℕ\nH : 0 < m\n⊢ m * n / (m * k) = n / k\n[PROOFSTEP]\nrw [← Nat.div_div_eq_div_mul, Nat.mul_div_cancel_left _ H]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nn : ℕ\npn : p n\nm✝ m : ℕ\nIH : ∀ (k : ℕ), n ≤ k + m → Acc Nat.lbp k\nk : ℕ\nkn : n ≤ k + succ m\ny : ℕ\nr : Nat.lbp y k\n_a : ∀ (k_1 : ℕ), k_1 ≤ k → ¬p k_1\n⊢ n ≤ k + 1 + m\n[PROOFSTEP]\nrw [Nat.add_right_comm]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nn : ℕ\npn : p n\nm✝ m : ℕ\nIH : ∀ (k : ℕ), n ≤ k + m → Acc Nat.lbp k\nk : ℕ\nkn : n ≤ k + succ m\ny : ℕ\nr : Nat.lbp y k\n_a : ∀ (k_1 : ℕ), k_1 ≤ k → ¬p k_1\n⊢ n ≤ k + m + 1\n[PROOFSTEP]\nexact kn\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nm : ℕ\nIH : (y : ℕ) → Nat.lbp y m → (fun k => (∀ (n : ℕ), n < k → ¬p n) → { n // p n ∧ ∀ (m : ℕ), m < n → ¬p m }) y\nal : ∀ (n : ℕ), n < m → ¬p n\npm : ¬p m\nn : ℕ\nh : n ≤ m\ne : n = m\n⊢ ¬p n\n[PROOFSTEP]\nrw [e]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nm : ℕ\nIH : (y : ℕ) → Nat.lbp y m → (fun k => (∀ (n : ℕ), n < k → ¬p n) → { n // p n ∧ ∀ (m : ℕ), m < n → ¬p m }) y\nal : ∀ (n : ℕ), n < m → ¬p n\npm : ¬p m\nn : ℕ\nh : n ≤ m\ne : n = m\n⊢ ¬p m\n[PROOFSTEP]\nexact pm\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\n⊢ ∀ (n : ℕ) (l1 l2 : List Char),\n List.length l1 = List.length l2 → List.length (toDigitsCore b f n l1) = List.length (toDigitsCore b f n l2)\n[PROOFSTEP]\ninduction f with (simp only [Nat.toDigitsCore, List.length]; intro n l1 l2 hlen)\n| zero => assumption\n| succ f ih =>\n by_cases hx : n / b = 0\n case pos => simp only [hx, if_true, List.length, congrArg (fun l ↦ l + 1) hlen]\n case neg =>\n simp only [hx, if_false]\n specialize ih (n / b) (Nat.digitChar (n % b) :: l1) (Nat.digitChar (n % b) :: l2)\n simp only [List.length, congrArg (fun l ↦ l + 1) hlen] at ih \n exact ih trivial\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\n⊢ ∀ (n : ℕ) (l1 l2 : List Char),\n List.length l1 = List.length l2 → List.length (toDigitsCore b f n l1) = List.length (toDigitsCore b f n l2)\n[PROOFSTEP]\ninduction f with (simp only [Nat.toDigitsCore, List.length]; intro n l1 l2 hlen)\n| zero => assumption\n| succ f ih =>\n by_cases hx : n / b = 0\n case pos => simp only [hx, if_true, List.length, congrArg (fun l ↦ l + 1) hlen]\n case neg =>\n simp only [hx, if_false]\n specialize ih (n / b) (Nat.digitChar (n % b) :: l1) (Nat.digitChar (n % b) :: l2)\n simp only [List.length, congrArg (fun l ↦ l + 1) hlen] at ih \n exact ih trivial\n[GOAL]\ncase zero\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\n⊢ ∀ (n : ℕ) (l1 l2 : List Char),\n List.length l1 = List.length l2 → List.length (toDigitsCore b zero n l1) = List.length (toDigitsCore b zero n l2)\n[PROOFSTEP]\nsimp only [Nat.toDigitsCore, List.length]\n[GOAL]\ncase zero\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\n⊢ ℕ → ∀ (l1 l2 : List Char), List.length l1 = List.length l2 → List.length l1 = List.length l2\n[PROOFSTEP]\nintro n l1 l2 hlen\n[GOAL]\ncase zero\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb n : ℕ\nl1 l2 : List Char\nhlen : List.length l1 = List.length l2\n⊢ List.length l1 = List.length l2\n[PROOFSTEP]\n\n| zero => assumption\n[GOAL]\ncase zero\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb n : ℕ\nl1 l2 : List Char\nhlen : List.length l1 = List.length l2\n⊢ List.length l1 = List.length l2\n[PROOFSTEP]\nassumption\n[GOAL]\ncase succ\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (l1 l2 : List Char),\n List.length l1 = List.length l2 → List.length (toDigitsCore b f n l1) = List.length (toDigitsCore b f n l2)\n⊢ ∀ (n : ℕ) (l1 l2 : List Char),\n List.length l1 = List.length l2 →\n List.length (toDigitsCore b (succ f) n l1) = List.length (toDigitsCore b (succ f) n l2)\n[PROOFSTEP]\nsimp only [Nat.toDigitsCore, List.length]\n[GOAL]\ncase succ\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (l1 l2 : List Char),\n List.length l1 = List.length l2 → List.length (toDigitsCore b f n l1) = List.length (toDigitsCore b f n l2)\n⊢ ∀ (n : ℕ) (l1 l2 : List Char),\n List.length l1 = List.length l2 →\n List.length (if n / b = 0 then digitChar (n % b) :: l1 else toDigitsCore b f (n / b) (digitChar (n % b) :: l1)) =\n List.length (if n / b = 0 then digitChar (n % b) :: l2 else toDigitsCore b f (n / b) (digitChar (n % b) :: l2))\n[PROOFSTEP]\nintro n l1 l2 hlen\n[GOAL]\ncase succ\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (l1 l2 : List Char),\n List.length l1 = List.length l2 → List.length (toDigitsCore b f n l1) = List.length (toDigitsCore b f n l2)\nn : ℕ\nl1 l2 : List Char\nhlen : List.length l1 = List.length l2\n⊢ List.length (if n / b = 0 then digitChar (n % b) :: l1 else toDigitsCore b f (n / b) (digitChar (n % b) :: l1)) =\n List.length (if n / b = 0 then digitChar (n % b) :: l2 else toDigitsCore b f (n / b) (digitChar (n % b) :: l2))\n[PROOFSTEP]\n\n| succ f ih =>\n by_cases hx : n / b = 0\n case pos => simp only [hx, if_true, List.length, congrArg (fun l ↦ l + 1) hlen]\n case neg =>\n simp only [hx, if_false]\n specialize ih (n / b) (Nat.digitChar (n % b) :: l1) (Nat.digitChar (n % b) :: l2)\n simp only [List.length, congrArg (fun l ↦ l + 1) hlen] at ih \n exact ih trivial\n[GOAL]\ncase succ\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (l1 l2 : List Char),\n List.length l1 = List.length l2 → List.length (toDigitsCore b f n l1) = List.length (toDigitsCore b f n l2)\nn : ℕ\nl1 l2 : List Char\nhlen : List.length l1 = List.length l2\n⊢ List.length (if n / b = 0 then digitChar (n % b) :: l1 else toDigitsCore b f (n / b) (digitChar (n % b) :: l1)) =\n List.length (if n / b = 0 then digitChar (n % b) :: l2 else toDigitsCore b f (n / b) (digitChar (n % b) :: l2))\n[PROOFSTEP]\nby_cases hx : n / b = 0\n[GOAL]\ncase pos\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (l1 l2 : List Char),\n List.length l1 = List.length l2 → List.length (toDigitsCore b f n l1) = List.length (toDigitsCore b f n l2)\nn : ℕ\nl1 l2 : List Char\nhlen : List.length l1 = List.length l2\nhx : n / b = 0\n⊢ List.length (if n / b = 0 then digitChar (n % b) :: l1 else toDigitsCore b f (n / b) (digitChar (n % b) :: l1)) =\n List.length (if n / b = 0 then digitChar (n % b) :: l2 else toDigitsCore b f (n / b) (digitChar (n % b) :: l2))\ncase neg\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (l1 l2 : List Char),\n List.length l1 = List.length l2 → List.length (toDigitsCore b f n l1) = List.length (toDigitsCore b f n l2)\nn : ℕ\nl1 l2 : List Char\nhlen : List.length l1 = List.length l2\nhx : ¬n / b = 0\n⊢ List.length (if n / b = 0 then digitChar (n % b) :: l1 else toDigitsCore b f (n / b) (digitChar (n % b) :: l1)) =\n List.length (if n / b = 0 then digitChar (n % b) :: l2 else toDigitsCore b f (n / b) (digitChar (n % b) :: l2))\n[PROOFSTEP]\ncase pos => simp only [hx, if_true, List.length, congrArg (fun l ↦ l + 1) hlen]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (l1 l2 : List Char),\n List.length l1 = List.length l2 → List.length (toDigitsCore b f n l1) = List.length (toDigitsCore b f n l2)\nn : ℕ\nl1 l2 : List Char\nhlen : List.length l1 = List.length l2\nhx : n / b = 0\n⊢ List.length (if n / b = 0 then digitChar (n % b) :: l1 else toDigitsCore b f (n / b) (digitChar (n % b) :: l1)) =\n List.length (if n / b = 0 then digitChar (n % b) :: l2 else toDigitsCore b f (n / b) (digitChar (n % b) :: l2))\n[PROOFSTEP]\ncase pos => simp only [hx, if_true, List.length, congrArg (fun l ↦ l + 1) hlen]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (l1 l2 : List Char),\n List.length l1 = List.length l2 → List.length (toDigitsCore b f n l1) = List.length (toDigitsCore b f n l2)\nn : ℕ\nl1 l2 : List Char\nhlen : List.length l1 = List.length l2\nhx : n / b = 0\n⊢ List.length (if n / b = 0 then digitChar (n % b) :: l1 else toDigitsCore b f (n / b) (digitChar (n % b) :: l1)) =\n List.length (if n / b = 0 then digitChar (n % b) :: l2 else toDigitsCore b f (n / b) (digitChar (n % b) :: l2))\n[PROOFSTEP]\nsimp only [hx, if_true, List.length, congrArg (fun l ↦ l + 1) hlen]\n[GOAL]\ncase neg\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (l1 l2 : List Char),\n List.length l1 = List.length l2 → List.length (toDigitsCore b f n l1) = List.length (toDigitsCore b f n l2)\nn : ℕ\nl1 l2 : List Char\nhlen : List.length l1 = List.length l2\nhx : ¬n / b = 0\n⊢ List.length (if n / b = 0 then digitChar (n % b) :: l1 else toDigitsCore b f (n / b) (digitChar (n % b) :: l1)) =\n List.length (if n / b = 0 then digitChar (n % b) :: l2 else toDigitsCore b f (n / b) (digitChar (n % b) :: l2))\n[PROOFSTEP]\ncase neg =>\n simp only [hx, if_false]\n specialize ih (n / b) (Nat.digitChar (n % b) :: l1) (Nat.digitChar (n % b) :: l2)\n simp only [List.length, congrArg (fun l ↦ l + 1) hlen] at ih \n exact ih trivial\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (l1 l2 : List Char),\n List.length l1 = List.length l2 → List.length (toDigitsCore b f n l1) = List.length (toDigitsCore b f n l2)\nn : ℕ\nl1 l2 : List Char\nhlen : List.length l1 = List.length l2\nhx : ¬n / b = 0\n⊢ List.length (if n / b = 0 then digitChar (n % b) :: l1 else toDigitsCore b f (n / b) (digitChar (n % b) :: l1)) =\n List.length (if n / b = 0 then digitChar (n % b) :: l2 else toDigitsCore b f (n / b) (digitChar (n % b) :: l2))\n[PROOFSTEP]\ncase neg =>\n simp only [hx, if_false]\n specialize ih (n / b) (Nat.digitChar (n % b) :: l1) (Nat.digitChar (n % b) :: l2)\n simp only [List.length, congrArg (fun l ↦ l + 1) hlen] at ih \n exact ih trivial\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (l1 l2 : List Char),\n List.length l1 = List.length l2 → List.length (toDigitsCore b f n l1) = List.length (toDigitsCore b f n l2)\nn : ℕ\nl1 l2 : List Char\nhlen : List.length l1 = List.length l2\nhx : ¬n / b = 0\n⊢ List.length (if n / b = 0 then digitChar (n % b) :: l1 else toDigitsCore b f (n / b) (digitChar (n % b) :: l1)) =\n List.length (if n / b = 0 then digitChar (n % b) :: l2 else toDigitsCore b f (n / b) (digitChar (n % b) :: l2))\n[PROOFSTEP]\nsimp only [hx, if_false]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (l1 l2 : List Char),\n List.length l1 = List.length l2 → List.length (toDigitsCore b f n l1) = List.length (toDigitsCore b f n l2)\nn : ℕ\nl1 l2 : List Char\nhlen : List.length l1 = List.length l2\nhx : ¬n / b = 0\n⊢ List.length (toDigitsCore b f (n / b) (digitChar (n % b) :: l1)) =\n List.length (toDigitsCore b f (n / b) (digitChar (n % b) :: l2))\n[PROOFSTEP]\nspecialize ih (n / b) (Nat.digitChar (n % b) :: l1) (Nat.digitChar (n % b) :: l2)\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f n : ℕ\nl1 l2 : List Char\nhlen : List.length l1 = List.length l2\nhx : ¬n / b = 0\nih :\n List.length (digitChar (n % b) :: l1) = List.length (digitChar (n % b) :: l2) →\n List.length (toDigitsCore b f (n / b) (digitChar (n % b) :: l1)) =\n List.length (toDigitsCore b f (n / b) (digitChar (n % b) :: l2))\n⊢ List.length (toDigitsCore b f (n / b) (digitChar (n % b) :: l1)) =\n List.length (toDigitsCore b f (n / b) (digitChar (n % b) :: l2))\n[PROOFSTEP]\nsimp only [List.length, congrArg (fun l ↦ l + 1) hlen] at ih \n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f n : ℕ\nl1 l2 : List Char\nhlen : List.length l1 = List.length l2\nhx : ¬n / b = 0\nih :\n True →\n List.length (toDigitsCore b f (n / b) (digitChar (n % b) :: l1)) =\n List.length (toDigitsCore b f (n / b) (digitChar (n % b) :: l2))\n⊢ List.length (toDigitsCore b f (n / b) (digitChar (n % b) :: l1)) =\n List.length (toDigitsCore b f (n / b) (digitChar (n % b) :: l2))\n[PROOFSTEP]\nexact ih trivial\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\n⊢ ∀ (n : ℕ) (c : Char) (tl : List Char),\n List.length (toDigitsCore b f n (c :: tl)) = List.length (toDigitsCore b f n tl) + 1\n[PROOFSTEP]\ninduction f with (intro n c tl; simp only [Nat.toDigitsCore, List.length])\n| succ f ih =>\n by_cases hnb : (n / b) = 0\n case pos => simp only [hnb, if_true, List.length]\n case neg =>\n generalize hx : Nat.digitChar (n % b) = x\n simp only [hx, hnb, if_false] at ih \n simp only [hnb, if_false]\n specialize ih (n / b) c (x :: tl)\n rw [← ih]\n have lens_eq : (x :: (c :: tl)).length = (c :: x :: tl).length := by simp\n apply to_digits_core_lens_eq_aux\n exact lens_eq\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\n⊢ ∀ (n : ℕ) (c : Char) (tl : List Char),\n List.length (toDigitsCore b f n (c :: tl)) = List.length (toDigitsCore b f n tl) + 1\n[PROOFSTEP]\ninduction f with (intro n c tl; simp only [Nat.toDigitsCore, List.length])\n| succ f ih =>\n by_cases hnb : (n / b) = 0\n case pos => simp only [hnb, if_true, List.length]\n case neg =>\n generalize hx : Nat.digitChar (n % b) = x\n simp only [hx, hnb, if_false] at ih \n simp only [hnb, if_false]\n specialize ih (n / b) c (x :: tl)\n rw [← ih]\n have lens_eq : (x :: (c :: tl)).length = (c :: x :: tl).length := by simp\n apply to_digits_core_lens_eq_aux\n exact lens_eq\n[GOAL]\ncase succ\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (c : Char) (tl : List Char),\n List.length (toDigitsCore b f n (c :: tl)) = List.length (toDigitsCore b f n tl) + 1\n⊢ ∀ (n : ℕ) (c : Char) (tl : List Char),\n List.length (toDigitsCore b (succ f) n (c :: tl)) = List.length (toDigitsCore b (succ f) n tl) + 1\n[PROOFSTEP]\nintro n c tl\n[GOAL]\ncase succ\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (c : Char) (tl : List Char),\n List.length (toDigitsCore b f n (c :: tl)) = List.length (toDigitsCore b f n tl) + 1\nn : ℕ\nc : Char\ntl : List Char\n⊢ List.length (toDigitsCore b (succ f) n (c :: tl)) = List.length (toDigitsCore b (succ f) n tl) + 1\n[PROOFSTEP]\nsimp only [Nat.toDigitsCore, List.length]\n[GOAL]\ncase succ\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (c : Char) (tl : List Char),\n List.length (toDigitsCore b f n (c :: tl)) = List.length (toDigitsCore b f n tl) + 1\nn : ℕ\nc : Char\ntl : List Char\n⊢ List.length\n (if n / b = 0 then digitChar (n % b) :: c :: tl else toDigitsCore b f (n / b) (digitChar (n % b) :: c :: tl)) =\n List.length (if n / b = 0 then digitChar (n % b) :: tl else toDigitsCore b f (n / b) (digitChar (n % b) :: tl)) + 1\n[PROOFSTEP]\n\n| succ f ih =>\n by_cases hnb : (n / b) = 0\n case pos => simp only [hnb, if_true, List.length]\n case neg =>\n generalize hx : Nat.digitChar (n % b) = x\n simp only [hx, hnb, if_false] at ih \n simp only [hnb, if_false]\n specialize ih (n / b) c (x :: tl)\n rw [← ih]\n have lens_eq : (x :: (c :: tl)).length = (c :: x :: tl).length := by simp\n apply to_digits_core_lens_eq_aux\n exact lens_eq\n[GOAL]\ncase succ\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (c : Char) (tl : List Char),\n List.length (toDigitsCore b f n (c :: tl)) = List.length (toDigitsCore b f n tl) + 1\nn : ℕ\nc : Char\ntl : List Char\n⊢ List.length\n (if n / b = 0 then digitChar (n % b) :: c :: tl else toDigitsCore b f (n / b) (digitChar (n % b) :: c :: tl)) =\n List.length (if n / b = 0 then digitChar (n % b) :: tl else toDigitsCore b f (n / b) (digitChar (n % b) :: tl)) + 1\n[PROOFSTEP]\nby_cases hnb : (n / b) = 0\n[GOAL]\ncase pos\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (c : Char) (tl : List Char),\n List.length (toDigitsCore b f n (c :: tl)) = List.length (toDigitsCore b f n tl) + 1\nn : ℕ\nc : Char\ntl : List Char\nhnb : n / b = 0\n⊢ List.length\n (if n / b = 0 then digitChar (n % b) :: c :: tl else toDigitsCore b f (n / b) (digitChar (n % b) :: c :: tl)) =\n List.length (if n / b = 0 then digitChar (n % b) :: tl else toDigitsCore b f (n / b) (digitChar (n % b) :: tl)) + 1\ncase neg\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (c : Char) (tl : List Char),\n List.length (toDigitsCore b f n (c :: tl)) = List.length (toDigitsCore b f n tl) + 1\nn : ℕ\nc : Char\ntl : List Char\nhnb : ¬n / b = 0\n⊢ List.length\n (if n / b = 0 then digitChar (n % b) :: c :: tl else toDigitsCore b f (n / b) (digitChar (n % b) :: c :: tl)) =\n List.length (if n / b = 0 then digitChar (n % b) :: tl else toDigitsCore b f (n / b) (digitChar (n % b) :: tl)) + 1\n[PROOFSTEP]\ncase pos => simp only [hnb, if_true, List.length]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (c : Char) (tl : List Char),\n List.length (toDigitsCore b f n (c :: tl)) = List.length (toDigitsCore b f n tl) + 1\nn : ℕ\nc : Char\ntl : List Char\nhnb : n / b = 0\n⊢ List.length\n (if n / b = 0 then digitChar (n % b) :: c :: tl else toDigitsCore b f (n / b) (digitChar (n % b) :: c :: tl)) =\n List.length (if n / b = 0 then digitChar (n % b) :: tl else toDigitsCore b f (n / b) (digitChar (n % b) :: tl)) + 1\n[PROOFSTEP]\ncase pos => simp only [hnb, if_true, List.length]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (c : Char) (tl : List Char),\n List.length (toDigitsCore b f n (c :: tl)) = List.length (toDigitsCore b f n tl) + 1\nn : ℕ\nc : Char\ntl : List Char\nhnb : n / b = 0\n⊢ List.length\n (if n / b = 0 then digitChar (n % b) :: c :: tl else toDigitsCore b f (n / b) (digitChar (n % b) :: c :: tl)) =\n List.length (if n / b = 0 then digitChar (n % b) :: tl else toDigitsCore b f (n / b) (digitChar (n % b) :: tl)) + 1\n[PROOFSTEP]\nsimp only [hnb, if_true, List.length]\n[GOAL]\ncase neg\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (c : Char) (tl : List Char),\n List.length (toDigitsCore b f n (c :: tl)) = List.length (toDigitsCore b f n tl) + 1\nn : ℕ\nc : Char\ntl : List Char\nhnb : ¬n / b = 0\n⊢ List.length\n (if n / b = 0 then digitChar (n % b) :: c :: tl else toDigitsCore b f (n / b) (digitChar (n % b) :: c :: tl)) =\n List.length (if n / b = 0 then digitChar (n % b) :: tl else toDigitsCore b f (n / b) (digitChar (n % b) :: tl)) + 1\n[PROOFSTEP]\ncase neg =>\n generalize hx : Nat.digitChar (n % b) = x\n simp only [hx, hnb, if_false] at ih \n simp only [hnb, if_false]\n specialize ih (n / b) c (x :: tl)\n rw [← ih]\n have lens_eq : (x :: (c :: tl)).length = (c :: x :: tl).length := by simp\n apply to_digits_core_lens_eq_aux\n exact lens_eq\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (c : Char) (tl : List Char),\n List.length (toDigitsCore b f n (c :: tl)) = List.length (toDigitsCore b f n tl) + 1\nn : ℕ\nc : Char\ntl : List Char\nhnb : ¬n / b = 0\n⊢ List.length\n (if n / b = 0 then digitChar (n % b) :: c :: tl else toDigitsCore b f (n / b) (digitChar (n % b) :: c :: tl)) =\n List.length (if n / b = 0 then digitChar (n % b) :: tl else toDigitsCore b f (n / b) (digitChar (n % b) :: tl)) + 1\n[PROOFSTEP]\ncase neg =>\n generalize hx : Nat.digitChar (n % b) = x\n simp only [hx, hnb, if_false] at ih \n simp only [hnb, if_false]\n specialize ih (n / b) c (x :: tl)\n rw [← ih]\n have lens_eq : (x :: (c :: tl)).length = (c :: x :: tl).length := by simp\n apply to_digits_core_lens_eq_aux\n exact lens_eq\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (c : Char) (tl : List Char),\n List.length (toDigitsCore b f n (c :: tl)) = List.length (toDigitsCore b f n tl) + 1\nn : ℕ\nc : Char\ntl : List Char\nhnb : ¬n / b = 0\n⊢ List.length\n (if n / b = 0 then digitChar (n % b) :: c :: tl else toDigitsCore b f (n / b) (digitChar (n % b) :: c :: tl)) =\n List.length (if n / b = 0 then digitChar (n % b) :: tl else toDigitsCore b f (n / b) (digitChar (n % b) :: tl)) + 1\n[PROOFSTEP]\ngeneralize hx : Nat.digitChar (n % b) = x\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (c : Char) (tl : List Char),\n List.length (toDigitsCore b f n (c :: tl)) = List.length (toDigitsCore b f n tl) + 1\nn : ℕ\nc : Char\ntl : List Char\nhnb : ¬n / b = 0\nx : Char\nhx : digitChar (n % b) = x\n⊢ List.length (if n / b = 0 then x :: c :: tl else toDigitsCore b f (n / b) (x :: c :: tl)) =\n List.length (if n / b = 0 then x :: tl else toDigitsCore b f (n / b) (x :: tl)) + 1\n[PROOFSTEP]\nsimp only [hx, hnb, if_false] at ih \n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (c : Char) (tl : List Char),\n List.length (toDigitsCore b f n (c :: tl)) = List.length (toDigitsCore b f n tl) + 1\nn : ℕ\nc : Char\ntl : List Char\nhnb : ¬n / b = 0\nx : Char\nhx : digitChar (n % b) = x\n⊢ List.length (if n / b = 0 then x :: c :: tl else toDigitsCore b f (n / b) (x :: c :: tl)) =\n List.length (if n / b = 0 then x :: tl else toDigitsCore b f (n / b) (x :: tl)) + 1\n[PROOFSTEP]\nsimp only [hnb, if_false]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f : ℕ\nih :\n ∀ (n : ℕ) (c : Char) (tl : List Char),\n List.length (toDigitsCore b f n (c :: tl)) = List.length (toDigitsCore b f n tl) + 1\nn : ℕ\nc : Char\ntl : List Char\nhnb : ¬n / b = 0\nx : Char\nhx : digitChar (n % b) = x\n⊢ List.length (toDigitsCore b f (n / b) (x :: c :: tl)) = List.length (toDigitsCore b f (n / b) (x :: tl)) + 1\n[PROOFSTEP]\nspecialize ih (n / b) c (x :: tl)\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f n : ℕ\nc : Char\ntl : List Char\nhnb : ¬n / b = 0\nx : Char\nhx : digitChar (n % b) = x\nih : List.length (toDigitsCore b f (n / b) (c :: x :: tl)) = List.length (toDigitsCore b f (n / b) (x :: tl)) + 1\n⊢ List.length (toDigitsCore b f (n / b) (x :: c :: tl)) = List.length (toDigitsCore b f (n / b) (x :: tl)) + 1\n[PROOFSTEP]\nrw [← ih]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f n : ℕ\nc : Char\ntl : List Char\nhnb : ¬n / b = 0\nx : Char\nhx : digitChar (n % b) = x\nih : List.length (toDigitsCore b f (n / b) (c :: x :: tl)) = List.length (toDigitsCore b f (n / b) (x :: tl)) + 1\n⊢ List.length (toDigitsCore b f (n / b) (x :: c :: tl)) = List.length (toDigitsCore b f (n / b) (c :: x :: tl))\n[PROOFSTEP]\nhave lens_eq : (x :: (c :: tl)).length = (c :: x :: tl).length := by simp\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f n : ℕ\nc : Char\ntl : List Char\nhnb : ¬n / b = 0\nx : Char\nhx : digitChar (n % b) = x\nih : List.length (toDigitsCore b f (n / b) (c :: x :: tl)) = List.length (toDigitsCore b f (n / b) (x :: tl)) + 1\n⊢ List.length (x :: c :: tl) = List.length (c :: x :: tl)\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f n : ℕ\nc : Char\ntl : List Char\nhnb : ¬n / b = 0\nx : Char\nhx : digitChar (n % b) = x\nih : List.length (toDigitsCore b f (n / b) (c :: x :: tl)) = List.length (toDigitsCore b f (n / b) (x :: tl)) + 1\nlens_eq : List.length (x :: c :: tl) = List.length (c :: x :: tl)\n⊢ List.length (toDigitsCore b f (n / b) (x :: c :: tl)) = List.length (toDigitsCore b f (n / b) (c :: x :: tl))\n[PROOFSTEP]\napply to_digits_core_lens_eq_aux\n[GOAL]\ncase a\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb f n : ℕ\nc : Char\ntl : List Char\nhnb : ¬n / b = 0\nx : Char\nhx : digitChar (n % b) = x\nih : List.length (toDigitsCore b f (n / b) (c :: x :: tl)) = List.length (toDigitsCore b f (n / b) (x :: tl)) + 1\nlens_eq : List.length (x :: c :: tl) = List.length (c :: x :: tl)\n⊢ List.length (x :: c :: tl) = List.length (c :: x :: tl)\n[PROOFSTEP]\nexact lens_eq\n[GOAL]\ncase zero\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\n⊢ ∀ (n : ℕ) (c : Char) (tl : List Char),\n List.length (toDigitsCore b zero n (c :: tl)) = List.length (toDigitsCore b zero n tl) + 1\n[PROOFSTEP]\nintro n c tl\n[GOAL]\ncase zero\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb n : ℕ\nc : Char\ntl : List Char\n⊢ List.length (toDigitsCore b zero n (c :: tl)) = List.length (toDigitsCore b zero n tl) + 1\n[PROOFSTEP]\nsimp only [Nat.toDigitsCore, List.length]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nn b e : ℕ\nh_b_pos : 0 < b\n⊢ n < b ^ succ e → n / b < b ^ e\n[PROOFSTEP]\nsimp only [Nat.pow_succ]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nn b e : ℕ\nh_b_pos : 0 < b\n⊢ n < b ^ e * b → n / b < b ^ e\n[PROOFSTEP]\nexact (@Nat.div_lt_iff_lt_mul b n (b ^ e) h_b_pos).mpr\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf n e : ℕ\nhlt : n < b ^ e\nh_e_pos : 0 < e\n⊢ List.length (toDigitsCore b f n []) ≤ e\n[PROOFSTEP]\ninduction f generalizing n e hlt h_e_pos with simp only [Nat.toDigitsCore, List.length, Nat.zero_le]\n| succ f ih =>\n cases e with\n | zero => exact False.elim (Nat.lt_irrefl 0 h_e_pos)\n | succ e =>\n by_cases h_pred_pos : 0 < e\n case pos =>\n have _ : 0 < b := Nat.lt_trans (by decide) h\n specialize ih (n / b) e (nat_repr_len_aux n b e ‹0 < b› hlt) h_pred_pos\n by_cases hdiv_ten : n / b = 0\n case pos => simp only [hdiv_ten]; exact Nat.le.step h_pred_pos\n case neg =>\n simp only [hdiv_ten, to_digits_core_lens_eq b f (n / b) (Nat.digitChar $ n % b), if_false]\n exact Nat.succ_le_succ ih\n case neg =>\n have _ : e = 0 := Nat.eq_zero_of_nonpos e h_pred_pos\n rw [‹e = 0›]\n have _ : b ^ 1 = b := by simp only [pow_succ, pow_zero, Nat.one_mul]\n have _ : n < b := ‹b ^ 1 = b› ▸ (‹e = 0› ▸ hlt : n < b ^ Nat.succ 0)\n simp only [(@Nat.div_eq_of_lt n b ‹n < b› : n / b = 0), if_true, List.length]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf n e : ℕ\nhlt : n < b ^ e\nh_e_pos : 0 < e\n⊢ List.length (toDigitsCore b f n []) ≤ e\n[PROOFSTEP]\ninduction f generalizing n e hlt h_e_pos with simp only [Nat.toDigitsCore, List.length, Nat.zero_le]\n| succ f ih =>\n cases e with\n | zero => exact False.elim (Nat.lt_irrefl 0 h_e_pos)\n | succ e =>\n by_cases h_pred_pos : 0 < e\n case pos =>\n have _ : 0 < b := Nat.lt_trans (by decide) h\n specialize ih (n / b) e (nat_repr_len_aux n b e ‹0 < b› hlt) h_pred_pos\n by_cases hdiv_ten : n / b = 0\n case pos => simp only [hdiv_ten]; exact Nat.le.step h_pred_pos\n case neg =>\n simp only [hdiv_ten, to_digits_core_lens_eq b f (n / b) (Nat.digitChar $ n % b), if_false]\n exact Nat.succ_le_succ ih\n case neg =>\n have _ : e = 0 := Nat.eq_zero_of_nonpos e h_pred_pos\n rw [‹e = 0›]\n have _ : b ^ 1 = b := by simp only [pow_succ, pow_zero, Nat.one_mul]\n have _ : n < b := ‹b ^ 1 = b› ▸ (‹e = 0› ▸ hlt : n < b ^ Nat.succ 0)\n simp only [(@Nat.div_eq_of_lt n b ‹n < b› : n / b = 0), if_true, List.length]\n[GOAL]\ncase succ\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ e\nh_e_pos : 0 < e\n⊢ List.length (toDigitsCore b (succ f) n []) ≤ e\n[PROOFSTEP]\nsimp only [Nat.toDigitsCore, List.length, Nat.zero_le]\n[GOAL]\ncase succ\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ e\nh_e_pos : 0 < e\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ e\n[PROOFSTEP]\n\n| succ f ih =>\n cases e with\n | zero => exact False.elim (Nat.lt_irrefl 0 h_e_pos)\n | succ e =>\n by_cases h_pred_pos : 0 < e\n case pos =>\n have _ : 0 < b := Nat.lt_trans (by decide) h\n specialize ih (n / b) e (nat_repr_len_aux n b e ‹0 < b› hlt) h_pred_pos\n by_cases hdiv_ten : n / b = 0\n case pos => simp only [hdiv_ten]; exact Nat.le.step h_pred_pos\n case neg =>\n simp only [hdiv_ten, to_digits_core_lens_eq b f (n / b) (Nat.digitChar $ n % b), if_false]\n exact Nat.succ_le_succ ih\n case neg =>\n have _ : e = 0 := Nat.eq_zero_of_nonpos e h_pred_pos\n rw [‹e = 0›]\n have _ : b ^ 1 = b := by simp only [pow_succ, pow_zero, Nat.one_mul]\n have _ : n < b := ‹b ^ 1 = b› ▸ (‹e = 0› ▸ hlt : n < b ^ Nat.succ 0)\n simp only [(@Nat.div_eq_of_lt n b ‹n < b› : n / b = 0), if_true, List.length]\n[GOAL]\ncase succ\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ e\nh_e_pos : 0 < e\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ e\n[PROOFSTEP]\ncases e with\n| zero => exact False.elim (Nat.lt_irrefl 0 h_e_pos)\n| succ e =>\n by_cases h_pred_pos : 0 < e\n case pos =>\n have _ : 0 < b := Nat.lt_trans (by decide) h\n specialize ih (n / b) e (nat_repr_len_aux n b e ‹0 < b› hlt) h_pred_pos\n by_cases hdiv_ten : n / b = 0\n case pos => simp only [hdiv_ten]; exact Nat.le.step h_pred_pos\n case neg =>\n simp only [hdiv_ten, to_digits_core_lens_eq b f (n / b) (Nat.digitChar $ n % b), if_false]\n exact Nat.succ_le_succ ih\n case neg =>\n have _ : e = 0 := Nat.eq_zero_of_nonpos e h_pred_pos\n rw [‹e = 0›]\n have _ : b ^ 1 = b := by simp only [pow_succ, pow_zero, Nat.one_mul]\n have _ : n < b := ‹b ^ 1 = b› ▸ (‹e = 0› ▸ hlt : n < b ^ Nat.succ 0)\n simp only [(@Nat.div_eq_of_lt n b ‹n < b› : n / b = 0), if_true, List.length]\n[GOAL]\ncase succ\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ e\nh_e_pos : 0 < e\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ e\n[PROOFSTEP]\ncases e with\n| zero => exact False.elim (Nat.lt_irrefl 0 h_e_pos)\n| succ e =>\n by_cases h_pred_pos : 0 < e\n case pos =>\n have _ : 0 < b := Nat.lt_trans (by decide) h\n specialize ih (n / b) e (nat_repr_len_aux n b e ‹0 < b› hlt) h_pred_pos\n by_cases hdiv_ten : n / b = 0\n case pos => simp only [hdiv_ten]; exact Nat.le.step h_pred_pos\n case neg =>\n simp only [hdiv_ten, to_digits_core_lens_eq b f (n / b) (Nat.digitChar $ n % b), if_false]\n exact Nat.succ_le_succ ih\n case neg =>\n have _ : e = 0 := Nat.eq_zero_of_nonpos e h_pred_pos\n rw [‹e = 0›]\n have _ : b ^ 1 = b := by simp only [pow_succ, pow_zero, Nat.one_mul]\n have _ : n < b := ‹b ^ 1 = b› ▸ (‹e = 0› ▸ hlt : n < b ^ Nat.succ 0)\n simp only [(@Nat.div_eq_of_lt n b ‹n < b› : n / b = 0), if_true, List.length]\n[GOAL]\ncase succ.zero\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn : ℕ\nhlt : n < b ^ zero\nh_e_pos : 0 < zero\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ zero\n[PROOFSTEP]\n\n| zero => exact False.elim (Nat.lt_irrefl 0 h_e_pos)\n[GOAL]\ncase succ.zero\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn : ℕ\nhlt : n < b ^ zero\nh_e_pos : 0 < zero\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ zero\n[PROOFSTEP]\nexact False.elim (Nat.lt_irrefl 0 h_e_pos)\n[GOAL]\ncase succ.succ\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\n[PROOFSTEP]\n\n| succ e =>\n by_cases h_pred_pos : 0 < e\n case pos =>\n have _ : 0 < b := Nat.lt_trans (by decide) h\n specialize ih (n / b) e (nat_repr_len_aux n b e ‹0 < b› hlt) h_pred_pos\n by_cases hdiv_ten : n / b = 0\n case pos => simp only [hdiv_ten]; exact Nat.le.step h_pred_pos\n case neg =>\n simp only [hdiv_ten, to_digits_core_lens_eq b f (n / b) (Nat.digitChar $ n % b), if_false]\n exact Nat.succ_le_succ ih\n case neg =>\n have _ : e = 0 := Nat.eq_zero_of_nonpos e h_pred_pos\n rw [‹e = 0›]\n have _ : b ^ 1 = b := by simp only [pow_succ, pow_zero, Nat.one_mul]\n have _ : n < b := ‹b ^ 1 = b› ▸ (‹e = 0› ▸ hlt : n < b ^ Nat.succ 0)\n simp only [(@Nat.div_eq_of_lt n b ‹n < b› : n / b = 0), if_true, List.length]\n[GOAL]\ncase succ.succ\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\n[PROOFSTEP]\nby_cases h_pred_pos : 0 < e\n[GOAL]\ncase pos\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : 0 < e\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\ncase neg\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : ¬0 < e\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\n[PROOFSTEP]\ncase pos =>\n have _ : 0 < b := Nat.lt_trans (by decide) h\n specialize ih (n / b) e (nat_repr_len_aux n b e ‹0 < b› hlt) h_pred_pos\n by_cases hdiv_ten : n / b = 0\n case pos => simp only [hdiv_ten]; exact Nat.le.step h_pred_pos\n case neg =>\n simp only [hdiv_ten, to_digits_core_lens_eq b f (n / b) (Nat.digitChar $ n % b), if_false]\n exact Nat.succ_le_succ ih\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : 0 < e\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\n[PROOFSTEP]\ncase pos =>\n have _ : 0 < b := Nat.lt_trans (by decide) h\n specialize ih (n / b) e (nat_repr_len_aux n b e ‹0 < b› hlt) h_pred_pos\n by_cases hdiv_ten : n / b = 0\n case pos => simp only [hdiv_ten]; exact Nat.le.step h_pred_pos\n case neg =>\n simp only [hdiv_ten, to_digits_core_lens_eq b f (n / b) (Nat.digitChar $ n % b), if_false]\n exact Nat.succ_le_succ ih\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : 0 < e\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\n[PROOFSTEP]\nhave _ : 0 < b := Nat.lt_trans (by decide) h\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : 0 < e\n⊢ 0 < 1\n[PROOFSTEP]\ndecide\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : 0 < e\nx✝ : 0 < b\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\n[PROOFSTEP]\nspecialize ih (n / b) e (nat_repr_len_aux n b e ‹0 < b› hlt) h_pred_pos\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf n e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : 0 < e\nx✝ : 0 < b\nih : List.length (toDigitsCore b f (n / b) []) ≤ e\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\n[PROOFSTEP]\nby_cases hdiv_ten : n / b = 0\n[GOAL]\ncase pos\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf n e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : 0 < e\nx✝ : 0 < b\nih : List.length (toDigitsCore b f (n / b) []) ≤ e\nhdiv_ten : n / b = 0\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\ncase neg\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf n e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : 0 < e\nx✝ : 0 < b\nih : List.length (toDigitsCore b f (n / b) []) ≤ e\nhdiv_ten : ¬n / b = 0\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\n[PROOFSTEP]\ncase pos => simp only [hdiv_ten]; exact Nat.le.step h_pred_pos\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf n e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : 0 < e\nx✝ : 0 < b\nih : List.length (toDigitsCore b f (n / b) []) ≤ e\nhdiv_ten : n / b = 0\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\n[PROOFSTEP]\ncase pos => simp only [hdiv_ten]; exact Nat.le.step h_pred_pos\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf n e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : 0 < e\nx✝ : 0 < b\nih : List.length (toDigitsCore b f (n / b) []) ≤ e\nhdiv_ten : n / b = 0\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\n[PROOFSTEP]\nsimp only [hdiv_ten]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf n e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : 0 < e\nx✝ : 0 < b\nih : List.length (toDigitsCore b f (n / b) []) ≤ e\nhdiv_ten : n / b = 0\n⊢ List.length (if True then [digitChar (n % b)] else toDigitsCore b f 0 [digitChar (n % b)]) ≤ succ e\n[PROOFSTEP]\nexact Nat.le.step h_pred_pos\n[GOAL]\ncase neg\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf n e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : 0 < e\nx✝ : 0 < b\nih : List.length (toDigitsCore b f (n / b) []) ≤ e\nhdiv_ten : ¬n / b = 0\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\n[PROOFSTEP]\ncase neg =>\n simp only [hdiv_ten, to_digits_core_lens_eq b f (n / b) (Nat.digitChar $ n % b), if_false]\n exact Nat.succ_le_succ ih\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf n e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : 0 < e\nx✝ : 0 < b\nih : List.length (toDigitsCore b f (n / b) []) ≤ e\nhdiv_ten : ¬n / b = 0\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\n[PROOFSTEP]\ncase neg =>\n simp only [hdiv_ten, to_digits_core_lens_eq b f (n / b) (Nat.digitChar $ n % b), if_false]\n exact Nat.succ_le_succ ih\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf n e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : 0 < e\nx✝ : 0 < b\nih : List.length (toDigitsCore b f (n / b) []) ≤ e\nhdiv_ten : ¬n / b = 0\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\n[PROOFSTEP]\nsimp only [hdiv_ten, to_digits_core_lens_eq b f (n / b) (Nat.digitChar $ n % b), if_false]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf n e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : 0 < e\nx✝ : 0 < b\nih : List.length (toDigitsCore b f (n / b) []) ≤ e\nhdiv_ten : ¬n / b = 0\n⊢ List.length (toDigitsCore b f (n / b) []) + 1 ≤ succ e\n[PROOFSTEP]\nexact Nat.succ_le_succ ih\n[GOAL]\ncase neg\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : ¬0 < e\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\n[PROOFSTEP]\ncase neg =>\n have _ : e = 0 := Nat.eq_zero_of_nonpos e h_pred_pos\n rw [‹e = 0›]\n have _ : b ^ 1 = b := by simp only [pow_succ, pow_zero, Nat.one_mul]\n have _ : n < b := ‹b ^ 1 = b› ▸ (‹e = 0› ▸ hlt : n < b ^ Nat.succ 0)\n simp only [(@Nat.div_eq_of_lt n b ‹n < b› : n / b = 0), if_true, List.length]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : ¬0 < e\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\n[PROOFSTEP]\ncase neg =>\n have _ : e = 0 := Nat.eq_zero_of_nonpos e h_pred_pos\n rw [‹e = 0›]\n have _ : b ^ 1 = b := by simp only [pow_succ, pow_zero, Nat.one_mul]\n have _ : n < b := ‹b ^ 1 = b› ▸ (‹e = 0› ▸ hlt : n < b ^ Nat.succ 0)\n simp only [(@Nat.div_eq_of_lt n b ‹n < b› : n / b = 0), if_true, List.length]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : ¬0 < e\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\n[PROOFSTEP]\nhave _ : e = 0 := Nat.eq_zero_of_nonpos e h_pred_pos\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : ¬0 < e\nx✝ : e = 0\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ e\n[PROOFSTEP]\nrw [‹e = 0›]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : ¬0 < e\nx✝ : e = 0\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ 0\n[PROOFSTEP]\nhave _ : b ^ 1 = b := by simp only [pow_succ, pow_zero, Nat.one_mul]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : ¬0 < e\nx✝ : e = 0\n⊢ b ^ 1 = b\n[PROOFSTEP]\nsimp only [pow_succ, pow_zero, Nat.one_mul]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : ¬0 < e\nx✝¹ : e = 0\nx✝ : b ^ 1 = b\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ 0\n[PROOFSTEP]\nhave _ : n < b := ‹b ^ 1 = b› ▸ (‹e = 0› ▸ hlt : n < b ^ Nat.succ 0)\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nf : ℕ\nih : ∀ (n e : ℕ), n < b ^ e → 0 < e → List.length (toDigitsCore b f n []) ≤ e\nn e : ℕ\nhlt : n < b ^ succ e\nh_e_pos : 0 < succ e\nh_pred_pos : ¬0 < e\nx✝² : e = 0\nx✝¹ : b ^ 1 = b\nx✝ : n < b\n⊢ List.length (if n / b = 0 then [digitChar (n % b)] else toDigitsCore b f (n / b) [digitChar (n % b)]) ≤ succ 0\n[PROOFSTEP]\nsimp only [(@Nat.div_eq_of_lt n b ‹n < b› : n / b = 0), if_true, List.length]\n[GOAL]\ncase zero\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nb : ℕ\nh : 2 ≤ b\nn e : ℕ\nhlt : n < b ^ e\nh_e_pos : 0 < e\n⊢ List.length (toDigitsCore b zero n []) ≤ e\n[PROOFSTEP]\nsimp only [Nat.toDigitsCore, List.length, Nat.zero_le]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nn e : ℕ\n⊢ 0 < e → n < 10 ^ e → String.length (Nat.repr n) ≤ e\n[PROOFSTEP]\ncases n with (intro e0 he; simp only [Nat.repr, Nat.toDigits, String.length, List.asString])\n| zero => assumption\n| succ n =>\n by_cases hterm : n.succ / 10 = 0\n case pos => simp only [hterm, Nat.toDigitsCore]; assumption\n case neg => exact to_digits_core_length 10 (by decide) (Nat.succ n + 1) (Nat.succ n) e he e0\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\nn e : ℕ\n⊢ 0 < e → n < 10 ^ e → String.length (Nat.repr n) ≤ e\n[PROOFSTEP]\ncases n with (intro e0 he; simp only [Nat.repr, Nat.toDigits, String.length, List.asString])\n| zero => assumption\n| succ n =>\n by_cases hterm : n.succ / 10 = 0\n case pos => simp only [hterm, Nat.toDigitsCore]; assumption\n case neg => exact to_digits_core_length 10 (by decide) (Nat.succ n + 1) (Nat.succ n) e he e0\n[GOAL]\ncase zero\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\ne : ℕ\n⊢ 0 < e → zero < 10 ^ e → String.length (Nat.repr zero) ≤ e\n[PROOFSTEP]\nintro e0 he\n[GOAL]\ncase zero\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\ne : ℕ\ne0 : 0 < e\nhe : zero < 10 ^ e\n⊢ String.length (Nat.repr zero) ≤ e\n[PROOFSTEP]\nsimp only [Nat.repr, Nat.toDigits, String.length, List.asString]\n[GOAL]\ncase zero\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\ne : ℕ\ne0 : 0 < e\nhe : zero < 10 ^ e\n⊢ List.length (toDigitsCore 10 (zero + 1) zero []) ≤ e\n[PROOFSTEP]\n\n| zero => assumption\n[GOAL]\ncase zero\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\ne : ℕ\ne0 : 0 < e\nhe : zero < 10 ^ e\n⊢ List.length (toDigitsCore 10 (zero + 1) zero []) ≤ e\n[PROOFSTEP]\nassumption\n[GOAL]\ncase succ\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\ne n : ℕ\n⊢ 0 < e → succ n < 10 ^ e → String.length (Nat.repr (succ n)) ≤ e\n[PROOFSTEP]\nintro e0 he\n[GOAL]\ncase succ\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\ne n : ℕ\ne0 : 0 < e\nhe : succ n < 10 ^ e\n⊢ String.length (Nat.repr (succ n)) ≤ e\n[PROOFSTEP]\nsimp only [Nat.repr, Nat.toDigits, String.length, List.asString]\n[GOAL]\ncase succ\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\ne n : ℕ\ne0 : 0 < e\nhe : succ n < 10 ^ e\n⊢ List.length (toDigitsCore 10 (succ n + 1) (succ n) []) ≤ e\n[PROOFSTEP]\n\n| succ n =>\n by_cases hterm : n.succ / 10 = 0\n case pos => simp only [hterm, Nat.toDigitsCore]; assumption\n case neg => exact to_digits_core_length 10 (by decide) (Nat.succ n + 1) (Nat.succ n) e he e0\n[GOAL]\ncase succ\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\ne n : ℕ\ne0 : 0 < e\nhe : succ n < 10 ^ e\n⊢ List.length (toDigitsCore 10 (succ n + 1) (succ n) []) ≤ e\n[PROOFSTEP]\nby_cases hterm : n.succ / 10 = 0\n[GOAL]\ncase pos\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\ne n : ℕ\ne0 : 0 < e\nhe : succ n < 10 ^ e\nhterm : succ n / 10 = 0\n⊢ List.length (toDigitsCore 10 (succ n + 1) (succ n) []) ≤ e\ncase neg\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\ne n : ℕ\ne0 : 0 < e\nhe : succ n < 10 ^ e\nhterm : ¬succ n / 10 = 0\n⊢ List.length (toDigitsCore 10 (succ n + 1) (succ n) []) ≤ e\n[PROOFSTEP]\ncase pos => simp only [hterm, Nat.toDigitsCore]; assumption\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\ne n : ℕ\ne0 : 0 < e\nhe : succ n < 10 ^ e\nhterm : succ n / 10 = 0\n⊢ List.length (toDigitsCore 10 (succ n + 1) (succ n) []) ≤ e\n[PROOFSTEP]\ncase pos => simp only [hterm, Nat.toDigitsCore]; assumption\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\ne n : ℕ\ne0 : 0 < e\nhe : succ n < 10 ^ e\nhterm : succ n / 10 = 0\n⊢ List.length (toDigitsCore 10 (succ n + 1) (succ n) []) ≤ e\n[PROOFSTEP]\nsimp only [hterm, Nat.toDigitsCore]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\ne n : ℕ\ne0 : 0 < e\nhe : succ n < 10 ^ e\nhterm : succ n / 10 = 0\n⊢ List.length\n (if True then [digitChar (succ n % 10)]\n else\n if True then [digitChar (0 % 10), digitChar (succ n % 10)]\n else toDigitsCore 10 n (0 / 10) [digitChar (0 % 10), digitChar (succ n % 10)]) ≤\n e\n[PROOFSTEP]\nassumption\n[GOAL]\ncase neg\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\ne n : ℕ\ne0 : 0 < e\nhe : succ n < 10 ^ e\nhterm : ¬succ n / 10 = 0\n⊢ List.length (toDigitsCore 10 (succ n + 1) (succ n) []) ≤ e\n[PROOFSTEP]\ncase neg => exact to_digits_core_length 10 (by decide) (Nat.succ n + 1) (Nat.succ n) e he e0\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\ne n : ℕ\ne0 : 0 < e\nhe : succ n < 10 ^ e\nhterm : ¬succ n / 10 = 0\n⊢ List.length (toDigitsCore 10 (succ n + 1) (succ n) []) ≤ e\n[PROOFSTEP]\ncase neg => exact to_digits_core_length 10 (by decide) (Nat.succ n + 1) (Nat.succ n) e he e0\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\ne n : ℕ\ne0 : 0 < e\nhe : succ n < 10 ^ e\nhterm : ¬succ n / 10 = 0\n⊢ List.length (toDigitsCore 10 (succ n + 1) (succ n) []) ≤ e\n[PROOFSTEP]\nexact to_digits_core_length 10 (by decide) (Nat.succ n + 1) (Nat.succ n) e he e0\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nH : ∃ n, p n\ne n : ℕ\ne0 : 0 < e\nhe : succ n < 10 ^ e\nhterm : ¬succ n / 10 = 0\n⊢ 2 ≤ 10\n[PROOFSTEP]\ndecide\n", "meta": {"mathlib_filename": "Mathlib.Init.Data.Nat.Lemmas", "llama_tokens": 25915, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7718434978390746, "lm_q2_score": 0.7662936484231889, "lm_q1q2_score": 0.5914587699708201}} {"text": "[GOAL]\nα : Type u_1\ninst✝ : NonUnitalNonAssocRing α\nk : α\nh : ∀ (x : α), k * x = 0 → x = 0\n⊢ IsLeftRegular k\n[PROOFSTEP]\nrefine' fun x y (h' : k * x = k * y) => sub_eq_zero.mp (h _ _)\n[GOAL]\nα : Type u_1\ninst✝ : NonUnitalNonAssocRing α\nk : α\nh : ∀ (x : α), k * x = 0 → x = 0\nx y : α\nh' : k * x = k * y\n⊢ k * (x - y) = 0\n[PROOFSTEP]\nrw [mul_sub, sub_eq_zero, h']\n[GOAL]\nα : Type u_1\ninst✝ : NonUnitalNonAssocRing α\nk : α\nh : ∀ (x : α), x * k = 0 → x = 0\n⊢ IsRightRegular k\n[PROOFSTEP]\nrefine' fun x y (h' : x * k = y * k) => sub_eq_zero.mp (h _ _)\n[GOAL]\nα : Type u_1\ninst✝ : NonUnitalNonAssocRing α\nk : α\nh : ∀ (x : α), x * k = 0 → x = 0\nx y : α\nh' : x * k = y * k\n⊢ (x - y) * k = 0\n[PROOFSTEP]\nrw [sub_mul, sub_eq_zero, h']\n[GOAL]\nα : Type u_1\ninst✝² : Nontrivial α\ninst✝¹ : NonUnitalNonAssocRing α\ninst✝ : NoZeroDivisors α\nk : α\nh : IsRegular k\n⊢ k ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝² : Nontrivial α\ninst✝¹ : NonUnitalNonAssocRing α\ninst✝ : NoZeroDivisors α\nh : IsRegular 0\n⊢ False\n[PROOFSTEP]\nexact not_not.mpr h.left not_isLeftRegular_zero\n[GOAL]\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : NoZeroDivisors α\n⊢ MonoidWithZero α\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Ring.Regular", "llama_tokens": 620, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8267118111485244, "lm_q2_score": 0.7154239836484143, "lm_q1q2_score": 0.5914494572610729}} {"text": "[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\np : ℕ\ninst✝ : CharP R p\nI : Ideal R\nh : ∀ (x : ℕ), ↑x ∈ I → ↑x = 0\nx : ℕ\n⊢ ↑x = 0 ↔ p ∣ x\n[PROOFSTEP]\nrw [← cast_eq_zero_iff R p x, ← map_natCast (Ideal.Quotient.mk I)]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\np : ℕ\ninst✝ : CharP R p\nI : Ideal R\nh : ∀ (x : ℕ), ↑x ∈ I → ↑x = 0\nx : ℕ\n⊢ ↑(Ideal.Quotient.mk I) ↑x = 0 ↔ ↑x = 0\n[PROOFSTEP]\nrefine' Ideal.Quotient.eq.trans (_ : ↑x - 0 ∈ I ↔ _)\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\np : ℕ\ninst✝ : CharP R p\nI : Ideal R\nh : ∀ (x : ℕ), ↑x ∈ I → ↑x = 0\nx : ℕ\n⊢ ↑x - 0 ∈ I ↔ ↑x = 0\n[PROOFSTEP]\nrw [sub_zero]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\np : ℕ\ninst✝ : CharP R p\nI : Ideal R\nh : ∀ (x : ℕ), ↑x ∈ I → ↑x = 0\nx : ℕ\n⊢ ↑x ∈ I ↔ ↑x = 0\n[PROOFSTEP]\nexact ⟨h x, fun h' => h'.symm ▸ I.zero_mem⟩\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\n⊢ ↑(AddSubgroup.index (Submodule.toAddSubgroup I)) = 0\n[PROOFSTEP]\nrw [AddSubgroup.index, Nat.card_eq]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\n⊢ ↑(if h : Finite (R ⧸ Submodule.toAddSubgroup I) then Fintype.card (R ⧸ Submodule.toAddSubgroup I) else 0) = 0\n[PROOFSTEP]\nsplit_ifs with hq\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nhq : Finite (R ⧸ Submodule.toAddSubgroup I)\n⊢ ↑(Fintype.card (R ⧸ Submodule.toAddSubgroup I)) = 0\ncase neg R : Type u_1 inst✝ : CommRing R I : Ideal R hq : ¬Finite (R ⧸ Submodule.toAddSubgroup I) ⊢ ↑0 = 0\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nhq : ¬Finite (R ⧸ Submodule.toAddSubgroup I)\n⊢ ↑0 = 0\ncase pos\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nhq : Finite (R ⧸ Submodule.toAddSubgroup I)\n⊢ ↑(Fintype.card (R ⧸ Submodule.toAddSubgroup I)) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nhq : Finite (R ⧸ Submodule.toAddSubgroup I)\n⊢ ↑(Fintype.card (R ⧸ Submodule.toAddSubgroup I)) = 0\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nhq : Finite (R ⧸ Submodule.toAddSubgroup I)\nh : ¬↑(Fintype.card (R ⧸ Submodule.toAddSubgroup I)) = 0\n⊢ False\n[PROOFSTEP]\nletI : Fintype (R ⧸ I) := @Fintype.ofFinite _ hq\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nhq : Finite (R ⧸ Submodule.toAddSubgroup I)\nh : ¬↑(Fintype.card (R ⧸ Submodule.toAddSubgroup I)) = 0\nthis : Fintype (R ⧸ I) := Fintype.ofFinite (R ⧸ I)\n⊢ False\n[PROOFSTEP]\nhave h : (Fintype.card (R ⧸ I) : R ⧸ I) ≠ 0 := h\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nhq : Finite (R ⧸ Submodule.toAddSubgroup I)\nh✝ : ¬↑(Fintype.card (R ⧸ Submodule.toAddSubgroup I)) = 0\nthis : Fintype (R ⧸ I) := Fintype.ofFinite (R ⧸ I)\nh : ↑(Fintype.card (R ⧸ I)) ≠ 0\n⊢ False\n[PROOFSTEP]\nsimp at h \n", "meta": {"mathlib_filename": "Mathlib.Algebra.CharP.Quotient", "llama_tokens": 1465, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8418256432832333, "lm_q2_score": 0.7025300573952054, "lm_q1q2_score": 0.5914078174925256}} {"text": "[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝³ : Zero R\ninst✝² : One R\ninst✝¹ : DecidableEq α\ninst✝ : DecidableRel G.Adj\na : α\ne : Sym2 α\n⊢ incMatrix R G a e = if e ∈ incidenceSet G a then 1 else 0\n[PROOFSTEP]\nunfold incMatrix Set.indicator\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝³ : Zero R\ninst✝² : One R\ninst✝¹ : DecidableEq α\ninst✝ : DecidableRel G.Adj\na : α\ne : Sym2 α\n⊢ (if e ∈ incidenceSet G a then OfNat.ofNat 1 e else 0) = if e ∈ incidenceSet G a then 1 else 0\n[PROOFSTEP]\nsimp only [Pi.one_apply]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝ : MulZeroOneClass R\na b : α\ne : Sym2 α\n⊢ incMatrix R G a e * incMatrix R G b e = Set.indicator (incidenceSet G a ∩ incidenceSet G b) 1 e\n[PROOFSTEP]\nclassical simp only [incMatrix, Set.indicator_apply, ← ite_and_mul_zero, Pi.one_apply, mul_one, Set.mem_inter_iff]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝ : MulZeroOneClass R\na b : α\ne : Sym2 α\n⊢ incMatrix R G a e * incMatrix R G b e = Set.indicator (incidenceSet G a ∩ incidenceSet G b) 1 e\n[PROOFSTEP]\nsimp only [incMatrix, Set.indicator_apply, ← ite_and_mul_zero, Pi.one_apply, mul_one, Set.mem_inter_iff]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝ : MulZeroOneClass R\na b : α\ne : Sym2 α\nhab : a ≠ b\nh : ¬Adj G a b\n⊢ incMatrix R G a e * incMatrix R G b e = 0\n[PROOFSTEP]\nrw [incMatrix_apply_mul_incMatrix_apply, Set.indicator_of_not_mem]\n[GOAL]\ncase h\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝ : MulZeroOneClass R\na b : α\ne : Sym2 α\nhab : a ≠ b\nh : ¬Adj G a b\n⊢ ¬e ∈ incidenceSet G a ∩ incidenceSet G b\n[PROOFSTEP]\nrw [G.incidenceSet_inter_incidenceSet_of_not_adj h hab]\n[GOAL]\ncase h\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝ : MulZeroOneClass R\na b : α\ne : Sym2 α\nhab : a ≠ b\nh : ¬Adj G a b\n⊢ ¬e ∈ ∅\n[PROOFSTEP]\nexact Set.not_mem_empty e\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝ : MulZeroOneClass R\na b : α\ne : Sym2 α\nh : ¬e ∈ incidenceSet G a\n⊢ incMatrix R G a e = 0\n[PROOFSTEP]\nrw [incMatrix_apply, Set.indicator_of_not_mem h]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝ : MulZeroOneClass R\na b : α\ne : Sym2 α\nh : e ∈ incidenceSet G a\n⊢ incMatrix R G a e = 1\n[PROOFSTEP]\nrw [incMatrix_apply, Set.indicator_of_mem h, Pi.one_apply]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : MulZeroOneClass R\na b : α\ne : Sym2 α\ninst✝ : Nontrivial R\n⊢ incMatrix R G a e = 0 ↔ ¬e ∈ incidenceSet G a\n[PROOFSTEP]\nsimp only [incMatrix_apply, Set.indicator_apply_eq_zero, Pi.one_apply, one_ne_zero]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : MulZeroOneClass R\na b : α\ne : Sym2 α\ninst✝ : Nontrivial R\n⊢ incMatrix R G a e = 1 ↔ e ∈ incidenceSet G a\n[PROOFSTEP]\nunfold incMatrix Set.indicator\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : MulZeroOneClass R\na b : α\ne : Sym2 α\ninst✝ : Nontrivial R\n⊢ (if e ∈ incidenceSet G a then OfNat.ofNat 1 e else 0) = 1 ↔ e ∈ incidenceSet G a\n[PROOFSTEP]\nsimp only [Pi.one_apply]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : MulZeroOneClass R\na b : α\ne : Sym2 α\ninst✝ : Nontrivial R\n⊢ (if e ∈ incidenceSet G a then 1 else 0) = 1 ↔ e ∈ incidenceSet G a\n[PROOFSTEP]\napply Iff.intro\n[GOAL]\ncase mp\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : MulZeroOneClass R\na b : α\ne : Sym2 α\ninst✝ : Nontrivial R\n⊢ (if e ∈ incidenceSet G a then 1 else 0) = 1 → e ∈ incidenceSet G a\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : MulZeroOneClass R\na b : α\ne : Sym2 α\ninst✝ : Nontrivial R\n⊢ e ∈ incidenceSet G a → (if e ∈ incidenceSet G a then 1 else 0) = 1\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : MulZeroOneClass R\na b : α\ne : Sym2 α\ninst✝ : Nontrivial R\nh : (if e ∈ incidenceSet G a then 1 else 0) = 1\n⊢ e ∈ incidenceSet G a\n[PROOFSTEP]\nsplit at h \n[GOAL]\ncase mp.inl\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : MulZeroOneClass R\na b : α\ne : Sym2 α\ninst✝ : Nontrivial R\nh✝ : e ∈ incidenceSet G a\nh : 1 = 1\n⊢ e ∈ incidenceSet G a\n[PROOFSTEP]\nsimp_all only [zero_ne_one]\n[GOAL]\ncase mp.inr\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : MulZeroOneClass R\na b : α\ne : Sym2 α\ninst✝ : Nontrivial R\nh✝ : ¬e ∈ incidenceSet G a\nh : 0 = 1\n⊢ e ∈ incidenceSet G a\n[PROOFSTEP]\nsimp_all only [zero_ne_one]\n[GOAL]\ncase mpr\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : MulZeroOneClass R\na b : α\ne : Sym2 α\ninst✝ : Nontrivial R\nh : e ∈ incidenceSet G a\n⊢ (if e ∈ incidenceSet G a then 1 else 0) = 1\n[PROOFSTEP]\nsimp_all only [ite_true]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝³ : Fintype α\ninst✝² : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableRel G.Adj\n⊢ ∑ e : Sym2 α, incMatrix R G a e = ↑(degree G a)\n[PROOFSTEP]\nsimp [incMatrix_apply', sum_boole, Set.filter_mem_univ_eq_toFinset]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝³ : Fintype α\ninst✝² : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableRel G.Adj\n⊢ (incMatrix R G * (incMatrix R G)ᵀ) a a = ↑(degree G a)\n[PROOFSTEP]\nrw [← sum_incMatrix_apply]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝³ : Fintype α\ninst✝² : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableRel G.Adj\n⊢ (incMatrix R G * (incMatrix R G)ᵀ) a a = ∑ e : Sym2 α, incMatrix R G a e\n[PROOFSTEP]\nsimp only [mul_apply, incMatrix_apply', transpose_apply, mul_ite, mul_one, mul_zero]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝³ : Fintype α\ninst✝² : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableRel G.Adj\n⊢ (∑ x : Sym2 α, if x ∈ incidenceSet G a then if x ∈ incidenceSet G a then 1 else 0 else 0) =\n ∑ x : Sym2 α, if x ∈ incidenceSet G a then 1 else 0\n[PROOFSTEP]\nsimp_all only [ite_true, sum_boole]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : Fintype α\ninst✝ : NonAssocSemiring R\na b : α\ne : Sym2 α\n⊢ e ∈ edgeSet G → ∑ a : α, incMatrix R G a e = 2\n[PROOFSTEP]\nclassical\nrefine' e.ind _\nintro a b h\nrw [mem_edgeSet] at h \nrw [← Nat.cast_two, ← card_doubleton h.ne]\nsimp only [incMatrix_apply', sum_boole, mk'_mem_incidenceSet_iff, h, true_and_iff]\ncongr 2\next e\nsimp only [mem_filter, mem_univ, true_and_iff, mem_insert, mem_singleton]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : Fintype α\ninst✝ : NonAssocSemiring R\na b : α\ne : Sym2 α\n⊢ e ∈ edgeSet G → ∑ a : α, incMatrix R G a e = 2\n[PROOFSTEP]\nrefine' e.ind _\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : Fintype α\ninst✝ : NonAssocSemiring R\na b : α\ne : Sym2 α\n⊢ ∀ (x y : α),\n Quotient.mk (Rel.setoid α) (x, y) ∈ edgeSet G → ∑ a : α, incMatrix R G a (Quotient.mk (Rel.setoid α) (x, y)) = 2\n[PROOFSTEP]\nintro a b h\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : Fintype α\ninst✝ : NonAssocSemiring R\na✝ b✝ : α\ne : Sym2 α\na b : α\nh : Quotient.mk (Rel.setoid α) (a, b) ∈ edgeSet G\n⊢ ∑ a_1 : α, incMatrix R G a_1 (Quotient.mk (Rel.setoid α) (a, b)) = 2\n[PROOFSTEP]\nrw [mem_edgeSet] at h \n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : Fintype α\ninst✝ : NonAssocSemiring R\na✝ b✝ : α\ne : Sym2 α\na b : α\nh : Adj G a b\n⊢ ∑ a_1 : α, incMatrix R G a_1 (Quotient.mk (Rel.setoid α) (a, b)) = 2\n[PROOFSTEP]\nrw [← Nat.cast_two, ← card_doubleton h.ne]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : Fintype α\ninst✝ : NonAssocSemiring R\na✝ b✝ : α\ne : Sym2 α\na b : α\nh : Adj G a b\n⊢ ∑ a_1 : α, incMatrix R G a_1 (Quotient.mk (Rel.setoid α) (a, b)) = ↑(card {a, b})\n[PROOFSTEP]\nsimp only [incMatrix_apply', sum_boole, mk'_mem_incidenceSet_iff, h, true_and_iff]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : Fintype α\ninst✝ : NonAssocSemiring R\na✝ b✝ : α\ne : Sym2 α\na b : α\nh : Adj G a b\n⊢ ↑(card (filter (fun x => x = a ∨ x = b) univ)) = ↑(card {a, b})\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase e_a.e_s\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : Fintype α\ninst✝ : NonAssocSemiring R\na✝ b✝ : α\ne : Sym2 α\na b : α\nh : Adj G a b\n⊢ filter (fun x => x = a ∨ x = b) univ = {a, b}\n[PROOFSTEP]\next e\n[GOAL]\ncase e_a.e_s.a\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : Fintype α\ninst✝ : NonAssocSemiring R\na✝ b✝ : α\ne✝ : Sym2 α\na b : α\nh : Adj G a b\ne : α\n⊢ e ∈ filter (fun x => x = a ∨ x = b) univ ↔ e ∈ {a, b}\n[PROOFSTEP]\nsimp only [mem_filter, mem_univ, true_and_iff, mem_insert, mem_singleton]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝² : Fintype α\ninst✝¹ : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝ : DecidableRel G.Adj\n⊢ ((incMatrix R G)ᵀ * incMatrix R G) e e = if e ∈ edgeSet G then 2 else 0\n[PROOFSTEP]\nclassical\nsimp only [Matrix.mul_apply, incMatrix_apply', transpose_apply, ← ite_and_mul_zero, one_mul, sum_boole, and_self_iff]\nsplit_ifs with h\n· revert h\n refine' e.ind _\n intro v w h\n rw [← Nat.cast_two, ← card_doubleton (G.ne_of_adj h)]\n simp [mk'_mem_incidenceSet_iff, G.mem_edgeSet.mp h]\n congr 2\n ext u\n simp\n· revert h\n refine' e.ind _\n intro v w h\n simp [mk'_mem_incidenceSet_iff, G.mem_edgeSet.not.mp h]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝² : Fintype α\ninst✝¹ : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝ : DecidableRel G.Adj\n⊢ ((incMatrix R G)ᵀ * incMatrix R G) e e = if e ∈ edgeSet G then 2 else 0\n[PROOFSTEP]\nsimp only [Matrix.mul_apply, incMatrix_apply', transpose_apply, ← ite_and_mul_zero, one_mul, sum_boole, and_self_iff]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝² : Fintype α\ninst✝¹ : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝ : DecidableRel G.Adj\n⊢ ↑(card (filter (fun x => e ∈ incidenceSet G x) univ)) = if e ∈ edgeSet G then 2 else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝² : Fintype α\ninst✝¹ : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝ : DecidableRel G.Adj\nh : e ∈ edgeSet G\n⊢ ↑(card (filter (fun x => e ∈ incidenceSet G x) univ)) = 2\n[PROOFSTEP]\nrevert h\n[GOAL]\ncase pos\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝² : Fintype α\ninst✝¹ : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝ : DecidableRel G.Adj\n⊢ e ∈ edgeSet G → ↑(card (filter (fun x => e ∈ incidenceSet G x) univ)) = 2\n[PROOFSTEP]\nrefine' e.ind _\n[GOAL]\ncase pos\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝² : Fintype α\ninst✝¹ : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝ : DecidableRel G.Adj\n⊢ ∀ (x y : α),\n Quotient.mk (Rel.setoid α) (x, y) ∈ edgeSet G →\n ↑(card (filter (fun x_1 => Quotient.mk (Rel.setoid α) (x, y) ∈ incidenceSet G x_1) univ)) = 2\n[PROOFSTEP]\nintro v w h\n[GOAL]\ncase pos\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝² : Fintype α\ninst✝¹ : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝ : DecidableRel G.Adj\nv w : α\nh : Quotient.mk (Rel.setoid α) (v, w) ∈ edgeSet G\n⊢ ↑(card (filter (fun x => Quotient.mk (Rel.setoid α) (v, w) ∈ incidenceSet G x) univ)) = 2\n[PROOFSTEP]\nrw [← Nat.cast_two, ← card_doubleton (G.ne_of_adj h)]\n[GOAL]\ncase pos\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝² : Fintype α\ninst✝¹ : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝ : DecidableRel G.Adj\nv w : α\nh : Quotient.mk (Rel.setoid α) (v, w) ∈ edgeSet G\n⊢ ↑(card (filter (fun x => Quotient.mk (Rel.setoid α) (v, w) ∈ incidenceSet G x) univ)) =\n ↑(card {(v, w).fst, (v, w).snd})\n[PROOFSTEP]\nsimp [mk'_mem_incidenceSet_iff, G.mem_edgeSet.mp h]\n[GOAL]\ncase pos\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝² : Fintype α\ninst✝¹ : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝ : DecidableRel G.Adj\nv w : α\nh : Quotient.mk (Rel.setoid α) (v, w) ∈ edgeSet G\n⊢ ↑(card (filter (fun x => x = v ∨ x = w) univ)) = ↑(card {v, w})\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase pos.e_a.e_s\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝² : Fintype α\ninst✝¹ : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝ : DecidableRel G.Adj\nv w : α\nh : Quotient.mk (Rel.setoid α) (v, w) ∈ edgeSet G\n⊢ filter (fun x => x = v ∨ x = w) univ = {v, w}\n[PROOFSTEP]\next u\n[GOAL]\ncase pos.e_a.e_s.a\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝² : Fintype α\ninst✝¹ : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝ : DecidableRel G.Adj\nv w : α\nh : Quotient.mk (Rel.setoid α) (v, w) ∈ edgeSet G\nu : α\n⊢ u ∈ filter (fun x => x = v ∨ x = w) univ ↔ u ∈ {v, w}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝² : Fintype α\ninst✝¹ : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝ : DecidableRel G.Adj\nh : ¬e ∈ edgeSet G\n⊢ ↑(card (filter (fun x => e ∈ incidenceSet G x) univ)) = 0\n[PROOFSTEP]\nrevert h\n[GOAL]\ncase neg\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝² : Fintype α\ninst✝¹ : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝ : DecidableRel G.Adj\n⊢ ¬e ∈ edgeSet G → ↑(card (filter (fun x => e ∈ incidenceSet G x) univ)) = 0\n[PROOFSTEP]\nrefine' e.ind _\n[GOAL]\ncase neg\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝² : Fintype α\ninst✝¹ : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝ : DecidableRel G.Adj\n⊢ ∀ (x y : α),\n ¬Quotient.mk (Rel.setoid α) (x, y) ∈ edgeSet G →\n ↑(card (filter (fun x_1 => Quotient.mk (Rel.setoid α) (x, y) ∈ incidenceSet G x_1) univ)) = 0\n[PROOFSTEP]\nintro v w h\n[GOAL]\ncase neg\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝² : Fintype α\ninst✝¹ : NonAssocSemiring R\na b : α\ne : Sym2 α\ninst✝ : DecidableRel G.Adj\nv w : α\nh : ¬Quotient.mk (Rel.setoid α) (v, w) ∈ edgeSet G\n⊢ ↑(card (filter (fun x => Quotient.mk (Rel.setoid α) (v, w) ∈ incidenceSet G x) univ)) = 0\n[PROOFSTEP]\nsimp [mk'_mem_incidenceSet_iff, G.mem_edgeSet.not.mp h]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : Fintype (Sym2 α)\ninst✝ : Semiring R\na b : α\ne : Sym2 α\nh : Adj G a b\n⊢ (incMatrix R G * (incMatrix R G)ᵀ) a b = 1\n[PROOFSTEP]\nclassical\nsimp_rw [Matrix.mul_apply, Matrix.transpose_apply, incMatrix_apply_mul_incMatrix_apply, Set.indicator_apply,\n Pi.one_apply, sum_boole]\nconvert @Nat.cast_one R _\nconvert card_singleton ⟦(a, b)⟧\nrw [← coe_eq_singleton, coe_filter_univ]\nexact G.incidenceSet_inter_incidenceSet_of_adj h\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : Fintype (Sym2 α)\ninst✝ : Semiring R\na b : α\ne : Sym2 α\nh : Adj G a b\n⊢ (incMatrix R G * (incMatrix R G)ᵀ) a b = 1\n[PROOFSTEP]\nsimp_rw [Matrix.mul_apply, Matrix.transpose_apply, incMatrix_apply_mul_incMatrix_apply, Set.indicator_apply,\n Pi.one_apply, sum_boole]\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : Fintype (Sym2 α)\ninst✝ : Semiring R\na b : α\ne : Sym2 α\nh : Adj G a b\n⊢ ↑(card (filter (fun x => x ∈ incidenceSet G a ∩ incidenceSet G b) univ)) = 1\n[PROOFSTEP]\nconvert @Nat.cast_one R _\n[GOAL]\ncase h.e'_2.h.e'_3\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : Fintype (Sym2 α)\ninst✝ : Semiring R\na b : α\ne : Sym2 α\nh : Adj G a b\n⊢ card (filter (fun x => x ∈ incidenceSet G a ∩ incidenceSet G b) univ) = 1\n[PROOFSTEP]\nconvert card_singleton ⟦(a, b)⟧\n[GOAL]\ncase h.e'_2.h.e'_2.h\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : Fintype (Sym2 α)\ninst✝ : Semiring R\na b : α\ne : Sym2 α\nh : Adj G a b\ne_1✝ : Sym2 α = Quotient (Rel.setoid α)\n⊢ filter (fun x => x ∈ incidenceSet G a ∩ incidenceSet G b) univ = {Quotient.mk (Rel.setoid α) (a, b)}\n[PROOFSTEP]\nrw [← coe_eq_singleton, coe_filter_univ]\n[GOAL]\ncase h.e'_2.h.e'_2.h\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝¹ : Fintype (Sym2 α)\ninst✝ : Semiring R\na b : α\ne : Sym2 α\nh : Adj G a b\ne_1✝ : Sym2 α = Quotient (Rel.setoid α)\n⊢ {x | x ∈ incidenceSet G a ∩ incidenceSet G b} = {Quotient.mk (Rel.setoid α) (a, b)}\n[PROOFSTEP]\nexact G.incidenceSet_inter_incidenceSet_of_adj h\n[GOAL]\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝⁴ : Fintype (Sym2 α)\ninst✝³ : Semiring R\na b : α\ne : Sym2 α\ninst✝² : Fintype α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableRel G.Adj\n⊢ incMatrix R G * (incMatrix R G)ᵀ = fun a b => if a = b then ↑(degree G a) else if Adj G a b then 1 else 0\n[PROOFSTEP]\next a b\n[GOAL]\ncase a.h\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝⁴ : Fintype (Sym2 α)\ninst✝³ : Semiring R\na✝ b✝ : α\ne : Sym2 α\ninst✝² : Fintype α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableRel G.Adj\na b : α\n⊢ (incMatrix R G * (incMatrix R G)ᵀ) a b = if a = b then ↑(degree G a) else if Adj G a b then 1 else 0\n[PROOFSTEP]\nsplit_ifs with h h'\n[GOAL]\ncase pos\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝⁴ : Fintype (Sym2 α)\ninst✝³ : Semiring R\na✝ b✝ : α\ne : Sym2 α\ninst✝² : Fintype α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableRel G.Adj\na b : α\nh : a = b\n⊢ (incMatrix R G * (incMatrix R G)ᵀ) a b = ↑(degree G a)\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase pos\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝⁴ : Fintype (Sym2 α)\ninst✝³ : Semiring R\na✝ b : α\ne : Sym2 α\ninst✝² : Fintype α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableRel G.Adj\na : α\n⊢ (incMatrix R G * (incMatrix R G)ᵀ) a a = ↑(degree G a)\n[PROOFSTEP]\nrename Semiring R => sr\n[GOAL]\ncase pos\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝³ : Fintype (Sym2 α)\nsr : Semiring R\na✝ b : α\ne : Sym2 α\ninst✝² : Fintype α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableRel G.Adj\na : α\n⊢ (incMatrix R G * (incMatrix R G)ᵀ) a a = ↑(degree G a)\n[PROOFSTEP]\nconvert @incMatrix_mul_transpose_diag _ _ _ _ sr.toNonAssocSemiring _ _ _\n[GOAL]\ncase pos\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝⁴ : Fintype (Sym2 α)\ninst✝³ : Semiring R\na✝ b✝ : α\ne : Sym2 α\ninst✝² : Fintype α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableRel G.Adj\na b : α\nh : ¬a = b\nh' : Adj G a b\n⊢ (incMatrix R G * (incMatrix R G)ᵀ) a b = 1\n[PROOFSTEP]\nexact G.incMatrix_mul_transpose_apply_of_adj h'\n[GOAL]\ncase neg\nR : Type u_1\nα : Type u_2\nG : SimpleGraph α\ninst✝⁴ : Fintype (Sym2 α)\ninst✝³ : Semiring R\na✝ b✝ : α\ne : Sym2 α\ninst✝² : Fintype α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableRel G.Adj\na b : α\nh : ¬a = b\nh' : ¬Adj G a b\n⊢ (incMatrix R G * (incMatrix R G)ᵀ) a b = 0\n[PROOFSTEP]\nsimp only [Matrix.mul_apply, Matrix.transpose_apply, G.incMatrix_apply_mul_incMatrix_apply_of_not_adj h h',\n sum_const_zero]\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.SimpleGraph.IncMatrix", "llama_tokens": 8677, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8289388252252041, "lm_q2_score": 0.712232184238947, "lm_q1q2_score": 0.5903969100906138}} {"text": "[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nε : ℝ\nε0 : ε > 0\na✝ b✝ : ℝ\nh : dist a✝ b✝ < ε\n⊢ dist (-a✝) (-b✝) < ε\n[PROOFSTEP]\nrw [dist_comm] at h \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nε : ℝ\nε0 : ε > 0\na✝ b✝ : ℝ\nh : dist b✝ a✝ < ε\n⊢ dist (-a✝) (-b✝) < ε\n[PROOFSTEP]\nsimpa only [Real.dist_eq, neg_sub_neg] using h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\n⊢ TopologicalAddGroup ℝ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nx r : ℝ\n⊢ IsCompact (closedBall x r)\n[PROOFSTEP]\nrw [Real.closedBall_eq_Icc]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nx r : ℝ\n⊢ IsCompact (Icc (x - r) (x + r))\n[PROOFSTEP]\napply isCompact_Icc\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\n⊢ ∀ (u : Set ℝ), u ∈ ⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo ↑a ↑b} → IsOpen u\n[PROOFSTEP]\nsimp (config := { contextual := true }) [isOpen_Ioo]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : ℝ\nv : Set ℝ\nhav : a ∈ v\nhv : IsOpen v\nl u : ℝ\nhl : l < a\nhu : a < u\nh : Ioo l u ⊆ v\nq : ℚ\nhlq : l < ↑q\nhqa : ↑q < a\np : ℚ\nhap : a < ↑p\nhpu : ↑p < u\n⊢ Ioo ↑q ↑p ∈ ⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo ↑a ↑b}\n[PROOFSTEP]\nsimp only [mem_iUnion]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : ℝ\nv : Set ℝ\nhav : a ∈ v\nhv : IsOpen v\nl u : ℝ\nhl : l < a\nhu : a < u\nh : Ioo l u ⊆ v\nq : ℚ\nhlq : l < ↑q\nhqa : ↑q < a\np : ℚ\nhap : a < ↑p\nhpu : ↑p < u\n⊢ ∃ i i_1 i_2, Ioo ↑q ↑p ∈ {Ioo ↑i ↑i_1}\n[PROOFSTEP]\nexact ⟨q, p, Rat.cast_lt.1 <| hqa.trans hap, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\n⊢ cocompact ℝ = atBot ⊔ atTop\n[PROOFSTEP]\nsimp only [← comap_dist_right_atTop_eq_cocompact (0 : ℝ), Real.dist_eq, sub_zero, comap_abs_atTop]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Set ℝ\nx : ℝ\n⊢ x ∈ closure s ↔ ∀ (ε : ℝ), ε > 0 → ∃ y, y ∈ s ∧ |y - x| < ε\n[PROOFSTEP]\nsimp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\n⊢ CompleteSpace ℝ\n[PROOFSTEP]\napply complete_of_cauchySeq_tendsto\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\n⊢ ∀ (u : ℕ → ℝ), CauchySeq u → ∃ a, Tendsto u atTop (𝓝 a)\n[PROOFSTEP]\nintro u hu\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nu : ℕ → ℝ\nhu : CauchySeq u\n⊢ ∃ a, Tendsto u atTop (𝓝 a)\n[PROOFSTEP]\nlet c : CauSeq ℝ abs := ⟨u, Metric.cauchySeq_iff'.1 hu⟩\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nu : ℕ → ℝ\nhu : CauchySeq u\nc : CauSeq ℝ abs := { val := u, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → dist (u n) (u N) < ε) }\n⊢ ∃ a, Tendsto u atTop (𝓝 a)\n[PROOFSTEP]\nrefine' ⟨c.lim, fun s h => _⟩\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nu : ℕ → ℝ\nhu : CauchySeq u\nc : CauSeq ℝ abs := { val := u, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → dist (u n) (u N) < ε) }\ns : Set ℝ\nh : s ∈ 𝓝 (CauSeq.lim c)\n⊢ s ∈ map u atTop\n[PROOFSTEP]\nrcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩\n[GOAL]\ncase a.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nu : ℕ → ℝ\nhu : CauchySeq u\nc : CauSeq ℝ abs := { val := u, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → dist (u n) (u N) < ε) }\ns : Set ℝ\nh : s ∈ 𝓝 (CauSeq.lim c)\nε : ℝ\nε0 : ε > 0\nhε : ball (CauSeq.lim c) ε ⊆ s\n⊢ s ∈ map u atTop\n[PROOFSTEP]\nhave := c.equiv_lim ε ε0\n[GOAL]\ncase a.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nu : ℕ → ℝ\nhu : CauchySeq u\nc : CauSeq ℝ abs := { val := u, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → dist (u n) (u N) < ε) }\ns : Set ℝ\nh : s ∈ 𝓝 (CauSeq.lim c)\nε : ℝ\nε0 : ε > 0\nhε : ball (CauSeq.lim c) ε ⊆ s\nthis : ∃ i, ∀ (j : ℕ), j ≥ i → |↑(c - CauSeq.const abs (CauSeq.lim c)) j| < ε\n⊢ s ∈ map u atTop\n[PROOFSTEP]\nsimp only [mem_map, mem_atTop_sets, mem_setOf_eq]\n[GOAL]\ncase a.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nu : ℕ → ℝ\nhu : CauchySeq u\nc : CauSeq ℝ abs := { val := u, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → dist (u n) (u N) < ε) }\ns : Set ℝ\nh : s ∈ 𝓝 (CauSeq.lim c)\nε : ℝ\nε0 : ε > 0\nhε : ball (CauSeq.lim c) ε ⊆ s\nthis : ∃ i, ∀ (j : ℕ), j ≥ i → |↑(c - CauSeq.const abs (CauSeq.lim c)) j| < ε\n⊢ ∃ a, ∀ (b : ℕ), b ≥ a → b ∈ u ⁻¹' s\n[PROOFSTEP]\nrefine' this.imp fun N hN n hn => hε (hN n hn)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nx ε : ℝ\n⊢ TotallyBounded (ball x ε)\n[PROOFSTEP]\nrw [Real.ball_eq_Ioo]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nx ε : ℝ\n⊢ TotallyBounded (Ioo (x - ε) (x + ε))\n[PROOFSTEP]\napply totallyBounded_Ioo\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nq : ℚ\nx : ℝ\nhx : x ∈ {r | ↑q ≤ r}\nt : Set ℝ\nht : t ∈ 𝓝 x\nε : ℝ\nε0 : ε > 0\nhε : ball x ε ⊆ t\np : ℚ\nh₁ : x < ↑p\nh₂ : ↑p < x + ε\n⊢ ↑p ∈ ball x ε\n[PROOFSTEP]\nrwa [mem_ball, Real.dist_eq, abs_of_pos (sub_pos.2 h₁), sub_lt_iff_lt_add']\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Set ℝ\n⊢ Metric.Bounded s → BddBelow s ∧ BddAbove s\n[PROOFSTEP]\nintro bdd\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Set ℝ\nbdd : Metric.Bounded s\n⊢ BddBelow s ∧ BddAbove s\n[PROOFSTEP]\nrcases(bounded_iff_subset_ball 0).1 bdd with\n ⟨r, hr⟩\n -- hr : s ⊆ closed_ball 0 r\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\ns : Set ℝ\nbdd : Metric.Bounded s\nr : ℝ\nhr : s ⊆ closedBall 0 r\n⊢ BddBelow s ∧ BddAbove s\n[PROOFSTEP]\nrw [Real.closedBall_eq_Icc] at hr \n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\ns : Set ℝ\nbdd : Metric.Bounded s\nr : ℝ\nhr : s ⊆ Icc (0 - r) (0 + r)\n⊢ BddBelow s ∧ BddAbove s\n[PROOFSTEP]\nexact ⟨bddBelow_Icc.mono hr, bddAbove_Icc.mono hr⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : TopologicalSpace α\nf : ℝ → α\nc : ℝ\nhp : Periodic f c\nhc : c ≠ 0\nhf : Continuous f\n⊢ IsCompact (range f)\n[PROOFSTEP]\nrw [← hp.image_uIcc hc 0]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : TopologicalSpace α\nf : ℝ → α\nc : ℝ\nhp : Periodic f c\nhc : c ≠ 0\nhf : Continuous f\n⊢ IsCompact (f '' [[0, 0 + c]])\n[PROOFSTEP]\nexact isCompact_uIcc.image hf\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : ℝ\n⊢ DiscreteTopology { x // x ∈ AddSubgroup.zmultiples a }\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha)\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\n⊢ DiscreteTopology { x // x ∈ AddSubgroup.zmultiples 0 }\n[PROOFSTEP]\nrw [AddSubgroup.zmultiples_zero_eq_bot]\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\n⊢ DiscreteTopology { x // x ∈ ⊥ }\n[PROOFSTEP]\nexact Subsingleton.discreteTopology (α := (⊥ : Submodule ℤ ℝ))\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\na : ℝ\nha : a ≠ 0\n⊢ DiscreteTopology { x // x ∈ AddSubgroup.zmultiples a }\n[PROOFSTEP]\nrw [discreteTopology_iff_open_singleton_zero, isOpen_induced_iff]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\na : ℝ\nha : a ≠ 0\n⊢ ∃ t, IsOpen t ∧ Subtype.val ⁻¹' t = {0}\n[PROOFSTEP]\nrefine' ⟨ball 0 |a|, isOpen_ball, _⟩\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\na : ℝ\nha : a ≠ 0\n⊢ Subtype.val ⁻¹' ball 0 |a| = {0}\n[PROOFSTEP]\next ⟨x, hx⟩\n[GOAL]\ncase inr.h.mk\nα : Type u\nβ : Type v\nγ : Type w\na : ℝ\nha : a ≠ 0\nx : ℝ\nhx : x ∈ AddSubgroup.zmultiples a\n⊢ { val := x, property := hx } ∈ Subtype.val ⁻¹' ball 0 |a| ↔ { val := x, property := hx } ∈ {0}\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := AddSubgroup.mem_zmultiples_iff.mp hx\n[GOAL]\ncase inr.h.mk.intro\nα : Type u\nβ : Type v\nγ : Type w\na : ℝ\nha : a ≠ 0\nk : ℤ\nhx : k • a ∈ AddSubgroup.zmultiples a\n⊢ { val := k • a, property := hx } ∈ Subtype.val ⁻¹' ball 0 |a| ↔ { val := k • a, property := hx } ∈ {0}\n[PROOFSTEP]\nsimp [ha, Real.dist_eq, abs_mul, (by norm_cast : |(k : ℝ)| < 1 ↔ |k| < 1)]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : ℝ\nha : a ≠ 0\nk : ℤ\nhx : k • a ∈ AddSubgroup.zmultiples a\n⊢ |↑k| < 1 ↔ |k| < 1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\n⊢ Tendsto Int.cast cofinite (cocompact ℝ)\n[PROOFSTEP]\napply (castAddHom ℝ).tendsto_coe_cofinite_of_discrete cast_injective\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\n⊢ DiscreteTopology { x // x ∈ AddMonoidHom.range (castAddHom ℝ) }\n[PROOFSTEP]\nrw [range_castAddHom]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\n⊢ DiscreteTopology { x // x ∈ AddSubgroup.zmultiples 1 }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : ℝ\nha : a ≠ 0\n⊢ Tendsto (↑(↑(zmultiplesHom ℝ) a)) cofinite (cocompact ℝ)\n[PROOFSTEP]\napply (zmultiplesHom ℝ a).tendsto_coe_cofinite_of_discrete $ smul_left_injective ℤ ha\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : ℝ\nha : a ≠ 0\n⊢ DiscreteTopology { x // x ∈ AddMonoidHom.range (↑(zmultiplesHom ℝ) a) }\n[PROOFSTEP]\nrw [AddSubgroup.range_zmultiplesHom]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : ℝ\nha : a ≠ 0\n⊢ DiscreteTopology { x // x ∈ AddSubgroup.zmultiples a }\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Topology.Instances.Real", "llama_tokens": 4379, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.828938825225204, "lm_q2_score": 0.7122321720225278, "lm_q1q2_score": 0.5903968999639496}} {"text": "[GOAL]\nα : Type u_1\nx : ℤˣ\n⊢ x ∈ {1, -1}\n[PROOFSTEP]\ncases Int.units_eq_one_or x\n[GOAL]\ncase inl\nα : Type u_1\nx : ℤˣ\nh✝ : x = 1\n⊢ x ∈ {1, -1}\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase inr\nα : Type u_1\nx : ℤˣ\nh✝ : x = -1\n⊢ x ∈ {1, -1}\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_1\ninst✝² : GroupWithZero α\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\n⊢ card α = card αˣ + 1\n[PROOFSTEP]\nrw [eq_comm, Fintype.card_congr (unitsEquivNeZero α)]\n[GOAL]\nα : Type u_1\ninst✝² : GroupWithZero α\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\n⊢ card { a // a ≠ 0 } + 1 = card α\n[PROOFSTEP]\nhave := Fintype.card_congr (Equiv.sumCompl (· = (0 : α)))\n[GOAL]\nα : Type u_1\ninst✝² : GroupWithZero α\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\nthis : card ({ a // a = 0 } ⊕ { a // ¬a = 0 }) = card α\n⊢ card { a // a ≠ 0 } + 1 = card α\n[PROOFSTEP]\nrwa [Fintype.card_sum, add_comm, Fintype.card_subtype_eq] at this \n[GOAL]\nα : Type u_1\ninst✝¹ : GroupWithZero α\ninst✝ : Finite α\n⊢ Nat.card α = Nat.card αˣ + 1\n[PROOFSTEP]\nhave : Fintype α := Fintype.ofFinite α\n[GOAL]\nα : Type u_1\ninst✝¹ : GroupWithZero α\ninst✝ : Finite α\nthis : Fintype α\n⊢ Nat.card α = Nat.card αˣ + 1\n[PROOFSTEP]\nclassical rw [Nat.card_eq_fintype_card, Nat.card_eq_fintype_card, Fintype.card_eq_card_units_add_one]\n[GOAL]\nα : Type u_1\ninst✝¹ : GroupWithZero α\ninst✝ : Finite α\nthis : Fintype α\n⊢ Nat.card α = Nat.card αˣ + 1\n[PROOFSTEP]\nrw [Nat.card_eq_fintype_card, Nat.card_eq_fintype_card, Fintype.card_eq_card_units_add_one]\n[GOAL]\nα : Type u_1\ninst✝² : GroupWithZero α\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\n⊢ card αˣ = card α - 1\n[PROOFSTEP]\nrw [@Fintype.card_eq_card_units_add_one α, Nat.add_sub_cancel]\n", "meta": {"mathlib_filename": "Mathlib.Data.Fintype.Units", "llama_tokens": 855, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7879311956428947, "lm_q2_score": 0.7490872243177518, "lm_q1q2_score": 0.5902291922975034}} {"text": "[GOAL]\nα : Type u\nβ : Type v\nf : α → α\nn✝ n : ℕ\nihn : id^[n] = id\n⊢ id^[Nat.succ n] = id\n[PROOFSTEP]\nrw [iterate_succ, ihn, comp.left_id]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\nm n : ℕ\n⊢ f^[m + Nat.succ n] = f^[m] ∘ f^[Nat.succ n]\n[PROOFSTEP]\nrw [Nat.add_succ, iterate_succ, iterate_succ, iterate_add m n]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\nm n : ℕ\n⊢ (f^[m] ∘ f^[n]) ∘ f = f^[m] ∘ f^[n] ∘ f\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\nm n : ℕ\nx : α\n⊢ f^[m + n] x = f^[m] (f^[n] x)\n[PROOFSTEP]\nrw [iterate_add f m n]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\nm n : ℕ\nx : α\n⊢ (f^[m] ∘ f^[n]) x = f^[m] (f^[n] x)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\nm : ℕ\n⊢ f^[m * 0] = f^[m]^[0]\n[PROOFSTEP]\nsimp only [Nat.mul_zero, iterate_zero]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\nm n : ℕ\n⊢ f^[m * (n + 1)] = f^[m]^[n + 1]\n[PROOFSTEP]\nsimp only [Nat.mul_succ, Nat.mul_one, iterate_one, iterate_add, iterate_mul m n]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\nx : α\nh : f x = x\nn✝ n : ℕ\nihn : f^[n] x = x\n⊢ f^[Nat.succ n] x = x\n[PROOFSTEP]\nrw [iterate_succ_apply, h, ihn]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\ng : ℕ → α → α\nH : ∀ (n : ℕ), Semiconj f (g n) (g (n + 1))\nn k : ℕ\n⊢ Semiconj f^[n] (g k) (g (n + k))\n[PROOFSTEP]\ninduction' n with n ihn generalizing k\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nf : α → α\ng : ℕ → α → α\nH : ∀ (n : ℕ), Semiconj f (g n) (g (n + 1))\nk✝ k : ℕ\n⊢ Semiconj f^[Nat.zero] (g k) (g (Nat.zero + k))\n[PROOFSTEP]\nrw [Nat.zero_add]\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nf : α → α\ng : ℕ → α → α\nH : ∀ (n : ℕ), Semiconj f (g n) (g (n + 1))\nk✝ k : ℕ\n⊢ Semiconj f^[Nat.zero] (g k) (g k)\n[PROOFSTEP]\nexact id_left\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nf : α → α\ng : ℕ → α → α\nH : ∀ (n : ℕ), Semiconj f (g n) (g (n + 1))\nk✝ n : ℕ\nihn : ∀ (k : ℕ), Semiconj f^[n] (g k) (g (n + k))\nk : ℕ\n⊢ Semiconj f^[Nat.succ n] (g k) (g (Nat.succ n + k))\n[PROOFSTEP]\nrw [Nat.succ_eq_add_one, Nat.add_right_comm, Nat.add_assoc]\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nf : α → α\ng : ℕ → α → α\nH : ∀ (n : ℕ), Semiconj f (g n) (g (n + 1))\nk✝ n : ℕ\nihn : ∀ (k : ℕ), Semiconj f^[n] (g k) (g (n + k))\nk : ℕ\n⊢ Semiconj f^[n + 1] (g k) (g (n + (k + 1)))\n[PROOFSTEP]\nexact (H k).comp_left (ihn (k + 1))\n[GOAL]\nα : Type u\nβ : Type v\nf g : α → α\nh : Commute f g\nn✝ : ℕ\nx : α\nhx : f x = g x\nn : ℕ\nihn : f^[n] x = g^[n] x\n⊢ f^[Nat.succ n] x = g^[Nat.succ n] x\n[PROOFSTEP]\nsimp only [iterate_succ_apply, hx, (h.iterate_left n).eq, ihn, ((refl g).iterate_right n).eq]\n[GOAL]\nα : Type u\nβ : Type v\nf g : α → α\nh : Commute f g\nn : ℕ\n⊢ (f ∘ g)^[n] = f^[n] ∘ g^[n]\n[PROOFSTEP]\ninduction' n with n ihn\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nf g : α → α\nh : Commute f g\n⊢ (f ∘ g)^[Nat.zero] = f^[Nat.zero] ∘ g^[Nat.zero]\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nf g : α → α\nh : Commute f g\nn : ℕ\nihn : (f ∘ g)^[n] = f^[n] ∘ g^[n]\n⊢ (f ∘ g)^[Nat.succ n] = f^[Nat.succ n] ∘ g^[Nat.succ n]\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase succ.h\nα : Type u\nβ : Type v\nf g : α → α\nh : Commute f g\nn : ℕ\nihn : (f ∘ g)^[n] = f^[n] ∘ g^[n]\nx : α\n⊢ (f ∘ g)^[Nat.succ n] x = (f^[Nat.succ n] ∘ g^[Nat.succ n]) x\n[PROOFSTEP]\nsimp only [ihn, (h.iterate_right n).eq, iterate_succ, comp_apply]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\nn : ℕ\n⊢ f^[Nat.succ n] = f ∘ f^[n]\n[PROOFSTEP]\nrw [iterate_succ, (Commute.self_iterate f n).comp_eq]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\nn : ℕ\nx : α\n⊢ f^[Nat.succ n] x = f (f^[n] x)\n[PROOFSTEP]\nrw [iterate_succ']\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\nn : ℕ\nx : α\n⊢ (f ∘ f^[n]) x = f (f^[n] x)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\nn : ℕ\nhn : 0 < n\n⊢ f^[Nat.pred n] ∘ f = f^[n]\n[PROOFSTEP]\nrw [← iterate_succ, Nat.succ_pred_eq_of_pos hn]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\nn : ℕ\nhn : 0 < n\n⊢ f ∘ f^[Nat.pred n] = f^[n]\n[PROOFSTEP]\nrw [← iterate_succ', Nat.succ_pred_eq_of_pos hn]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\nm n✝¹ : ℕ\na : α\ng : α → α\nhg : LeftInverse g f\nn✝ n : ℕ\nihn : LeftInverse g^[n] f^[n]\n⊢ LeftInverse g^[Nat.succ n] f^[Nat.succ n]\n[PROOFSTEP]\nrw [iterate_succ', iterate_succ]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\nm n✝¹ : ℕ\na : α\ng : α → α\nhg : LeftInverse g f\nn✝ n : ℕ\nihn : LeftInverse g^[n] f^[n]\n⊢ LeftInverse (g ∘ g^[n]) (f^[n] ∘ f)\n[PROOFSTEP]\nexact ihn.comp hg\n[GOAL]\nα : Type u\nβ : Type v\nf✝ : α → α\nm✝ n✝ : ℕ\na : α\nf : α → α\nm n : ℕ\n⊢ f^[n * m] = f^[m * n]\n[PROOFSTEP]\nrw [Nat.mul_comm]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\nm n : ℕ\na : α\nhf : Injective f\n⊢ f^[m + n] a = f^[n] a ↔ f^[n] (f^[m] a) = f^[n] a\n[PROOFSTEP]\nrw [← iterate_add_apply, Nat.add_comm]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\nm n : ℕ\na : α\nhf : Injective f\nha : f^[m] a = f^[n] a\n⊢ f^[m - n] a = a\n[PROOFSTEP]\nobtain h | h := le_total m n\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nf : α → α\nm n : ℕ\na : α\nhf : Injective f\nha : f^[m] a = f^[n] a\nh : m ≤ n\n⊢ f^[m - n] a = a\ncase inr\nα : Type u\nβ : Type v\nf : α → α\nm n : ℕ\na : α\nhf : Injective f\nha : f^[m] a = f^[n] a\nh : n ≤ m\n⊢ f^[m - n] a = a\n[PROOFSTEP]\n{simp [Nat.sub_eq_zero_of_le h]\n}\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nf : α → α\nm n : ℕ\na : α\nhf : Injective f\nha : f^[m] a = f^[n] a\nh : m ≤ n\n⊢ f^[m - n] a = a\n[PROOFSTEP]\nsimp [Nat.sub_eq_zero_of_le h]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nf : α → α\nm n : ℕ\na : α\nhf : Injective f\nha : f^[m] a = f^[n] a\nh : n ≤ m\n⊢ f^[m - n] a = a\n[PROOFSTEP]\n{exact iterate_cancel_of_add hf (by rwa [Nat.sub_add_cancel h])\n}\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nf : α → α\nm n : ℕ\na : α\nhf : Injective f\nha : f^[m] a = f^[n] a\nh : n ≤ m\n⊢ f^[m - n] a = a\n[PROOFSTEP]\nexact iterate_cancel_of_add hf (by rwa [Nat.sub_add_cancel h])\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\nm n : ℕ\na : α\nhf : Injective f\nha : f^[m] a = f^[n] a\nh : n ≤ m\n⊢ f^[m - n + ?m.6123] a = f^[?m.6123] a\n[PROOFSTEP]\nrwa [Nat.sub_add_cancel h]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → α\na : α\nl : List β\n⊢ foldl (fun b x => f b) a l = f^[length l] a\n[PROOFSTEP]\ninduction' l with b l H generalizing a\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nf : α → α\na✝ a : α\n⊢ foldl (fun b x => f b) a [] = f^[length []] a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nf : α → α\na✝ : α\nb : β\nl : List β\nH : ∀ (a : α), foldl (fun b x => f b) a l = f^[length l] a\na : α\n⊢ foldl (fun b x => f b) a (b :: l) = f^[length (b :: l)] a\n[PROOFSTEP]\nrw [length_cons, foldl, iterate_succ_apply, H]\n[GOAL]\nα : Type u\nβ : Type v\nf : β → β\nb : β\na : α\nl : List α\n⊢ foldr (fun x => f) b (a :: l) = f^[length (a :: l)] b\n[PROOFSTEP]\nrw [length_cons, foldr, foldr_const f b l, iterate_succ_apply']\n", "meta": {"mathlib_filename": "Mathlib.Logic.Function.Iterate", "llama_tokens": 3699, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8104788995148792, "lm_q2_score": 0.727975443004307, "lm_q1q2_score": 0.5900087359199874}} {"text": "[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na✝ b c d e : α\nm n : ℤ\na : α\nha : 0 < a\n⊢ a * 0 < a * a⁻¹\n[PROOFSTEP]\nsimp [ne_of_gt ha, zero_lt_one]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\n⊢ 0 ≤ a⁻¹ ↔ 0 ≤ a\n[PROOFSTEP]\nsimp only [le_iff_eq_or_lt, inv_pos, zero_eq_inv]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\n⊢ a⁻¹ < 0 ↔ a < 0\n[PROOFSTEP]\nsimp only [← not_le, inv_nonneg]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\n⊢ a⁻¹ ≤ 0 ↔ a ≤ 0\n[PROOFSTEP]\nsimp only [← not_lt, inv_pos]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\nhb : 0 < b\n⊢ 0 < a / b\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\nhb : 0 < b\n⊢ 0 < a * b⁻¹\n[PROOFSTEP]\nexact mul_pos ha (inv_pos.2 hb)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 ≤ a\nhb : 0 ≤ b\n⊢ 0 ≤ a / b\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 ≤ a\nhb : 0 ≤ b\n⊢ 0 ≤ a * b⁻¹\n[PROOFSTEP]\nexact mul_nonneg ha (inv_nonneg.2 hb)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : a ≤ 0\nhb : 0 ≤ b\n⊢ a / b ≤ 0\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : a ≤ 0\nhb : 0 ≤ b\n⊢ a * b⁻¹ ≤ 0\n[PROOFSTEP]\nexact mul_nonpos_of_nonpos_of_nonneg ha (inv_nonneg.2 hb)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 ≤ a\nhb : b ≤ 0\n⊢ a / b ≤ 0\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 ≤ a\nhb : b ≤ 0\n⊢ a * b⁻¹ ≤ 0\n[PROOFSTEP]\nexact mul_nonpos_of_nonneg_of_nonpos ha (inv_nonpos.2 hb)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n✝ : ℤ\nha : 0 ≤ a\nn : ℕ\n⊢ 0 ≤ a ^ ↑n\n[PROOFSTEP]\nrw [zpow_ofNat]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n✝ : ℤ\nha : 0 ≤ a\nn : ℕ\n⊢ 0 ≤ a ^ n\n[PROOFSTEP]\nexact pow_nonneg ha _\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n✝ : ℤ\nha : 0 ≤ a\nn : ℕ\n⊢ 0 ≤ a ^ (-↑(n + 1))\n[PROOFSTEP]\nrw [zpow_neg, inv_nonneg, zpow_ofNat]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n✝ : ℤ\nha : 0 ≤ a\nn : ℕ\n⊢ 0 ≤ a ^ (n + 1)\n[PROOFSTEP]\nexact pow_nonneg ha _\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n✝ : ℤ\nha : 0 < a\nn : ℕ\n⊢ 0 < a ^ ↑n\n[PROOFSTEP]\nrw [zpow_ofNat]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n✝ : ℤ\nha : 0 < a\nn : ℕ\n⊢ 0 < a ^ n\n[PROOFSTEP]\nexact pow_pos ha _\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n✝ : ℤ\nha : 0 < a\nn : ℕ\n⊢ 0 < a ^ (-↑(n + 1))\n[PROOFSTEP]\nrw [zpow_neg, inv_pos, zpow_ofNat]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n✝ : ℤ\nha : 0 < a\nn : ℕ\n⊢ 0 < a ^ (n + 1)\n[PROOFSTEP]\nexact pow_pos ha _\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhc : 0 < c\n⊢ a ≤ b / c ↔ c * a ≤ b\n[PROOFSTEP]\nrw [mul_comm, le_div_iff hc]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhb : 0 < b\nh : a / b ≤ c\n⊢ a = a / b * b\n[PROOFSTEP]\nrw [div_mul_cancel _ (ne_of_lt hb).symm]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhb : 0 < b\nh : a ≤ c * b\n⊢ c * b / b = c\n[PROOFSTEP]\nrefine' (div_eq_iff (ne_of_gt hb)).mpr rfl\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhb : 0 < b\n⊢ a / b ≤ c ↔ a ≤ b * c\n[PROOFSTEP]\nrw [mul_comm, div_le_iff hb]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhc : 0 < c\n⊢ a < b / c ↔ c * a < b\n[PROOFSTEP]\nrw [mul_comm, lt_div_iff hc]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhc : 0 < c\n⊢ b / c < a ↔ b < c * a\n[PROOFSTEP]\nrw [mul_comm, div_lt_iff hc]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh : 0 < b\n⊢ b⁻¹ * a ≤ c ↔ a ≤ b * c\n[PROOFSTEP]\nrw [inv_eq_one_div, mul_comm, ← div_eq_mul_one_div]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh : 0 < b\n⊢ a / b ≤ c ↔ a ≤ b * c\n[PROOFSTEP]\nexact div_le_iff' h\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh : 0 < b\n⊢ b⁻¹ * a ≤ c ↔ a ≤ c * b\n[PROOFSTEP]\nrw [inv_mul_le_iff h, mul_comm]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh : 0 < b\n⊢ a * b⁻¹ ≤ c ↔ a ≤ b * c\n[PROOFSTEP]\nrw [mul_comm, inv_mul_le_iff h]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh : 0 < b\n⊢ a * b⁻¹ ≤ c ↔ a ≤ c * b\n[PROOFSTEP]\nrw [mul_comm, inv_mul_le_iff' h]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na✝ b c d e : α\nm n : ℤ\na : α\nh : a = 0\n⊢ a / a ≤ 1\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na✝ b c d e : α\nm n : ℤ\na : α\nh : ¬a = 0\n⊢ a / a ≤ 1\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh : 0 < b\n⊢ b⁻¹ * a < c ↔ a < b * c\n[PROOFSTEP]\nrw [inv_eq_one_div, mul_comm, ← div_eq_mul_one_div]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh : 0 < b\n⊢ a / b < c ↔ a < b * c\n[PROOFSTEP]\nexact div_lt_iff' h\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh : 0 < b\n⊢ b⁻¹ * a < c ↔ a < c * b\n[PROOFSTEP]\nrw [inv_mul_lt_iff h, mul_comm]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh : 0 < b\n⊢ a * b⁻¹ < c ↔ a < b * c\n[PROOFSTEP]\nrw [mul_comm, inv_mul_lt_iff h]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh : 0 < b\n⊢ a * b⁻¹ < c ↔ a < c * b\n[PROOFSTEP]\nrw [mul_comm, inv_mul_lt_iff' h]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\n⊢ a⁻¹ ≤ b ↔ 1 ≤ b * a\n[PROOFSTEP]\nrw [inv_eq_one_div]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\n⊢ 1 / a ≤ b ↔ 1 ≤ b * a\n[PROOFSTEP]\nexact div_le_iff ha\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\n⊢ a⁻¹ ≤ b ↔ 1 ≤ a * b\n[PROOFSTEP]\nrw [inv_eq_one_div]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\n⊢ 1 / a ≤ b ↔ 1 ≤ a * b\n[PROOFSTEP]\nexact div_le_iff' ha\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\n⊢ a⁻¹ < b ↔ 1 < b * a\n[PROOFSTEP]\nrw [inv_eq_one_div]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\n⊢ 1 / a < b ↔ 1 < b * a\n[PROOFSTEP]\nexact div_lt_iff ha\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\n⊢ a⁻¹ < b ↔ 1 < a * b\n[PROOFSTEP]\nrw [inv_eq_one_div]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\n⊢ 1 / a < b ↔ 1 < a * b\n[PROOFSTEP]\nexact div_lt_iff' ha\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhb : 0 ≤ b\nhc : 0 ≤ c\nh : a ≤ c * b\n⊢ a / b ≤ c\n[PROOFSTEP]\nrcases eq_or_lt_of_le hb with (rfl | hb')\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na c d e : α\nm n : ℤ\nhc : 0 ≤ c\nhb : 0 ≤ 0\nh : a ≤ c * 0\n⊢ a / 0 ≤ c\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhb : 0 ≤ b\nhc : 0 ≤ c\nh : a ≤ c * b\nhb' : 0 < b\n⊢ a / b ≤ c\n[PROOFSTEP]\nsimp [hc]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhb : 0 ≤ b\nhc : 0 ≤ c\nh : a ≤ c * b\nhb' : 0 < b\n⊢ a / b ≤ c\n[PROOFSTEP]\nrwa [div_le_iff hb']\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhb : 0 ≤ b\nhc : 0 ≤ c\nh : a ≤ b / c\n⊢ a * c ≤ b\n[PROOFSTEP]\nobtain rfl | hc := hc.eq_or_lt\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b d e : α\nm n : ℤ\nhb : 0 ≤ b\nhc : 0 ≤ 0\nh : a ≤ b / 0\n⊢ a * 0 ≤ b\n[PROOFSTEP]\nsimpa using hb\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhb : 0 ≤ b\nhc✝ : 0 ≤ c\nh : a ≤ b / c\nhc : 0 < c\n⊢ a * c ≤ b\n[PROOFSTEP]\nrwa [le_div_iff hc] at h \n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh : a ≤ b\nhb : 0 ≤ b\n⊢ a ≤ 1 * b\n[PROOFSTEP]\nrwa [one_mul]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\nh : a ≤ b\n⊢ b⁻¹ ≤ a⁻¹\n[PROOFSTEP]\nrwa [← one_div a, le_div_iff' ha, ← div_eq_mul_inv, div_le_iff (ha.trans_le h), one_mul]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\nhb : 0 < b\n⊢ a⁻¹ ≤ b⁻¹ ↔ b ≤ a\n[PROOFSTEP]\nrw [← one_div, div_le_iff ha, ← div_eq_inv_mul, le_div_iff hb, one_mul]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\nhb : 0 < b\n⊢ a⁻¹ ≤ b ↔ b⁻¹ ≤ a\n[PROOFSTEP]\nrw [← inv_le_inv hb (inv_pos.2 ha), inv_inv]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\nhb : 0 < b\n⊢ a ≤ b⁻¹ ↔ b ≤ a⁻¹\n[PROOFSTEP]\nrw [← inv_le_inv (inv_pos.2 hb) ha, inv_inv]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 1 < a\n⊢ a⁻¹ < 1\n[PROOFSTEP]\nrwa [inv_lt (zero_lt_one.trans ha) zero_lt_one, inv_one]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh₁ : 0 < a\nh₂ : a < 1\n⊢ 1 < a⁻¹\n[PROOFSTEP]\nrwa [lt_inv (@zero_lt_one α _ _ _ _ _) h₁, inv_one]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 1 ≤ a\n⊢ a⁻¹ ≤ 1\n[PROOFSTEP]\nrwa [inv_le (zero_lt_one.trans_le ha) zero_lt_one, inv_one]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh₁ : 0 < a\nh₂ : a ≤ 1\n⊢ 1 ≤ a⁻¹\n[PROOFSTEP]\nrwa [le_inv (@zero_lt_one α _ _ _ _ _) h₁, inv_one]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\n⊢ a⁻¹ < 1 ↔ a ≤ 0 ∨ 1 < a\n[PROOFSTEP]\ncases' le_or_lt a 0 with ha ha\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : a ≤ 0\n⊢ a⁻¹ < 1 ↔ a ≤ 0 ∨ 1 < a\n[PROOFSTEP]\nsimp [ha, (inv_nonpos.2 ha).trans_lt zero_lt_one]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\n⊢ a⁻¹ < 1 ↔ a ≤ 0 ∨ 1 < a\n[PROOFSTEP]\nsimp only [ha.not_le, false_or_iff, inv_lt_one_iff_of_pos ha]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\n⊢ a⁻¹ ≤ 1 ↔ a ≤ 0 ∨ 1 ≤ a\n[PROOFSTEP]\nrcases em (a = 1) with (rfl | ha)\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\nb c d e : α\nm n : ℤ\n⊢ 1⁻¹ ≤ 1 ↔ 1 ≤ 0 ∨ 1 ≤ 1\n[PROOFSTEP]\nsimp [le_rfl]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : ¬a = 1\n⊢ a⁻¹ ≤ 1 ↔ a ≤ 0 ∨ 1 ≤ a\n[PROOFSTEP]\nsimp only [Ne.le_iff_lt (Ne.symm ha), Ne.le_iff_lt (mt inv_eq_one.1 ha), inv_lt_one_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhc : 0 ≤ c\nh : a ≤ b\n⊢ a / c ≤ b / c\n[PROOFSTEP]\nrw [div_eq_mul_one_div a c, div_eq_mul_one_div b c]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhc : 0 ≤ c\nh : a ≤ b\n⊢ a * (1 / c) ≤ b * (1 / c)\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_right h (one_div_nonneg.2 hc)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 ≤ a\nhc : 0 < c\nh : c ≤ b\n⊢ a / b ≤ a / c\n[PROOFSTEP]\nrw [div_eq_mul_inv, div_eq_mul_inv]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 ≤ a\nhc : 0 < c\nh : c ≤ b\n⊢ a * b⁻¹ ≤ a * c⁻¹\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_left ((inv_le_inv (hc.trans_le h) hc).mpr h) ha\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhc : 0 < c\nh : a < b\n⊢ a / c < b / c\n[PROOFSTEP]\nrw [div_eq_mul_one_div a c, div_eq_mul_one_div b c]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhc : 0 < c\nh : a < b\n⊢ a * (1 / c) < b * (1 / c)\n[PROOFSTEP]\nexact mul_lt_mul_of_pos_right h (one_div_pos.2 hc)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\nhb : 0 < b\nhc : 0 < c\n⊢ a / b < a / c ↔ c < b\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, mul_lt_mul_left ha, inv_lt_inv hb hc]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nb0 : 0 < b\nd0 : 0 < d\n⊢ a / b < c / d ↔ a * d < c * b\n[PROOFSTEP]\nrw [lt_div_iff d0, div_mul_eq_mul_div, div_lt_iff b0]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nb0 : 0 < b\nd0 : 0 < d\n⊢ a / b ≤ c / d ↔ a * d ≤ c * b\n[PROOFSTEP]\nrw [le_div_iff d0, div_mul_eq_mul_div, div_le_iff b0]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhc : 0 ≤ c\nhac : a ≤ c\nhd : 0 < d\nhbd : d ≤ b\n⊢ a / b ≤ c / d\n[PROOFSTEP]\nrw [div_le_div_iff (hd.trans_le hbd) hd]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhc : 0 ≤ c\nhac : a ≤ c\nhd : 0 < d\nhbd : d ≤ b\n⊢ a * d ≤ c * b\n[PROOFSTEP]\nexact mul_le_mul hac hbd hd.le hc\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 ≤ a\nhb : 1 ≤ b\n⊢ a / b ≤ a\n[PROOFSTEP]\nsimpa only [div_one] using div_le_div_of_le_left ha zero_lt_one hb\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\nhb : 1 < b\n⊢ a / b < a\n[PROOFSTEP]\nsimpa only [div_one] using div_lt_div_of_lt_left ha zero_lt_one hb\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 ≤ a\nhb₀ : 0 < b\nhb₁ : b ≤ 1\n⊢ a ≤ a / b\n[PROOFSTEP]\nsimpa only [div_one] using div_le_div_of_le_left ha hb₀ hb₁\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhb : 0 < b\n⊢ 1 ≤ a / b ↔ b ≤ a\n[PROOFSTEP]\nrw [le_div_iff hb, one_mul]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhb : 0 < b\n⊢ a / b ≤ 1 ↔ a ≤ b\n[PROOFSTEP]\nrw [div_le_iff hb, one_mul]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhb : 0 < b\n⊢ 1 < a / b ↔ b < a\n[PROOFSTEP]\nrw [lt_div_iff hb, one_mul]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nhb : 0 < b\n⊢ a / b < 1 ↔ a < b\n[PROOFSTEP]\nrw [div_lt_iff hb, one_mul]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\nhb : 0 < b\n⊢ 1 / a ≤ b ↔ 1 / b ≤ a\n[PROOFSTEP]\nsimpa using inv_le ha hb\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\nhb : 0 < b\n⊢ 1 / a < b ↔ 1 / b < a\n[PROOFSTEP]\nsimpa using inv_lt ha hb\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\nhb : 0 < b\n⊢ a ≤ 1 / b ↔ b ≤ 1 / a\n[PROOFSTEP]\nsimpa using le_inv ha hb\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\nhb : 0 < b\n⊢ a < 1 / b ↔ b < 1 / a\n[PROOFSTEP]\nsimpa using lt_inv ha hb\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\nh : a ≤ b\n⊢ 1 / b ≤ 1 / a\n[PROOFSTEP]\nsimpa using inv_le_inv_of_le ha h\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 0 < a\nh : a < b\n⊢ 1 / b < 1 / a\n[PROOFSTEP]\nrwa [lt_div_iff' ha, ← div_eq_mul_one_div, div_lt_one (ha.trans h)]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh1 : 0 < a\nh2 : a < 1\n⊢ 1 < 1 / a\n[PROOFSTEP]\nrwa [lt_one_div (@zero_lt_one α _ _ _ _ _) h1, one_div_one]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh1 : 0 < a\nh2 : a ≤ 1\n⊢ 1 ≤ 1 / a\n[PROOFSTEP]\nrwa [le_one_div (@zero_lt_one α _ _ _ _ _) h1, one_div_one]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na✝ b c d e : α\nm n : ℤ\na : α\n⊢ a / 2 + a / 2 = a\n[PROOFSTEP]\nrw [div_add_div_same, ← two_mul, mul_div_cancel_left a two_ne_zero]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na✝ b c d e : α\nm n : ℤ\na : α\n⊢ (a + a) / 2 = a\n[PROOFSTEP]\nrw [← mul_two, mul_div_cancel a two_ne_zero]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\n⊢ a / 2 ≤ a ↔ 0 ≤ a\n[PROOFSTEP]\nrw [div_le_iff (zero_lt_two' α), mul_two, le_add_iff_nonneg_left]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\n⊢ a / 2 < a ↔ 0 < a\n[PROOFSTEP]\nrw [div_lt_iff (zero_lt_two' α), mul_two, lt_add_iff_pos_left]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\n⊢ a < (a + b) / 2 ↔ a < b\n[PROOFSTEP]\nsimp [lt_div_iff, mul_two]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\n⊢ (a + b) / 2 < b ↔ a < b\n[PROOFSTEP]\nsimp [div_lt_iff, mul_two]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na✝ b c d e : α\nm n : ℤ\na : α\n⊢ a / 3 + a / 3 + a / 3 = a\n[PROOFSTEP]\nrw [div_add_div_same, div_add_div_same, ← two_mul, ← add_one_mul 2 a, two_add_one_eq_three,\n mul_div_cancel_left a three_ne_zero]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh : a * (b / c) ≤ d\nhc : 0 < c\n⊢ b * a ≤ d * c\n[PROOFSTEP]\nrw [← mul_div_assoc] at h \n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh : a * b / c ≤ d\nhc : 0 < c\n⊢ b * a ≤ d * c\n[PROOFSTEP]\nrwa [mul_comm b, ← div_le_iff hc]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh : a / b ≤ c / d\nhe : 0 ≤ e\n⊢ a / (b * e) ≤ c / (d * e)\n[PROOFSTEP]\nrw [div_mul_eq_div_mul_one_div, div_mul_eq_div_mul_one_div]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh : a / b ≤ c / d\nhe : 0 ≤ e\n⊢ a / b * (1 / e) ≤ c / d * (1 / e)\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_right h (one_div_nonneg.2 he)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na✝ b✝ c d e : α\nm n : ℤ\na : α\nh : 0 < a\nb : α\n⊢ ∃ c, 0 < c ∧ b * c < a\n[PROOFSTEP]\nhave : 0 < a / max (b + 1) 1 := div_pos h (lt_max_iff.2 (Or.inr zero_lt_one))\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na✝ b✝ c d e : α\nm n : ℤ\na : α\nh : 0 < a\nb : α\nthis : 0 < a / max (b + 1) 1\n⊢ ∃ c, 0 < c ∧ b * c < a\n[PROOFSTEP]\nrefine' ⟨a / max (b + 1) 1, this, _⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na✝ b✝ c d e : α\nm n : ℤ\na : α\nh : 0 < a\nb : α\nthis : 0 < a / max (b + 1) 1\n⊢ b * (a / max (b + 1) 1) < a\n[PROOFSTEP]\nrw [← lt_div_iff this, div_div_cancel' h.ne']\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na✝ b✝ c d e : α\nm n : ℤ\na : α\nh : 0 < a\nb : α\nthis : 0 < a / max (b + 1) 1\n⊢ b < max (b + 1) 1\n[PROOFSTEP]\nexact lt_max_iff.2 (Or.inl <| lt_add_one _)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na✝ b✝ c✝ d e : α\nm n : ℤ\na : α\nh : 0 < a\nb c : α\nhc₀ : 0 < c\nhc : b * c < a\n⊢ b < c⁻¹ * a\n[PROOFSTEP]\nrwa [← div_eq_inv_mul, lt_div_iff hc₀]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ✝ : Type u_3\ninst✝¹ : LinearOrderedSemifield α\na b c✝ d e : α\nm n : ℤ\nβ : Type u_4\ninst✝ : Preorder β\nf : β → α\nhf : Monotone f\nc : α\nhc : 0 ≤ c\n⊢ Monotone fun x => f x / c\n[PROOFSTEP]\nhaveI := @LinearOrder.decidableLE α _\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ✝ : Type u_3\ninst✝¹ : LinearOrderedSemifield α\na b c✝ d e : α\nm n : ℤ\nβ : Type u_4\ninst✝ : Preorder β\nf : β → α\nhf : Monotone f\nc : α\nhc : 0 ≤ c\nthis : DecidableRel fun x x_1 => x ≤ x_1\n⊢ Monotone fun x => f x / c\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using (monotone_mul_right_of_nonneg (inv_nonneg.2 hc)).comp hf\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ✝ : Type u_3\ninst✝¹ : LinearOrderedSemifield α\na b c✝ d e : α\nm n : ℤ\nβ : Type u_4\ninst✝ : Preorder β\nf : β → α\nhf : StrictMono f\nc : α\nhc : 0 < c\n⊢ StrictMono fun x => f x / c\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using hf.mul_const (inv_pos.2 hc)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm✝ n✝ : ℤ\na1 : 1 ≤ a\nm n : ℕ\nmn : m ≤ n\n⊢ 1 / a ^ n ≤ 1 / a ^ m\n[PROOFSTEP]\nrefine' (one_div_le_one_div _ _).mpr (pow_le_pow a1 mn)\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm✝ n✝ : ℤ\na1 : 1 ≤ a\nm n : ℕ\nmn : m ≤ n\n⊢ 0 < a ^ n\n[PROOFSTEP]\nexact pow_pos (zero_lt_one.trans_le a1) _\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm✝ n✝ : ℤ\na1 : 1 ≤ a\nm n : ℕ\nmn : m ≤ n\n⊢ 0 < a ^ m\n[PROOFSTEP]\nexact pow_pos (zero_lt_one.trans_le a1) _\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm✝ n✝ : ℤ\na1 : 1 < a\nm n : ℕ\nmn : m < n\n⊢ 1 / a ^ n < 1 / a ^ m\n[PROOFSTEP]\nrefine' (one_div_lt_one_div _ _).mpr (pow_lt_pow a1 mn)\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm✝ n✝ : ℤ\na1 : 1 < a\nm n : ℕ\nmn : m < n\n⊢ 0 < a ^ n\n[PROOFSTEP]\nexact pow_pos (zero_lt_one.trans a1) _\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm✝ n✝ : ℤ\na1 : 1 < a\nm n : ℕ\nmn : m < n\n⊢ 0 < a ^ m\n[PROOFSTEP]\nexact pow_pos (zero_lt_one.trans a1) _\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm✝ n✝ : ℤ\na1 : 1 ≤ a\nm n : ℕ\nmn : m ≤ n\n⊢ (a ^ n)⁻¹ ≤ (a ^ m)⁻¹\n[PROOFSTEP]\nconvert one_div_pow_le_one_div_pow_of_le a1 mn using 1\n[GOAL]\ncase h.e'_3\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm✝ n✝ : ℤ\na1 : 1 ≤ a\nm n : ℕ\nmn : m ≤ n\n⊢ (a ^ n)⁻¹ = 1 / a ^ n\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_4\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm✝ n✝ : ℤ\na1 : 1 ≤ a\nm n : ℕ\nmn : m ≤ n\n⊢ (a ^ m)⁻¹ = 1 / a ^ m\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm✝ n✝ : ℤ\na1 : 1 < a\nm n : ℕ\nmn : m < n\n⊢ (a ^ n)⁻¹ < (a ^ m)⁻¹\n[PROOFSTEP]\nconvert one_div_pow_lt_one_div_pow_of_lt a1 mn using 1\n[GOAL]\ncase h.e'_3\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm✝ n✝ : ℤ\na1 : 1 < a\nm n : ℕ\nmn : m < n\n⊢ (a ^ n)⁻¹ = 1 / a ^ n\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_4\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm✝ n✝ : ℤ\na1 : 1 < a\nm n : ℕ\nmn : m < n\n⊢ (a ^ m)⁻¹ = 1 / a ^ m\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\ns : Set α\nha : 0 ≤ a\nhs : IsGLB s b\n⊢ IsGLB ((fun b => a * b) '' s) (a * b)\n[PROOFSTEP]\nrcases lt_or_eq_of_le ha with (ha | rfl)\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\ns : Set α\nha✝ : 0 ≤ a\nhs : IsGLB s b\nha : 0 < a\n⊢ IsGLB ((fun b => a * b) '' s) (a * b)\n[PROOFSTEP]\nexact (OrderIso.mulLeft₀ _ ha).isGLB_image'.2 hs\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\nb c d e : α\nm n : ℤ\ns : Set α\nhs : IsGLB s b\nha : 0 ≤ 0\n⊢ IsGLB ((fun b => 0 * b) '' s) (0 * b)\n[PROOFSTEP]\nsimp_rw [zero_mul]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\nb c d e : α\nm n : ℤ\ns : Set α\nhs : IsGLB s b\nha : 0 ≤ 0\n⊢ IsGLB ((fun a => 0) '' s) 0\n[PROOFSTEP]\nrw [hs.nonempty.image_const]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\nb c d e : α\nm n : ℤ\ns : Set α\nhs : IsGLB s b\nha : 0 ≤ 0\n⊢ IsGLB {0} 0\n[PROOFSTEP]\nexact isGLB_singleton\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\ns : Set α\nha : 0 ≤ a\nhs : IsGLB s b\n⊢ IsGLB ((fun b => b * a) '' s) (b * a)\n[PROOFSTEP]\nsimpa [mul_comm] using hs.mul_left ha\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\n⊢ 0 < a / b ↔ 0 < a ∧ 0 < b ∨ a < 0 ∧ b < 0\n[PROOFSTEP]\nsimp only [division_def, mul_pos_iff, inv_pos, inv_lt_zero]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\n⊢ a / b < 0 ↔ 0 < a ∧ b < 0 ∨ a < 0 ∧ 0 < b\n[PROOFSTEP]\nsimp [division_def, mul_neg_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\n⊢ 0 ≤ a / b ↔ 0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0\n[PROOFSTEP]\nsimp [division_def, mul_nonneg_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\n⊢ a / b ≤ 0 ↔ 0 ≤ a ∧ b ≤ 0 ∨ a ≤ 0 ∧ 0 ≤ b\n[PROOFSTEP]\nsimp [division_def, mul_nonpos_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhc : c < 0\n⊢ b / c ≤ a ↔ c * a ≤ b\n[PROOFSTEP]\nrw [mul_comm, div_le_iff_of_neg hc]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhc : c < 0\n⊢ a ≤ b / c ↔ b ≤ a * c\n[PROOFSTEP]\nrw [← neg_neg c, mul_neg, div_neg, le_neg, div_le_iff (neg_pos.2 hc), neg_mul]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhc : c < 0\n⊢ a ≤ b / c ↔ b ≤ c * a\n[PROOFSTEP]\nrw [mul_comm, le_div_iff_of_neg hc]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhc : c < 0\n⊢ b / c < a ↔ c * a < b\n[PROOFSTEP]\nrw [mul_comm, div_lt_iff_of_neg hc]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhc : c < 0\n⊢ a < b / c ↔ b < c * a\n[PROOFSTEP]\nrw [mul_comm, lt_div_iff_of_neg hc]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nh : b ≤ a\nhb : b ≤ 0\n⊢ a / b ≤ 1\n[PROOFSTEP]\nsimpa only [neg_div_neg_eq] using div_le_one_of_le (neg_le_neg h) (neg_nonneg_of_nonpos hb)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nha : a < 0\nhb : b < 0\n⊢ a⁻¹ ≤ b⁻¹ ↔ b ≤ a\n[PROOFSTEP]\nrw [← one_div, div_le_iff_of_neg ha, ← div_eq_inv_mul, div_le_iff_of_neg hb, one_mul]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nha : a < 0\nhb : b < 0\n⊢ a⁻¹ ≤ b ↔ b⁻¹ ≤ a\n[PROOFSTEP]\nrw [← inv_le_inv_of_neg hb (inv_lt_zero.2 ha), inv_inv]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nha : a < 0\nhb : b < 0\n⊢ a ≤ b⁻¹ ↔ b ≤ a⁻¹\n[PROOFSTEP]\nrw [← inv_le_inv_of_neg (inv_lt_zero.2 hb) ha, inv_inv]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhc : c ≤ 0\nh : b ≤ a\n⊢ a / c ≤ b / c\n[PROOFSTEP]\nrw [div_eq_mul_one_div a c, div_eq_mul_one_div b c]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhc : c ≤ 0\nh : b ≤ a\n⊢ a * (1 / c) ≤ b * (1 / c)\n[PROOFSTEP]\nexact mul_le_mul_of_nonpos_right h (one_div_nonpos.2 hc)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhc : c < 0\nh : b < a\n⊢ a / c < b / c\n[PROOFSTEP]\nrw [div_eq_mul_one_div a c, div_eq_mul_one_div b c]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhc : c < 0\nh : b < a\n⊢ a * (1 / c) < b * (1 / c)\n[PROOFSTEP]\nexact mul_lt_mul_of_neg_right h (one_div_neg.2 hc)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhb : b < 0\n⊢ 1 ≤ a / b ↔ a ≤ b\n[PROOFSTEP]\nrw [le_div_iff_of_neg hb, one_mul]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhb : b < 0\n⊢ a / b ≤ 1 ↔ b ≤ a\n[PROOFSTEP]\nrw [div_le_iff_of_neg hb, one_mul]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhb : b < 0\n⊢ 1 < a / b ↔ a < b\n[PROOFSTEP]\nrw [lt_div_iff_of_neg hb, one_mul]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhb : b < 0\n⊢ a / b < 1 ↔ b < a\n[PROOFSTEP]\nrw [div_lt_iff_of_neg hb, one_mul]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nha : a < 0\nhb : b < 0\n⊢ 1 / a ≤ b ↔ 1 / b ≤ a\n[PROOFSTEP]\nsimpa using inv_le_of_neg ha hb\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nha : a < 0\nhb : b < 0\n⊢ 1 / a < b ↔ 1 / b < a\n[PROOFSTEP]\nsimpa using inv_lt_of_neg ha hb\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nha : a < 0\nhb : b < 0\n⊢ a ≤ 1 / b ↔ b ≤ 1 / a\n[PROOFSTEP]\nsimpa using le_inv_of_neg ha hb\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nha : a < 0\nhb : b < 0\n⊢ a < 1 / b ↔ b < 1 / a\n[PROOFSTEP]\nsimpa using lt_inv_of_neg ha hb\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\n⊢ 1 < a / b ↔ 0 < b ∧ b < a ∨ b < 0 ∧ a < b\n[PROOFSTEP]\nrcases lt_trichotomy b 0 with (hb | rfl | hb)\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhb : b < 0\n⊢ 1 < a / b ↔ 0 < b ∧ b < a ∨ b < 0 ∧ a < b\n[PROOFSTEP]\nsimp [hb, hb.not_lt, one_lt_div_of_neg]\n[GOAL]\ncase inr.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na c d : α\nn : ℤ\n⊢ 1 < a / 0 ↔ 0 < 0 ∧ 0 < a ∨ 0 < 0 ∧ a < 0\n[PROOFSTEP]\nsimp [lt_irrefl, zero_le_one]\n[GOAL]\ncase inr.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhb : 0 < b\n⊢ 1 < a / b ↔ 0 < b ∧ b < a ∨ b < 0 ∧ a < b\n[PROOFSTEP]\nsimp [hb, hb.not_lt, one_lt_div]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\n⊢ 1 ≤ a / b ↔ 0 < b ∧ b ≤ a ∨ b < 0 ∧ a ≤ b\n[PROOFSTEP]\nrcases lt_trichotomy b 0 with (hb | rfl | hb)\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhb : b < 0\n⊢ 1 ≤ a / b ↔ 0 < b ∧ b ≤ a ∨ b < 0 ∧ a ≤ b\n[PROOFSTEP]\nsimp [hb, hb.not_lt, one_le_div_of_neg]\n[GOAL]\ncase inr.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na c d : α\nn : ℤ\n⊢ 1 ≤ a / 0 ↔ 0 < 0 ∧ 0 ≤ a ∨ 0 < 0 ∧ a ≤ 0\n[PROOFSTEP]\nsimp [lt_irrefl, zero_lt_one.not_le, zero_lt_one]\n[GOAL]\ncase inr.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhb : 0 < b\n⊢ 1 ≤ a / b ↔ 0 < b ∧ b ≤ a ∨ b < 0 ∧ a ≤ b\n[PROOFSTEP]\nsimp [hb, hb.not_lt, one_le_div]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\n⊢ a / b < 1 ↔ 0 < b ∧ a < b ∨ b = 0 ∨ b < 0 ∧ b < a\n[PROOFSTEP]\nrcases lt_trichotomy b 0 with (hb | rfl | hb)\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhb : b < 0\n⊢ a / b < 1 ↔ 0 < b ∧ a < b ∨ b = 0 ∨ b < 0 ∧ b < a\n[PROOFSTEP]\nsimp [hb, hb.not_lt, hb.ne, div_lt_one_of_neg]\n[GOAL]\ncase inr.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na c d : α\nn : ℤ\n⊢ a / 0 < 1 ↔ 0 < 0 ∧ a < 0 ∨ 0 = 0 ∨ 0 < 0 ∧ 0 < a\n[PROOFSTEP]\nsimp [zero_lt_one]\n[GOAL]\ncase inr.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhb : 0 < b\n⊢ a / b < 1 ↔ 0 < b ∧ a < b ∨ b = 0 ∨ b < 0 ∧ b < a\n[PROOFSTEP]\nsimp [hb, hb.not_lt, div_lt_one, hb.ne.symm]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\n⊢ a / b ≤ 1 ↔ 0 < b ∧ a ≤ b ∨ b = 0 ∨ b < 0 ∧ b ≤ a\n[PROOFSTEP]\nrcases lt_trichotomy b 0 with (hb | rfl | hb)\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhb : b < 0\n⊢ a / b ≤ 1 ↔ 0 < b ∧ a ≤ b ∨ b = 0 ∨ b < 0 ∧ b ≤ a\n[PROOFSTEP]\nsimp [hb, hb.not_lt, hb.ne, div_le_one_of_neg]\n[GOAL]\ncase inr.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na c d : α\nn : ℤ\n⊢ a / 0 ≤ 1 ↔ 0 < 0 ∧ a ≤ 0 ∨ 0 = 0 ∨ 0 < 0 ∧ 0 ≤ a\n[PROOFSTEP]\nsimp [zero_le_one]\n[GOAL]\ncase inr.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhb : 0 < b\n⊢ a / b ≤ 1 ↔ 0 < b ∧ a ≤ b ∨ b = 0 ∨ b < 0 ∧ b ≤ a\n[PROOFSTEP]\nsimp [hb, hb.not_lt, div_le_one, hb.ne.symm]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhb : b < 0\nh : a ≤ b\n⊢ 1 / b ≤ 1 / a\n[PROOFSTEP]\nrwa [div_le_iff_of_neg' hb, ← div_eq_mul_one_div, div_le_one_of_neg (h.trans_lt hb)]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhb : b < 0\nh : a < b\n⊢ 1 / b < 1 / a\n[PROOFSTEP]\nrwa [div_lt_iff_of_neg' hb, ← div_eq_mul_one_div, div_lt_one_of_neg (h.trans hb)]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nha : a < 0\nhb : b < 0\n⊢ 1 / a ≤ 1 / b ↔ b ≤ a\n[PROOFSTEP]\nsimpa [one_div] using inv_le_inv_of_neg ha hb\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nh1 : a < 0\nh2 : -1 < a\nthis : 1 / a < 1 / -1\n⊢ 1 / a < -1\n[PROOFSTEP]\nrwa [one_div_neg_one_eq_neg_one] at this \n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nh1 : a < 0\nh2 : -1 ≤ a\nthis : 1 / a ≤ 1 / -1\n⊢ 1 / a ≤ -1\n[PROOFSTEP]\nrwa [one_div_neg_one_eq_neg_one] at this \n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na✝ b c d : α\nn : ℤ\na : α\n⊢ a - a / 2 = a / 2\n[PROOFSTEP]\nsuffices a / 2 + a / 2 - a / 2 = a / 2 by rwa [add_halves] at this \n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na✝ b c d : α\nn : ℤ\na : α\nthis : a / 2 + a / 2 - a / 2 = a / 2\n⊢ a - a / 2 = a / 2\n[PROOFSTEP]\nrwa [add_halves] at this \n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na✝ b c d : α\nn : ℤ\na : α\n⊢ a / 2 + a / 2 - a / 2 = a / 2\n[PROOFSTEP]\nrw [add_sub_cancel]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na✝ b c d : α\nn : ℤ\na : α\n⊢ a / 2 - a = -(a / 2)\n[PROOFSTEP]\nsuffices a / 2 - (a / 2 + a / 2) = -(a / 2) by rwa [add_halves] at this \n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na✝ b c d : α\nn : ℤ\na : α\nthis : a / 2 - (a / 2 + a / 2) = -(a / 2)\n⊢ a / 2 - a = -(a / 2)\n[PROOFSTEP]\nrwa [add_halves] at this \n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na✝ b c d : α\nn : ℤ\na : α\n⊢ a / 2 - (a / 2 + a / 2) = -(a / 2)\n[PROOFSTEP]\nrw [sub_add_eq_sub_sub, sub_self, zero_sub]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nh : a < b\n⊢ a + (b - a) / 2 < b\n[PROOFSTEP]\nrwa [← div_sub_div_same, sub_eq_add_neg, add_comm (b / 2), ← add_assoc, ← sub_eq_add_neg, ← lt_sub_iff_add_lt,\n sub_self_div_two, sub_self_div_two, div_lt_div_right (zero_lt_two' α)]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\na2 : 2 ≤ a\n⊢ (1 - 1 / a)⁻¹ ≤ 2\n[PROOFSTEP]\nrefine'\n (inv_le_inv_of_le (inv_pos.2 <| zero_lt_two' α) _).trans_eq\n (inv_inv (2 : α))\n -- move `1 / a` to the left and `2⁻¹` to the right.\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\na2 : 2 ≤ a\n⊢ 2⁻¹ ≤ 1 - 1 / a\n[PROOFSTEP]\nrw [le_sub_iff_add_le, add_comm, ← le_sub_iff_add_le]\n -- take inverses on both sides and use the assumption `2 ≤ a`.\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\na2 : 2 ≤ a\n⊢ 1 / a ≤ 1 - 2⁻¹\n[PROOFSTEP]\nconvert (one_div a).le.trans (inv_le_inv_of_le zero_lt_two a2) using 1\n -- show `1 - 1 / 2 = 1 / 2`.\n[GOAL]\ncase h.e'_4\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\na2 : 2 ≤ a\n⊢ 1 - 2⁻¹ = 2⁻¹\n[PROOFSTEP]\nrw [sub_eq_iff_eq_add, ← two_mul, mul_inv_cancel two_ne_zero]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\ns : Set α\nha : 0 ≤ a\nhs : IsLUB s b\n⊢ IsLUB ((fun b => a * b) '' s) (a * b)\n[PROOFSTEP]\nrcases lt_or_eq_of_le ha with (ha | rfl)\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\ns : Set α\nha✝ : 0 ≤ a\nhs : IsLUB s b\nha : 0 < a\n⊢ IsLUB ((fun b => a * b) '' s) (a * b)\n[PROOFSTEP]\nexact (OrderIso.mulLeft₀ _ ha).isLUB_image'.2 hs\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\nb c d : α\nn : ℤ\ns : Set α\nhs : IsLUB s b\nha : 0 ≤ 0\n⊢ IsLUB ((fun b => 0 * b) '' s) (0 * b)\n[PROOFSTEP]\nsimp_rw [zero_mul]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\nb c d : α\nn : ℤ\ns : Set α\nhs : IsLUB s b\nha : 0 ≤ 0\n⊢ IsLUB ((fun a => 0) '' s) 0\n[PROOFSTEP]\nrw [hs.nonempty.image_const]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\nb c d : α\nn : ℤ\ns : Set α\nhs : IsLUB s b\nha : 0 ≤ 0\n⊢ IsLUB {0} 0\n[PROOFSTEP]\nexact isLUB_singleton\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\ns : Set α\nha : 0 ≤ a\nhs : IsLUB s b\n⊢ IsLUB ((fun b => b * a) '' s) (b * a)\n[PROOFSTEP]\nsimpa [mul_comm] using hs.mul_left ha\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhc : c ≠ 0\nhd : d ≠ 0\n⊢ (a * d - b * c) / (c * d) < 0 ↔ a / c < b / d\n[PROOFSTEP]\nrw [mul_comm b c, ← div_sub_div _ _ hc hd, sub_lt_zero]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhc : c ≠ 0\nhd : d ≠ 0\n⊢ (a * d - b * c) / (c * d) ≤ 0 ↔ a / c ≤ b / d\n[PROOFSTEP]\nrw [mul_comm b c, ← div_sub_div _ _ hc hd, sub_nonpos]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nh : ∀ (ε : α), ε > 0 → b - ε ≤ a\n⊢ b ≤ a\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nh : a < b\n⊢ ∃ ε, ε > 0 ∧ a < b - ε\n[PROOFSTEP]\nsimpa only [@and_comm ((0 : α) < _), lt_sub_iff_add_lt, gt_iff_lt] using exists_add_lt_and_pos_of_lt h\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\na0 : 0 ≤ a\nb0 : 0 ≤ b\nh : a = -b\n⊢ a = b\n[PROOFSTEP]\nsubst a\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\nb c d : α\nn : ℤ\nb0 : 0 ≤ b\na0 : 0 ≤ -b\n⊢ -b = b\n[PROOFSTEP]\nhave : b = 0 := le_antisymm (neg_nonneg.1 a0) b0\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\nb c d : α\nn : ℤ\nb0 : 0 ≤ b\na0 : 0 ≤ -b\nthis : b = 0\n⊢ -b = b\n[PROOFSTEP]\nrw [this, neg_zero]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\na✝ b c d : α\nn : ℤ\na : α\n⊢ |1 / a| = 1 / |a|\n[PROOFSTEP]\nrw [abs_div, abs_one]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Field.Basic", "llama_tokens": 22625, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8031737963569014, "lm_q2_score": 0.7341195327172402, "lm_q1q2_score": 0.5896255720722603}} {"text": "[GOAL]\n⊢ lift 𝔠 = 𝔠\n[PROOFSTEP]\nrw [← two_power_aleph0, lift_two_power, lift_aleph0, two_power_aleph0]\n[GOAL]\nc : Cardinal.{u}\n⊢ 𝔠 ≤ lift c ↔ 𝔠 ≤ c\n[PROOFSTEP]\nrw [← lift_continuum.{u, v}, lift_le]\n[GOAL]\nc : Cardinal.{u}\n⊢ lift c ≤ 𝔠 ↔ c ≤ 𝔠\n[PROOFSTEP]\nrw [← lift_continuum.{u, v}, lift_le]\n[GOAL]\nc : Cardinal.{u}\n⊢ 𝔠 < lift c ↔ 𝔠 < c\n[PROOFSTEP]\nrw [← lift_continuum.{u, v}, lift_lt]\n[GOAL]\nc : Cardinal.{u}\n⊢ lift c < 𝔠 ↔ c < 𝔠\n[PROOFSTEP]\nrw [← lift_continuum.{u, v}, lift_lt]\n[GOAL]\n⊢ beth 1 = 𝔠\n[PROOFSTEP]\nsimpa using beth_succ 0\n[GOAL]\n⊢ #(Set ℕ) = 𝔠\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ aleph 1 ≤ 𝔠\n[PROOFSTEP]\nrw [← succ_aleph0]\n[GOAL]\n⊢ Order.succ ℵ₀ ≤ 𝔠\n[PROOFSTEP]\nexact Order.succ_le_of_lt aleph0_lt_continuum\n[GOAL]\n⊢ 𝔠 ^ ℵ₀ = 𝔠\n[PROOFSTEP]\nrw [← two_power_aleph0, ← power_mul, mul_eq_left le_rfl le_rfl aleph0_ne_zero]\n", "meta": {"mathlib_filename": "Mathlib.SetTheory.Cardinal.Continuum", "llama_tokens": 512, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8991213691605412, "lm_q2_score": 0.6548947357776795, "lm_q1q2_score": 0.5888298514884581}} {"text": "[GOAL]\nα : Type u\nβ✝ : Type u_1\ninst✝³ : OrderedCommMonoid α\nβ : Type u_2\ninst✝² : One β\ninst✝¹ : Mul β\ninst✝ : Pow β ℕ\nf : β → α\nhf : Injective f\none : f 1 = 1\nmul : ∀ (x y : β), f (x * y) = f x * f y\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nsrc✝¹ : PartialOrder β := PartialOrder.lift f hf\nsrc✝ : CommMonoid β := Injective.commMonoid f hf one mul npow\na b : β\nab : a ≤ b\nc : β\n⊢ f (c * a) ≤ f (c * b)\n[PROOFSTEP]\nrw [mul, mul]\n[GOAL]\nα : Type u\nβ✝ : Type u_1\ninst✝³ : OrderedCommMonoid α\nβ : Type u_2\ninst✝² : One β\ninst✝¹ : Mul β\ninst✝ : Pow β ℕ\nf : β → α\nhf : Injective f\none : f 1 = 1\nmul : ∀ (x y : β), f (x * y) = f x * f y\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nsrc✝¹ : PartialOrder β := PartialOrder.lift f hf\nsrc✝ : CommMonoid β := Injective.commMonoid f hf one mul npow\na b : β\nab : a ≤ b\nc : β\n⊢ f c * f a ≤ f c * f b\n[PROOFSTEP]\napply mul_le_mul_left'\n[GOAL]\ncase bc\nα : Type u\nβ✝ : Type u_1\ninst✝³ : OrderedCommMonoid α\nβ : Type u_2\ninst✝² : One β\ninst✝¹ : Mul β\ninst✝ : Pow β ℕ\nf : β → α\nhf : Injective f\none : f 1 = 1\nmul : ∀ (x y : β), f (x * y) = f x * f y\nnpow : ∀ (x : β) (n : ℕ), f (x ^ n) = f x ^ n\nsrc✝¹ : PartialOrder β := PartialOrder.lift f hf\nsrc✝ : CommMonoid β := Injective.commMonoid f hf one mul npow\na b : β\nab : a ≤ b\nc : β\n⊢ f a ≤ f b\n[PROOFSTEP]\nexact ab\n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝⁴ : Mul α\ninst✝³ : LinearOrder α\ninst✝² : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : ContravariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b a0 b0 : α\nha : a0 ≤ a\nhb : b0 ≤ b\nab : a * b ≤ a0 * b0\n⊢ a = a0 ∧ b = b0\n[PROOFSTEP]\nhaveI := Mul.to_covariantClass_right α\n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝⁴ : Mul α\ninst✝³ : LinearOrder α\ninst✝² : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : ContravariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b a0 b0 : α\nha : a0 ≤ a\nhb : b0 ≤ b\nab : a * b ≤ a0 * b0\nthis : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\n⊢ a = a0 ∧ b = b0\n[PROOFSTEP]\nhave ha' : ¬a0 * b0 < a * b → ¬a0 < a := mt (mul_lt_mul_of_lt_of_le · hb)\n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝⁴ : Mul α\ninst✝³ : LinearOrder α\ninst✝² : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : ContravariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b a0 b0 : α\nha : a0 ≤ a\nhb : b0 ≤ b\nab : a * b ≤ a0 * b0\nthis : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nha' : ¬a0 * b0 < a * b → ¬a0 < a\n⊢ a = a0 ∧ b = b0\n[PROOFSTEP]\nhave hb' : ¬a0 * b0 < a * b → ¬b0 < b := mt (mul_lt_mul_of_le_of_lt ha ·)\n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝⁴ : Mul α\ninst✝³ : LinearOrder α\ninst✝² : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : ContravariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b a0 b0 : α\nha : a0 ≤ a\nhb : b0 ≤ b\nab : a * b ≤ a0 * b0\nthis : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nha' : ¬a0 * b0 < a * b → ¬a0 < a\nhb' : ¬a0 * b0 < a * b → ¬b0 < b\n⊢ a = a0 ∧ b = b0\n[PROOFSTEP]\npush_neg at ha' hb' \n[GOAL]\nα : Type u\nβ : Type u_1\ninst✝⁴ : Mul α\ninst✝³ : LinearOrder α\ninst✝² : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : ContravariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b a0 b0 : α\nha : a0 ≤ a\nhb : b0 ≤ b\nab : a * b ≤ a0 * b0\nthis : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nha' : a * b ≤ a0 * b0 → a ≤ a0\nhb' : a * b ≤ a0 * b0 → b ≤ b0\n⊢ a = a0 ∧ b = b0\n[PROOFSTEP]\nexact ⟨ha.antisymm' (ha' ab), hb.antisymm' (hb' ab)⟩\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Monoid.Basic", "llama_tokens": 2163, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8267118068790619, "lm_q2_score": 0.7122321842389469, "lm_q1q2_score": 0.5888107559496006}} {"text": "[GOAL]\n⊢ ∀ (a b c : Game), a + b + c = a + (b + c)\n[PROOFSTEP]\nrintro ⟨x⟩ ⟨y⟩ ⟨z⟩\n[GOAL]\ncase mk.mk.mk\na✝ : Game\nx : PGame\nb✝ : Game\ny : PGame\nc✝ : Game\nz : PGame\n⊢ Quot.mk Setoid.r x + Quot.mk Setoid.r y + Quot.mk Setoid.r z =\n Quot.mk Setoid.r x + (Quot.mk Setoid.r y + Quot.mk Setoid.r z)\n[PROOFSTEP]\nexact Quot.sound add_assoc_equiv\n[GOAL]\n⊢ ∀ (a : Game), 0 + a = a\n[PROOFSTEP]\nrintro ⟨x⟩\n[GOAL]\ncase mk\na✝ : Game\nx : PGame\n⊢ 0 + Quot.mk Setoid.r x = Quot.mk Setoid.r x\n[PROOFSTEP]\nexact Quot.sound (zero_add_equiv x)\n[GOAL]\n⊢ ∀ (a : Game), a + 0 = a\n[PROOFSTEP]\nrintro ⟨x⟩\n[GOAL]\ncase mk\na✝ : Game\nx : PGame\n⊢ Quot.mk Setoid.r x + 0 = Quot.mk Setoid.r x\n[PROOFSTEP]\nexact Quot.sound (add_zero_equiv x)\n[GOAL]\n⊢ ∀ (a : Game), -a + a = 0\n[PROOFSTEP]\nrintro ⟨x⟩\n[GOAL]\ncase mk\na✝ : Game\nx : PGame\n⊢ -Quot.mk Setoid.r x + Quot.mk Setoid.r x = 0\n[PROOFSTEP]\nexact Quot.sound (add_left_neg_equiv x)\n[GOAL]\n⊢ ∀ (a b : Game), a + b = b + a\n[PROOFSTEP]\nrintro ⟨x⟩ ⟨y⟩\n[GOAL]\ncase mk.mk\na✝ : Game\nx : PGame\nb✝ : Game\ny : PGame\n⊢ Quot.mk Setoid.r x + Quot.mk Setoid.r y = Quot.mk Setoid.r y + Quot.mk Setoid.r x\n[PROOFSTEP]\nexact Quot.sound add_comm_equiv\n[GOAL]\n⊢ ∀ (a : Game), a ≤ a\n[PROOFSTEP]\nrintro ⟨x⟩\n[GOAL]\ncase mk\na✝ : Game\nx : PGame\n⊢ Quot.mk Setoid.r x ≤ Quot.mk Setoid.r x\n[PROOFSTEP]\nexact le_refl x\n[GOAL]\n⊢ ∀ (a b c : Game), a ≤ b → b ≤ c → a ≤ c\n[PROOFSTEP]\nrintro ⟨x⟩ ⟨y⟩ ⟨z⟩\n[GOAL]\ncase mk.mk.mk\na✝ : Game\nx : PGame\nb✝ : Game\ny : PGame\nc✝ : Game\nz : PGame\n⊢ Quot.mk Setoid.r x ≤ Quot.mk Setoid.r y →\n Quot.mk Setoid.r y ≤ Quot.mk Setoid.r z → Quot.mk Setoid.r x ≤ Quot.mk Setoid.r z\n[PROOFSTEP]\nexact @le_trans _ _ x y z\n[GOAL]\n⊢ ∀ (a b : Game), a < b ↔ a ≤ b ∧ ¬b ≤ a\n[PROOFSTEP]\nrintro ⟨x⟩ ⟨y⟩\n[GOAL]\ncase mk.mk\na✝ : Game\nx : PGame\nb✝ : Game\ny : PGame\n⊢ Quot.mk Setoid.r x < Quot.mk Setoid.r y ↔\n Quot.mk Setoid.r x ≤ Quot.mk Setoid.r y ∧ ¬Quot.mk Setoid.r y ≤ Quot.mk Setoid.r x\n[PROOFSTEP]\nexact @lt_iff_le_not_le _ _ x y\n[GOAL]\n⊢ ∀ (a b : Game), a ≤ b → b ≤ a → a = b\n[PROOFSTEP]\nrintro ⟨x⟩ ⟨y⟩ h₁ h₂\n[GOAL]\ncase mk.mk\na✝ : Game\nx : PGame\nb✝ : Game\ny : PGame\nh₁ : Quot.mk Setoid.r x ≤ Quot.mk Setoid.r y\nh₂ : Quot.mk Setoid.r y ≤ Quot.mk Setoid.r x\n⊢ Quot.mk Setoid.r x = Quot.mk Setoid.r y\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase mk.mk.a\na✝ : Game\nx : PGame\nb✝ : Game\ny : PGame\nh₁ : Quot.mk Setoid.r x ≤ Quot.mk Setoid.r y\nh₂ : Quot.mk Setoid.r y ≤ Quot.mk Setoid.r x\n⊢ Setoid.r x y\n[PROOFSTEP]\nexact ⟨h₁, h₂⟩\n[GOAL]\n⊢ ∀ {x y : Game}, ¬x ≤ y ↔ y ⧏ x\n[PROOFSTEP]\nrintro ⟨x⟩ ⟨y⟩\n[GOAL]\ncase mk.mk\nx✝ : Game\nx : PGame\ny✝ : Game\ny : PGame\n⊢ ¬Quot.mk Setoid.r x ≤ Quot.mk Setoid.r y ↔ Quot.mk Setoid.r y ⧏ Quot.mk Setoid.r x\n[PROOFSTEP]\nexact PGame.not_le\n[GOAL]\n⊢ ∀ {x y : Game}, ¬x ⧏ y ↔ y ≤ x\n[PROOFSTEP]\nrintro ⟨x⟩ ⟨y⟩\n[GOAL]\ncase mk.mk\nx✝ : Game\nx : PGame\ny✝ : Game\ny : PGame\n⊢ ¬Quot.mk Setoid.r x ⧏ Quot.mk Setoid.r y ↔ Quot.mk Setoid.r y ≤ Quot.mk Setoid.r x\n[PROOFSTEP]\nexact PGame.not_lf\n[GOAL]\n⊢ ∀ (a b : Game), a ⧏ b ∨ a = b ∨ b ⧏ a\n[PROOFSTEP]\nrintro ⟨x⟩ ⟨y⟩\n[GOAL]\ncase mk.mk\na✝ : Game\nx : PGame\nb✝ : Game\ny : PGame\n⊢ Quot.mk Setoid.r x ⧏ Quot.mk Setoid.r y ∨\n Quot.mk Setoid.r x = Quot.mk Setoid.r y ∨ Quot.mk Setoid.r y ⧏ Quot.mk Setoid.r x\n[PROOFSTEP]\nchange _ ∨ ⟦x⟧ = ⟦y⟧ ∨ _\n[GOAL]\ncase mk.mk\na✝ : Game\nx : PGame\nb✝ : Game\ny : PGame\n⊢ Quot.mk Setoid.r x ⧏ Quot.mk Setoid.r y ∨\n Quotient.mk setoid x = Quotient.mk setoid y ∨ Quot.mk Setoid.r y ⧏ Quot.mk Setoid.r x\n[PROOFSTEP]\nrw [Quotient.eq]\n[GOAL]\ncase mk.mk\na✝ : Game\nx : PGame\nb✝ : Game\ny : PGame\n⊢ Quot.mk Setoid.r x ⧏ Quot.mk Setoid.r y ∨ x ≈ y ∨ Quot.mk Setoid.r y ⧏ Quot.mk Setoid.r x\n[PROOFSTEP]\napply lf_or_equiv_or_gf\n[GOAL]\n⊢ Covariant Game Game (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩ ⟨c⟩ h\n[GOAL]\ncase mk.mk.mk\nm✝ : Game\na : PGame\nn₁✝ : Game\nb : PGame\nn₂✝ : Game\nc : PGame\nh : Quot.mk Setoid.r b ≤ Quot.mk Setoid.r c\n⊢ (fun x x_1 => x + x_1) (Quot.mk Setoid.r a) (Quot.mk Setoid.r b) ≤\n (fun x x_1 => x + x_1) (Quot.mk Setoid.r a) (Quot.mk Setoid.r c)\n[PROOFSTEP]\nexact @add_le_add_left _ _ _ _ b c h a\n[GOAL]\n⊢ Covariant Game Game (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩ ⟨c⟩ h\n[GOAL]\ncase mk.mk.mk\nm✝ : Game\na : PGame\nn₁✝ : Game\nb : PGame\nn₂✝ : Game\nc : PGame\nh : Quot.mk Setoid.r b ≤ Quot.mk Setoid.r c\n⊢ swap (fun x x_1 => x + x_1) (Quot.mk Setoid.r a) (Quot.mk Setoid.r b) ≤\n swap (fun x x_1 => x + x_1) (Quot.mk Setoid.r a) (Quot.mk Setoid.r c)\n[PROOFSTEP]\nexact @add_le_add_right _ _ _ _ b c h a\n[GOAL]\n⊢ Covariant Game Game (fun x x_1 => x + x_1) fun x x_1 => x < x_1\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩ ⟨c⟩ h\n[GOAL]\ncase mk.mk.mk\nm✝ : Game\na : PGame\nn₁✝ : Game\nb : PGame\nn₂✝ : Game\nc : PGame\nh : Quot.mk Setoid.r b < Quot.mk Setoid.r c\n⊢ (fun x x_1 => x + x_1) (Quot.mk Setoid.r a) (Quot.mk Setoid.r b) <\n (fun x x_1 => x + x_1) (Quot.mk Setoid.r a) (Quot.mk Setoid.r c)\n[PROOFSTEP]\nexact @add_lt_add_left _ _ _ _ b c h a\n[GOAL]\n⊢ Covariant Game Game (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩ ⟨c⟩ h\n[GOAL]\ncase mk.mk.mk\nm✝ : Game\na : PGame\nn₁✝ : Game\nb : PGame\nn₂✝ : Game\nc : PGame\nh : Quot.mk Setoid.r b < Quot.mk Setoid.r c\n⊢ swap (fun x x_1 => x + x_1) (Quot.mk Setoid.r a) (Quot.mk Setoid.r b) <\n swap (fun x x_1 => x + x_1) (Quot.mk Setoid.r a) (Quot.mk Setoid.r c)\n[PROOFSTEP]\nexact @add_lt_add_right _ _ _ _ b c h a\n[GOAL]\n⊢ ∀ {b c : Game}, b ⧏ c → ∀ (a : Game), b + a ⧏ c + a\n[PROOFSTEP]\nrintro ⟨b⟩ ⟨c⟩ h ⟨a⟩\n[GOAL]\ncase mk.mk.mk\nb✝ : Game\nb : PGame\nc✝ : Game\nc : PGame\nh : Quot.mk Setoid.r b ⧏ Quot.mk Setoid.r c\na✝ : Game\na : PGame\n⊢ Quot.mk Setoid.r b + Quot.mk Setoid.r a ⧏ Quot.mk Setoid.r c + Quot.mk Setoid.r a\n[PROOFSTEP]\napply PGame.add_lf_add_right h\n[GOAL]\n⊢ ∀ {b c : Game}, b ⧏ c → ∀ (a : Game), a + b ⧏ a + c\n[PROOFSTEP]\nrintro ⟨b⟩ ⟨c⟩ h ⟨a⟩\n[GOAL]\ncase mk.mk.mk\nb✝ : Game\nb : PGame\nc✝ : Game\nc : PGame\nh : Quot.mk Setoid.r b ⧏ Quot.mk Setoid.r c\na✝ : Game\na : PGame\n⊢ Quot.mk Setoid.r a + Quot.mk Setoid.r b ⧏ Quot.mk Setoid.r a + Quot.mk Setoid.r c\n[PROOFSTEP]\napply PGame.add_lf_add_left h\n[GOAL]\nx y : PGame\nL : LeftMoves x ≃ LeftMoves y\nR : RightMoves x ≃ RightMoves y\nhl : ∀ (i : LeftMoves x), Quotient.mk setoid (moveLeft x i) = Quotient.mk setoid (moveLeft y (↑L i))\nhr : ∀ (j : RightMoves x), Quotient.mk setoid (moveRight x j) = Quotient.mk setoid (moveRight y (↑R j))\n⊢ Quotient.mk setoid x = Quotient.mk setoid y\n[PROOFSTEP]\nexact\n Quot.sound\n (equiv_of_mk_equiv L R (fun _ => Game.PGame.equiv_iff_game_eq.2 (hl _))\n (fun _ => Game.PGame.equiv_iff_game_eq.2 (hr _)))\n[GOAL]\nx y : PGame\n⊢ PGame\n[PROOFSTEP]\ninduction' x with xl xr _ _ IHxl IHxr generalizing y\n[GOAL]\ncase mk\ny✝ : PGame\nxl xr : Type u\na✝¹ : xl → PGame\na✝ : xr → PGame\nIHxl : xl → PGame → PGame\nIHxr : xr → PGame → PGame\ny : PGame\n⊢ PGame\n[PROOFSTEP]\ninduction' y with yl yr yL yR IHyl IHyr\n[GOAL]\ncase mk.mk\ny : PGame\nxl xr : Type u\na✝¹ : xl → PGame\na✝ : xr → PGame\nIHxl : xl → PGame → PGame\nIHxr : xr → PGame → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nIHyl : yl → PGame\nIHyr : yr → PGame\n⊢ PGame\n[PROOFSTEP]\nhave y := mk yl yr yL yR\n[GOAL]\ncase mk.mk\ny✝ : PGame\nxl xr : Type u\na✝¹ : xl → PGame\na✝ : xr → PGame\nIHxl : xl → PGame → PGame\nIHxr : xr → PGame → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nIHyl : yl → PGame\nIHyr : yr → PGame\ny : PGame\n⊢ PGame\n[PROOFSTEP]\nrefine' ⟨Sum (xl × yl) (xr × yr), Sum (xl × yr) (xr × yl), _, _⟩\n[GOAL]\ncase mk.mk.refine'_1\ny✝ : PGame\nxl xr : Type u\na✝¹ : xl → PGame\na✝ : xr → PGame\nIHxl : xl → PGame → PGame\nIHxr : xr → PGame → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nIHyl : yl → PGame\nIHyr : yr → PGame\ny : PGame\n⊢ xl × yl ⊕ xr × yr → PGame\n[PROOFSTEP]\nrintro (⟨i, j⟩ | ⟨i, j⟩)\n[GOAL]\ncase mk.mk.refine'_2\ny✝ : PGame\nxl xr : Type u\na✝¹ : xl → PGame\na✝ : xr → PGame\nIHxl : xl → PGame → PGame\nIHxr : xr → PGame → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nIHyl : yl → PGame\nIHyr : yr → PGame\ny : PGame\n⊢ xl × yr ⊕ xr × yl → PGame\n[PROOFSTEP]\nrintro (⟨i, j⟩ | ⟨i, j⟩)\n[GOAL]\ncase mk.mk.refine'_1.inl.mk\ny✝ : PGame\nxl xr : Type u\na✝¹ : xl → PGame\na✝ : xr → PGame\nIHxl : xl → PGame → PGame\nIHxr : xr → PGame → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nIHyl : yl → PGame\nIHyr : yr → PGame\ny : PGame\ni : xl\nj : yl\n⊢ PGame\n[PROOFSTEP]\nexact IHxl i y + IHyl j - IHxl i (yL j)\n[GOAL]\ncase mk.mk.refine'_1.inr.mk\ny✝ : PGame\nxl xr : Type u\na✝¹ : xl → PGame\na✝ : xr → PGame\nIHxl : xl → PGame → PGame\nIHxr : xr → PGame → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nIHyl : yl → PGame\nIHyr : yr → PGame\ny : PGame\ni : xr\nj : yr\n⊢ PGame\n[PROOFSTEP]\nexact IHxr i y + IHyr j - IHxr i (yR j)\n[GOAL]\ncase mk.mk.refine'_2.inl.mk\ny✝ : PGame\nxl xr : Type u\na✝¹ : xl → PGame\na✝ : xr → PGame\nIHxl : xl → PGame → PGame\nIHxr : xr → PGame → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nIHyl : yl → PGame\nIHyr : yr → PGame\ny : PGame\ni : xl\nj : yr\n⊢ PGame\n[PROOFSTEP]\nexact IHxl i y + IHyr j - IHxl i (yR j)\n[GOAL]\ncase mk.mk.refine'_2.inr.mk\ny✝ : PGame\nxl xr : Type u\na✝¹ : xl → PGame\na✝ : xr → PGame\nIHxl : xl → PGame → PGame\nIHxr : xr → PGame → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nIHyl : yl → PGame\nIHyr : yr → PGame\ny : PGame\ni : xr\nj : yl\n⊢ PGame\n[PROOFSTEP]\nexact IHxr i y + IHyl j - IHxr i (yL j)\n[GOAL]\nx y : PGame\ni : LeftMoves x\nj : LeftMoves y\n⊢ moveLeft (x * y) (↑toLeftMovesMul (Sum.inl (i, j))) =\n moveLeft x i * y + x * moveLeft y j - moveLeft x i * moveLeft y j\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\ny : PGame\nj : LeftMoves y\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ni : LeftMoves (mk α✝ β✝ a✝¹ a✝)\n⊢ moveLeft (mk α✝ β✝ a✝¹ a✝ * y) (↑toLeftMovesMul (Sum.inl (i, j))) =\n moveLeft (mk α✝ β✝ a✝¹ a✝) i * y + mk α✝ β✝ a✝¹ a✝ * moveLeft y j - moveLeft (mk α✝ β✝ a✝¹ a✝) i * moveLeft y j\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nα✝¹ β✝¹ : Type u_1\na✝³ : α✝¹ → PGame\na✝² : β✝¹ → PGame\ni : LeftMoves (mk α✝¹ β✝¹ a✝³ a✝²)\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\nj : LeftMoves (mk α✝ β✝ a✝¹ a✝)\n⊢ moveLeft (mk α✝¹ β✝¹ a✝³ a✝² * mk α✝ β✝ a✝¹ a✝) (↑toLeftMovesMul (Sum.inl (i, j))) =\n moveLeft (mk α✝¹ β✝¹ a✝³ a✝²) i * mk α✝ β✝ a✝¹ a✝ + mk α✝¹ β✝¹ a✝³ a✝² * moveLeft (mk α✝ β✝ a✝¹ a✝) j -\n moveLeft (mk α✝¹ β✝¹ a✝³ a✝²) i * moveLeft (mk α✝ β✝ a✝¹ a✝) j\n[PROOFSTEP]\nrfl\n[GOAL]\nx y : PGame\ni : RightMoves x\nj : RightMoves y\n⊢ moveLeft (x * y) (↑toLeftMovesMul (Sum.inr (i, j))) =\n moveRight x i * y + x * moveRight y j - moveRight x i * moveRight y j\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\ny : PGame\nj : RightMoves y\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ni : RightMoves (mk α✝ β✝ a✝¹ a✝)\n⊢ moveLeft (mk α✝ β✝ a✝¹ a✝ * y) (↑toLeftMovesMul (Sum.inr (i, j))) =\n moveRight (mk α✝ β✝ a✝¹ a✝) i * y + mk α✝ β✝ a✝¹ a✝ * moveRight y j - moveRight (mk α✝ β✝ a✝¹ a✝) i * moveRight y j\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nα✝¹ β✝¹ : Type u_1\na✝³ : α✝¹ → PGame\na✝² : β✝¹ → PGame\ni : RightMoves (mk α✝¹ β✝¹ a✝³ a✝²)\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\nj : RightMoves (mk α✝ β✝ a✝¹ a✝)\n⊢ moveLeft (mk α✝¹ β✝¹ a✝³ a✝² * mk α✝ β✝ a✝¹ a✝) (↑toLeftMovesMul (Sum.inr (i, j))) =\n moveRight (mk α✝¹ β✝¹ a✝³ a✝²) i * mk α✝ β✝ a✝¹ a✝ + mk α✝¹ β✝¹ a✝³ a✝² * moveRight (mk α✝ β✝ a✝¹ a✝) j -\n moveRight (mk α✝¹ β✝¹ a✝³ a✝²) i * moveRight (mk α✝ β✝ a✝¹ a✝) j\n[PROOFSTEP]\nrfl\n[GOAL]\nx y : PGame\ni : LeftMoves x\nj : RightMoves y\n⊢ moveRight (x * y) (↑toRightMovesMul (Sum.inl (i, j))) =\n moveLeft x i * y + x * moveRight y j - moveLeft x i * moveRight y j\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\ny : PGame\nj : RightMoves y\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ni : LeftMoves (mk α✝ β✝ a✝¹ a✝)\n⊢ moveRight (mk α✝ β✝ a✝¹ a✝ * y) (↑toRightMovesMul (Sum.inl (i, j))) =\n moveLeft (mk α✝ β✝ a✝¹ a✝) i * y + mk α✝ β✝ a✝¹ a✝ * moveRight y j - moveLeft (mk α✝ β✝ a✝¹ a✝) i * moveRight y j\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nα✝¹ β✝¹ : Type u_1\na✝³ : α✝¹ → PGame\na✝² : β✝¹ → PGame\ni : LeftMoves (mk α✝¹ β✝¹ a✝³ a✝²)\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\nj : RightMoves (mk α✝ β✝ a✝¹ a✝)\n⊢ moveRight (mk α✝¹ β✝¹ a✝³ a✝² * mk α✝ β✝ a✝¹ a✝) (↑toRightMovesMul (Sum.inl (i, j))) =\n moveLeft (mk α✝¹ β✝¹ a✝³ a✝²) i * mk α✝ β✝ a✝¹ a✝ + mk α✝¹ β✝¹ a✝³ a✝² * moveRight (mk α✝ β✝ a✝¹ a✝) j -\n moveLeft (mk α✝¹ β✝¹ a✝³ a✝²) i * moveRight (mk α✝ β✝ a✝¹ a✝) j\n[PROOFSTEP]\nrfl\n[GOAL]\nx y : PGame\ni : RightMoves x\nj : LeftMoves y\n⊢ moveRight (x * y) (↑toRightMovesMul (Sum.inr (i, j))) =\n moveRight x i * y + x * moveLeft y j - moveRight x i * moveLeft y j\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\ny : PGame\nj : LeftMoves y\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ni : RightMoves (mk α✝ β✝ a✝¹ a✝)\n⊢ moveRight (mk α✝ β✝ a✝¹ a✝ * y) (↑toRightMovesMul (Sum.inr (i, j))) =\n moveRight (mk α✝ β✝ a✝¹ a✝) i * y + mk α✝ β✝ a✝¹ a✝ * moveLeft y j - moveRight (mk α✝ β✝ a✝¹ a✝) i * moveLeft y j\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nα✝¹ β✝¹ : Type u_1\na✝³ : α✝¹ → PGame\na✝² : β✝¹ → PGame\ni : RightMoves (mk α✝¹ β✝¹ a✝³ a✝²)\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\nj : LeftMoves (mk α✝ β✝ a✝¹ a✝)\n⊢ moveRight (mk α✝¹ β✝¹ a✝³ a✝² * mk α✝ β✝ a✝¹ a✝) (↑toRightMovesMul (Sum.inr (i, j))) =\n moveRight (mk α✝¹ β✝¹ a✝³ a✝²) i * mk α✝ β✝ a✝¹ a✝ + mk α✝¹ β✝¹ a✝³ a✝² * moveLeft (mk α✝ β✝ a✝¹ a✝) j -\n moveRight (mk α✝¹ β✝¹ a✝³ a✝²) i * moveLeft (mk α✝ β✝ a✝¹ a✝) j\n[PROOFSTEP]\nrfl\n[GOAL]\nx y : PGame\nk : LeftMoves (x * y)\nP : LeftMoves (x * y) → Prop\nhl : ∀ (ix : LeftMoves x) (iy : LeftMoves y), P (↑toLeftMovesMul (Sum.inl (ix, iy)))\nhr : ∀ (jx : RightMoves x) (jy : RightMoves y), P (↑toLeftMovesMul (Sum.inr (jx, jy)))\n⊢ P k\n[PROOFSTEP]\nrw [← toLeftMovesMul.apply_symm_apply k]\n[GOAL]\nx y : PGame\nk : LeftMoves (x * y)\nP : LeftMoves (x * y) → Prop\nhl : ∀ (ix : LeftMoves x) (iy : LeftMoves y), P (↑toLeftMovesMul (Sum.inl (ix, iy)))\nhr : ∀ (jx : RightMoves x) (jy : RightMoves y), P (↑toLeftMovesMul (Sum.inr (jx, jy)))\n⊢ P (↑toLeftMovesMul (↑toLeftMovesMul.symm k))\n[PROOFSTEP]\nrcases toLeftMovesMul.symm k with (⟨ix, iy⟩ | ⟨jx, jy⟩)\n[GOAL]\ncase inl.mk\nx y : PGame\nk : LeftMoves (x * y)\nP : LeftMoves (x * y) → Prop\nhl : ∀ (ix : LeftMoves x) (iy : LeftMoves y), P (↑toLeftMovesMul (Sum.inl (ix, iy)))\nhr : ∀ (jx : RightMoves x) (jy : RightMoves y), P (↑toLeftMovesMul (Sum.inr (jx, jy)))\nix : LeftMoves x\niy : LeftMoves y\n⊢ P (↑toLeftMovesMul (Sum.inl (ix, iy)))\n[PROOFSTEP]\napply hl\n[GOAL]\ncase inr.mk\nx y : PGame\nk : LeftMoves (x * y)\nP : LeftMoves (x * y) → Prop\nhl : ∀ (ix : LeftMoves x) (iy : LeftMoves y), P (↑toLeftMovesMul (Sum.inl (ix, iy)))\nhr : ∀ (jx : RightMoves x) (jy : RightMoves y), P (↑toLeftMovesMul (Sum.inr (jx, jy)))\njx : RightMoves x\njy : RightMoves y\n⊢ P (↑toLeftMovesMul (Sum.inr (jx, jy)))\n[PROOFSTEP]\napply hr\n[GOAL]\nx y : PGame\nk : RightMoves (x * y)\nP : RightMoves (x * y) → Prop\nhl : ∀ (ix : LeftMoves x) (jy : RightMoves y), P (↑toRightMovesMul (Sum.inl (ix, jy)))\nhr : ∀ (jx : RightMoves x) (iy : LeftMoves y), P (↑toRightMovesMul (Sum.inr (jx, iy)))\n⊢ P k\n[PROOFSTEP]\nrw [← toRightMovesMul.apply_symm_apply k]\n[GOAL]\nx y : PGame\nk : RightMoves (x * y)\nP : RightMoves (x * y) → Prop\nhl : ∀ (ix : LeftMoves x) (jy : RightMoves y), P (↑toRightMovesMul (Sum.inl (ix, jy)))\nhr : ∀ (jx : RightMoves x) (iy : LeftMoves y), P (↑toRightMovesMul (Sum.inr (jx, iy)))\n⊢ P (↑toRightMovesMul (↑toRightMovesMul.symm k))\n[PROOFSTEP]\nrcases toRightMovesMul.symm k with (⟨ix, iy⟩ | ⟨jx, jy⟩)\n[GOAL]\ncase inl.mk\nx y : PGame\nk : RightMoves (x * y)\nP : RightMoves (x * y) → Prop\nhl : ∀ (ix : LeftMoves x) (jy : RightMoves y), P (↑toRightMovesMul (Sum.inl (ix, jy)))\nhr : ∀ (jx : RightMoves x) (iy : LeftMoves y), P (↑toRightMovesMul (Sum.inr (jx, iy)))\nix : LeftMoves x\niy : RightMoves y\n⊢ P (↑toRightMovesMul (Sum.inl (ix, iy)))\n[PROOFSTEP]\napply hl\n[GOAL]\ncase inr.mk\nx y : PGame\nk : RightMoves (x * y)\nP : RightMoves (x * y) → Prop\nhl : ∀ (ix : LeftMoves x) (jy : RightMoves y), P (↑toRightMovesMul (Sum.inl (ix, jy)))\nhr : ∀ (jx : RightMoves x) (iy : LeftMoves y), P (↑toRightMovesMul (Sum.inr (jx, iy)))\njx : RightMoves x\njy : LeftMoves y\n⊢ P (↑toRightMovesMul (Sum.inr (jx, jy)))\n[PROOFSTEP]\napply hr\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ mk xl xr xL xR * mk yl yr yL yR ≡r mk yl yr yL yR * mk xl xr xL xR\n[PROOFSTEP]\nrefine'\n ⟨Equiv.sumCongr (Equiv.prodComm _ _) (Equiv.prodComm _ _),\n (Equiv.sumComm _ _).trans (Equiv.sumCongr (Equiv.prodComm _ _) (Equiv.prodComm _ _)), _, _⟩\n[GOAL]\ncase refine'_1\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ (i : LeftMoves (mk xl xr xL xR * mk yl yr yL yR)) →\n moveLeft (mk xl xr xL xR * mk yl yr yL yR) i ≡r\n moveLeft (mk yl yr yL yR * mk xl xr xL xR) (↑(Equiv.sumCongr (Equiv.prodComm xl yl) (Equiv.prodComm xr yr)) i)\n[PROOFSTEP]\nrintro (⟨i, j⟩ | ⟨i, j⟩)\n[GOAL]\ncase refine'_2\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ (j : RightMoves (mk xl xr xL xR * mk yl yr yL yR)) →\n moveRight (mk xl xr xL xR * mk yl yr yL yR) j ≡r\n moveRight (mk yl yr yL yR * mk xl xr xL xR)\n (↑((Equiv.sumComm (xl × yr) (xr × yl)).trans (Equiv.sumCongr (Equiv.prodComm xr yl) (Equiv.prodComm xl yr))) j)\n[PROOFSTEP]\nrintro (⟨i, j⟩ | ⟨i, j⟩)\n[GOAL]\ncase refine'_1.inl.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yl\n⊢ moveLeft (mk xl xr xL xR * mk yl yr yL yR) (Sum.inl (i, j)) ≡r\n moveLeft (mk yl yr yL yR * mk xl xr xL xR)\n (↑(Equiv.sumCongr (Equiv.prodComm xl yl) (Equiv.prodComm xr yr)) (Sum.inl (i, j)))\n[PROOFSTEP]\n{ dsimp\n exact\n ((addCommRelabelling _ _).trans <| (mulCommRelabelling _ _).addCongr (mulCommRelabelling _ _)).subCongr\n (mulCommRelabelling _ _)\n}\n[GOAL]\ncase refine'_1.inl.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yl\n⊢ moveLeft (mk xl xr xL xR * mk yl yr yL yR) (Sum.inl (i, j)) ≡r\n moveLeft (mk yl yr yL yR * mk xl xr xL xR)\n (↑(Equiv.sumCongr (Equiv.prodComm xl yl) (Equiv.prodComm xr yr)) (Sum.inl (i, j)))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_1.inl.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yl\n⊢ xL i * mk yl yr yL yR + mk xl xr xL xR * yL j - xL i * yL j ≡r\n moveLeft (mk yl yr yL yR * mk xl xr xL xR)\n (↑(Equiv.sumCongr (Equiv.prodComm xl yl) (Equiv.prodComm xr yr)) (Sum.inl (i, j)))\n[PROOFSTEP]\nexact\n ((addCommRelabelling _ _).trans <| (mulCommRelabelling _ _).addCongr (mulCommRelabelling _ _)).subCongr\n (mulCommRelabelling _ _)\n[GOAL]\ncase refine'_1.inr.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yr\n⊢ moveLeft (mk xl xr xL xR * mk yl yr yL yR) (Sum.inr (i, j)) ≡r\n moveLeft (mk yl yr yL yR * mk xl xr xL xR)\n (↑(Equiv.sumCongr (Equiv.prodComm xl yl) (Equiv.prodComm xr yr)) (Sum.inr (i, j)))\n[PROOFSTEP]\n{ dsimp\n exact\n ((addCommRelabelling _ _).trans <| (mulCommRelabelling _ _).addCongr (mulCommRelabelling _ _)).subCongr\n (mulCommRelabelling _ _)\n}\n[GOAL]\ncase refine'_1.inr.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yr\n⊢ moveLeft (mk xl xr xL xR * mk yl yr yL yR) (Sum.inr (i, j)) ≡r\n moveLeft (mk yl yr yL yR * mk xl xr xL xR)\n (↑(Equiv.sumCongr (Equiv.prodComm xl yl) (Equiv.prodComm xr yr)) (Sum.inr (i, j)))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_1.inr.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yr\n⊢ xR i * mk yl yr yL yR + mk xl xr xL xR * yR j - xR i * yR j ≡r\n moveLeft (mk yl yr yL yR * mk xl xr xL xR)\n (↑(Equiv.sumCongr (Equiv.prodComm xl yl) (Equiv.prodComm xr yr)) (Sum.inr (i, j)))\n[PROOFSTEP]\nexact\n ((addCommRelabelling _ _).trans <| (mulCommRelabelling _ _).addCongr (mulCommRelabelling _ _)).subCongr\n (mulCommRelabelling _ _)\n[GOAL]\ncase refine'_2.inl.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yr\n⊢ moveRight (mk xl xr xL xR * mk yl yr yL yR) (Sum.inl (i, j)) ≡r\n moveRight (mk yl yr yL yR * mk xl xr xL xR)\n (↑((Equiv.sumComm (xl × yr) (xr × yl)).trans (Equiv.sumCongr (Equiv.prodComm xr yl) (Equiv.prodComm xl yr)))\n (Sum.inl (i, j)))\n[PROOFSTEP]\n{ dsimp\n exact\n ((addCommRelabelling _ _).trans <| (mulCommRelabelling _ _).addCongr (mulCommRelabelling _ _)).subCongr\n (mulCommRelabelling _ _)\n}\n[GOAL]\ncase refine'_2.inl.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yr\n⊢ moveRight (mk xl xr xL xR * mk yl yr yL yR) (Sum.inl (i, j)) ≡r\n moveRight (mk yl yr yL yR * mk xl xr xL xR)\n (↑((Equiv.sumComm (xl × yr) (xr × yl)).trans (Equiv.sumCongr (Equiv.prodComm xr yl) (Equiv.prodComm xl yr)))\n (Sum.inl (i, j)))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_2.inl.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yr\n⊢ xL i * mk yl yr yL yR + mk xl xr xL xR * yR j - xL i * yR j ≡r\n moveRight (mk yl yr yL yR * mk xl xr xL xR)\n (↑(Equiv.sumCongr (Equiv.prodComm xr yl) (Equiv.prodComm xl yr))\n (↑(Equiv.sumComm (xl × yr) (xr × yl)) (Sum.inl (i, j))))\n[PROOFSTEP]\nexact\n ((addCommRelabelling _ _).trans <| (mulCommRelabelling _ _).addCongr (mulCommRelabelling _ _)).subCongr\n (mulCommRelabelling _ _)\n[GOAL]\ncase refine'_2.inr.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yl\n⊢ moveRight (mk xl xr xL xR * mk yl yr yL yR) (Sum.inr (i, j)) ≡r\n moveRight (mk yl yr yL yR * mk xl xr xL xR)\n (↑((Equiv.sumComm (xl × yr) (xr × yl)).trans (Equiv.sumCongr (Equiv.prodComm xr yl) (Equiv.prodComm xl yr)))\n (Sum.inr (i, j)))\n[PROOFSTEP]\n{ dsimp\n exact\n ((addCommRelabelling _ _).trans <| (mulCommRelabelling _ _).addCongr (mulCommRelabelling _ _)).subCongr\n (mulCommRelabelling _ _)\n}\n[GOAL]\ncase refine'_2.inr.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yl\n⊢ moveRight (mk xl xr xL xR * mk yl yr yL yR) (Sum.inr (i, j)) ≡r\n moveRight (mk yl yr yL yR * mk xl xr xL xR)\n (↑((Equiv.sumComm (xl × yr) (xr × yl)).trans (Equiv.sumCongr (Equiv.prodComm xr yl) (Equiv.prodComm xl yr)))\n (Sum.inr (i, j)))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_2.inr.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yl\n⊢ xR i * mk yl yr yL yR + mk xl xr xL xR * yL j - xR i * yL j ≡r\n moveRight (mk yl yr yL yR * mk xl xr xL xR)\n (↑(Equiv.sumCongr (Equiv.prodComm xr yl) (Equiv.prodComm xl yr))\n (↑(Equiv.sumComm (xl × yr) (xr × yl)) (Sum.inr (i, j))))\n[PROOFSTEP]\nexact\n ((addCommRelabelling _ _).trans <| (mulCommRelabelling _ _).addCongr (mulCommRelabelling _ _)).subCongr\n (mulCommRelabelling _ _)\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := yL j } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := mk yl yr yL yR } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := yL j } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := yR j } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := mk yl yr yL yR } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := yR j } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := yR j } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := mk yl yr yL yR } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := yR j } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := yL j } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := mk yl yr yL yR } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := yL j } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nx : PGame\n⊢ IsEmpty (LeftMoves (x * 0))\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nα✝ β✝ : Type u\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\n⊢ IsEmpty (LeftMoves (mk α✝ β✝ a✝¹ a✝ * 0))\n[PROOFSTEP]\nexact instIsEmptySum\n[GOAL]\nx : PGame\n⊢ IsEmpty (RightMoves (x * 0))\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nα✝ β✝ : Type u\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\n⊢ IsEmpty (RightMoves (mk α✝ β✝ a✝¹ a✝ * 0))\n[PROOFSTEP]\napply instIsEmptySum\n[GOAL]\nx : PGame\n⊢ IsEmpty (LeftMoves (0 * x))\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nα✝ β✝ : Type u\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\n⊢ IsEmpty (LeftMoves (0 * mk α✝ β✝ a✝¹ a✝))\n[PROOFSTEP]\napply instIsEmptySum\n[GOAL]\nx : PGame\n⊢ IsEmpty (RightMoves (0 * x))\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nα✝ β✝ : Type u\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\n⊢ IsEmpty (RightMoves (0 * mk α✝ β✝ a✝¹ a✝))\n[PROOFSTEP]\napply instIsEmptySum\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ -mk xl xr xL xR * mk yl yr yL yR ≡r -(mk xl xr xL xR * mk yl yr yL yR)\n[PROOFSTEP]\nrefine' ⟨Equiv.sumComm _ _, Equiv.sumComm _ _, _, _⟩\n[GOAL]\ncase refine'_1\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ (i : LeftMoves (-mk xl xr xL xR * mk yl yr yL yR)) →\n moveLeft (-mk xl xr xL xR * mk yl yr yL yR) i ≡r\n moveLeft (-(mk xl xr xL xR * mk yl yr yL yR)) (↑(Equiv.sumComm (xr × yl) (xl × yr)) i)\n[PROOFSTEP]\nrintro (⟨i, j⟩ | ⟨i, j⟩)\n[GOAL]\ncase refine'_2\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ (j : RightMoves (-mk xl xr xL xR * mk yl yr yL yR)) →\n moveRight (-mk xl xr xL xR * mk yl yr yL yR) j ≡r\n moveRight (-(mk xl xr xL xR * mk yl yr yL yR)) (↑(Equiv.sumComm (xr × yr) (xl × yl)) j)\n[PROOFSTEP]\nrintro (⟨i, j⟩ | ⟨i, j⟩)\n[GOAL]\ncase refine'_1.inl.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yl\n⊢ moveLeft (-mk xl xr xL xR * mk yl yr yL yR) (Sum.inl (i, j)) ≡r\n moveLeft (-(mk xl xr xL xR * mk yl yr yL yR)) (↑(Equiv.sumComm (xr × yl) (xl × yr)) (Sum.inl (i, j)))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_1.inl.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yl\n⊢ -xR i * mk yl yr yL yR + (mk xr xl (fun j => -xR j) fun i => -xL i) * yL j - -xR i * yL j ≡r\n moveLeft (-(mk xl xr xL xR * mk yl yr yL yR)) (↑(Equiv.sumComm (xr × yl) (xl × yr)) (Sum.inl (i, j)))\n[PROOFSTEP]\napply ((negAddRelabelling _ _).trans _).symm\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yl\n⊢ -((fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (mk yl yr yL yR) +\n (fun a =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yL j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yR j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yL j))\n (yL a))\n j) +\n - -(fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yL j) ≡r\n -xR i * mk yl yr yL yR + (mk xr xl (fun j => -xR j) fun i => -xL i) * yL j - -xR i * yL j\n[PROOFSTEP]\napply ((negAddRelabelling _ _).trans (Relabelling.addCongr _ _)).subCongr\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yl\n⊢ -(fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j)) fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yL j) ≡r\n -xR i * yL j\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yl\n⊢ -(fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j)) fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (mk yl yr yL yR) ≡r\n -xR i * mk yl yr yL yR\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yl\n⊢ -(fun a =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yL j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yR j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yL j))\n (yL a))\n j ≡r\n (mk xr xl (fun j => -xR j) fun i => -xL i) * yL j\n[PROOFSTEP]\nexact (negMulRelabelling _ _).symm\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yl\n⊢ -(fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j)) fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (mk yl yr yL yR) ≡r\n -xR i * mk yl yr yL yR\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yl\n⊢ -(fun a =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yL j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yR j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yL j))\n (yL a))\n j ≡r\n (mk xr xl (fun j => -xR j) fun i => -xL i) * yL j\n[PROOFSTEP]\nexact (negMulRelabelling _ _).symm\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yl\n⊢ -(fun a =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yL j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yR j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yL j))\n (yL a))\n j ≡r\n (mk xr xl (fun j => -xR j) fun i => -xL i) * yL j\n[PROOFSTEP]\nchange -(mk xl xr xL xR * _) ≡r _\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yl\n⊢ -(mk xl xr xL xR * yL j) ≡r (mk xr xl (fun j => -xR j) fun i => -xL i) * yL j\n[PROOFSTEP]\nexact (negMulRelabelling _ _).symm\n[GOAL]\ncase refine'_1.inr.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yr\n⊢ moveLeft (-mk xl xr xL xR * mk yl yr yL yR) (Sum.inr (i, j)) ≡r\n moveLeft (-(mk xl xr xL xR * mk yl yr yL yR)) (↑(Equiv.sumComm (xr × yl) (xl × yr)) (Sum.inr (i, j)))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_1.inr.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yr\n⊢ -xL i * mk yl yr yL yR + (mk xr xl (fun j => -xR j) fun i => -xL i) * yR j - -xL i * yR j ≡r\n moveLeft (-(mk xl xr xL xR * mk yl yr yL yR)) (↑(Equiv.sumComm (xr × yl) (xl × yr)) (Sum.inr (i, j)))\n[PROOFSTEP]\napply ((negAddRelabelling _ _).trans _).symm\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yr\n⊢ -((fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (mk yl yr yL yR) +\n (fun a =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yL j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yR j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yL j))\n (yR a))\n j) +\n - -(fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yR j) ≡r\n -xL i * mk yl yr yL yR + (mk xr xl (fun j => -xR j) fun i => -xL i) * yR j - -xL i * yR j\n[PROOFSTEP]\napply ((negAddRelabelling _ _).trans (Relabelling.addCongr _ _)).subCongr\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yr\n⊢ -(fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j)) fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yR j) ≡r\n -xL i * yR j\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yr\n⊢ -(fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j)) fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (mk yl yr yL yR) ≡r\n -xL i * mk yl yr yL yR\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yr\n⊢ -(fun a =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yL j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yR j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yL j))\n (yR a))\n j ≡r\n (mk xr xl (fun j => -xR j) fun i => -xL i) * yR j\n[PROOFSTEP]\nexact (negMulRelabelling _ _).symm\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yr\n⊢ -(fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j)) fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (mk yl yr yL yR) ≡r\n -xL i * mk yl yr yL yR\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yr\n⊢ -(fun a =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yL j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yR j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yL j))\n (yR a))\n j ≡r\n (mk xr xl (fun j => -xR j) fun i => -xL i) * yR j\n[PROOFSTEP]\nexact (negMulRelabelling _ _).symm\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yr\n⊢ -(fun a =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yL j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yR j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yL j))\n (yR a))\n j ≡r\n (mk xr xl (fun j => -xR j) fun i => -xL i) * yR j\n[PROOFSTEP]\nchange -(mk xl xr xL xR * _) ≡r _\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yr\n⊢ -(mk xl xr xL xR * yR j) ≡r (mk xr xl (fun j => -xR j) fun i => -xL i) * yR j\n[PROOFSTEP]\nexact (negMulRelabelling _ _).symm\n[GOAL]\ncase refine'_2.inl.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yr\n⊢ moveRight (-mk xl xr xL xR * mk yl yr yL yR) (Sum.inl (i, j)) ≡r\n moveRight (-(mk xl xr xL xR * mk yl yr yL yR)) (↑(Equiv.sumComm (xr × yr) (xl × yl)) (Sum.inl (i, j)))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_2.inl.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yr\n⊢ -xR i * mk yl yr yL yR + (mk xr xl (fun j => -xR j) fun i => -xL i) * yR j - -xR i * yR j ≡r\n moveRight (-(mk xl xr xL xR * mk yl yr yL yR)) (↑(Equiv.sumComm (xr × yr) (xl × yl)) (Sum.inl (i, j)))\n[PROOFSTEP]\napply ((negAddRelabelling _ _).trans _).symm\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yr\n⊢ -((fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (mk yl yr yL yR) +\n (fun a =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yL j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yR j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yL j))\n (yR a))\n j) +\n - -(fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yR j) ≡r\n -xR i * mk yl yr yL yR + (mk xr xl (fun j => -xR j) fun i => -xL i) * yR j - -xR i * yR j\n[PROOFSTEP]\napply ((negAddRelabelling _ _).trans (Relabelling.addCongr _ _)).subCongr\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yr\n⊢ -(fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j)) fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yR j) ≡r\n -xR i * yR j\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yr\n⊢ -(fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j)) fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (mk yl yr yL yR) ≡r\n -xR i * mk yl yr yL yR\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yr\n⊢ -(fun a =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yL j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yR j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yL j))\n (yR a))\n j ≡r\n (mk xr xl (fun j => -xR j) fun i => -xL i) * yR j\n[PROOFSTEP]\nexact (negMulRelabelling _ _).symm\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yr\n⊢ -(fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j)) fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (mk yl yr yL yR) ≡r\n -xR i * mk yl yr yL yR\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yr\n⊢ -(fun a =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yL j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yR j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yL j))\n (yR a))\n j ≡r\n (mk xr xl (fun j => -xR j) fun i => -xL i) * yR j\n[PROOFSTEP]\nexact (negMulRelabelling _ _).symm\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yr\n⊢ -(fun a =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yL j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yR j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yL j))\n (yR a))\n j ≡r\n (mk xr xl (fun j => -xR j) fun i => -xL i) * yR j\n[PROOFSTEP]\nchange -(mk xl xr xL xR * _) ≡r _\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yr\n⊢ -(mk xl xr xL xR * yR j) ≡r (mk xr xl (fun j => -xR j) fun i => -xL i) * yR j\n[PROOFSTEP]\nexact (negMulRelabelling _ _).symm\n[GOAL]\ncase refine'_2.inr.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yl\n⊢ moveRight (-mk xl xr xL xR * mk yl yr yL yR) (Sum.inr (i, j)) ≡r\n moveRight (-(mk xl xr xL xR * mk yl yr yL yR)) (↑(Equiv.sumComm (xr × yr) (xl × yl)) (Sum.inr (i, j)))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_2.inr.mk\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yl\n⊢ -xL i * mk yl yr yL yR + (mk xr xl (fun j => -xR j) fun i => -xL i) * yL j - -xL i * yL j ≡r\n moveRight (-(mk xl xr xL xR * mk yl yr yL yR)) (↑(Equiv.sumComm (xr × yr) (xl × yl)) (Sum.inr (i, j)))\n[PROOFSTEP]\napply ((negAddRelabelling _ _).trans _).symm\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yl\n⊢ -((fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (mk yl yr yL yR) +\n (fun a =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yL j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yR j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yL j))\n (yL a))\n j) +\n - -(fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yL j) ≡r\n -xL i * mk yl yr yL yR + (mk xr xl (fun j => -xR j) fun i => -xL i) * yL j - -xL i * yL j\n[PROOFSTEP]\napply ((negAddRelabelling _ _).trans (Relabelling.addCongr _ _)).subCongr\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yl\n⊢ -(fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j)) fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yL j) ≡r\n -xL i * yL j\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yl\n⊢ -(fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j)) fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (mk yl yr yL yR) ≡r\n -xL i * mk yl yr yL yR\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yl\n⊢ -(fun a =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yL j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yR j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yL j))\n (yL a))\n j ≡r\n (mk xr xl (fun j => -xR j) fun i => -xL i) * yL j\n[PROOFSTEP]\nexact (negMulRelabelling _ _).symm\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yl\n⊢ -(fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j)) fun val =>\n Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (mk yl yr yL yR) ≡r\n -xL i * mk yl yr yL yR\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yl\n⊢ -(fun a =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yL j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yR j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yL j))\n (yL a))\n j ≡r\n (mk xr xl (fun j => -xR j) fun i => -xL i) * yL j\n[PROOFSTEP]\nexact (negMulRelabelling _ _).symm\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yl\n⊢ -(fun a =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yL j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i y +\n IHyr j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xL a))\n i (yR j))\n fun val =>\n Prod.casesOn val fun i j =>\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i y +\n IHyl j -\n (fun a =>\n rec (motive := fun x => PGame → PGame)\n (fun xl xr a a IHxl IHxr y =>\n rec\n (fun yl yr yL yR IHyl IHyr =>\n let_fun y := mk yl yr yL yR;\n mk (xl × yl ⊕ xr × yr) (xl × yr ⊕ xr × yl)\n (fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyl j - IHxl i (yL j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyr j - IHxr i (yR j))\n fun a =>\n Sum.casesOn a\n (fun val => Prod.casesOn val fun i j => IHxl i y + IHyr j - IHxl i (yR j))\n fun val => Prod.casesOn val fun i j => IHxr i y + IHyl j - IHxr i (yL j))\n y)\n (xR a))\n i (yL j))\n (yL a))\n j ≡r\n (mk xr xl (fun j => -xR j) fun i => -xL i) * yL j\n[PROOFSTEP]\nchange -(mk xl xr xL xR * _) ≡r _\n[GOAL]\nx y : PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yl\n⊢ -(mk xl xr xL xR * yL j) ≡r (mk xr xl (fun j => -xR j) fun i => -xL i) * yL j\n[PROOFSTEP]\nexact (negMulRelabelling _ _).symm\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := mk yl yr yL yR } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := yL j } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := yL j } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := mk yl yr yL yR } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := yR j } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := yR j } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := mk yl yr yL yR } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := yR j } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xr\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := yR j } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := mk yl yr yL yR } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := yL j } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\ni : xl\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => (x, snd)) Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := yL j } { fst := mk xl xr xL xR, snd := mk yl yr yL yR }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nx y z : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\n⊢ Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nlet x := mk xl xr xL xR\n[GOAL]\nx✝ y z : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\n⊢ Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nlet y := mk yl yr yL yR\n[GOAL]\nx✝ y✝ z : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\n⊢ Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nlet z := mk zl zr zL zR\n[GOAL]\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nrefine' quot_eq_of_mk'_quot_eq _ _ _ _\n[GOAL]\ncase refine'_1\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ LeftMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)) ≃\n LeftMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase refine'_1.toFun\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ LeftMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)) →\n LeftMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nrintro (⟨_, _ | _⟩ | ⟨_, _ | _⟩)\n[GOAL]\ncase refine'_1.toFun.inl.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xl\nval✝ : yl\n⊢ LeftMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_1.toFun.inl.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xl\nval✝ : zl\n⊢ LeftMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_1.toFun.inr.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xr\nval✝ : yr\n⊢ LeftMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_1.toFun.inr.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xr\nval✝ : zr\n⊢ LeftMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_1.invFun\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ LeftMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR) →\n LeftMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))\n[PROOFSTEP]\nrintro (⟨⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, _⟩ | ⟨_, _⟩)\n[GOAL]\ncase refine'_1.invFun.inl.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xl\nsnd✝ : yl\n⊢ LeftMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_1.invFun.inl.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xr\nsnd✝ : yr\n⊢ LeftMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_1.invFun.inr.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xl\nsnd✝ : zl\n⊢ LeftMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_1.invFun.inr.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xr\nsnd✝ : zr\n⊢ LeftMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_1.left_inv\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ LeftInverse\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val))\n[PROOFSTEP]\nrintro (⟨_, _ | _⟩ | ⟨_, _ | _⟩)\n[GOAL]\ncase refine'_1.left_inv.inl.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xl\nval✝ : yl\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)))\n (Sum.inl (fst✝, Sum.inl val✝))) =\n Sum.inl (fst✝, Sum.inl val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1.left_inv.inl.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xl\nval✝ : zl\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)))\n (Sum.inl (fst✝, Sum.inr val✝))) =\n Sum.inl (fst✝, Sum.inr val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1.left_inv.inr.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xr\nval✝ : yr\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)))\n (Sum.inr (fst✝, Sum.inl val✝))) =\n Sum.inr (fst✝, Sum.inl val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1.left_inv.inr.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xr\nval✝ : zr\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)))\n (Sum.inr (fst✝, Sum.inr val✝))) =\n Sum.inr (fst✝, Sum.inr val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1.right_inv\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ Function.RightInverse\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val))\n[PROOFSTEP]\nrintro (⟨⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, _⟩ | ⟨_, _⟩)\n[GOAL]\ncase refine'_1.right_inv.inl.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xl\nsnd✝ : yl\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n (Sum.inl (Sum.inl (fst✝, snd✝)))) =\n Sum.inl (Sum.inl (fst✝, snd✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1.right_inv.inl.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xr\nsnd✝ : yr\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n (Sum.inl (Sum.inr (fst✝, snd✝)))) =\n Sum.inl (Sum.inr (fst✝, snd✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1.right_inv.inr.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xl\nsnd✝ : zl\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n (Sum.inr (Sum.inl (fst✝, snd✝)))) =\n Sum.inr (Sum.inl (fst✝, snd✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1.right_inv.inr.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xr\nsnd✝ : zr\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n (Sum.inr (Sum.inr (fst✝, snd✝)))) =\n Sum.inr (Sum.inr (fst✝, snd✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ RightMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)) ≃\n RightMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase refine'_2.toFun\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ RightMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)) →\n RightMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nrintro (⟨_, _ | _⟩ | ⟨_, _ | _⟩)\n[GOAL]\ncase refine'_2.toFun.inl.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xl\nval✝ : yr\n⊢ RightMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_2.toFun.inl.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xl\nval✝ : zr\n⊢ RightMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_2.toFun.inr.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xr\nval✝ : yl\n⊢ RightMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_2.toFun.inr.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xr\nval✝ : zl\n⊢ RightMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_2.invFun\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ RightMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR) →\n RightMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))\n[PROOFSTEP]\nrintro (⟨⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, _⟩ | ⟨_, _⟩)\n[GOAL]\ncase refine'_2.invFun.inl.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xl\nsnd✝ : yr\n⊢ RightMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_2.invFun.inl.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xr\nsnd✝ : yl\n⊢ RightMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_2.invFun.inr.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xl\nsnd✝ : zr\n⊢ RightMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_2.invFun.inr.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xr\nsnd✝ : zl\n⊢ RightMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 6 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_2.left_inv\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ LeftInverse\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val))\n[PROOFSTEP]\nrintro (⟨_, _ | _⟩ | ⟨_, _ | _⟩)\n[GOAL]\ncase refine'_2.left_inv.inl.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xl\nval✝ : yr\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)))\n (Sum.inl (fst✝, Sum.inl val✝))) =\n Sum.inl (fst✝, Sum.inl val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2.left_inv.inl.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xl\nval✝ : zr\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)))\n (Sum.inl (fst✝, Sum.inr val✝))) =\n Sum.inl (fst✝, Sum.inr val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2.left_inv.inr.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xr\nval✝ : yl\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)))\n (Sum.inr (fst✝, Sum.inl val✝))) =\n Sum.inr (fst✝, Sum.inl val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2.left_inv.inr.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xr\nval✝ : zl\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)))\n (Sum.inr (fst✝, Sum.inr val✝))) =\n Sum.inr (fst✝, Sum.inr val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2.right_inv\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ Function.RightInverse\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val))\n[PROOFSTEP]\nrintro (⟨⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, _⟩ | ⟨_, _⟩)\n[GOAL]\ncase refine'_2.right_inv.inl.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xl\nsnd✝ : yr\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n (Sum.inl (Sum.inl (fst✝, snd✝)))) =\n Sum.inl (Sum.inl (fst✝, snd✝))\n[PROOFSTEP]\nrfl\n -- Porting note: explicitly wrote out arguments to each recursive\n -- quot_left_distrib reference below, because otherwise the decreasing_by block\n -- failed. Previously, each branch ended with: `simp [quot_left_distrib]; abel`\n -- See https://github.com/leanprover/lean4/issues/2288\n[GOAL]\ncase refine'_2.right_inv.inl.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xr\nsnd✝ : yl\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n (Sum.inl (Sum.inr (fst✝, snd✝)))) =\n Sum.inl (Sum.inr (fst✝, snd✝))\n[PROOFSTEP]\nrfl\n -- Porting note: explicitly wrote out arguments to each recursive\n -- quot_left_distrib reference below, because otherwise the decreasing_by block\n -- failed. Previously, each branch ended with: `simp [quot_left_distrib]; abel`\n -- See https://github.com/leanprover/lean4/issues/2288\n[GOAL]\ncase refine'_2.right_inv.inr.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xl\nsnd✝ : zr\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n (Sum.inr (Sum.inl (fst✝, snd✝)))) =\n Sum.inr (Sum.inl (fst✝, snd✝))\n[PROOFSTEP]\nrfl\n -- Porting note: explicitly wrote out arguments to each recursive\n -- quot_left_distrib reference below, because otherwise the decreasing_by block\n -- failed. Previously, each branch ended with: `simp [quot_left_distrib]; abel`\n -- See https://github.com/leanprover/lean4/issues/2288\n[GOAL]\ncase refine'_2.right_inv.inr.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝ : xr\nsnd✝ : zl\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n (Sum.inr (Sum.inr (fst✝, snd✝)))) =\n Sum.inr (Sum.inr (fst✝, snd✝))\n[PROOFSTEP]\nrfl\n -- Porting note: explicitly wrote out arguments to each recursive\n -- quot_left_distrib reference below, because otherwise the decreasing_by block\n -- failed. Previously, each branch ended with: `simp [quot_left_distrib]; abel`\n -- See https://github.com/leanprover/lean4/issues/2288\n[GOAL]\ncase refine'_3\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ ∀ (i : LeftMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))),\n Quotient.mk setoid (moveLeft (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)) i) =\n Quotient.mk setoid\n (moveLeft (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),\n left_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val\n (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n x) =\n x) }\n i))\n[PROOFSTEP]\nrintro (⟨i, j | k⟩ | ⟨i, j | k⟩)\n[GOAL]\ncase refine'_3.inl.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nj : yl\n⊢ Quotient.mk setoid (moveLeft (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)) (Sum.inl (i, Sum.inl j))) =\n Quotient.mk setoid\n (moveLeft (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),\n left_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n x) =\n x) }\n (Sum.inl (i, Sum.inl j))))\n[PROOFSTEP]\nchange ⟦xL i * (y + z) + x * (yL j + z) - xL i * (yL j + z)⟧ = ⟦xL i * y + x * yL j - xL i * yL j + x * z⟧\n[GOAL]\ncase refine'_3.inl.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * (y + z) + x * (yL j + z) - xL i * (yL j + z)) =\n Quotient.mk setoid (xL i * y + x * yL j - xL i * yL j + x * z)\n[PROOFSTEP]\nsimp only [quot_sub, quot_add]\n[GOAL]\ncase refine'_3.inl.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR + mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j + mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yL j + mk zl zr zL zR)) =\n Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yL j) -\n Quotient.mk setoid (xL i * yL j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nrw [quot_left_distrib (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inl.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j + mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yL j + mk zl zr zL zR)) =\n Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yL j) -\n Quotient.mk setoid (xL i * yL j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nrw [quot_left_distrib (mk xl xr xL xR) (yL j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inl.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * yL j) + Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yL j + mk zl zr zL zR)) =\n Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yL j) -\n Quotient.mk setoid (xL i * yL j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nrw [quot_left_distrib (xL i) (yL j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inl.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * yL j) + Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)) -\n (Quotient.mk setoid (xL i * yL j) + Quotient.mk setoid (xL i * mk zl zr zL zR)) =\n Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yL j) -\n Quotient.mk setoid (xL i * yL j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_3.inl.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * yL j) + Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)) -\n (Quotient.mk setoid (xL i * yL j) + Quotient.mk setoid (xL i * mk zl zr zL zR)) =\n Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yL j) -\n Quotient.mk setoid (xL i * yL j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_3.inl.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nk : zl\n⊢ Quotient.mk setoid (moveLeft (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)) (Sum.inl (i, Sum.inr k))) =\n Quotient.mk setoid\n (moveLeft (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),\n left_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n x) =\n x) }\n (Sum.inl (i, Sum.inr k))))\n[PROOFSTEP]\nchange ⟦xL i * (y + z) + x * (y + zL k) - xL i * (y + zL k)⟧ = ⟦x * y + (xL i * z + x * zL k - xL i * zL k)⟧\n[GOAL]\ncase refine'_3.inl.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nk : zl\n⊢ Quotient.mk setoid (xL i * (y + z) + x * (y + zL k) - xL i * (y + zL k)) =\n Quotient.mk setoid (x * y + (xL i * z + x * zL k - xL i * zL k))\n[PROOFSTEP]\nsimp only [quot_sub, quot_add]\n[GOAL]\ncase refine'_3.inl.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nk : zl\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR + mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR + zL k)) -\n Quotient.mk setoid (xL i * (mk yl yr yL yR + zL k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xL i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zL k) -\n Quotient.mk setoid (xL i * zL k))\n[PROOFSTEP]\nrw [quot_left_distrib (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inl.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nk : zl\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR + zL k)) -\n Quotient.mk setoid (xL i * (mk yl yr yL yR + zL k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xL i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zL k) -\n Quotient.mk setoid (xL i * zL k))\n[PROOFSTEP]\nrw [quot_left_distrib (mk xl xr xL xR) (mk yl yr yL yR) (zL k)]\n[GOAL]\ncase refine'_3.inl.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nk : zl\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * zL k)) -\n Quotient.mk setoid (xL i * (mk yl yr yL yR + zL k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xL i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zL k) -\n Quotient.mk setoid (xL i * zL k))\n[PROOFSTEP]\nrw [quot_left_distrib (xL i) (mk yl yr yL yR) (zL k)]\n[GOAL]\ncase refine'_3.inl.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nk : zl\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * zL k)) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * zL k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xL i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zL k) -\n Quotient.mk setoid (xL i * zL k))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_3.inl.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nk : zl\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * zL k)) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * zL k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xL i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zL k) -\n Quotient.mk setoid (xL i * zL k))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_3.inr.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nj : yr\n⊢ Quotient.mk setoid (moveLeft (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)) (Sum.inr (i, Sum.inl j))) =\n Quotient.mk setoid\n (moveLeft (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),\n left_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n x) =\n x) }\n (Sum.inr (i, Sum.inl j))))\n[PROOFSTEP]\nchange ⟦xR i * (y + z) + x * (yR j + z) - xR i * (yR j + z)⟧ = ⟦xR i * y + x * yR j - xR i * yR j + x * z⟧\n[GOAL]\ncase refine'_3.inr.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * (y + z) + x * (yR j + z) - xR i * (yR j + z)) =\n Quotient.mk setoid (xR i * y + x * yR j - xR i * yR j + x * z)\n[PROOFSTEP]\nsimp only [quot_sub, quot_add]\n[GOAL]\ncase refine'_3.inr.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR + mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j + mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yR j + mk zl zr zL zR)) =\n Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yR j) -\n Quotient.mk setoid (xR i * yR j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nrw [quot_left_distrib (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inr.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j + mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yR j + mk zl zr zL zR)) =\n Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yR j) -\n Quotient.mk setoid (xR i * yR j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nrw [quot_left_distrib (mk xl xr xL xR) (yR j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inr.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * yR j) + Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yR j + mk zl zr zL zR)) =\n Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yR j) -\n Quotient.mk setoid (xR i * yR j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nrw [quot_left_distrib (xR i) (yR j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inr.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * yR j) + Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)) -\n (Quotient.mk setoid (xR i * yR j) + Quotient.mk setoid (xR i * mk zl zr zL zR)) =\n Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yR j) -\n Quotient.mk setoid (xR i * yR j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_3.inr.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * yR j) + Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)) -\n (Quotient.mk setoid (xR i * yR j) + Quotient.mk setoid (xR i * mk zl zr zL zR)) =\n Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yR j) -\n Quotient.mk setoid (xR i * yR j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_3.inr.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nk : zr\n⊢ Quotient.mk setoid (moveLeft (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)) (Sum.inr (i, Sum.inr k))) =\n Quotient.mk setoid\n (moveLeft (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),\n left_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n x) =\n x) }\n (Sum.inr (i, Sum.inr k))))\n[PROOFSTEP]\nchange ⟦xR i * (y + z) + x * (y + zR k) - xR i * (y + zR k)⟧ = ⟦x * y + (xR i * z + x * zR k - xR i * zR k)⟧\n[GOAL]\ncase refine'_3.inr.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nk : zr\n⊢ Quotient.mk setoid (xR i * (y + z) + x * (y + zR k) - xR i * (y + zR k)) =\n Quotient.mk setoid (x * y + (xR i * z + x * zR k - xR i * zR k))\n[PROOFSTEP]\nsimp only [quot_sub, quot_add]\n[GOAL]\ncase refine'_3.inr.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nk : zr\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR + mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR + zR k)) -\n Quotient.mk setoid (xR i * (mk yl yr yL yR + zR k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xR i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zR k) -\n Quotient.mk setoid (xR i * zR k))\n[PROOFSTEP]\nrw [quot_left_distrib (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inr.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nk : zr\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR + zR k)) -\n Quotient.mk setoid (xR i * (mk yl yr yL yR + zR k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xR i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zR k) -\n Quotient.mk setoid (xR i * zR k))\n[PROOFSTEP]\nrw [quot_left_distrib (mk xl xr xL xR) (mk yl yr yL yR) (zR k)]\n[GOAL]\ncase refine'_3.inr.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nk : zr\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * zR k)) -\n Quotient.mk setoid (xR i * (mk yl yr yL yR + zR k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xR i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zR k) -\n Quotient.mk setoid (xR i * zR k))\n[PROOFSTEP]\nrw [quot_left_distrib (xR i) (mk yl yr yL yR) (zR k)]\n[GOAL]\ncase refine'_3.inr.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nk : zr\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * zR k)) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * zR k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xR i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zR k) -\n Quotient.mk setoid (xR i * zR k))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_3.inr.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nk : zr\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * zR k)) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * zR k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xR i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zR k) -\n Quotient.mk setoid (xR i * zR k))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_4\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ ∀ (j : RightMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))),\n Quotient.mk setoid (moveRight (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)) j) =\n Quotient.mk setoid\n (moveRight (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),\n left_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val\n (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n x) =\n x) }\n j))\n[PROOFSTEP]\nrintro (⟨i, j | k⟩ | ⟨i, j | k⟩)\n[GOAL]\ncase refine'_4.inl.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nj : yr\n⊢ Quotient.mk setoid (moveRight (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)) (Sum.inl (i, Sum.inl j))) =\n Quotient.mk setoid\n (moveRight (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),\n left_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n x) =\n x) }\n (Sum.inl (i, Sum.inl j))))\n[PROOFSTEP]\nchange ⟦xL i * (y + z) + x * (yR j + z) - xL i * (yR j + z)⟧ = ⟦xL i * y + x * yR j - xL i * yR j + x * z⟧\n[GOAL]\ncase refine'_4.inl.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * (y + z) + x * (yR j + z) - xL i * (yR j + z)) =\n Quotient.mk setoid (xL i * y + x * yR j - xL i * yR j + x * z)\n[PROOFSTEP]\nsimp only [quot_sub, quot_add]\n[GOAL]\ncase refine'_4.inl.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR + mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j + mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yR j + mk zl zr zL zR)) =\n Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yR j) -\n Quotient.mk setoid (xL i * yR j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nrw [quot_left_distrib (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inl.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j + mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yR j + mk zl zr zL zR)) =\n Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yR j) -\n Quotient.mk setoid (xL i * yR j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nrw [quot_left_distrib (mk xl xr xL xR) (yR j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inl.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * yR j) + Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yR j + mk zl zr zL zR)) =\n Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yR j) -\n Quotient.mk setoid (xL i * yR j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nrw [quot_left_distrib (xL i) (yR j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inl.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * yR j) + Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)) -\n (Quotient.mk setoid (xL i * yR j) + Quotient.mk setoid (xL i * mk zl zr zL zR)) =\n Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yR j) -\n Quotient.mk setoid (xL i * yR j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_4.inl.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * yR j) + Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)) -\n (Quotient.mk setoid (xL i * yR j) + Quotient.mk setoid (xL i * mk zl zr zL zR)) =\n Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yR j) -\n Quotient.mk setoid (xL i * yR j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_4.inl.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nk : zr\n⊢ Quotient.mk setoid (moveRight (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)) (Sum.inl (i, Sum.inr k))) =\n Quotient.mk setoid\n (moveRight (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),\n left_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n x) =\n x) }\n (Sum.inl (i, Sum.inr k))))\n[PROOFSTEP]\nchange ⟦xL i * (y + z) + x * (y + zR k) - xL i * (y + zR k)⟧ = ⟦x * y + (xL i * z + x * zR k - xL i * zR k)⟧\n[GOAL]\ncase refine'_4.inl.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nk : zr\n⊢ Quotient.mk setoid (xL i * (y + z) + x * (y + zR k) - xL i * (y + zR k)) =\n Quotient.mk setoid (x * y + (xL i * z + x * zR k - xL i * zR k))\n[PROOFSTEP]\nsimp only [quot_sub, quot_add]\n[GOAL]\ncase refine'_4.inl.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nk : zr\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR + mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR + zR k)) -\n Quotient.mk setoid (xL i * (mk yl yr yL yR + zR k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xL i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zR k) -\n Quotient.mk setoid (xL i * zR k))\n[PROOFSTEP]\nrw [quot_left_distrib (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inl.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nk : zr\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR + zR k)) -\n Quotient.mk setoid (xL i * (mk yl yr yL yR + zR k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xL i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zR k) -\n Quotient.mk setoid (xL i * zR k))\n[PROOFSTEP]\nrw [quot_left_distrib (mk xl xr xL xR) (mk yl yr yL yR) (zR k)]\n[GOAL]\ncase refine'_4.inl.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nk : zr\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * zR k)) -\n Quotient.mk setoid (xL i * (mk yl yr yL yR + zR k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xL i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zR k) -\n Quotient.mk setoid (xL i * zR k))\n[PROOFSTEP]\nrw [quot_left_distrib (xL i) (mk yl yr yL yR) (zR k)]\n[GOAL]\ncase refine'_4.inl.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nk : zr\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * zR k)) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * zR k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xL i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zR k) -\n Quotient.mk setoid (xL i * zR k))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_4.inl.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xl\nk : zr\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * zR k)) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR) + Quotient.mk setoid (xL i * zR k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xL i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zR k) -\n Quotient.mk setoid (xL i * zR k))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_4.inr.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nj : yl\n⊢ Quotient.mk setoid (moveRight (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)) (Sum.inr (i, Sum.inl j))) =\n Quotient.mk setoid\n (moveRight (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),\n left_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n x) =\n x) }\n (Sum.inr (i, Sum.inl j))))\n[PROOFSTEP]\nchange ⟦xR i * (y + z) + x * (yL j + z) - xR i * (yL j + z)⟧ = ⟦xR i * y + x * yL j - xR i * yL j + x * z⟧\n[GOAL]\ncase refine'_4.inr.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * (y + z) + x * (yL j + z) - xR i * (yL j + z)) =\n Quotient.mk setoid (xR i * y + x * yL j - xR i * yL j + x * z)\n[PROOFSTEP]\nsimp only [quot_sub, quot_add]\n[GOAL]\ncase refine'_4.inr.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR + mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j + mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yL j + mk zl zr zL zR)) =\n Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yL j) -\n Quotient.mk setoid (xR i * yL j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nrw [quot_left_distrib (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inr.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j + mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yL j + mk zl zr zL zR)) =\n Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yL j) -\n Quotient.mk setoid (xR i * yL j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nrw [quot_left_distrib (mk xl xr xL xR) (yL j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inr.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * yL j) + Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yL j + mk zl zr zL zR)) =\n Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yL j) -\n Quotient.mk setoid (xR i * yL j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nrw [quot_left_distrib (xR i) (yL j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inr.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * yL j) + Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)) -\n (Quotient.mk setoid (xR i * yL j) + Quotient.mk setoid (xR i * mk zl zr zL zR)) =\n Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yL j) -\n Quotient.mk setoid (xR i * yL j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_4.inr.mk.inl\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * yL j) + Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)) -\n (Quotient.mk setoid (xR i * yL j) + Quotient.mk setoid (xR i * mk zl zr zL zR)) =\n Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * yL j) -\n Quotient.mk setoid (xR i * yL j) +\n Quotient.mk setoid (mk xl xr xL xR * mk zl zr zL zR)\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_4.inr.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nk : zl\n⊢ Quotient.mk setoid (moveRight (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR)) (Sum.inr (i, Sum.inr k))) =\n Quotient.mk setoid\n (moveRight (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val => Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val => Sum.inr (Sum.inr (fst, val)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd)) fun val =>\n Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd),\n left_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * (mk yl yr yL yR + mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * mk yl yr yL yR + mk xl xr xL xR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inl (fst, val))) fun val =>\n Sum.inr (Sum.inl (fst, val)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Sum.inl (Sum.inr (fst, val))) fun val =>\n Sum.inr (Sum.inr (fst, val)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inl snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inl snd))\n fun val =>\n Sum.casesOn val (fun val => Prod.casesOn val fun fst snd => Sum.inl (fst, Sum.inr snd))\n fun val => Prod.casesOn val fun fst snd => Sum.inr (fst, Sum.inr snd))\n x) =\n x) }\n (Sum.inr (i, Sum.inr k))))\n[PROOFSTEP]\nchange ⟦xR i * (y + z) + x * (y + zL k) - xR i * (y + zL k)⟧ = ⟦x * y + (xR i * z + x * zL k - xR i * zL k)⟧\n[GOAL]\ncase refine'_4.inr.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nk : zl\n⊢ Quotient.mk setoid (xR i * (y + z) + x * (y + zL k) - xR i * (y + zL k)) =\n Quotient.mk setoid (x * y + (xR i * z + x * zL k - xR i * zL k))\n[PROOFSTEP]\nsimp only [quot_sub, quot_add]\n[GOAL]\ncase refine'_4.inr.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nk : zl\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR + mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR + zL k)) -\n Quotient.mk setoid (xR i * (mk yl yr yL yR + zL k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xR i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zL k) -\n Quotient.mk setoid (xR i * zL k))\n[PROOFSTEP]\nrw [quot_left_distrib (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inr.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nk : zl\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR + zL k)) -\n Quotient.mk setoid (xR i * (mk yl yr yL yR + zL k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xR i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zL k) -\n Quotient.mk setoid (xR i * zL k))\n[PROOFSTEP]\nrw [quot_left_distrib (mk xl xr xL xR) (mk yl yr yL yR) (zL k)]\n[GOAL]\ncase refine'_4.inr.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nk : zl\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * zL k)) -\n Quotient.mk setoid (xR i * (mk yl yr yL yR + zL k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xR i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zL k) -\n Quotient.mk setoid (xR i * zL k))\n[PROOFSTEP]\nrw [quot_left_distrib (xR i) (mk yl yr yL yR) (zL k)]\n[GOAL]\ncase refine'_4.inr.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nk : zl\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * zL k)) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * zL k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xR i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zL k) -\n Quotient.mk setoid (xR i * zL k))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_4.inr.mk.inr\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\ni : xr\nk : zl\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * mk zl zr zL zR) +\n (Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) + Quotient.mk setoid (mk xl xr xL xR * zL k)) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR) + Quotient.mk setoid (xR i * zL k)) =\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR) +\n (Quotient.mk setoid (xR i * mk zl zr zL zR) + Quotient.mk setoid (mk xl xr xL xR * zL k) -\n Quotient.mk setoid (xR i * zL k))\n[PROOFSTEP]\nabel\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\ni : xl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yL j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\ni : xl\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := yL j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\ni : xl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\nk : zl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\ni : xl\nk : zl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := mk yl yr yL yR, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\ni : xr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yR j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\ni : xr\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := yR j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\ni : xr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\nk : zr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\ni : xr\nk : zr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := mk yl yr yL yR, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\ni : xl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yR j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\ni : xl\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := yR j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\ni : xl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\nk : zr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\ni : xl\nk : zr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := mk yl yr yL yR, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\ni : xr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yL j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\ni : xr\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := yL j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\ni : xr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\nk : zl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * (y.2.1 + y.2.2)) = Quotient.mk setoid (y.1 * y.2.1) + Quotient.mk setoid (y.1 * y.2.2)\ni : xr\nk : zl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := mk yl yr yL yR, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nx y z : PGame\n⊢ Quotient.mk setoid (x * (y - z)) = Quotient.mk setoid (x * y) - Quotient.mk setoid (x * z)\n[PROOFSTEP]\nchange (⟦x * (y + -z)⟧ : Game) = ⟦x * y⟧ + -⟦x * z⟧\n[GOAL]\nx y z : PGame\n⊢ Quotient.mk setoid (x * (y + -z)) = Quotient.mk setoid (x * y) + -Quotient.mk setoid (x * z)\n[PROOFSTEP]\nrw [quot_left_distrib, quot_mul_neg]\n[GOAL]\nx y z : PGame\n⊢ Quotient.mk setoid ((x + y) * z) = Quotient.mk setoid (x * z) + Quotient.mk setoid (y * z)\n[PROOFSTEP]\nsimp only [quot_mul_comm, quot_left_distrib]\n[GOAL]\nx y z : PGame\n⊢ Quotient.mk setoid ((y - z) * x) = Quotient.mk setoid (y * x) - Quotient.mk setoid (z * x)\n[PROOFSTEP]\nchange (⟦(y + -z) * x⟧ : Game) = ⟦y * x⟧ + -⟦z * x⟧\n[GOAL]\nx y z : PGame\n⊢ Quotient.mk setoid ((y + -z) * x) = Quotient.mk setoid (y * x) + -Quotient.mk setoid (z * x)\n[PROOFSTEP]\nrw [quot_right_distrib, quot_neg_mul]\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\n⊢ mk xl xr xL xR * 1 ≡r mk xl xr xL xR\n[PROOFSTEP]\nshow _ * One.one ≡r _\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\n⊢ mk xl xr xL xR * One.one ≡r mk xl xr xL xR\n[PROOFSTEP]\nunfold One.one\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\n⊢ mk xl xr xL xR * instOnePGame.1 ≡r mk xl xr xL xR\n[PROOFSTEP]\nunfold instOnePGame\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\n⊢ mk xl xr xL xR * { one := mk PUnit PEmpty (fun x => 0) PEmpty.elim }.1 ≡r mk xl xr xL xR\n[PROOFSTEP]\nchange\n mk _ _ _ _ * mk _ _ _ _ ≡r\n _\n -- Porting note: changed `refine'` to `refine`,\n -- otherwise there are typeclass inference failures.\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\n⊢ mk xl xr xL xR * mk PUnit PEmpty (fun x => 0) PEmpty.elim ≡r mk xl xr xL xR\n[PROOFSTEP]\nrefine ⟨(Equiv.sumEmpty _ _).trans (Equiv.prodPUnit _), (Equiv.emptySum _ _).trans (Equiv.prodPUnit _), ?_, ?_⟩\n[GOAL]\ncase refine_1\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\n⊢ (i : LeftMoves (mk xl xr xL xR * mk PUnit PEmpty (fun x => 0) PEmpty.elim)) →\n moveLeft (mk xl xr xL xR * mk PUnit PEmpty (fun x => 0) PEmpty.elim) i ≡r\n moveLeft (mk xl xr xL xR) (↑((Equiv.sumEmpty (xl × PUnit) (xr × PEmpty)).trans (Equiv.prodPUnit xl)) i)\n[PROOFSTEP]\ntry rintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)\n[GOAL]\ncase refine_1\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\n⊢ (i : LeftMoves (mk xl xr xL xR * mk PUnit PEmpty (fun x => 0) PEmpty.elim)) →\n moveLeft (mk xl xr xL xR * mk PUnit PEmpty (fun x => 0) PEmpty.elim) i ≡r\n moveLeft (mk xl xr xL xR) (↑((Equiv.sumEmpty (xl × PUnit) (xr × PEmpty)).trans (Equiv.prodPUnit xl)) i)\n[PROOFSTEP]\nrintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)\n[GOAL]\ncase refine_2\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\n⊢ (j : RightMoves (mk xl xr xL xR * mk PUnit PEmpty (fun x => 0) PEmpty.elim)) →\n moveRight (mk xl xr xL xR * mk PUnit PEmpty (fun x => 0) PEmpty.elim) j ≡r\n moveRight (mk xl xr xL xR) (↑((Equiv.emptySum (xl × PEmpty) (xr × PUnit)).trans (Equiv.prodPUnit xr)) j)\n[PROOFSTEP]\ntry rintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)\n[GOAL]\ncase refine_2\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\n⊢ (j : RightMoves (mk xl xr xL xR * mk PUnit PEmpty (fun x => 0) PEmpty.elim)) →\n moveRight (mk xl xr xL xR * mk PUnit PEmpty (fun x => 0) PEmpty.elim) j ≡r\n moveRight (mk xl xr xL xR) (↑((Equiv.emptySum (xl × PEmpty) (xr × PUnit)).trans (Equiv.prodPUnit xr)) j)\n[PROOFSTEP]\nrintro (⟨i, ⟨⟩⟩ | ⟨i, ⟨⟩⟩)\n[GOAL]\ncase refine_1.inl.mk.unit\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\ni : xl\n⊢ moveLeft (mk xl xr xL xR * mk PUnit PEmpty (fun x => 0) PEmpty.elim) (Sum.inl (i, PUnit.unit)) ≡r\n moveLeft (mk xl xr xL xR)\n (↑((Equiv.sumEmpty (xl × PUnit) (xr × PEmpty)).trans (Equiv.prodPUnit xl)) (Sum.inl (i, PUnit.unit)))\n[PROOFSTEP]\n{ (try intro i)\n dsimp\n apply (Relabelling.subCongr (Relabelling.refl _) (mulZeroRelabelling _)).trans\n rw [sub_zero]\n exact\n (addZeroRelabelling _).trans <|\n (((mulOneRelabelling _).addCongr (mulZeroRelabelling _)).trans <| addZeroRelabelling _)\n}\n[GOAL]\ncase refine_1.inl.mk.unit\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\ni : xl\n⊢ moveLeft (mk xl xr xL xR * mk PUnit PEmpty (fun x => 0) PEmpty.elim) (Sum.inl (i, PUnit.unit)) ≡r\n moveLeft (mk xl xr xL xR)\n (↑((Equiv.sumEmpty (xl × PUnit) (xr × PEmpty)).trans (Equiv.prodPUnit xl)) (Sum.inl (i, PUnit.unit)))\n[PROOFSTEP]\ntry intro i\n[GOAL]\ncase refine_1.inl.mk.unit\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\ni : xl\n⊢ moveLeft (mk xl xr xL xR * mk PUnit PEmpty (fun x => 0) PEmpty.elim) (Sum.inl (i, PUnit.unit)) ≡r\n moveLeft (mk xl xr xL xR)\n (↑((Equiv.sumEmpty (xl × PUnit) (xr × PEmpty)).trans (Equiv.prodPUnit xl)) (Sum.inl (i, PUnit.unit)))\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine_1.inl.mk.unit\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\ni : xl\n⊢ moveLeft (mk xl xr xL xR * mk PUnit PEmpty (fun x => 0) PEmpty.elim) (Sum.inl (i, PUnit.unit)) ≡r\n moveLeft (mk xl xr xL xR)\n (↑((Equiv.sumEmpty (xl × PUnit) (xr × PEmpty)).trans (Equiv.prodPUnit xl)) (Sum.inl (i, PUnit.unit)))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine_1.inl.mk.unit\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\ni : xl\n⊢ xL i * mk PUnit PEmpty (fun x => 0) PEmpty.elim + mk xl xr xL xR * 0 - xL i * 0 ≡r\n xL (↑(Equiv.sumEmpty (xl × PUnit) (xr × PEmpty)) (Sum.inl (i, PUnit.unit))).fst\n[PROOFSTEP]\napply (Relabelling.subCongr (Relabelling.refl _) (mulZeroRelabelling _)).trans\n[GOAL]\ncase refine_1.inl.mk.unit\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\ni : xl\n⊢ xL i * mk PUnit PEmpty (fun x => 0) PEmpty.elim + mk xl xr xL xR * 0 - 0 ≡r\n xL (↑(Equiv.sumEmpty (xl × PUnit) (xr × PEmpty)) (Sum.inl (i, PUnit.unit))).fst\n[PROOFSTEP]\nrw [sub_zero]\n[GOAL]\ncase refine_1.inl.mk.unit\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\ni : xl\n⊢ xL i * mk PUnit PEmpty (fun x => 0) PEmpty.elim + mk xl xr xL xR * 0 + 0 ≡r\n xL (↑(Equiv.sumEmpty (xl × PUnit) (xr × PEmpty)) (Sum.inl (i, PUnit.unit))).fst\n[PROOFSTEP]\nexact\n (addZeroRelabelling _).trans <|\n (((mulOneRelabelling _).addCongr (mulZeroRelabelling _)).trans <| addZeroRelabelling _)\n[GOAL]\ncase refine_2.inr.mk.unit\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\ni : xr\n⊢ moveRight (mk xl xr xL xR * mk PUnit PEmpty (fun x => 0) PEmpty.elim) (Sum.inr (i, PUnit.unit)) ≡r\n moveRight (mk xl xr xL xR)\n (↑((Equiv.emptySum (xl × PEmpty) (xr × PUnit)).trans (Equiv.prodPUnit xr)) (Sum.inr (i, PUnit.unit)))\n[PROOFSTEP]\n{ (try intro i)\n dsimp\n apply (Relabelling.subCongr (Relabelling.refl _) (mulZeroRelabelling _)).trans\n rw [sub_zero]\n exact\n (addZeroRelabelling _).trans <|\n (((mulOneRelabelling _).addCongr (mulZeroRelabelling _)).trans <| addZeroRelabelling _)\n}\n[GOAL]\ncase refine_2.inr.mk.unit\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\ni : xr\n⊢ moveRight (mk xl xr xL xR * mk PUnit PEmpty (fun x => 0) PEmpty.elim) (Sum.inr (i, PUnit.unit)) ≡r\n moveRight (mk xl xr xL xR)\n (↑((Equiv.emptySum (xl × PEmpty) (xr × PUnit)).trans (Equiv.prodPUnit xr)) (Sum.inr (i, PUnit.unit)))\n[PROOFSTEP]\ntry intro i\n[GOAL]\ncase refine_2.inr.mk.unit\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\ni : xr\n⊢ moveRight (mk xl xr xL xR * mk PUnit PEmpty (fun x => 0) PEmpty.elim) (Sum.inr (i, PUnit.unit)) ≡r\n moveRight (mk xl xr xL xR)\n (↑((Equiv.emptySum (xl × PEmpty) (xr × PUnit)).trans (Equiv.prodPUnit xr)) (Sum.inr (i, PUnit.unit)))\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine_2.inr.mk.unit\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\ni : xr\n⊢ moveRight (mk xl xr xL xR * mk PUnit PEmpty (fun x => 0) PEmpty.elim) (Sum.inr (i, PUnit.unit)) ≡r\n moveRight (mk xl xr xL xR)\n (↑((Equiv.emptySum (xl × PEmpty) (xr × PUnit)).trans (Equiv.prodPUnit xr)) (Sum.inr (i, PUnit.unit)))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine_2.inr.mk.unit\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\ni : xr\n⊢ xR i * mk PUnit PEmpty (fun x => 0) PEmpty.elim + mk xl xr xL xR * 0 - xR i * 0 ≡r\n xR (↑(Equiv.emptySum (xl × PEmpty) (xr × PUnit)) (Sum.inr (i, PUnit.unit))).fst\n[PROOFSTEP]\napply (Relabelling.subCongr (Relabelling.refl _) (mulZeroRelabelling _)).trans\n[GOAL]\ncase refine_2.inr.mk.unit\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\ni : xr\n⊢ xR i * mk PUnit PEmpty (fun x => 0) PEmpty.elim + mk xl xr xL xR * 0 - 0 ≡r\n xR (↑(Equiv.emptySum (xl × PEmpty) (xr × PUnit)) (Sum.inr (i, PUnit.unit))).fst\n[PROOFSTEP]\nrw [sub_zero]\n[GOAL]\ncase refine_2.inr.mk.unit\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\ni : xr\n⊢ xR i * mk PUnit PEmpty (fun x => 0) PEmpty.elim + mk xl xr xL xR * 0 + 0 ≡r\n xR (↑(Equiv.emptySum (xl × PEmpty) (xr × PUnit)) (Sum.inr (i, PUnit.unit))).fst\n[PROOFSTEP]\nexact\n (addZeroRelabelling _).trans <|\n (((mulOneRelabelling _).addCongr (mulZeroRelabelling _)).trans <| addZeroRelabelling _)\n[GOAL]\nx y z : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\n⊢ Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR) =\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n[PROOFSTEP]\nlet x := mk xl xr xL xR\n[GOAL]\nx✝ y z : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\n⊢ Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR) =\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n[PROOFSTEP]\nlet y := mk yl yr yL yR\n[GOAL]\nx✝ y✝ z : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\n⊢ Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR) =\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n[PROOFSTEP]\nlet z := mk zl zr zL zR\n[GOAL]\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR) =\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n[PROOFSTEP]\nrefine' quot_eq_of_mk'_quot_eq _ _ _ _\n[GOAL]\ncase refine'_1\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ LeftMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR) ≃\n LeftMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase refine'_1.toFun\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ LeftMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR) →\n LeftMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n[PROOFSTEP]\nrintro (⟨⟨_, _⟩ | ⟨_, _⟩, _⟩ | ⟨⟨_, _⟩ | ⟨_, _⟩, _⟩)\n[GOAL]\ncase refine'_1.toFun.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nsnd✝¹ : zl\nfst✝ : xl\nsnd✝ : yl\n⊢ LeftMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_1.toFun.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nsnd✝¹ : zl\nfst✝ : xr\nsnd✝ : yr\n⊢ LeftMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_1.toFun.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nsnd✝¹ : zr\nfst✝ : xl\nsnd✝ : yr\n⊢ LeftMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_1.toFun.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nsnd✝¹ : zr\nfst✝ : xr\nsnd✝ : yl\n⊢ LeftMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_1.invFun\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ LeftMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)) →\n LeftMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)\n[PROOFSTEP]\nrintro (⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩)\n[GOAL]\ncase refine'_1.invFun.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝¹ : xl\nfst✝ : yl\nsnd✝ : zl\n⊢ LeftMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_1.invFun.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝¹ : xl\nfst✝ : yr\nsnd✝ : zr\n⊢ LeftMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_1.invFun.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝¹ : xr\nfst✝ : yl\nsnd✝ : zr\n⊢ LeftMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_1.invFun.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝¹ : xr\nfst✝ : yr\nsnd✝ : zl\n⊢ LeftMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_1.left_inv\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ LeftInverse\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd)) fun val =>\n Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd))) fun val =>\n Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd))) fun val =>\n Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd))\n[PROOFSTEP]\nrintro (⟨⟨_, _⟩ | ⟨_, _⟩, _⟩ | ⟨⟨_, _⟩ | ⟨_, _⟩, _⟩)\n[GOAL]\ncase refine'_1.left_inv.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nsnd✝¹ : zl\nfst✝ : xl\nsnd✝ : yl\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n (Sum.inl (Sum.inl (fst✝, snd✝), snd✝¹))) =\n Sum.inl (Sum.inl (fst✝, snd✝), snd✝¹)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1.left_inv.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nsnd✝¹ : zl\nfst✝ : xr\nsnd✝ : yr\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n (Sum.inl (Sum.inr (fst✝, snd✝), snd✝¹))) =\n Sum.inl (Sum.inr (fst✝, snd✝), snd✝¹)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1.left_inv.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nsnd✝¹ : zr\nfst✝ : xl\nsnd✝ : yr\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n (Sum.inr (Sum.inl (fst✝, snd✝), snd✝¹))) =\n Sum.inr (Sum.inl (fst✝, snd✝), snd✝¹)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1.left_inv.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nsnd✝¹ : zr\nfst✝ : xr\nsnd✝ : yl\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n (Sum.inr (Sum.inr (fst✝, snd✝), snd✝¹))) =\n Sum.inr (Sum.inr (fst✝, snd✝), snd✝¹)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1.right_inv\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ Function.RightInverse\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd)) fun val =>\n Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd))) fun val =>\n Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd))) fun val =>\n Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd))\n[PROOFSTEP]\nrintro (⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩)\n[GOAL]\ncase refine'_1.right_inv.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝¹ : xl\nfst✝ : yl\nsnd✝ : zl\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n (Sum.inl (fst✝¹, Sum.inl (fst✝, snd✝)))) =\n Sum.inl (fst✝¹, Sum.inl (fst✝, snd✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1.right_inv.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝¹ : xl\nfst✝ : yr\nsnd✝ : zr\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n (Sum.inl (fst✝¹, Sum.inr (fst✝, snd✝)))) =\n Sum.inl (fst✝¹, Sum.inr (fst✝, snd✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1.right_inv.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝¹ : xr\nfst✝ : yl\nsnd✝ : zr\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n (Sum.inr (fst✝¹, Sum.inl (fst✝, snd✝)))) =\n Sum.inr (fst✝¹, Sum.inl (fst✝, snd✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1.right_inv.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝¹ : xr\nfst✝ : yr\nsnd✝ : zl\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n (Sum.inr (fst✝¹, Sum.inr (fst✝, snd✝)))) =\n Sum.inr (fst✝¹, Sum.inr (fst✝, snd✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ RightMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR) ≃\n RightMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase refine'_2.toFun\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ RightMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR) →\n RightMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n[PROOFSTEP]\nrintro (⟨⟨_, _⟩ | ⟨_, _⟩, _⟩ | ⟨⟨_, _⟩ | ⟨_, _⟩, _⟩)\n[GOAL]\ncase refine'_2.toFun.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nsnd✝¹ : zr\nfst✝ : xl\nsnd✝ : yl\n⊢ RightMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_2.toFun.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nsnd✝¹ : zr\nfst✝ : xr\nsnd✝ : yr\n⊢ RightMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_2.toFun.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nsnd✝¹ : zl\nfst✝ : xl\nsnd✝ : yr\n⊢ RightMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_2.toFun.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nsnd✝¹ : zl\nfst✝ : xr\nsnd✝ : yl\n⊢ RightMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_2.invFun\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ RightMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR)) →\n RightMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)\n[PROOFSTEP]\nrintro (⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩)\n[GOAL]\ncase refine'_2.invFun.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝¹ : xl\nfst✝ : yl\nsnd✝ : zr\n⊢ RightMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_2.invFun.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝¹ : xl\nfst✝ : yr\nsnd✝ : zl\n⊢ RightMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_2.invFun.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝¹ : xr\nfst✝ : yl\nsnd✝ : zl\n⊢ RightMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_2.invFun.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝¹ : xr\nfst✝ : yr\nsnd✝ : zr\n⊢ RightMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)\n[PROOFSTEP]\nsolve_by_elim (config := { maxDepth := 8 }) [Sum.inl, Sum.inr, Prod.mk]\n[GOAL]\ncase refine'_2.left_inv\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ LeftInverse\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd)) fun val =>\n Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd))) fun val =>\n Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd))) fun val =>\n Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd))\n[PROOFSTEP]\nrintro (⟨⟨_, _⟩ | ⟨_, _⟩, _⟩ | ⟨⟨_, _⟩ | ⟨_, _⟩, _⟩)\n[GOAL]\ncase refine'_2.left_inv.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nsnd✝¹ : zr\nfst✝ : xl\nsnd✝ : yl\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n (Sum.inl (Sum.inl (fst✝, snd✝), snd✝¹))) =\n Sum.inl (Sum.inl (fst✝, snd✝), snd✝¹)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2.left_inv.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nsnd✝¹ : zr\nfst✝ : xr\nsnd✝ : yr\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n (Sum.inl (Sum.inr (fst✝, snd✝), snd✝¹))) =\n Sum.inl (Sum.inr (fst✝, snd✝), snd✝¹)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2.left_inv.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nsnd✝¹ : zl\nfst✝ : xl\nsnd✝ : yr\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n (Sum.inr (Sum.inl (fst✝, snd✝), snd✝¹))) =\n Sum.inr (Sum.inl (fst✝, snd✝), snd✝¹)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2.left_inv.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nsnd✝¹ : zl\nfst✝ : xr\nsnd✝ : yl\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n (Sum.inr (Sum.inr (fst✝, snd✝), snd✝¹))) =\n Sum.inr (Sum.inr (fst✝, snd✝), snd✝¹)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2.right_inv\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ Function.RightInverse\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd)) fun val =>\n Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd))) fun val =>\n Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd))) fun val =>\n Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd))\n[PROOFSTEP]\nrintro (⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩ | ⟨_, ⟨_, _⟩ | ⟨_, _⟩⟩)\n[GOAL]\ncase refine'_2.right_inv.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝¹ : xl\nfst✝ : yl\nsnd✝ : zr\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n (Sum.inl (fst✝¹, Sum.inl (fst✝, snd✝)))) =\n Sum.inl (fst✝¹, Sum.inl (fst✝, snd✝))\n[PROOFSTEP]\nrfl\n -- Porting note: explicitly wrote out arguments to each recursive\n -- quot_mul_assoc reference below, because otherwise the decreasing_by block\n -- failed. Each branch previously ended with: `simp [quot_mul_assoc]; abel`\n -- See https://github.com/leanprover/lean4/issues/2288\n[GOAL]\ncase refine'_2.right_inv.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝¹ : xl\nfst✝ : yr\nsnd✝ : zl\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n (Sum.inl (fst✝¹, Sum.inr (fst✝, snd✝)))) =\n Sum.inl (fst✝¹, Sum.inr (fst✝, snd✝))\n[PROOFSTEP]\nrfl\n -- Porting note: explicitly wrote out arguments to each recursive\n -- quot_mul_assoc reference below, because otherwise the decreasing_by block\n -- failed. Each branch previously ended with: `simp [quot_mul_assoc]; abel`\n -- See https://github.com/leanprover/lean4/issues/2288\n[GOAL]\ncase refine'_2.right_inv.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝¹ : xr\nfst✝ : yl\nsnd✝ : zl\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n (Sum.inr (fst✝¹, Sum.inl (fst✝, snd✝)))) =\n Sum.inr (fst✝¹, Sum.inl (fst✝, snd✝))\n[PROOFSTEP]\nrfl\n -- Porting note: explicitly wrote out arguments to each recursive\n -- quot_mul_assoc reference below, because otherwise the decreasing_by block\n -- failed. Each branch previously ended with: `simp [quot_mul_assoc]; abel`\n -- See https://github.com/leanprover/lean4/issues/2288\n[GOAL]\ncase refine'_2.right_inv.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nfst✝¹ : xr\nfst✝ : yr\nsnd✝ : zr\n⊢ (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n (Sum.inr (fst✝¹, Sum.inr (fst✝, snd✝)))) =\n Sum.inr (fst✝¹, Sum.inr (fst✝, snd✝))\n[PROOFSTEP]\nrfl\n -- Porting note: explicitly wrote out arguments to each recursive\n -- quot_mul_assoc reference below, because otherwise the decreasing_by block\n -- failed. Each branch previously ended with: `simp [quot_mul_assoc]; abel`\n -- See https://github.com/leanprover/lean4/issues/2288\n[GOAL]\ncase refine'_3\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ ∀ (i : LeftMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)),\n Quotient.mk setoid (moveLeft (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR) i) =\n Quotient.mk setoid\n (moveLeft (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd))) fun val =>\n Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd)) fun val =>\n Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),\n left_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n x) =\n x) }\n i))\n[PROOFSTEP]\nrintro (⟨⟨i, j⟩ | ⟨i, j⟩, k⟩ | ⟨⟨i, j⟩ | ⟨i, j⟩, k⟩)\n[GOAL]\ncase refine'_3.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yl\n⊢ Quotient.mk setoid (moveLeft (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR) (Sum.inl (Sum.inl (i, j), k))) =\n Quotient.mk setoid\n (moveLeft (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),\n left_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n x) =\n x) }\n (Sum.inl (Sum.inl (i, j), k))))\n[PROOFSTEP]\nchange\n ⟦(xL i * y + x * yL j - xL i * yL j) * z + x * y * zL k - (xL i * y + x * yL j - xL i * yL j) * zL k⟧ =\n ⟦xL i * (y * z) + x * (yL j * z + y * zL k - yL j * zL k) - xL i * (yL j * z + y * zL k - yL j * zL k)⟧\n[GOAL]\ncase refine'_3.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yl\n⊢ Quotient.mk setoid\n ((xL i * y + x * yL j - xL i * yL j) * z + x * y * zL k - (xL i * y + x * yL j - xL i * yL j) * zL k) =\n Quotient.mk setoid\n (xL i * (y * z) + x * (yL j * z + y * zL k - yL j * zL k) - xL i * (yL j * z + y * zL k - yL j * zL k))\n[PROOFSTEP]\nsimp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib, quot_left_distrib_sub, quot_left_distrib]\n[GOAL]\ncase refine'_3.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * yL j * mk zl zr zL zR) -\n Quotient.mk setoid (xL i * yL j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zL k) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zL k) -\n Quotient.mk setoid (xL i * yL j * zL k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k))) -\n (Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xL i * (yL j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * yL j * mk zl zr zL zR) -\n Quotient.mk setoid (xL i * yL j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zL k) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zL k) -\n Quotient.mk setoid (xL i * yL j * zL k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k))) -\n (Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xL i * (yL j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (yL j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * yL j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zL k) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zL k) -\n Quotient.mk setoid (xL i * yL j * zL k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k))) -\n (Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xL i * (yL j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xL i) (yL j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zL k) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zL k) -\n Quotient.mk setoid (xL i * yL j * zL k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k))) -\n (Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xL i * (yL j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (mk yl yr yL yR) (zL k)]\n[GOAL]\ncase refine'_3.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zL k) -\n Quotient.mk setoid (xL i * yL j * zL k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k))) -\n (Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xL i * (yL j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xL i) (mk yl yr yL yR) (zL k)]\n[GOAL]\ncase refine'_3.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) + Quotient.mk setoid (mk xl xr xL xR * yL j * zL k) -\n Quotient.mk setoid (xL i * yL j * zL k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k))) -\n (Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xL i * (yL j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (yL j) (zL k)]\n[GOAL]\ncase refine'_3.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) + Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k)) -\n Quotient.mk setoid (xL i * yL j * zL k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k))) -\n (Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xL i * (yL j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xL i) (yL j) (zL k)]\n[GOAL]\ncase refine'_3.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) + Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k)) -\n Quotient.mk setoid (xL i * (yL j * zL k))) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k))) -\n (Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xL i * (yL j * zL k)))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_3.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) + Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k)) -\n Quotient.mk setoid (xL i * (yL j * zL k))) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k))) -\n (Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xL i * (yL j * zL k)))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_3.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yr\n⊢ Quotient.mk setoid (moveLeft (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR) (Sum.inl (Sum.inr (i, j), k))) =\n Quotient.mk setoid\n (moveLeft (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),\n left_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n x) =\n x) }\n (Sum.inl (Sum.inr (i, j), k))))\n[PROOFSTEP]\nchange\n ⟦(xR i * y + x * yR j - xR i * yR j) * z + x * y * zL k - (xR i * y + x * yR j - xR i * yR j) * zL k⟧ =\n ⟦xR i * (y * z) + x * (yR j * z + y * zL k - yR j * zL k) - xR i * (yR j * z + y * zL k - yR j * zL k)⟧\n[GOAL]\ncase refine'_3.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yr\n⊢ Quotient.mk setoid\n ((xR i * y + x * yR j - xR i * yR j) * z + x * y * zL k - (xR i * y + x * yR j - xR i * yR j) * zL k) =\n Quotient.mk setoid\n (xR i * (y * z) + x * (yR j * z + y * zL k - yR j * zL k) - xR i * (yR j * z + y * zL k - yR j * zL k))\n[PROOFSTEP]\nsimp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib, quot_left_distrib_sub, quot_left_distrib]\n[GOAL]\ncase refine'_3.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * yR j * mk zl zr zL zR) -\n Quotient.mk setoid (xR i * yR j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zL k) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zL k) -\n Quotient.mk setoid (xR i * yR j * zL k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k))) -\n (Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xR i * (yR j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * yR j * mk zl zr zL zR) -\n Quotient.mk setoid (xR i * yR j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zL k) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zL k) -\n Quotient.mk setoid (xR i * yR j * zL k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k))) -\n (Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xR i * (yR j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (yR j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * yR j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zL k) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zL k) -\n Quotient.mk setoid (xR i * yR j * zL k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k))) -\n (Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xR i * (yR j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xR i) (yR j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zL k) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zL k) -\n Quotient.mk setoid (xR i * yR j * zL k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k))) -\n (Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xR i * (yR j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (mk yl yr yL yR) (zL k)]\n[GOAL]\ncase refine'_3.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zL k) -\n Quotient.mk setoid (xR i * yR j * zL k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k))) -\n (Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xR i * (yR j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xR i) (mk yl yr yL yR) (zL k)]\n[GOAL]\ncase refine'_3.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) + Quotient.mk setoid (mk xl xr xL xR * yR j * zL k) -\n Quotient.mk setoid (xR i * yR j * zL k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k))) -\n (Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xR i * (yR j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (yR j) (zL k)]\n[GOAL]\ncase refine'_3.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) + Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k)) -\n Quotient.mk setoid (xR i * yR j * zL k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k))) -\n (Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xR i * (yR j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xR i) (yR j) (zL k)]\n[GOAL]\ncase refine'_3.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) + Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k)) -\n Quotient.mk setoid (xR i * (yR j * zL k))) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k))) -\n (Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xR i * (yR j * zL k)))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_3.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) + Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k)) -\n Quotient.mk setoid (xR i * (yR j * zL k))) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k))) -\n (Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xR i * (yR j * zL k)))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_3.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yr\n⊢ Quotient.mk setoid (moveLeft (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR) (Sum.inr (Sum.inl (i, j), k))) =\n Quotient.mk setoid\n (moveLeft (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),\n left_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n x) =\n x) }\n (Sum.inr (Sum.inl (i, j), k))))\n[PROOFSTEP]\nchange\n ⟦(xL i * y + x * yR j - xL i * yR j) * z + x * y * zR k - (xL i * y + x * yR j - xL i * yR j) * zR k⟧ =\n ⟦xL i * (y * z) + x * (yR j * z + y * zR k - yR j * zR k) - xL i * (yR j * z + y * zR k - yR j * zR k)⟧\n[GOAL]\ncase refine'_3.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yr\n⊢ Quotient.mk setoid\n ((xL i * y + x * yR j - xL i * yR j) * z + x * y * zR k - (xL i * y + x * yR j - xL i * yR j) * zR k) =\n Quotient.mk setoid\n (xL i * (y * z) + x * (yR j * z + y * zR k - yR j * zR k) - xL i * (yR j * z + y * zR k - yR j * zR k))\n[PROOFSTEP]\nsimp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib, quot_left_distrib_sub, quot_left_distrib]\n[GOAL]\ncase refine'_3.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * yR j * mk zl zr zL zR) -\n Quotient.mk setoid (xL i * yR j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zR k) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zR k) -\n Quotient.mk setoid (xL i * yR j * zR k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k))) -\n (Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xL i * (yR j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * yR j * mk zl zr zL zR) -\n Quotient.mk setoid (xL i * yR j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zR k) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zR k) -\n Quotient.mk setoid (xL i * yR j * zR k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k))) -\n (Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xL i * (yR j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (yR j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * yR j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zR k) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zR k) -\n Quotient.mk setoid (xL i * yR j * zR k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k))) -\n (Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xL i * (yR j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xL i) (yR j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zR k) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zR k) -\n Quotient.mk setoid (xL i * yR j * zR k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k))) -\n (Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xL i * (yR j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (mk yl yr yL yR) (zR k)]\n[GOAL]\ncase refine'_3.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zR k) -\n Quotient.mk setoid (xL i * yR j * zR k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k))) -\n (Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xL i * (yR j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xL i) (mk yl yr yL yR) (zR k)]\n[GOAL]\ncase refine'_3.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) + Quotient.mk setoid (mk xl xr xL xR * yR j * zR k) -\n Quotient.mk setoid (xL i * yR j * zR k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k))) -\n (Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xL i * (yR j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (yR j) (zR k)]\n[GOAL]\ncase refine'_3.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) + Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k)) -\n Quotient.mk setoid (xL i * yR j * zR k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k))) -\n (Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xL i * (yR j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xL i) (yR j) (zR k)]\n[GOAL]\ncase refine'_3.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) + Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k)) -\n Quotient.mk setoid (xL i * (yR j * zR k))) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k))) -\n (Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xL i * (yR j * zR k)))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_3.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) + Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k)) -\n Quotient.mk setoid (xL i * (yR j * zR k))) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k))) -\n (Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xL i * (yR j * zR k)))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_3.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yl\n⊢ Quotient.mk setoid (moveLeft (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR) (Sum.inr (Sum.inr (i, j), k))) =\n Quotient.mk setoid\n (moveLeft (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),\n left_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : LeftMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n x) =\n x) }\n (Sum.inr (Sum.inr (i, j), k))))\n[PROOFSTEP]\nchange\n ⟦(xR i * y + x * yL j - xR i * yL j) * z + x * y * zR k - (xR i * y + x * yL j - xR i * yL j) * zR k⟧ =\n ⟦xR i * (y * z) + x * (yL j * z + y * zR k - yL j * zR k) - xR i * (yL j * z + y * zR k - yL j * zR k)⟧\n[GOAL]\ncase refine'_3.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yl\n⊢ Quotient.mk setoid\n ((xR i * y + x * yL j - xR i * yL j) * z + x * y * zR k - (xR i * y + x * yL j - xR i * yL j) * zR k) =\n Quotient.mk setoid\n (xR i * (y * z) + x * (yL j * z + y * zR k - yL j * zR k) - xR i * (yL j * z + y * zR k - yL j * zR k))\n[PROOFSTEP]\nsimp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib, quot_left_distrib_sub, quot_left_distrib]\n[GOAL]\ncase refine'_3.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * yL j * mk zl zr zL zR) -\n Quotient.mk setoid (xR i * yL j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zR k) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zR k) -\n Quotient.mk setoid (xR i * yL j * zR k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k))) -\n (Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xR i * (yL j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * yL j * mk zl zr zL zR) -\n Quotient.mk setoid (xR i * yL j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zR k) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zR k) -\n Quotient.mk setoid (xR i * yL j * zR k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k))) -\n (Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xR i * (yL j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (yL j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * yL j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zR k) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zR k) -\n Quotient.mk setoid (xR i * yL j * zR k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k))) -\n (Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xR i * (yL j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xR i) (yL j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_3.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zR k) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zR k) -\n Quotient.mk setoid (xR i * yL j * zR k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k))) -\n (Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xR i * (yL j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (mk yl yr yL yR) (zR k)]\n[GOAL]\ncase refine'_3.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zR k) -\n Quotient.mk setoid (xR i * yL j * zR k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k))) -\n (Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xR i * (yL j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xR i) (mk yl yr yL yR) (zR k)]\n[GOAL]\ncase refine'_3.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) + Quotient.mk setoid (mk xl xr xL xR * yL j * zR k) -\n Quotient.mk setoid (xR i * yL j * zR k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k))) -\n (Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xR i * (yL j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (yL j) (zR k)]\n[GOAL]\ncase refine'_3.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) + Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k)) -\n Quotient.mk setoid (xR i * yL j * zR k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k))) -\n (Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xR i * (yL j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xR i) (yL j) (zR k)]\n[GOAL]\ncase refine'_3.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) + Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k)) -\n Quotient.mk setoid (xR i * (yL j * zR k))) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k))) -\n (Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xR i * (yL j * zR k)))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_3.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) + Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k)) -\n Quotient.mk setoid (xR i * (yL j * zR k))) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k))) -\n (Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xR i * (yL j * zR k)))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_4\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\n⊢ ∀ (j : RightMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)),\n Quotient.mk setoid (moveRight (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR) j) =\n Quotient.mk setoid\n (moveRight (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd))) fun val =>\n Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd)) fun val =>\n Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),\n left_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n x) =\n x) }\n j))\n[PROOFSTEP]\nrintro (⟨⟨i, j⟩ | ⟨i, j⟩, k⟩ | ⟨⟨i, j⟩ | ⟨i, j⟩, k⟩)\n[GOAL]\ncase refine'_4.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yl\n⊢ Quotient.mk setoid (moveRight (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR) (Sum.inl (Sum.inl (i, j), k))) =\n Quotient.mk setoid\n (moveRight (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),\n left_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n x) =\n x) }\n (Sum.inl (Sum.inl (i, j), k))))\n[PROOFSTEP]\nchange\n ⟦(xL i * y + x * yL j - xL i * yL j) * z + x * y * zR k - (xL i * y + x * yL j - xL i * yL j) * zR k⟧ =\n ⟦xL i * (y * z) + x * (yL j * z + y * zR k - yL j * zR k) - xL i * (yL j * z + y * zR k - yL j * zR k)⟧\n[GOAL]\ncase refine'_4.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yl\n⊢ Quotient.mk setoid\n ((xL i * y + x * yL j - xL i * yL j) * z + x * y * zR k - (xL i * y + x * yL j - xL i * yL j) * zR k) =\n Quotient.mk setoid\n (xL i * (y * z) + x * (yL j * z + y * zR k - yL j * zR k) - xL i * (yL j * z + y * zR k - yL j * zR k))\n[PROOFSTEP]\nsimp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib, quot_left_distrib_sub, quot_left_distrib]\n[GOAL]\ncase refine'_4.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * yL j * mk zl zr zL zR) -\n Quotient.mk setoid (xL i * yL j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zR k) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zR k) -\n Quotient.mk setoid (xL i * yL j * zR k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k))) -\n (Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xL i * (yL j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * yL j * mk zl zr zL zR) -\n Quotient.mk setoid (xL i * yL j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zR k) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zR k) -\n Quotient.mk setoid (xL i * yL j * zR k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k))) -\n (Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xL i * (yL j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (yL j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * yL j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zR k) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zR k) -\n Quotient.mk setoid (xL i * yL j * zR k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k))) -\n (Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xL i * (yL j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xL i) (yL j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zR k) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zR k) -\n Quotient.mk setoid (xL i * yL j * zR k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k))) -\n (Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xL i * (yL j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (mk yl yr yL yR) (zR k)]\n[GOAL]\ncase refine'_4.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zR k) -\n Quotient.mk setoid (xL i * yL j * zR k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k))) -\n (Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xL i * (yL j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xL i) (mk yl yr yL yR) (zR k)]\n[GOAL]\ncase refine'_4.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) + Quotient.mk setoid (mk xl xr xL xR * yL j * zR k) -\n Quotient.mk setoid (xL i * yL j * zR k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k))) -\n (Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xL i * (yL j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (yL j) (zR k)]\n[GOAL]\ncase refine'_4.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) + Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k)) -\n Quotient.mk setoid (xL i * yL j * zR k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k))) -\n (Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xL i * (yL j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xL i) (yL j) (zR k)]\n[GOAL]\ncase refine'_4.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) + Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k)) -\n Quotient.mk setoid (xL i * (yL j * zR k))) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k))) -\n (Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xL i * (yL j * zR k)))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_4.inl.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xl\nj : yl\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) + Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k)) -\n Quotient.mk setoid (xL i * (yL j * zR k))) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zR k))) -\n (Quotient.mk setoid (xL i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xL i * (yL j * zR k)))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_4.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yr\n⊢ Quotient.mk setoid (moveRight (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR) (Sum.inl (Sum.inr (i, j), k))) =\n Quotient.mk setoid\n (moveRight (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),\n left_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n x) =\n x) }\n (Sum.inl (Sum.inr (i, j), k))))\n[PROOFSTEP]\nchange\n ⟦(xR i * y + x * yR j - xR i * yR j) * z + x * y * zR k - (xR i * y + x * yR j - xR i * yR j) * zR k⟧ =\n ⟦xR i * (y * z) + x * (yR j * z + y * zR k - yR j * zR k) - xR i * (yR j * z + y * zR k - yR j * zR k)⟧\n[GOAL]\ncase refine'_4.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yr\n⊢ Quotient.mk setoid\n ((xR i * y + x * yR j - xR i * yR j) * z + x * y * zR k - (xR i * y + x * yR j - xR i * yR j) * zR k) =\n Quotient.mk setoid\n (xR i * (y * z) + x * (yR j * z + y * zR k - yR j * zR k) - xR i * (yR j * z + y * zR k - yR j * zR k))\n[PROOFSTEP]\nsimp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib, quot_left_distrib_sub, quot_left_distrib]\n[GOAL]\ncase refine'_4.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * yR j * mk zl zr zL zR) -\n Quotient.mk setoid (xR i * yR j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zR k) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zR k) -\n Quotient.mk setoid (xR i * yR j * zR k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k))) -\n (Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xR i * (yR j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * yR j * mk zl zr zL zR) -\n Quotient.mk setoid (xR i * yR j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zR k) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zR k) -\n Quotient.mk setoid (xR i * yR j * zR k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k))) -\n (Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xR i * (yR j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (yR j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * yR j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zR k) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zR k) -\n Quotient.mk setoid (xR i * yR j * zR k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k))) -\n (Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xR i * (yR j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xR i) (yR j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zR k) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zR k) -\n Quotient.mk setoid (xR i * yR j * zR k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k))) -\n (Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xR i * (yR j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (mk yl yr yL yR) (zR k)]\n[GOAL]\ncase refine'_4.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zR k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zR k) -\n Quotient.mk setoid (xR i * yR j * zR k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k))) -\n (Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xR i * (yR j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xR i) (mk yl yr yL yR) (zR k)]\n[GOAL]\ncase refine'_4.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) + Quotient.mk setoid (mk xl xr xL xR * yR j * zR k) -\n Quotient.mk setoid (xR i * yR j * zR k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k))) -\n (Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xR i * (yR j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (yR j) (zR k)]\n[GOAL]\ncase refine'_4.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) + Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k)) -\n Quotient.mk setoid (xR i * yR j * zR k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k))) -\n (Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xR i * (yR j * zR k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xR i) (yR j) (zR k)]\n[GOAL]\ncase refine'_4.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) + Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k)) -\n Quotient.mk setoid (xR i * (yR j * zR k))) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k))) -\n (Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xR i * (yR j * zR k)))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_4.inl.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zr\ni : xr\nj : yr\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n (Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) + Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k)) -\n Quotient.mk setoid (xR i * (yR j * zR k))) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zR k))) -\n (Quotient.mk setoid (xR i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zR k)) -\n Quotient.mk setoid (xR i * (yR j * zR k)))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_4.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yr\n⊢ Quotient.mk setoid (moveRight (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR) (Sum.inr (Sum.inl (i, j), k))) =\n Quotient.mk setoid\n (moveRight (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),\n left_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n x) =\n x) }\n (Sum.inr (Sum.inl (i, j), k))))\n[PROOFSTEP]\nchange\n ⟦(xL i * y + x * yR j - xL i * yR j) * z + x * y * zL k - (xL i * y + x * yR j - xL i * yR j) * zL k⟧ =\n ⟦xL i * (y * z) + x * (yR j * z + y * zL k - yR j * zL k) - xL i * (yR j * z + y * zL k - yR j * zL k)⟧\n[GOAL]\ncase refine'_4.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yr\n⊢ Quotient.mk setoid\n ((xL i * y + x * yR j - xL i * yR j) * z + x * y * zL k - (xL i * y + x * yR j - xL i * yR j) * zL k) =\n Quotient.mk setoid\n (xL i * (y * z) + x * (yR j * z + y * zL k - yR j * zL k) - xL i * (yR j * z + y * zL k - yR j * zL k))\n[PROOFSTEP]\nsimp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib, quot_left_distrib_sub, quot_left_distrib]\n[GOAL]\ncase refine'_4.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * mk yl yr yL yR * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * yR j * mk zl zr zL zR) -\n Quotient.mk setoid (xL i * yR j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zL k) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zL k) -\n Quotient.mk setoid (xL i * yR j * zL k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k))) -\n (Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xL i * (yR j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xL i) (mk yl yr yL yR) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * yR j * mk zl zr zL zR) -\n Quotient.mk setoid (xL i * yR j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zL k) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zL k) -\n Quotient.mk setoid (xL i * yR j * zL k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k))) -\n (Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xL i * (yR j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (yR j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * yR j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zL k) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zL k) -\n Quotient.mk setoid (xL i * yR j * zL k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k))) -\n (Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xL i * (yR j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xL i) (yR j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zL k) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zL k) -\n Quotient.mk setoid (xL i * yR j * zL k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k))) -\n (Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xL i * (yR j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (mk yl yr yL yR) (zL k)]\n[GOAL]\ncase refine'_4.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xL i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yR j * zL k) -\n Quotient.mk setoid (xL i * yR j * zL k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k))) -\n (Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xL i * (yR j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xL i) (mk yl yr yL yR) (zL k)]\n[GOAL]\ncase refine'_4.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) + Quotient.mk setoid (mk xl xr xL xR * yR j * zL k) -\n Quotient.mk setoid (xL i * yR j * zL k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k))) -\n (Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xL i * (yR j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (yR j) (zL k)]\n[GOAL]\ncase refine'_4.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) + Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k)) -\n Quotient.mk setoid (xL i * yR j * zL k)) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k))) -\n (Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xL i * (yR j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xL i) (yR j) (zL k)]\n[GOAL]\ncase refine'_4.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) + Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k)) -\n Quotient.mk setoid (xL i * (yR j * zL k))) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k))) -\n (Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xL i * (yR j * zL k)))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_4.inr.mk.inl.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xl\nj : yr\n⊢ Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) -\n Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) + Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k)) -\n Quotient.mk setoid (xL i * (yR j * zL k))) =\n Quotient.mk setoid (xL i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yR j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yR j * zL k))) -\n (Quotient.mk setoid (xL i * (yR j * mk zl zr zL zR)) + Quotient.mk setoid (xL i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xL i * (yR j * zL k)))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_4.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yl\n⊢ Quotient.mk setoid (moveRight (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR) (Sum.inr (Sum.inr (i, j), k))) =\n Quotient.mk setoid\n (moveRight (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))\n (↑{\n toFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)),\n invFun := fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd),\n left_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * mk yl yr yL yR * mk zl zr zL zR)),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n x) =\n x),\n right_inv :=\n (_ :\n ∀ (x : RightMoves (mk xl xr xL xR * (mk yl yr yL yR * mk zl zr zL zR))),\n (fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inl (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inr (snd_1, snd)))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn fst\n (fun val => Prod.casesOn val fun fst snd_1 => Sum.inl (fst, Sum.inr (snd_1, snd)))\n fun val => Prod.casesOn val fun fst snd_1 => Sum.inr (fst, Sum.inl (snd_1, snd)))\n ((fun a =>\n Sum.casesOn a\n (fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inl (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inl (fst, fst_1), snd))\n fun val =>\n Prod.casesOn val fun fst snd =>\n Sum.casesOn snd\n (fun val => Prod.casesOn val fun fst_1 snd => Sum.inr (Sum.inr (fst, fst_1), snd))\n fun val => Prod.casesOn val fun fst_1 snd => Sum.inl (Sum.inr (fst, fst_1), snd))\n x) =\n x) }\n (Sum.inr (Sum.inr (i, j), k))))\n[PROOFSTEP]\nchange\n ⟦(xR i * y + x * yL j - xR i * yL j) * z + x * y * zL k - (xR i * y + x * yL j - xR i * yL j) * zL k⟧ =\n ⟦xR i * (y * z) + x * (yL j * z + y * zL k - yL j * zL k) - xR i * (yL j * z + y * zL k - yL j * zL k)⟧\n[GOAL]\ncase refine'_4.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yl\n⊢ Quotient.mk setoid\n ((xR i * y + x * yL j - xR i * yL j) * z + x * y * zL k - (xR i * y + x * yL j - xR i * yL j) * zL k) =\n Quotient.mk setoid\n (xR i * (y * z) + x * (yL j * z + y * zL k - yL j * zL k) - xR i * (yL j * z + y * zL k - yL j * zL k))\n[PROOFSTEP]\nsimp only [quot_sub, quot_add, quot_right_distrib_sub, quot_right_distrib, quot_left_distrib_sub, quot_left_distrib]\n[GOAL]\ncase refine'_4.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * mk yl yr yL yR * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * yL j * mk zl zr zL zR) -\n Quotient.mk setoid (xR i * yL j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zL k) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zL k) -\n Quotient.mk setoid (xR i * yL j * zL k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k))) -\n (Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xR i * (yL j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xR i) (mk yl yr yL yR) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * yL j * mk zl zr zL zR) -\n Quotient.mk setoid (xR i * yL j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zL k) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zL k) -\n Quotient.mk setoid (xR i * yL j * zL k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k))) -\n (Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xR i * (yL j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (yL j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * yL j * mk zl zr zL zR) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zL k) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zL k) -\n Quotient.mk setoid (xR i * yL j * zL k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k))) -\n (Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xR i * (yL j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xR i) (yL j) (mk zl zr zL zR)]\n[GOAL]\ncase refine'_4.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * mk yl yr yL yR * zL k) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zL k) -\n Quotient.mk setoid (xR i * yL j * zL k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k))) -\n (Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xR i * (yL j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (mk yl yr yL yR) (zL k)]\n[GOAL]\ncase refine'_4.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xR i * mk yl yr yL yR * zL k) + Quotient.mk setoid (mk xl xr xL xR * yL j * zL k) -\n Quotient.mk setoid (xR i * yL j * zL k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k))) -\n (Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xR i * (yL j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xR i) (mk yl yr yL yR) (zL k)]\n[GOAL]\ncase refine'_4.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) + Quotient.mk setoid (mk xl xr xL xR * yL j * zL k) -\n Quotient.mk setoid (xR i * yL j * zL k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k))) -\n (Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xR i * (yL j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (mk xl xr xL xR) (yL j) (zL k)]\n[GOAL]\ncase refine'_4.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) + Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k)) -\n Quotient.mk setoid (xR i * yL j * zL k)) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k))) -\n (Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xR i * (yL j * zL k)))\n[PROOFSTEP]\nrw [quot_mul_assoc (xR i) (yL j) (zL k)]\n[GOAL]\ncase refine'_4.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) + Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k)) -\n Quotient.mk setoid (xR i * (yL j * zL k))) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k))) -\n (Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xR i * (yL j * zL k)))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_4.inr.mk.inr.mk\nx✝ y✝ z✝ : PGame\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx : PGame := mk xl xr xL xR\ny : PGame := mk yl yr yL yR\nz : PGame := mk zl zr zL zR\nk : zl\ni : xr\nj : yl\n⊢ Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) -\n Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n (Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) + Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k)) -\n Quotient.mk setoid (xR i * (yL j * zL k))) =\n Quotient.mk setoid (xR i * (mk yl yr yL yR * mk zl zr zL zR)) +\n (Quotient.mk setoid (mk xl xr xL xR * (yL j * mk zl zr zL zR)) +\n Quotient.mk setoid (mk xl xr xL xR * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (mk xl xr xL xR * (yL j * zL k))) -\n (Quotient.mk setoid (xR i * (yL j * mk zl zr zL zR)) + Quotient.mk setoid (xR i * (mk yl yr yL yR * zL k)) -\n Quotient.mk setoid (xR i * (yL j * zL k)))\n[PROOFSTEP]\nabel\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\ni : xl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yL j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\ni : xl\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := yL j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zl\ni : xl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := mk yl yr yL yR, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zl\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yL j, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zl\ni : xl\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := yL j, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\ni : xr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yR j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\ni : xr\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := yR j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zl\ni : xr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := mk yl yr yL yR, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zl\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yR j, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zl\ni : xr\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := yR j, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\ni : xl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yR j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\ni : xl\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := yR j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zr\ni : xl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := mk yl yr yL yR, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zr\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yR j, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zr\ni : xl\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := yR j, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\ni : xr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yL j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\ni : xr\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := yL j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zr\ni : xr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := mk yl yr yL yR, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zr\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yL j, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zr\ni : xr\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := yL j, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\ni : xl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yL j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\ni : xl\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := yL j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zr\ni : xl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := mk yl yr yL yR, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zr\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yL j, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zr\ni : xl\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := yL j, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\ni : xr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yR j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\ni : xr\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := yR j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zr\ni : xr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := mk yl yr yL yR, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zr\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yR j, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zr\ni : xr\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := yR j, snd := zR k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\ni : xl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yR j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\ni : xl\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := yR j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zl\ni : xl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := mk yl yr yL yR, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zl\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yR j, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zl\ni : xl\nj : yr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xL i, snd := { fst := yR j, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\ni : xr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yL j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\ni : xr\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := yL j, snd := mk zl zr zL zR } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zl\ni : xr\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := mk yl yr yL yR, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zl\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := mk xl xr xL xR, snd := { fst := yL j, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nx✝ :\n ∀ (y : (_ : PGame) ×' (_ : PGame) ×' PGame),\n (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n y { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } } →\n Quotient.mk setoid (y.1 * y.2.1 * y.2.2) = Quotient.mk setoid (y.1 * (y.2.1 * y.2.2))\nk : zl\ni : xr\nj : yl\n⊢ (invImage (fun a => PSigma.casesOn a fun x snd => PSigma.casesOn snd fun y snd => (x, y, snd))\n Prod.instWellFoundedRelationProd).1\n { fst := xR i, snd := { fst := yL j, snd := zL k } }\n { fst := mk xl xr xL xR, snd := { fst := mk yl yr yL yR, snd := mk zl zr zL zR } }\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nl r : Type u\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\n⊢ InvTy l r true → False\n[PROOFSTEP]\nrintro (_ | _ | _ | a | a)\n[GOAL]\ncase right₁\nl r : Type u\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\na : l\na✝ : InvTy l r false\n⊢ False\n[PROOFSTEP]\nexact isEmptyElim a\n[GOAL]\ncase right₂\nl r : Type u\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\na : r\na✝ : InvTy l r true\n⊢ False\n[PROOFSTEP]\nexact isEmptyElim a\n[GOAL]\nl r : Type u\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\nsrc✝ : Inhabited (InvTy l r false) := InvTy.instInhabited l r\n⊢ ∀ (a : InvTy l r false), a = default\n[PROOFSTEP]\nrintro (a | a | a)\n[GOAL]\ncase zero\nl r : Type u\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\nsrc✝ : Inhabited (InvTy l r false) := InvTy.instInhabited l r\n⊢ InvTy.zero = default\ncase left₁\nl r : Type u\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\nsrc✝ : Inhabited (InvTy l r false) := InvTy.instInhabited l r\na : r\na✝ : InvTy l r false\n⊢ InvTy.left₁ a a✝ = default\ncase left₂\nl r : Type u\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\nsrc✝ : Inhabited (InvTy l r false) := InvTy.instInhabited l r\na : l\na✝ : InvTy l r true\n⊢ InvTy.left₂ a a✝ = default\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left₁\nl r : Type u\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\nsrc✝ : Inhabited (InvTy l r false) := InvTy.instInhabited l r\na : r\na✝ : InvTy l r false\n⊢ InvTy.left₁ a a✝ = default\ncase left₂\nl r : Type u\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\nsrc✝ : Inhabited (InvTy l r false) := InvTy.instInhabited l r\na : l\na✝ : InvTy l r true\n⊢ InvTy.left₂ a a✝ = default\n[PROOFSTEP]\nall_goals exact isEmptyElim a\n[GOAL]\ncase left₁\nl r : Type u\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\nsrc✝ : Inhabited (InvTy l r false) := InvTy.instInhabited l r\na : r\na✝ : InvTy l r false\n⊢ InvTy.left₁ a a✝ = default\n[PROOFSTEP]\nexact isEmptyElim a\n[GOAL]\ncase left₂\nl r : Type u\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\nsrc✝ : Inhabited (InvTy l r false) := InvTy.instInhabited l r\na : l\na✝ : InvTy l r true\n⊢ InvTy.left₂ a a✝ = default\n[PROOFSTEP]\nexact isEmptyElim a\n[GOAL]\nl r : Type u\nb : Bool\nL : l → PGame\nR : r → PGame\nIHl : l → PGame\nIHr : r → PGame\ni : InvTy l r b\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\n⊢ invVal L R IHl IHr i = 0\n[PROOFSTEP]\ncases' i with a _ a _ a _ a\n[GOAL]\ncase zero\nl r : Type u\nL : l → PGame\nR : r → PGame\nIHl : l → PGame\nIHr : r → PGame\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\n⊢ invVal L R IHl IHr InvTy.zero = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left₁\nl r : Type u\nL : l → PGame\nR : r → PGame\nIHl : l → PGame\nIHr : r → PGame\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\na : r\na✝ : InvTy l r false\n⊢ invVal L R IHl IHr (InvTy.left₁ a a✝) = 0\ncase left₂\nl r : Type u\nL : l → PGame\nR : r → PGame\nIHl : l → PGame\nIHr : r → PGame\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\na : l\na✝ : InvTy l r true\n⊢ invVal L R IHl IHr (InvTy.left₂ a a✝) = 0\ncase right₁\nl r : Type u\nL : l → PGame\nR : r → PGame\nIHl : l → PGame\nIHr : r → PGame\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\na : l\na✝ : InvTy l r false\n⊢ invVal L R IHl IHr (InvTy.right₁ a a✝) = 0\ncase right₂\nl r : Type u\nL : l → PGame\nR : r → PGame\nIHl : l → PGame\nIHr : r → PGame\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\na : r\na✝ : InvTy l r true\n⊢ invVal L R IHl IHr (InvTy.right₂ a a✝) = 0\n[PROOFSTEP]\nall_goals exact isEmptyElim a\n[GOAL]\ncase left₁\nl r : Type u\nL : l → PGame\nR : r → PGame\nIHl : l → PGame\nIHr : r → PGame\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\na : r\na✝ : InvTy l r false\n⊢ invVal L R IHl IHr (InvTy.left₁ a a✝) = 0\n[PROOFSTEP]\nexact isEmptyElim a\n[GOAL]\ncase left₂\nl r : Type u\nL : l → PGame\nR : r → PGame\nIHl : l → PGame\nIHr : r → PGame\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\na : l\na✝ : InvTy l r true\n⊢ invVal L R IHl IHr (InvTy.left₂ a a✝) = 0\n[PROOFSTEP]\nexact isEmptyElim a\n[GOAL]\ncase right₁\nl r : Type u\nL : l → PGame\nR : r → PGame\nIHl : l → PGame\nIHr : r → PGame\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\na : l\na✝ : InvTy l r false\n⊢ invVal L R IHl IHr (InvTy.right₁ a a✝) = 0\n[PROOFSTEP]\nexact isEmptyElim a\n[GOAL]\ncase right₂\nl r : Type u\nL : l → PGame\nR : r → PGame\nIHl : l → PGame\nIHr : r → PGame\ninst✝¹ : IsEmpty l\ninst✝ : IsEmpty r\na : r\na✝ : InvTy l r true\n⊢ invVal L R IHl IHr (InvTy.right₂ a a✝) = 0\n[PROOFSTEP]\nexact isEmptyElim a\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\n⊢ 0 ⧏ inv' (mk xl xr xL xR)\n[PROOFSTEP]\nconvert lf_mk _ _ InvTy.zero\n[GOAL]\ncase h.e'_1\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\n⊢ 0 = invVal (fun i => xL ↑i) xR (fun i => inv' (xL ↑i)) (fun i => inv' (xR i)) InvTy.zero\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ inv' 0 ≡r 1\n[PROOFSTEP]\nchange mk _ _ _ _ ≡r 1\n[GOAL]\n⊢ mk (InvTy { i // 0 < PEmpty.elim i } PEmpty false) (InvTy { i // 0 < PEmpty.elim i } PEmpty true)\n (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))\n (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i)) ≡r\n 1\n[PROOFSTEP]\nrefine' ⟨_, _, fun i => _, IsEmpty.elim _⟩\n[GOAL]\ncase refine'_1\n⊢ LeftMoves\n (mk (InvTy { i // 0 < PEmpty.elim i } PEmpty false) (InvTy { i // 0 < PEmpty.elim i } PEmpty true)\n (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))\n (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))) ≃\n LeftMoves 1\n[PROOFSTEP]\napply Equiv.equivPUnit (InvTy _ _ _)\n[GOAL]\ncase refine'_2\n⊢ RightMoves\n (mk (InvTy { i // 0 < PEmpty.elim i } PEmpty false) (InvTy { i // 0 < PEmpty.elim i } PEmpty true)\n (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))\n (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))) ≃\n RightMoves 1\n[PROOFSTEP]\napply Equiv.equivPEmpty (InvTy _ _ _)\n[GOAL]\ncase refine'_3\ni :\n LeftMoves\n (mk (InvTy { i // 0 < PEmpty.elim i } PEmpty false) (InvTy { i // 0 < PEmpty.elim i } PEmpty true)\n (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))\n (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i)))\n⊢ moveLeft\n (mk (InvTy { i // 0 < PEmpty.elim i } PEmpty false) (InvTy { i // 0 < PEmpty.elim i } PEmpty true)\n (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))\n (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i)))\n i ≡r\n moveLeft 1 (↑(Equiv.equivPUnit (InvTy { i // 0 < PEmpty.elim i } PEmpty false)) i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_3\ni :\n LeftMoves\n (mk (InvTy { i // 0 < PEmpty.elim i } PEmpty false) (InvTy { i // 0 < PEmpty.elim i } PEmpty true)\n (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))\n (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i)))\n⊢ 0 ≡r 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_4\n⊢ IsEmpty\n (RightMoves\n (mk (InvTy { i // 0 < PEmpty.elim i } PEmpty false) (InvTy { i // 0 < PEmpty.elim i } PEmpty true)\n (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))\n (invVal (fun i => PEmpty.elim ↑i) PEmpty.elim (fun i => inv' (PEmpty.elim ↑i)) fun i => inv' (PEmpty.elim i))))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_4\n⊢ IsEmpty (InvTy { i // 0 < PEmpty.elim i } PEmpty true)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ inv' 1 ≡r 1\n[PROOFSTEP]\nchange Relabelling (mk _ _ _ _) 1\n[GOAL]\n⊢ mk (InvTy { i // 0 < (fun x => 0) i } PEmpty false) (InvTy { i // 0 < (fun x => 0) i } PEmpty true)\n (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i))\n (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i)) ≡r\n 1\n[PROOFSTEP]\nhave : IsEmpty { _i : PUnit.{u + 1} // (0 : PGame.{u}) < 0 } :=\n by\n rw [lt_self_iff_false]\n infer_instance\n[GOAL]\n⊢ IsEmpty { _i // 0 < 0 }\n[PROOFSTEP]\nrw [lt_self_iff_false]\n[GOAL]\n⊢ IsEmpty { _i // False }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nthis : IsEmpty { _i // 0 < 0 }\n⊢ mk (InvTy { i // 0 < (fun x => 0) i } PEmpty false) (InvTy { i // 0 < (fun x => 0) i } PEmpty true)\n (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i))\n (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i)) ≡r\n 1\n[PROOFSTEP]\nrefine' ⟨_, _, fun i => _, IsEmpty.elim _⟩\n[GOAL]\ncase refine'_1\nthis : IsEmpty { _i // 0 < 0 }\n⊢ LeftMoves\n (mk (InvTy { i // 0 < (fun x => 0) i } PEmpty false) (InvTy { i // 0 < (fun x => 0) i } PEmpty true)\n (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i))\n (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i =>\n inv' (PEmpty.elim i))) ≃\n LeftMoves 1\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_2\nthis : IsEmpty { _i // 0 < 0 }\n⊢ RightMoves\n (mk (InvTy { i // 0 < (fun x => 0) i } PEmpty false) (InvTy { i // 0 < (fun x => 0) i } PEmpty true)\n (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i))\n (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i =>\n inv' (PEmpty.elim i))) ≃\n RightMoves 1\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_3\nthis : IsEmpty { _i // 0 < 0 }\ni :\n LeftMoves\n (mk (InvTy { i // 0 < (fun x => 0) i } PEmpty false) (InvTy { i // 0 < (fun x => 0) i } PEmpty true)\n (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i))\n (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i)))\n⊢ moveLeft\n (mk (InvTy { i // 0 < (fun x => 0) i } PEmpty false) (InvTy { i // 0 < (fun x => 0) i } PEmpty true)\n (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i))\n (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i)))\n i ≡r\n moveLeft 1 (↑(id ?refine'_1) i)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_4\nthis : IsEmpty { _i // 0 < 0 }\n⊢ IsEmpty\n (RightMoves\n (mk (InvTy { i // 0 < (fun x => 0) i } PEmpty false) (InvTy { i // 0 < (fun x => 0) i } PEmpty true)\n (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i))\n (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i =>\n inv' (PEmpty.elim i))))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_1\nthis : IsEmpty { _i // 0 < 0 }\n⊢ InvTy { i // 0 < 0 } PEmpty false ≃ PUnit\n[PROOFSTEP]\napply Equiv.equivPUnit\n[GOAL]\ncase refine'_2\nthis : IsEmpty { _i // 0 < 0 }\n⊢ InvTy { i // 0 < 0 } PEmpty true ≃ PEmpty\n[PROOFSTEP]\napply Equiv.equivOfIsEmpty\n[GOAL]\ncase refine'_3\nthis : IsEmpty { _i // 0 < 0 }\ni :\n LeftMoves\n (mk (InvTy { i // 0 < (fun x => 0) i } PEmpty false) (InvTy { i // 0 < (fun x => 0) i } PEmpty true)\n (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i))\n (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i)))\n⊢ invVal (fun i => 0) PEmpty.elim (fun i => inv' 0) (fun i => inv' (PEmpty.elim i)) i ≡r 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_3\nthis : IsEmpty { _i // 0 < 0 }\ni :\n LeftMoves\n (mk (InvTy { i // 0 < (fun x => 0) i } PEmpty false) (InvTy { i // 0 < (fun x => 0) i } PEmpty true)\n (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i))\n (invVal (fun i => (fun x => 0) ↑i) PEmpty.elim (fun i => inv' ((fun x => 0) ↑i)) fun i => inv' (PEmpty.elim i)))\n⊢ 0 ≡r 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_4\nthis : IsEmpty { _i // 0 < 0 }\n⊢ IsEmpty (InvTy { i // 0 < 0 } PEmpty true)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ PGame → PGame\n[PROOFSTEP]\nclassical exact fun x => if x ≈ 0 then 0 else if 0 < x then inv' x else -inv' (-x)\n[GOAL]\n⊢ PGame → PGame\n[PROOFSTEP]\nexact fun x => if x ≈ 0 then 0 else if 0 < x then inv' x else -inv' (-x)\n[GOAL]\nx : PGame\nh : x ≈ 0\n⊢ x⁻¹ = 0\n[PROOFSTEP]\nclassical exact if_pos h\n[GOAL]\nx : PGame\nh : x ≈ 0\n⊢ x⁻¹ = 0\n[PROOFSTEP]\nexact if_pos h\n[GOAL]\nx : PGame\nh : 0 < x\n⊢ x⁻¹ = inv' x\n[PROOFSTEP]\nclassical exact (if_neg h.lf.not_equiv').trans (if_pos h)\n[GOAL]\nx : PGame\nh : 0 < x\n⊢ x⁻¹ = inv' x\n[PROOFSTEP]\nexact (if_neg h.lf.not_equiv').trans (if_pos h)\n[GOAL]\nx : PGame\nh : x ⧏ 0\n⊢ x⁻¹ = -inv' (-x)\n[PROOFSTEP]\nclassical exact (if_neg h.not_equiv).trans (if_neg h.not_gt)\n[GOAL]\nx : PGame\nh : x ⧏ 0\n⊢ x⁻¹ = -inv' (-x)\n[PROOFSTEP]\nexact (if_neg h.not_equiv).trans (if_neg h.not_gt)\n[GOAL]\n⊢ 1⁻¹ ≡r 1\n[PROOFSTEP]\nrw [inv_eq_of_pos PGame.zero_lt_one]\n[GOAL]\n⊢ inv' 1 ≡r 1\n[PROOFSTEP]\nexact inv'One\n", "meta": {"mathlib_filename": "Mathlib.SetTheory.Game.Basic", "llama_tokens": 264377, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8499711908591638, "lm_q2_score": 0.6926419767901475, "lm_q1q2_score": 0.588725725851367}} {"text": "[GOAL]\nα : Type u_1\nM : Type u_2\ninst✝ : CommMonoid M\nf : Option α → M\ns : Finset α\n⊢ ∏ x in ↑insertNone s, f x = f none * ∏ x in s, f (some x)\n[PROOFSTEP]\nsimp [insertNone]\n[GOAL]\nα : Type u_1\nM : Type u_2\ninst✝ : CommMonoid M\nf : α → M\ns : Finset (Option α)\n⊢ ∏ x in ↑eraseNone s, f x = ∏ x in s, Option.elim' 1 f x\n[PROOFSTEP]\nclassical calc\n ∏ x in eraseNone s, f x = ∏ x in (eraseNone s).map Embedding.some, Option.elim' 1 f x :=\n (prod_map (eraseNone s) Embedding.some <| Option.elim' 1 f).symm\n _ = ∏ x in s.erase none, Option.elim' 1 f x := by rw [map_some_eraseNone]\n _ = ∏ x in s, Option.elim' 1 f x := prod_erase _ rfl\n[GOAL]\nα : Type u_1\nM : Type u_2\ninst✝ : CommMonoid M\nf : α → M\ns : Finset (Option α)\n⊢ ∏ x in ↑eraseNone s, f x = ∏ x in s, Option.elim' 1 f x\n[PROOFSTEP]\ncalc\n ∏ x in eraseNone s, f x = ∏ x in (eraseNone s).map Embedding.some, Option.elim' 1 f x :=\n (prod_map (eraseNone s) Embedding.some <| Option.elim' 1 f).symm\n _ = ∏ x in s.erase none, Option.elim' 1 f x := by rw [map_some_eraseNone]\n _ = ∏ x in s, Option.elim' 1 f x := prod_erase _ rfl\n[GOAL]\nα : Type u_1\nM : Type u_2\ninst✝ : CommMonoid M\nf : α → M\ns : Finset (Option α)\n⊢ ∏ x in map Embedding.some (↑eraseNone s), Option.elim' 1 f x = ∏ x in erase s none, Option.elim' 1 f x\n[PROOFSTEP]\nrw [map_some_eraseNone]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.BigOperators.Option", "llama_tokens": 665, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8499711908591638, "lm_q2_score": 0.6926419767901475, "lm_q1q2_score": 0.588725725851367}} {"text": "[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\nS : Type ?u.27\ninst✝² : Mul R\ninst✝¹ : Add R\ninst✝ : Distrib S\nf : R → S\nhf : Injective f\nadd : ∀ (x y : R), f (x + y) = f x + f y\nmul : ∀ (x y : R), f (x * y) = f x * f y\nx y z : R\n⊢ f (x * (y + z)) = f (x * y + x * z)\n[PROOFSTEP]\nsimp only [*, left_distrib]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\nS : Type ?u.27\ninst✝² : Mul R\ninst✝¹ : Add R\ninst✝ : Distrib S\nf : R → S\nhf : Injective f\nadd : ∀ (x y : R), f (x + y) = f x + f y\nmul : ∀ (x y : R), f (x * y) = f x * f y\nx y z : R\n⊢ f ((x + y) * z) = f (x * z + y * z)\n[PROOFSTEP]\nsimp only [*, right_distrib]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\nS : Type ?u.1511\ninst✝² : Distrib R\ninst✝¹ : Add S\ninst✝ : Mul S\nf : R → S\nhf : Surjective f\nadd : ∀ (x y : R), f (x + y) = f x + f y\nmul : ∀ (x y : R), f (x * y) = f x * f y\nx y z : R\n⊢ f x * (f y + f z) = f x * f y + f x * f z\n[PROOFSTEP]\nsimp only [← add, ← mul, left_distrib]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\nS : Type ?u.1511\ninst✝² : Distrib R\ninst✝¹ : Add S\ninst✝ : Mul S\nf : R → S\nhf : Surjective f\nadd : ∀ (x y : R), f (x + y) = f x + f y\nmul : ∀ (x y : R), f (x * y) = f x * f y\nx y z : R\n⊢ (f x + f y) * f z = f x * f z + f y * f z\n[PROOFSTEP]\nsimp only [← add, ← mul, right_distrib]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝³ : Mul α\ninst✝² : HasDistribNeg α\ninst✝¹ : Neg β\ninst✝ : Mul β\nf : β → α\nhf : Injective f\nneg : ∀ (a : β), f (-a) = -f a\nmul : ∀ (a b : β), f (a * b) = f a * f b\nsrc✝¹ : InvolutiveNeg β := Injective.involutiveNeg f hf neg\nsrc✝ : Mul β := inst✝\nx y : β\n⊢ f (-x * y) = f (-(x * y))\n[PROOFSTEP]\nerw [neg, mul, neg, neg_mul, mul]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝³ : Mul α\ninst✝² : HasDistribNeg α\ninst✝¹ : Neg β\ninst✝ : Mul β\nf : β → α\nhf : Injective f\nneg : ∀ (a : β), f (-a) = -f a\nmul : ∀ (a b : β), f (a * b) = f a * f b\nsrc✝¹ : InvolutiveNeg β := Injective.involutiveNeg f hf neg\nsrc✝ : Mul β := inst✝\nx y : β\n⊢ f (x * -y) = f (-(x * y))\n[PROOFSTEP]\nerw [neg, mul, neg, mul_neg, mul]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝³ : Mul α\ninst✝² : HasDistribNeg α\ninst✝¹ : Neg β\ninst✝ : Mul β\nf : α → β\nhf : Surjective f\nneg : ∀ (a : α), f (-a) = -f a\nmul : ∀ (a b : α), f (a * b) = f a * f b\nsrc✝¹ : InvolutiveNeg β := Surjective.involutiveNeg f hf neg\nsrc✝ : Mul β := inst✝\nx y : α\n⊢ -f x * f y = -(f x * f y)\n[PROOFSTEP]\nerw [← neg, ← mul, neg_mul, neg, mul]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝³ : Mul α\ninst✝² : HasDistribNeg α\ninst✝¹ : Neg β\ninst✝ : Mul β\nf : α → β\nhf : Surjective f\nneg : ∀ (a : α), f (-a) = -f a\nmul : ∀ (a b : α), f (a * b) = f a * f b\nsrc✝¹ : InvolutiveNeg β := Surjective.involutiveNeg f hf neg\nsrc✝ : Mul β := inst✝\nx y : α\n⊢ f x * -f y = -(f x * f y)\n[PROOFSTEP]\nerw [← neg, ← mul, mul_neg, neg, mul]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Ring.InjSurj", "llama_tokens": 1517, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8418256591565729, "lm_q2_score": 0.6992544273261176, "lm_q1q2_score": 0.5886503192019609}} {"text": "[GOAL]\nu : ℤˣ\n⊢ natAbs ↑u * natAbs ↑u⁻¹ = 1\n[PROOFSTEP]\nrw [← natAbs_mul, Units.mul_inv]\n[GOAL]\nu : ℤˣ\n⊢ natAbs 1 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nu : ℤˣ\n⊢ natAbs ↑u⁻¹ * natAbs ↑u = 1\n[PROOFSTEP]\nrw [← natAbs_mul, Units.inv_mul]\n[GOAL]\nu : ℤˣ\n⊢ natAbs 1 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nu : ℤˣ\n⊢ u = 1 ∨ u = -1\n[PROOFSTEP]\nsimpa only [Units.ext_iff, units_natAbs] using natAbs_eq u\n[GOAL]\na : ℤ\n⊢ IsUnit a ↔ a = 1 ∨ a = -1\n[PROOFSTEP]\nrefine' ⟨fun h => isUnit_eq_one_or h, fun h => _⟩\n[GOAL]\na : ℤ\nh : a = 1 ∨ a = -1\n⊢ IsUnit a\n[PROOFSTEP]\nrcases h with (rfl | rfl)\n[GOAL]\ncase inl\n⊢ IsUnit 1\n[PROOFSTEP]\nexact isUnit_one\n[GOAL]\ncase inr\n⊢ IsUnit (-1)\n[PROOFSTEP]\nexact isUnit_one.neg\n[GOAL]\na b : ℤ\nha : IsUnit a\nhb : IsUnit b\n⊢ a = b ∨ a = -b\n[PROOFSTEP]\nrcases isUnit_eq_one_or hb with (rfl | rfl)\n[GOAL]\ncase inl\na : ℤ\nha : IsUnit a\nhb : IsUnit 1\n⊢ a = 1 ∨ a = -1\n[PROOFSTEP]\nexact isUnit_eq_one_or ha\n[GOAL]\ncase inr\na : ℤ\nha : IsUnit a\nhb : IsUnit (-1)\n⊢ a = -1 ∨ a = - -1\n[PROOFSTEP]\nrwa [or_comm, neg_neg, ← isUnit_iff]\n[GOAL]\nz w : ℤ\nh : z * w = 1\n⊢ z = 1 ∧ w = 1 ∨ z = -1 ∧ w = -1\n[PROOFSTEP]\nhave h' : w * z = 1 := mul_comm z w ▸ h\n[GOAL]\nz w : ℤ\nh : z * w = 1\nh' : w * z = 1\n⊢ z = 1 ∧ w = 1 ∨ z = -1 ∧ w = -1\n[PROOFSTEP]\nrcases eq_one_or_neg_one_of_mul_eq_one h with (rfl | rfl)\n[GOAL]\ncase inl\nw : ℤ\nh : 1 * w = 1\nh' : w * 1 = 1\n⊢ 1 = 1 ∧ w = 1 ∨ 1 = -1 ∧ w = -1\n[PROOFSTEP]\nrcases eq_one_or_neg_one_of_mul_eq_one h' with (rfl | rfl)\n[GOAL]\ncase inr\nw : ℤ\nh : -1 * w = 1\nh' : w * -1 = 1\n⊢ -1 = 1 ∧ w = 1 ∨ -1 = -1 ∧ w = -1\n[PROOFSTEP]\nrcases eq_one_or_neg_one_of_mul_eq_one h' with (rfl | rfl)\n[GOAL]\ncase inl.inl\nh h' : 1 * 1 = 1\n⊢ 1 = 1 ∧ 1 = 1 ∨ 1 = -1 ∧ 1 = -1\n[PROOFSTEP]\ntauto\n[GOAL]\ncase inl.inr\nh : 1 * -1 = 1\nh' : -1 * 1 = 1\n⊢ 1 = 1 ∧ -1 = 1 ∨ 1 = -1 ∧ -1 = -1\n[PROOFSTEP]\ntauto\n[GOAL]\ncase inr.inl\nh : -1 * 1 = 1\nh' : 1 * -1 = 1\n⊢ -1 = 1 ∧ 1 = 1 ∨ -1 = -1 ∧ 1 = -1\n[PROOFSTEP]\ntauto\n[GOAL]\ncase inr.inr\nh h' : -1 * -1 = 1\n⊢ -1 = 1 ∧ -1 = 1 ∨ -1 = -1 ∧ -1 = -1\n[PROOFSTEP]\ntauto\n[GOAL]\nz w : ℤ\n⊢ z * w = 1 ↔ z = 1 ∧ w = 1 ∨ z = -1 ∧ w = -1\n[PROOFSTEP]\nrefine' ⟨eq_one_or_neg_one_of_mul_eq_one', fun h => Or.elim h (fun H => _) fun H => _⟩\n[GOAL]\ncase refine'_1\nz w : ℤ\nh : z = 1 ∧ w = 1 ∨ z = -1 ∧ w = -1\nH : z = 1 ∧ w = 1\n⊢ z * w = 1\n[PROOFSTEP]\nrcases H with ⟨rfl, rfl⟩\n[GOAL]\ncase refine'_2\nz w : ℤ\nh : z = 1 ∧ w = 1 ∨ z = -1 ∧ w = -1\nH : z = -1 ∧ w = -1\n⊢ z * w = 1\n[PROOFSTEP]\nrcases H with ⟨rfl, rfl⟩\n[GOAL]\ncase refine'_1.intro\nh : 1 = 1 ∧ 1 = 1 ∨ 1 = -1 ∧ 1 = -1\n⊢ 1 * 1 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2.intro\nh : -1 = 1 ∧ -1 = 1 ∨ -1 = -1 ∧ -1 = -1\n⊢ -1 * -1 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nz w : ℤ\nh : z * w = -1\n⊢ z = 1 ∧ w = -1 ∨ z = -1 ∧ w = 1\n[PROOFSTEP]\nrcases isUnit_eq_one_or (IsUnit.mul_iff.mp (Int.isUnit_iff.mpr (Or.inr h))).1 with (rfl | rfl)\n[GOAL]\ncase inl\nw : ℤ\nh : 1 * w = -1\n⊢ 1 = 1 ∧ w = -1 ∨ 1 = -1 ∧ w = 1\n[PROOFSTEP]\nexact Or.inl ⟨rfl, one_mul w ▸ h⟩\n[GOAL]\ncase inr\nw : ℤ\nh : -1 * w = -1\n⊢ -1 = 1 ∧ w = -1 ∨ -1 = -1 ∧ w = 1\n[PROOFSTEP]\nexact Or.inr ⟨rfl, neg_inj.mp (neg_one_mul w ▸ h)⟩\n[GOAL]\nz w : ℤ\n⊢ z * w = -1 ↔ z = 1 ∧ w = -1 ∨ z = -1 ∧ w = 1\n[PROOFSTEP]\nrefine' ⟨eq_one_or_neg_one_of_mul_eq_neg_one', fun h => Or.elim h (fun H => _) fun H => _⟩\n[GOAL]\ncase refine'_1\nz w : ℤ\nh : z = 1 ∧ w = -1 ∨ z = -1 ∧ w = 1\nH : z = 1 ∧ w = -1\n⊢ z * w = -1\n[PROOFSTEP]\nrcases H with ⟨rfl, rfl⟩\n[GOAL]\ncase refine'_2\nz w : ℤ\nh : z = 1 ∧ w = -1 ∨ z = -1 ∧ w = 1\nH : z = -1 ∧ w = 1\n⊢ z * w = -1\n[PROOFSTEP]\nrcases H with ⟨rfl, rfl⟩\n[GOAL]\ncase refine'_1.intro\nh : 1 = 1 ∧ -1 = -1 ∨ 1 = -1 ∧ -1 = 1\n⊢ 1 * -1 = -1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2.intro\nh : -1 = 1 ∧ 1 = -1 ∨ -1 = -1 ∧ 1 = 1\n⊢ -1 * 1 = -1\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℤ\n⊢ IsUnit n ↔ natAbs n = 1\n[PROOFSTEP]\nsimp [natAbs_eq_iff, isUnit_iff, Nat.cast_zero]\n[GOAL]\nn : ℕ\n⊢ IsUnit ↑n ↔ IsUnit n\n[PROOFSTEP]\nsimp [isUnit_iff_natAbs_eq]\n[GOAL]\na b c d : ℤ\nha : IsUnit a\nhb : IsUnit b\nhc : IsUnit c\nhd : IsUnit d\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\nrw [isUnit_iff] at ha hb hc hd \n[GOAL]\na b c d : ℤ\nha : a = 1 ∨ a = -1\nhb : b = 1 ∨ b = -1\nhc : c = 1 ∨ c = -1\nhd : d = 1 ∨ d = -1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\ncases ha\n[GOAL]\ncase inl\na b c d : ℤ\nhb : b = 1 ∨ b = -1\nhc : c = 1 ∨ c = -1\nhd : d = 1 ∨ d = -1\nh✝ : a = 1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\ncases hb\n[GOAL]\ncase inr\na b c d : ℤ\nhb : b = 1 ∨ b = -1\nhc : c = 1 ∨ c = -1\nhd : d = 1 ∨ d = -1\nh✝ : a = -1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\ncases hb\n[GOAL]\ncase inl.inl\na b c d : ℤ\nhc : c = 1 ∨ c = -1\nhd : d = 1 ∨ d = -1\nh✝¹ : a = 1\nh✝ : b = 1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\ncases hc\n[GOAL]\ncase inl.inr\na b c d : ℤ\nhc : c = 1 ∨ c = -1\nhd : d = 1 ∨ d = -1\nh✝¹ : a = 1\nh✝ : b = -1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\ncases hc\n[GOAL]\ncase inr.inl\na b c d : ℤ\nhc : c = 1 ∨ c = -1\nhd : d = 1 ∨ d = -1\nh✝¹ : a = -1\nh✝ : b = 1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\ncases hc\n[GOAL]\ncase inr.inr\na b c d : ℤ\nhc : c = 1 ∨ c = -1\nhd : d = 1 ∨ d = -1\nh✝¹ : a = -1\nh✝ : b = -1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\ncases hc\n[GOAL]\ncase inl.inl.inl\na b c d : ℤ\nhd : d = 1 ∨ d = -1\nh✝² : a = 1\nh✝¹ : b = 1\nh✝ : c = 1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\ncases hd\n[GOAL]\ncase inl.inl.inr\na b c d : ℤ\nhd : d = 1 ∨ d = -1\nh✝² : a = 1\nh✝¹ : b = 1\nh✝ : c = -1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\ncases hd\n[GOAL]\ncase inl.inr.inl\na b c d : ℤ\nhd : d = 1 ∨ d = -1\nh✝² : a = 1\nh✝¹ : b = -1\nh✝ : c = 1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\ncases hd\n[GOAL]\ncase inl.inr.inr\na b c d : ℤ\nhd : d = 1 ∨ d = -1\nh✝² : a = 1\nh✝¹ : b = -1\nh✝ : c = -1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\ncases hd\n[GOAL]\ncase inr.inl.inl\na b c d : ℤ\nhd : d = 1 ∨ d = -1\nh✝² : a = -1\nh✝¹ : b = 1\nh✝ : c = 1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\ncases hd\n[GOAL]\ncase inr.inl.inr\na b c d : ℤ\nhd : d = 1 ∨ d = -1\nh✝² : a = -1\nh✝¹ : b = 1\nh✝ : c = -1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\ncases hd\n[GOAL]\ncase inr.inr.inl\na b c d : ℤ\nhd : d = 1 ∨ d = -1\nh✝² : a = -1\nh✝¹ : b = -1\nh✝ : c = 1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\ncases hd\n[GOAL]\ncase inr.inr.inr\na b c d : ℤ\nhd : d = 1 ∨ d = -1\nh✝² : a = -1\nh✝¹ : b = -1\nh✝ : c = -1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\ncases hd\n[GOAL]\ncase inl.inl.inl.inl\na b c d : ℤ\nh✝³ : a = 1\nh✝² : b = 1\nh✝¹ : c = 1\nh✝ : d = 1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase inl.inl.inl.inr\na b c d : ℤ\nh✝³ : a = 1\nh✝² : b = 1\nh✝¹ : c = 1\nh✝ : d = -1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase inl.inl.inr.inl\na b c d : ℤ\nh✝³ : a = 1\nh✝² : b = 1\nh✝¹ : c = -1\nh✝ : d = 1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase inl.inl.inr.inr\na b c d : ℤ\nh✝³ : a = 1\nh✝² : b = 1\nh✝¹ : c = -1\nh✝ : d = -1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase inl.inr.inl.inl\na b c d : ℤ\nh✝³ : a = 1\nh✝² : b = -1\nh✝¹ : c = 1\nh✝ : d = 1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase inl.inr.inl.inr\na b c d : ℤ\nh✝³ : a = 1\nh✝² : b = -1\nh✝¹ : c = 1\nh✝ : d = -1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase inl.inr.inr.inl\na b c d : ℤ\nh✝³ : a = 1\nh✝² : b = -1\nh✝¹ : c = -1\nh✝ : d = 1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase inl.inr.inr.inr\na b c d : ℤ\nh✝³ : a = 1\nh✝² : b = -1\nh✝¹ : c = -1\nh✝ : d = -1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase inr.inl.inl.inl\na b c d : ℤ\nh✝³ : a = -1\nh✝² : b = 1\nh✝¹ : c = 1\nh✝ : d = 1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase inr.inl.inl.inr\na b c d : ℤ\nh✝³ : a = -1\nh✝² : b = 1\nh✝¹ : c = 1\nh✝ : d = -1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase inr.inl.inr.inl\na b c d : ℤ\nh✝³ : a = -1\nh✝² : b = 1\nh✝¹ : c = -1\nh✝ : d = 1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase inr.inl.inr.inr\na b c d : ℤ\nh✝³ : a = -1\nh✝² : b = 1\nh✝¹ : c = -1\nh✝ : d = -1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase inr.inr.inl.inl\na b c d : ℤ\nh✝³ : a = -1\nh✝² : b = -1\nh✝¹ : c = 1\nh✝ : d = 1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase inr.inr.inl.inr\na b c d : ℤ\nh✝³ : a = -1\nh✝² : b = -1\nh✝¹ : c = 1\nh✝ : d = -1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase inr.inr.inr.inl\na b c d : ℤ\nh✝³ : a = -1\nh✝² : b = -1\nh✝¹ : c = -1\nh✝ : d = 1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase inr.inr.inr.inr\na b c d : ℤ\nh✝³ : a = -1\nh✝² : b = -1\nh✝¹ : c = -1\nh✝ : d = -1\n⊢ a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase inl.inl.inl.inl\nb c d : ℤ\nh✝² : b = 1\nh✝¹ : c = 1\nh✝ : d = 1\n⊢ 1 + b = c + d ↔ 1 = c ∧ b = d ∨ 1 = d ∧ b = c\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase inl.inl.inl.inr\nb c d : ℤ\nh✝² : b = 1\nh✝¹ : c = 1\nh✝ : d = -1\n⊢ 1 + b = c + d ↔ 1 = c ∧ b = d ∨ 1 = d ∧ b = c\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase inl.inl.inr.inl\nb c d : ℤ\nh✝² : b = 1\nh✝¹ : c = -1\nh✝ : d = 1\n⊢ 1 + b = c + d ↔ 1 = c ∧ b = d ∨ 1 = d ∧ b = c\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase inl.inl.inr.inr\nb c d : ℤ\nh✝² : b = 1\nh✝¹ : c = -1\nh✝ : d = -1\n⊢ 1 + b = c + d ↔ 1 = c ∧ b = d ∨ 1 = d ∧ b = c\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase inl.inr.inl.inl\nb c d : ℤ\nh✝² : b = -1\nh✝¹ : c = 1\nh✝ : d = 1\n⊢ 1 + b = c + d ↔ 1 = c ∧ b = d ∨ 1 = d ∧ b = c\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase inl.inr.inl.inr\nb c d : ℤ\nh✝² : b = -1\nh✝¹ : c = 1\nh✝ : d = -1\n⊢ 1 + b = c + d ↔ 1 = c ∧ b = d ∨ 1 = d ∧ b = c\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase inl.inr.inr.inl\nb c d : ℤ\nh✝² : b = -1\nh✝¹ : c = -1\nh✝ : d = 1\n⊢ 1 + b = c + d ↔ 1 = c ∧ b = d ∨ 1 = d ∧ b = c\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase inl.inr.inr.inr\nb c d : ℤ\nh✝² : b = -1\nh✝¹ : c = -1\nh✝ : d = -1\n⊢ 1 + b = c + d ↔ 1 = c ∧ b = d ∨ 1 = d ∧ b = c\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase inr.inl.inl.inl\nb c d : ℤ\nh✝² : b = 1\nh✝¹ : c = 1\nh✝ : d = 1\n⊢ -1 + b = c + d ↔ -1 = c ∧ b = d ∨ -1 = d ∧ b = c\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase inr.inl.inl.inr\nb c d : ℤ\nh✝² : b = 1\nh✝¹ : c = 1\nh✝ : d = -1\n⊢ -1 + b = c + d ↔ -1 = c ∧ b = d ∨ -1 = d ∧ b = c\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase inr.inl.inr.inl\nb c d : ℤ\nh✝² : b = 1\nh✝¹ : c = -1\nh✝ : d = 1\n⊢ -1 + b = c + d ↔ -1 = c ∧ b = d ∨ -1 = d ∧ b = c\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase inr.inl.inr.inr\nb c d : ℤ\nh✝² : b = 1\nh✝¹ : c = -1\nh✝ : d = -1\n⊢ -1 + b = c + d ↔ -1 = c ∧ b = d ∨ -1 = d ∧ b = c\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase inr.inr.inl.inl\nb c d : ℤ\nh✝² : b = -1\nh✝¹ : c = 1\nh✝ : d = 1\n⊢ -1 + b = c + d ↔ -1 = c ∧ b = d ∨ -1 = d ∧ b = c\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase inr.inr.inl.inr\nb c d : ℤ\nh✝² : b = -1\nh✝¹ : c = 1\nh✝ : d = -1\n⊢ -1 + b = c + d ↔ -1 = c ∧ b = d ∨ -1 = d ∧ b = c\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase inr.inr.inr.inl\nb c d : ℤ\nh✝² : b = -1\nh✝¹ : c = -1\nh✝ : d = 1\n⊢ -1 + b = c + d ↔ -1 = c ∧ b = d ∨ -1 = d ∧ b = c\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase inr.inr.inr.inr\nb c d : ℤ\nh✝² : b = -1\nh✝¹ : c = -1\nh✝ : d = -1\n⊢ -1 + b = c + d ↔ -1 = c ∧ b = d ∨ -1 = d ∧ b = c\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase inl.inl.inl.inl\nc d : ℤ\nh✝¹ : c = 1\nh✝ : d = 1\n⊢ 1 + 1 = c + d ↔ 1 = c ∧ 1 = d ∨ 1 = d ∧ 1 = c\n[PROOFSTEP]\nsubst c\n[GOAL]\ncase inl.inl.inl.inr\nc d : ℤ\nh✝¹ : c = 1\nh✝ : d = -1\n⊢ 1 + 1 = c + d ↔ 1 = c ∧ 1 = d ∨ 1 = d ∧ 1 = c\n[PROOFSTEP]\nsubst c\n[GOAL]\ncase inl.inl.inr.inl\nc d : ℤ\nh✝¹ : c = -1\nh✝ : d = 1\n⊢ 1 + 1 = c + d ↔ 1 = c ∧ 1 = d ∨ 1 = d ∧ 1 = c\n[PROOFSTEP]\nsubst c\n[GOAL]\ncase inl.inl.inr.inr\nc d : ℤ\nh✝¹ : c = -1\nh✝ : d = -1\n⊢ 1 + 1 = c + d ↔ 1 = c ∧ 1 = d ∨ 1 = d ∧ 1 = c\n[PROOFSTEP]\nsubst c\n[GOAL]\ncase inl.inr.inl.inl\nc d : ℤ\nh✝¹ : c = 1\nh✝ : d = 1\n⊢ 1 + -1 = c + d ↔ 1 = c ∧ -1 = d ∨ 1 = d ∧ -1 = c\n[PROOFSTEP]\nsubst c\n[GOAL]\ncase inl.inr.inl.inr\nc d : ℤ\nh✝¹ : c = 1\nh✝ : d = -1\n⊢ 1 + -1 = c + d ↔ 1 = c ∧ -1 = d ∨ 1 = d ∧ -1 = c\n[PROOFSTEP]\nsubst c\n[GOAL]\ncase inl.inr.inr.inl\nc d : ℤ\nh✝¹ : c = -1\nh✝ : d = 1\n⊢ 1 + -1 = c + d ↔ 1 = c ∧ -1 = d ∨ 1 = d ∧ -1 = c\n[PROOFSTEP]\nsubst c\n[GOAL]\ncase inl.inr.inr.inr\nc d : ℤ\nh✝¹ : c = -1\nh✝ : d = -1\n⊢ 1 + -1 = c + d ↔ 1 = c ∧ -1 = d ∨ 1 = d ∧ -1 = c\n[PROOFSTEP]\nsubst c\n[GOAL]\ncase inr.inl.inl.inl\nc d : ℤ\nh✝¹ : c = 1\nh✝ : d = 1\n⊢ -1 + 1 = c + d ↔ -1 = c ∧ 1 = d ∨ -1 = d ∧ 1 = c\n[PROOFSTEP]\nsubst c\n[GOAL]\ncase inr.inl.inl.inr\nc d : ℤ\nh✝¹ : c = 1\nh✝ : d = -1\n⊢ -1 + 1 = c + d ↔ -1 = c ∧ 1 = d ∨ -1 = d ∧ 1 = c\n[PROOFSTEP]\nsubst c\n[GOAL]\ncase inr.inl.inr.inl\nc d : ℤ\nh✝¹ : c = -1\nh✝ : d = 1\n⊢ -1 + 1 = c + d ↔ -1 = c ∧ 1 = d ∨ -1 = d ∧ 1 = c\n[PROOFSTEP]\nsubst c\n[GOAL]\ncase inr.inl.inr.inr\nc d : ℤ\nh✝¹ : c = -1\nh✝ : d = -1\n⊢ -1 + 1 = c + d ↔ -1 = c ∧ 1 = d ∨ -1 = d ∧ 1 = c\n[PROOFSTEP]\nsubst c\n[GOAL]\ncase inr.inr.inl.inl\nc d : ℤ\nh✝¹ : c = 1\nh✝ : d = 1\n⊢ -1 + -1 = c + d ↔ -1 = c ∧ -1 = d ∨ -1 = d ∧ -1 = c\n[PROOFSTEP]\nsubst c\n[GOAL]\ncase inr.inr.inl.inr\nc d : ℤ\nh✝¹ : c = 1\nh✝ : d = -1\n⊢ -1 + -1 = c + d ↔ -1 = c ∧ -1 = d ∨ -1 = d ∧ -1 = c\n[PROOFSTEP]\nsubst c\n[GOAL]\ncase inr.inr.inr.inl\nc d : ℤ\nh✝¹ : c = -1\nh✝ : d = 1\n⊢ -1 + -1 = c + d ↔ -1 = c ∧ -1 = d ∨ -1 = d ∧ -1 = c\n[PROOFSTEP]\nsubst c\n[GOAL]\ncase inr.inr.inr.inr\nc d : ℤ\nh✝¹ : c = -1\nh✝ : d = -1\n⊢ -1 + -1 = c + d ↔ -1 = c ∧ -1 = d ∨ -1 = d ∧ -1 = c\n[PROOFSTEP]\nsubst c\n[GOAL]\ncase inl.inl.inl.inl\nd : ℤ\nh✝ : d = 1\n⊢ 1 + 1 = 1 + d ↔ 1 = 1 ∧ 1 = d ∨ 1 = d ∧ 1 = 1\n[PROOFSTEP]\nsubst d\n[GOAL]\ncase inl.inl.inl.inr\nd : ℤ\nh✝ : d = -1\n⊢ 1 + 1 = 1 + d ↔ 1 = 1 ∧ 1 = d ∨ 1 = d ∧ 1 = 1\n[PROOFSTEP]\nsubst d\n[GOAL]\ncase inl.inl.inr.inl\nd : ℤ\nh✝ : d = 1\n⊢ 1 + 1 = -1 + d ↔ 1 = -1 ∧ 1 = d ∨ 1 = d ∧ 1 = -1\n[PROOFSTEP]\nsubst d\n[GOAL]\ncase inl.inl.inr.inr\nd : ℤ\nh✝ : d = -1\n⊢ 1 + 1 = -1 + d ↔ 1 = -1 ∧ 1 = d ∨ 1 = d ∧ 1 = -1\n[PROOFSTEP]\nsubst d\n[GOAL]\ncase inl.inr.inl.inl\nd : ℤ\nh✝ : d = 1\n⊢ 1 + -1 = 1 + d ↔ 1 = 1 ∧ -1 = d ∨ 1 = d ∧ -1 = 1\n[PROOFSTEP]\nsubst d\n[GOAL]\ncase inl.inr.inl.inr\nd : ℤ\nh✝ : d = -1\n⊢ 1 + -1 = 1 + d ↔ 1 = 1 ∧ -1 = d ∨ 1 = d ∧ -1 = 1\n[PROOFSTEP]\nsubst d\n[GOAL]\ncase inl.inr.inr.inl\nd : ℤ\nh✝ : d = 1\n⊢ 1 + -1 = -1 + d ↔ 1 = -1 ∧ -1 = d ∨ 1 = d ∧ -1 = -1\n[PROOFSTEP]\nsubst d\n[GOAL]\ncase inl.inr.inr.inr\nd : ℤ\nh✝ : d = -1\n⊢ 1 + -1 = -1 + d ↔ 1 = -1 ∧ -1 = d ∨ 1 = d ∧ -1 = -1\n[PROOFSTEP]\nsubst d\n[GOAL]\ncase inr.inl.inl.inl\nd : ℤ\nh✝ : d = 1\n⊢ -1 + 1 = 1 + d ↔ -1 = 1 ∧ 1 = d ∨ -1 = d ∧ 1 = 1\n[PROOFSTEP]\nsubst d\n[GOAL]\ncase inr.inl.inl.inr\nd : ℤ\nh✝ : d = -1\n⊢ -1 + 1 = 1 + d ↔ -1 = 1 ∧ 1 = d ∨ -1 = d ∧ 1 = 1\n[PROOFSTEP]\nsubst d\n[GOAL]\ncase inr.inl.inr.inl\nd : ℤ\nh✝ : d = 1\n⊢ -1 + 1 = -1 + d ↔ -1 = -1 ∧ 1 = d ∨ -1 = d ∧ 1 = -1\n[PROOFSTEP]\nsubst d\n[GOAL]\ncase inr.inl.inr.inr\nd : ℤ\nh✝ : d = -1\n⊢ -1 + 1 = -1 + d ↔ -1 = -1 ∧ 1 = d ∨ -1 = d ∧ 1 = -1\n[PROOFSTEP]\nsubst d\n[GOAL]\ncase inr.inr.inl.inl\nd : ℤ\nh✝ : d = 1\n⊢ -1 + -1 = 1 + d ↔ -1 = 1 ∧ -1 = d ∨ -1 = d ∧ -1 = 1\n[PROOFSTEP]\nsubst d\n[GOAL]\ncase inr.inr.inl.inr\nd : ℤ\nh✝ : d = -1\n⊢ -1 + -1 = 1 + d ↔ -1 = 1 ∧ -1 = d ∨ -1 = d ∧ -1 = 1\n[PROOFSTEP]\nsubst d\n[GOAL]\ncase inr.inr.inr.inl\nd : ℤ\nh✝ : d = 1\n⊢ -1 + -1 = -1 + d ↔ -1 = -1 ∧ -1 = d ∨ -1 = d ∧ -1 = -1\n[PROOFSTEP]\nsubst d\n[GOAL]\ncase inr.inr.inr.inr\nd : ℤ\nh✝ : d = -1\n⊢ -1 + -1 = -1 + d ↔ -1 = -1 ∧ -1 = d ∨ -1 = d ∧ -1 = -1\n[PROOFSTEP]\nsubst d\n[GOAL]\ncase inl.inl.inl.inl\n⊢ 1 + 1 = 1 + 1 ↔ 1 = 1 ∧ 1 = 1 ∨ 1 = 1 ∧ 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl.inl.inl.inr\n⊢ 1 + 1 = 1 + -1 ↔ 1 = 1 ∧ 1 = -1 ∨ 1 = -1 ∧ 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl.inl.inr.inl\n⊢ 1 + 1 = -1 + 1 ↔ 1 = -1 ∧ 1 = 1 ∨ 1 = 1 ∧ 1 = -1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl.inl.inr.inr\n⊢ 1 + 1 = -1 + -1 ↔ 1 = -1 ∧ 1 = -1 ∨ 1 = -1 ∧ 1 = -1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl.inr.inl.inl\n⊢ 1 + -1 = 1 + 1 ↔ 1 = 1 ∧ -1 = 1 ∨ 1 = 1 ∧ -1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl.inr.inl.inr\n⊢ 1 + -1 = 1 + -1 ↔ 1 = 1 ∧ -1 = -1 ∨ 1 = -1 ∧ -1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl.inr.inr.inl\n⊢ 1 + -1 = -1 + 1 ↔ 1 = -1 ∧ -1 = 1 ∨ 1 = 1 ∧ -1 = -1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl.inr.inr.inr\n⊢ 1 + -1 = -1 + -1 ↔ 1 = -1 ∧ -1 = -1 ∨ 1 = -1 ∧ -1 = -1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inl.inl.inl\n⊢ -1 + 1 = 1 + 1 ↔ -1 = 1 ∧ 1 = 1 ∨ -1 = 1 ∧ 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inl.inl.inr\n⊢ -1 + 1 = 1 + -1 ↔ -1 = 1 ∧ 1 = -1 ∨ -1 = -1 ∧ 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inl.inr.inl\n⊢ -1 + 1 = -1 + 1 ↔ -1 = -1 ∧ 1 = 1 ∨ -1 = 1 ∧ 1 = -1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inl.inr.inr\n⊢ -1 + 1 = -1 + -1 ↔ -1 = -1 ∧ 1 = -1 ∨ -1 = -1 ∧ 1 = -1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr.inl.inl\n⊢ -1 + -1 = 1 + 1 ↔ -1 = 1 ∧ -1 = 1 ∨ -1 = 1 ∧ -1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr.inl.inr\n⊢ -1 + -1 = 1 + -1 ↔ -1 = 1 ∧ -1 = -1 ∨ -1 = -1 ∧ -1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr.inr.inl\n⊢ -1 + -1 = -1 + 1 ↔ -1 = -1 ∧ -1 = 1 ∨ -1 = 1 ∧ -1 = -1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr.inr.inr\n⊢ -1 + -1 = -1 + -1 ↔ -1 = -1 ∧ -1 = -1 ∨ -1 = -1 ∧ -1 = -1\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.Units", "llama_tokens": 11185, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.808067204308405, "lm_q2_score": 0.727975460709318, "lm_q1q2_score": 0.5882530953405016}} {"text": "[GOAL]\nz w : ℂ\n⊢ z < w ↔ z ≤ w ∧ ¬w ≤ z\n[PROOFSTEP]\ndsimp\n[GOAL]\nz w : ℂ\n⊢ z.re < w.re ∧ z.im = w.im ↔ (z.re ≤ w.re ∧ z.im = w.im) ∧ ¬(w.re ≤ z.re ∧ w.im = z.im)\n[PROOFSTEP]\nrw [lt_iff_le_not_le]\n[GOAL]\nz w : ℂ\n⊢ (z.re ≤ w.re ∧ ¬w.re ≤ z.re) ∧ z.im = w.im ↔ (z.re ≤ w.re ∧ z.im = w.im) ∧ ¬(w.re ≤ z.re ∧ w.im = z.im)\n[PROOFSTEP]\ntauto\n[GOAL]\nx y : ℝ\n⊢ ↑x ≤ ↑y ↔ x ≤ y\n[PROOFSTEP]\nsimp [le_def, ofReal']\n[GOAL]\nx y : ℝ\n⊢ ↑x < ↑y ↔ x < y\n[PROOFSTEP]\nsimp [lt_def, ofReal']\n[GOAL]\nz w : ℂ\n⊢ ¬z ≤ w ↔ w.re < z.re ∨ z.im ≠ w.im\n[PROOFSTEP]\nrw [le_def, not_and_or, not_le]\n[GOAL]\nz w : ℂ\n⊢ ¬z < w ↔ w.re ≤ z.re ∨ z.im ≠ w.im\n[PROOFSTEP]\nrw [lt_def, not_and_or, not_lt]\n[GOAL]\nr : ℝ\nz : ℂ\nhz : ↑r ≤ z\n⊢ z = ↑z.re\n[PROOFSTEP]\next\n[GOAL]\ncase a\nr : ℝ\nz : ℂ\nhz : ↑r ≤ z\n⊢ z.re = (↑z.re).re\ncase a r : ℝ z : ℂ hz : ↑r ≤ z ⊢ z.im = (↑z.re).im\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a\nr : ℝ\nz : ℂ\nhz : ↑r ≤ z\n⊢ z.im = (↑z.re).im\n[PROOFSTEP]\nsimp only [← (Complex.le_def.1 hz).2, Complex.zero_im, Complex.ofReal_im]\n", "meta": {"mathlib_filename": "Mathlib.Data.Complex.Order", "llama_tokens": 648, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8289387914176259, "lm_q2_score": 0.7090191276365462, "lm_q1q2_score": 0.587733458755018}} {"text": "[GOAL]\nB : Type u_1\nF : Type u_2\nZ : Type u_3\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\ninst✝¹ : TopologicalSpace Z\nproj : Z → B\ninst✝ : Nonempty F\nh : IsHomeomorphicTrivialFiberBundle F proj\n⊢ Function.Surjective proj\n[PROOFSTEP]\nobtain ⟨e, rfl⟩ := h.proj_eq\n[GOAL]\ncase intro\nB : Type u_1\nF : Type u_2\nZ : Type u_3\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\ninst✝¹ : TopologicalSpace Z\ninst✝ : Nonempty F\ne : Z ≃ₜ B × F\nh : IsHomeomorphicTrivialFiberBundle F (Prod.fst ∘ ↑e)\n⊢ Function.Surjective (Prod.fst ∘ ↑e)\n[PROOFSTEP]\nexact Prod.fst_surjective.comp e.surjective\n[GOAL]\nB : Type u_1\nF : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : TopologicalSpace Z\nproj : Z → B\nh : IsHomeomorphicTrivialFiberBundle F proj\n⊢ Continuous proj\n[PROOFSTEP]\nobtain ⟨e, rfl⟩ := h.proj_eq\n[GOAL]\ncase intro\nB : Type u_1\nF : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : TopologicalSpace Z\ne : Z ≃ₜ B × F\nh : IsHomeomorphicTrivialFiberBundle F (Prod.fst ∘ ↑e)\n⊢ Continuous (Prod.fst ∘ ↑e)\n[PROOFSTEP]\nexact continuous_fst.comp e.continuous\n[GOAL]\nB : Type u_1\nF : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : TopologicalSpace Z\nproj : Z → B\nh : IsHomeomorphicTrivialFiberBundle F proj\n⊢ IsOpenMap proj\n[PROOFSTEP]\nobtain ⟨e, rfl⟩ := h.proj_eq\n[GOAL]\ncase intro\nB : Type u_1\nF : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : TopologicalSpace Z\ne : Z ≃ₜ B × F\nh : IsHomeomorphicTrivialFiberBundle F (Prod.fst ∘ ↑e)\n⊢ IsOpenMap (Prod.fst ∘ ↑e)\n[PROOFSTEP]\nexact isOpenMap_fst.comp e.isOpenMap\n", "meta": {"mathlib_filename": "Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle", "llama_tokens": 755, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8479677660619633, "lm_q2_score": 0.6926419767901476, "lm_q1q2_score": 0.5873380697394838}} {"text": "[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring A\ninst✝¹ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\np : ℕ\ninst✝ : CharP R p\nx : ℕ\n⊢ ↑x = 0 ↔ p ∣ x\n[PROOFSTEP]\nrw [← CharP.cast_eq_zero_iff R p x]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring A\ninst✝¹ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\np : ℕ\ninst✝ : CharP R p\nx : ℕ\n⊢ ↑x = 0 ↔ ↑x = 0\n[PROOFSTEP]\nchange algebraMap ℕ A x = 0 ↔ algebraMap ℕ R x = 0\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring A\ninst✝¹ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\np : ℕ\ninst✝ : CharP R p\nx : ℕ\n⊢ ↑(algebraMap ℕ A) x = 0 ↔ ↑(algebraMap ℕ R) x = 0\n[PROOFSTEP]\nrw [IsScalarTower.algebraMap_apply ℕ R A x]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring A\ninst✝¹ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\np : ℕ\ninst✝ : CharP R p\nx : ℕ\n⊢ ↑(algebraMap R A) (↑(algebraMap ℕ R) x) = 0 ↔ ↑(algebraMap ℕ R) x = 0\n[PROOFSTEP]\nrefine' Iff.trans _ h.eq_iff\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring A\ninst✝¹ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\np : ℕ\ninst✝ : CharP R p\nx : ℕ\n⊢ ↑(algebraMap R A) (↑(algebraMap ℕ R) x) = 0 ↔ ↑(algebraMap R A) (↑(algebraMap ℕ R) x) = ↑(algebraMap R A) 0\n[PROOFSTEP]\nrw [RingHom.map_zero]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring A\ninst✝¹ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\ninst✝ : CharZero R\nx y : ℕ\nhxy : ↑x = ↑y\n⊢ x = y\n[PROOFSTEP]\nchange algebraMap ℕ A x = algebraMap ℕ A y at hxy \n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring A\ninst✝¹ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\ninst✝ : CharZero R\nx y : ℕ\nhxy : ↑(algebraMap ℕ A) x = ↑(algebraMap ℕ A) y\n⊢ x = y\n[PROOFSTEP]\nrw [IsScalarTower.algebraMap_apply ℕ R A x] at hxy \n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring A\ninst✝¹ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\ninst✝ : CharZero R\nx y : ℕ\nhxy : ↑(algebraMap R A) (↑(algebraMap ℕ R) x) = ↑(algebraMap ℕ A) y\n⊢ x = y\n[PROOFSTEP]\nrw [IsScalarTower.algebraMap_apply ℕ R A y] at hxy \n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring A\ninst✝¹ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\ninst✝ : CharZero R\nx y : ℕ\nhxy : ↑(algebraMap R A) (↑(algebraMap ℕ R) x) = ↑(algebraMap R A) (↑(algebraMap ℕ R) y)\n⊢ x = y\n[PROOFSTEP]\nexact CharZero.cast_injective (h hxy)\n[GOAL]\nK : Type u_1\nL : Type u_2\ninst✝³ : Field K\ninst✝² : CommSemiring L\ninst✝¹ : Nontrivial L\ninst✝ : Algebra K L\n⊢ ringChar K = ringChar L\n[PROOFSTEP]\nrw [ringChar.eq_iff, Algebra.charP_iff K L]\n[GOAL]\nK : Type u_1\nL : Type u_2\ninst✝³ : Field K\ninst✝² : CommSemiring L\ninst✝¹ : Nontrivial L\ninst✝ : Algebra K L\n⊢ CharP L (ringChar L)\n[PROOFSTEP]\napply ringChar.charP\n", "meta": {"mathlib_filename": "Mathlib.Algebra.CharP.Algebra", "llama_tokens": 1449, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8438951025545426, "lm_q2_score": 0.6959583124210896, "lm_q1q2_score": 0.5873158114342818}} {"text": "[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\n⊢ ⁅g₁, g₂⁆ = 1 ↔ g₁ * g₂ = g₂ * g₁\n[PROOFSTEP]\nrw [commutatorElement_def, mul_inv_eq_one, mul_inv_eq_iff_eq_mul]\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\n⊢ ⁅g₁, g₂⁆⁻¹ = ⁅g₂, g₁⁆\n[PROOFSTEP]\nsimp_rw [commutatorElement_def, mul_inv_rev, inv_inv, mul_assoc]\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\n⊢ ↑f ⁅g₁, g₂⁆ = ⁅↑f g₁, ↑f g₂⁆\n[PROOFSTEP]\nsimp_rw [commutatorElement_def, map_mul f, map_inv f]\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\n⊢ ⁅H₁, H₂⁆ = ⊥ ↔ H₁ ≤ centralizer ↑H₂\n[PROOFSTEP]\nrw [eq_bot_iff, commutator_le]\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\n⊢ (∀ (g₁ : G), g₁ ∈ H₁ → ∀ (g₂ : G), g₂ ∈ H₂ → ⁅g₁, g₂⁆ ∈ ⊥) ↔ H₁ ≤ centralizer ↑H₂\n[PROOFSTEP]\nrefine' forall_congr' fun p => forall_congr' fun _hp => forall_congr' fun q => forall_congr' fun hq => _\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\np : G\n_hp : p ∈ H₁\nq : G\nhq : q ∈ H₂\n⊢ ⁅p, q⁆ ∈ ⊥ ↔ q * p = p * q\n[PROOFSTEP]\nrw [mem_bot, commutatorElement_eq_one_iff_mul_comm, eq_comm]\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nh1 : ⁅⁅H₂, H₃⁆, H₁⁆ = ⊥\nh2 : ⁅⁅H₃, H₁⁆, H₂⁆ = ⊥\n⊢ ⁅⁅H₁, H₂⁆, H₃⁆ = ⊥\n[PROOFSTEP]\nsimp_rw [commutator_eq_bot_iff_le_centralizer, commutator_le, mem_centralizer_iff_commutator_eq_one, ←\n commutatorElement_def] at h1 h2 ⊢\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nh1 : ∀ (g₁ : G), g₁ ∈ H₂ → ∀ (g₂ : G), g₂ ∈ H₃ → ∀ (h : G), h ∈ ↑H₁ → ⁅h, ⁅g₁, g₂⁆⁆ = 1\nh2 : ∀ (g₁ : G), g₁ ∈ H₃ → ∀ (g₂ : G), g₂ ∈ H₁ → ∀ (h : G), h ∈ ↑H₂ → ⁅h, ⁅g₁, g₂⁆⁆ = 1\n⊢ ∀ (g₁ : G), g₁ ∈ H₁ → ∀ (g₂ : G), g₂ ∈ H₂ → ∀ (h : G), h ∈ ↑H₃ → ⁅h, ⁅g₁, g₂⁆⁆ = 1\n[PROOFSTEP]\nintro x hx y hy z hz\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nh1 : ∀ (g₁ : G), g₁ ∈ H₂ → ∀ (g₂ : G), g₂ ∈ H₃ → ∀ (h : G), h ∈ ↑H₁ → ⁅h, ⁅g₁, g₂⁆⁆ = 1\nh2 : ∀ (g₁ : G), g₁ ∈ H₃ → ∀ (g₂ : G), g₂ ∈ H₁ → ∀ (h : G), h ∈ ↑H₂ → ⁅h, ⁅g₁, g₂⁆⁆ = 1\nx : G\nhx : x ∈ H₁\ny : G\nhy : y ∈ H₂\nz : G\nhz : z ∈ ↑H₃\n⊢ ⁅z, ⁅x, y⁆⁆ = 1\n[PROOFSTEP]\ntrans x * z * ⁅y, ⁅z⁻¹, x⁻¹⁆⁆⁻¹ * z⁻¹ * y * ⁅x⁻¹, ⁅y⁻¹, z⁆⁆⁻¹ * y⁻¹ * x⁻¹\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nh1 : ∀ (g₁ : G), g₁ ∈ H₂ → ∀ (g₂ : G), g₂ ∈ H₃ → ∀ (h : G), h ∈ ↑H₁ → ⁅h, ⁅g₁, g₂⁆⁆ = 1\nh2 : ∀ (g₁ : G), g₁ ∈ H₃ → ∀ (g₂ : G), g₂ ∈ H₁ → ∀ (h : G), h ∈ ↑H₂ → ⁅h, ⁅g₁, g₂⁆⁆ = 1\nx : G\nhx : x ∈ H₁\ny : G\nhy : y ∈ H₂\nz : G\nhz : z ∈ ↑H₃\n⊢ ⁅z, ⁅x, y⁆⁆ = x * z * ⁅y, ⁅z⁻¹, x⁻¹⁆⁆⁻¹ * z⁻¹ * y * ⁅x⁻¹, ⁅y⁻¹, z⁆⁆⁻¹ * y⁻¹ * x⁻¹\n[PROOFSTEP]\ngroup\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nh1 : ∀ (g₁ : G), g₁ ∈ H₂ → ∀ (g₂ : G), g₂ ∈ H₃ → ∀ (h : G), h ∈ ↑H₁ → ⁅h, ⁅g₁, g₂⁆⁆ = 1\nh2 : ∀ (g₁ : G), g₁ ∈ H₃ → ∀ (g₂ : G), g₂ ∈ H₁ → ∀ (h : G), h ∈ ↑H₂ → ⁅h, ⁅g₁, g₂⁆⁆ = 1\nx : G\nhx : x ∈ H₁\ny : G\nhy : y ∈ H₂\nz : G\nhz : z ∈ ↑H₃\n⊢ x * z * ⁅y, ⁅z⁻¹, x⁻¹⁆⁆⁻¹ * z⁻¹ * y * ⁅x⁻¹, ⁅y⁻¹, z⁆⁆⁻¹ * y⁻¹ * x⁻¹ = 1\n[PROOFSTEP]\nrw [h1 _ (H₂.inv_mem hy) _ hz _ (H₁.inv_mem hx), h2 _ (H₃.inv_mem hz) _ (H₁.inv_mem hx) _ hy]\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nh1 : ∀ (g₁ : G), g₁ ∈ H₂ → ∀ (g₂ : G), g₂ ∈ H₃ → ∀ (h : G), h ∈ ↑H₁ → ⁅h, ⁅g₁, g₂⁆⁆ = 1\nh2 : ∀ (g₁ : G), g₁ ∈ H₃ → ∀ (g₂ : G), g₂ ∈ H₁ → ∀ (h : G), h ∈ ↑H₂ → ⁅h, ⁅g₁, g₂⁆⁆ = 1\nx : G\nhx : x ∈ H₁\ny : G\nhy : y ∈ H₂\nz : G\nhz : z ∈ ↑H₃\n⊢ x * z * 1⁻¹ * z⁻¹ * y * 1⁻¹ * y⁻¹ * x⁻¹ = 1\n[PROOFSTEP]\ngroup\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nh₁ : Normal H₁\nh₂ : Normal H₂\n⊢ Normal ⁅H₁, H₂⁆\n[PROOFSTEP]\nlet base : Set G := {x | ∃ g₁ ∈ H₁, ∃ g₂ ∈ H₂, ⁅g₁, g₂⁆ = x}\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nh₁ : Normal H₁\nh₂ : Normal H₂\nbase : Set G := {x | ∃ g₁, g₁ ∈ H₁ ∧ ∃ g₂, g₂ ∈ H₂ ∧ ⁅g₁, g₂⁆ = x}\n⊢ Normal ⁅H₁, H₂⁆\n[PROOFSTEP]\nchange (closure base).Normal\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nh₁ : Normal H₁\nh₂ : Normal H₂\nbase : Set G := {x | ∃ g₁, g₁ ∈ H₁ ∧ ∃ g₂, g₂ ∈ H₂ ∧ ⁅g₁, g₂⁆ = x}\n⊢ Normal (closure base)\n[PROOFSTEP]\nsuffices h_base : base = Group.conjugatesOfSet base\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nh₁ : Normal H₁\nh₂ : Normal H₂\nbase : Set G := {x | ∃ g₁, g₁ ∈ H₁ ∧ ∃ g₂, g₂ ∈ H₂ ∧ ⁅g₁, g₂⁆ = x}\nh_base : base = Group.conjugatesOfSet base\n⊢ Normal (closure base)\n[PROOFSTEP]\nrw [h_base]\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nh₁ : Normal H₁\nh₂ : Normal H₂\nbase : Set G := {x | ∃ g₁, g₁ ∈ H₁ ∧ ∃ g₂, g₂ ∈ H₂ ∧ ⁅g₁, g₂⁆ = x}\nh_base : base = Group.conjugatesOfSet base\n⊢ Normal (closure (Group.conjugatesOfSet base))\n[PROOFSTEP]\nexact Subgroup.normalClosure_normal\n[GOAL]\ncase h_base\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nh₁ : Normal H₁\nh₂ : Normal H₂\nbase : Set G := {x | ∃ g₁, g₁ ∈ H₁ ∧ ∃ g₂, g₂ ∈ H₂ ∧ ⁅g₁, g₂⁆ = x}\n⊢ base = Group.conjugatesOfSet base\n[PROOFSTEP]\nrefine' Set.Subset.antisymm Group.subset_conjugatesOfSet fun a h => _\n[GOAL]\ncase h_base\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nh₁ : Normal H₁\nh₂ : Normal H₂\nbase : Set G := {x | ∃ g₁, g₁ ∈ H₁ ∧ ∃ g₂, g₂ ∈ H₂ ∧ ⁅g₁, g₂⁆ = x}\na : G\nh : a ∈ Group.conjugatesOfSet base\n⊢ a ∈ base\n[PROOFSTEP]\nsimp_rw [Group.mem_conjugatesOfSet_iff, isConj_iff] at h \n[GOAL]\ncase h_base\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nh₁ : Normal H₁\nh₂ : Normal H₂\nbase : Set G := {x | ∃ g₁, g₁ ∈ H₁ ∧ ∃ g₂, g₂ ∈ H₂ ∧ ⁅g₁, g₂⁆ = x}\na : G\nh : ∃ a_1, a_1 ∈ {x | ∃ g₁, g₁ ∈ H₁ ∧ ∃ g₂, g₂ ∈ H₂ ∧ ⁅g₁, g₂⁆ = x} ∧ ∃ c, c * a_1 * c⁻¹ = a\n⊢ a ∈ base\n[PROOFSTEP]\nrcases h with ⟨b, ⟨c, hc, e, he, rfl⟩, d, rfl⟩\n[GOAL]\ncase h_base.intro.intro.intro.intro.intro.intro.intro\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nh₁ : Normal H₁\nh₂ : Normal H₂\nbase : Set G := {x | ∃ g₁, g₁ ∈ H₁ ∧ ∃ g₂, g₂ ∈ H₂ ∧ ⁅g₁, g₂⁆ = x}\nc : G\nhc : c ∈ H₁\ne : G\nhe : e ∈ H₂\nd : G\n⊢ d * ⁅c, e⁆ * d⁻¹ ∈ base\n[PROOFSTEP]\nexact ⟨_, h₁.conj_mem c hc d, _, h₂.conj_mem e he d, (conjugate_commutatorElement c e d).symm⟩\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf✝ : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nf : G →* G'\n⊢ map f ⁅H₁, H₂⁆ = ⁅map f H₁, map f H₂⁆\n[PROOFSTEP]\nsimp_rw [le_antisymm_iff, map_le_iff_le_comap, commutator_le, mem_comap, map_commutatorElement]\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf✝ : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nf : G →* G'\n⊢ (∀ (g₁ : G), g₁ ∈ H₁ → ∀ (g₂ : G), g₂ ∈ H₂ → ⁅↑f g₁, ↑f g₂⁆ ∈ ⁅map f H₁, map f H₂⁆) ∧\n ∀ (g₁ : G'), g₁ ∈ map f H₁ → ∀ (g₂ : G'), g₂ ∈ map f H₂ → ⁅g₁, g₂⁆ ∈ map f ⁅H₁, H₂⁆\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf✝ : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nf : G →* G'\n⊢ ∀ (g₁ : G), g₁ ∈ H₁ → ∀ (g₂ : G), g₂ ∈ H₂ → ⁅↑f g₁, ↑f g₂⁆ ∈ ⁅map f H₁, map f H₂⁆\n[PROOFSTEP]\nintro p hp q hq\n[GOAL]\ncase left\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf✝ : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nf : G →* G'\np : G\nhp : p ∈ H₁\nq : G\nhq : q ∈ H₂\n⊢ ⁅↑f p, ↑f q⁆ ∈ ⁅map f H₁, map f H₂⁆\n[PROOFSTEP]\nexact commutator_mem_commutator (mem_map_of_mem _ hp) (mem_map_of_mem _ hq)\n[GOAL]\ncase right\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf✝ : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nf : G →* G'\n⊢ ∀ (g₁ : G'), g₁ ∈ map f H₁ → ∀ (g₂ : G'), g₂ ∈ map f H₂ → ⁅g₁, g₂⁆ ∈ map f ⁅H₁, H₂⁆\n[PROOFSTEP]\nrintro _ ⟨p, hp, rfl⟩ _ ⟨q, hq, rfl⟩\n[GOAL]\ncase right.intro.intro.intro.intro\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf✝ : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nf : G →* G'\np : G\nhp : p ∈ ↑H₁\nq : G\nhq : q ∈ ↑H₂\n⊢ ⁅↑f p, ↑f q⁆ ∈ map f ⁅H₁, H₂⁆\n[PROOFSTEP]\nrw [← map_commutatorElement]\n[GOAL]\ncase right.intro.intro.intro.intro\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf✝ : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nf : G →* G'\np : G\nhp : p ∈ ↑H₁\nq : G\nhq : q ∈ ↑H₂\n⊢ ↑f ⁅p, q⁆ ∈ map f ⁅H₁, H₂⁆\n[PROOFSTEP]\nexact mem_map_of_mem _ (commutator_mem_commutator hp hq)\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G\nK₁ K₂ : Subgroup G'\n⊢ ⁅prod H₁ K₁, prod H₂ K₂⁆ = prod ⁅H₁, H₂⁆ ⁅K₁, K₂⁆\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G\nK₁ K₂ : Subgroup G'\n⊢ ⁅prod H₁ K₁, prod H₂ K₂⁆ ≤ prod ⁅H₁, H₂⁆ ⁅K₁, K₂⁆\n[PROOFSTEP]\nrw [commutator_le]\n[GOAL]\ncase a\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G\nK₁ K₂ : Subgroup G'\n⊢ ∀ (g₁ : G × G'), g₁ ∈ prod H₁ K₁ → ∀ (g₂ : G × G'), g₂ ∈ prod H₂ K₂ → ⁅g₁, g₂⁆ ∈ prod ⁅H₁, H₂⁆ ⁅K₁, K₂⁆\n[PROOFSTEP]\nrintro ⟨p₁, p₂⟩ ⟨hp₁, hp₂⟩ ⟨q₁, q₂⟩ ⟨hq₁, hq₂⟩\n[GOAL]\ncase a.mk.intro.mk.intro\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G\nK₁ K₂ : Subgroup G'\np₁ : G\np₂ : G'\nhp₁ : (p₁, p₂).fst ∈ ↑H₁.toSubmonoid\nhp₂ : (p₁, p₂).snd ∈ ↑K₁.toSubmonoid\nq₁ : G\nq₂ : G'\nhq₁ : (q₁, q₂).fst ∈ ↑H₂.toSubmonoid\nhq₂ : (q₁, q₂).snd ∈ ↑K₂.toSubmonoid\n⊢ ⁅(p₁, p₂), (q₁, q₂)⁆ ∈ prod ⁅H₁, H₂⁆ ⁅K₁, K₂⁆\n[PROOFSTEP]\nexact ⟨commutator_mem_commutator hp₁ hq₁, commutator_mem_commutator hp₂ hq₂⟩\n[GOAL]\ncase a\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G\nK₁ K₂ : Subgroup G'\n⊢ prod ⁅H₁, H₂⁆ ⁅K₁, K₂⁆ ≤ ⁅prod H₁ K₁, prod H₂ K₂⁆\n[PROOFSTEP]\nrw [prod_le_iff]\n[GOAL]\ncase a\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G\nK₁ K₂ : Subgroup G'\n⊢ map (MonoidHom.inl G G') ⁅H₁, H₂⁆ ≤ ⁅prod H₁ K₁, prod H₂ K₂⁆ ∧\n map (MonoidHom.inr G G') ⁅K₁, K₂⁆ ≤ ⁅prod H₁ K₁, prod H₂ K₂⁆\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.left\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G\nK₁ K₂ : Subgroup G'\n⊢ map (MonoidHom.inl G G') ⁅H₁, H₂⁆ ≤ ⁅prod H₁ K₁, prod H₂ K₂⁆\n[PROOFSTEP]\nrw [map_commutator]\n[GOAL]\ncase a.left\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G\nK₁ K₂ : Subgroup G'\n⊢ ⁅map (MonoidHom.inl G G') H₁, map (MonoidHom.inl G G') H₂⁆ ≤ ⁅prod H₁ K₁, prod H₂ K₂⁆\n[PROOFSTEP]\napply commutator_mono\n[GOAL]\ncase a.left.h₁\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G\nK₁ K₂ : Subgroup G'\n⊢ map (MonoidHom.inl G G') H₁ ≤ prod H₁ K₁\n[PROOFSTEP]\nsimp [le_prod_iff, map_map, MonoidHom.fst_comp_inl, MonoidHom.snd_comp_inl, MonoidHom.fst_comp_inr,\n MonoidHom.snd_comp_inr]\n[GOAL]\ncase a.left.h₂\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G\nK₁ K₂ : Subgroup G'\n⊢ map (MonoidHom.inl G G') H₂ ≤ prod H₂ K₂\n[PROOFSTEP]\nsimp [le_prod_iff, map_map, MonoidHom.fst_comp_inl, MonoidHom.snd_comp_inl, MonoidHom.fst_comp_inr,\n MonoidHom.snd_comp_inr]\n[GOAL]\ncase a.right\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G\nK₁ K₂ : Subgroup G'\n⊢ map (MonoidHom.inr G G') ⁅K₁, K₂⁆ ≤ ⁅prod H₁ K₁, prod H₂ K₂⁆\n[PROOFSTEP]\nrw [map_commutator]\n[GOAL]\ncase a.right\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G\nK₁ K₂ : Subgroup G'\n⊢ ⁅map (MonoidHom.inr G G') K₁, map (MonoidHom.inr G G') K₂⁆ ≤ ⁅prod H₁ K₁, prod H₂ K₂⁆\n[PROOFSTEP]\napply commutator_mono\n[GOAL]\ncase a.right.h₁\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G\nK₁ K₂ : Subgroup G'\n⊢ map (MonoidHom.inr G G') K₁ ≤ prod H₁ K₁\n[PROOFSTEP]\nsimp [le_prod_iff, map_map, MonoidHom.fst_comp_inl, MonoidHom.snd_comp_inl, MonoidHom.fst_comp_inr,\n MonoidHom.snd_comp_inr]\n[GOAL]\ncase a.right.h₂\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝² : Group G\ninst✝¹ : Group G'\ninst✝ : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G\nK₁ K₂ : Subgroup G'\n⊢ map (MonoidHom.inr G G') K₂ ≤ prod H₂ K₂\n[PROOFSTEP]\nsimp [le_prod_iff, map_map, MonoidHom.fst_comp_inl, MonoidHom.snd_comp_inl, MonoidHom.fst_comp_inr,\n MonoidHom.snd_comp_inr]\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\n⊢ ⁅pi Set.univ H, pi Set.univ K⁆ = pi Set.univ fun i => ⁅H i, K i⁆\n[PROOFSTEP]\nclassical\napply le_antisymm (commutator_pi_pi_le H K)\n· rw [pi_le_iff]\n intro i hi\n rw [map_commutator]\n apply commutator_mono <;>\n · rw [le_pi_iff]\n intro j _hj\n rintro _ ⟨_, ⟨x, hx, rfl⟩, rfl⟩\n by_cases h : j = i\n · subst h\n simpa using hx\n · simp [h, one_mem]\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\n⊢ ⁅pi Set.univ H, pi Set.univ K⁆ = pi Set.univ fun i => ⁅H i, K i⁆\n[PROOFSTEP]\napply le_antisymm (commutator_pi_pi_le H K)\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\n⊢ (pi Set.univ fun i => ⁅H i, K i⁆) ≤ ⁅pi Set.univ H, pi Set.univ K⁆\n[PROOFSTEP]\nrw [pi_le_iff]\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\n⊢ ∀ (i : η), map (MonoidHom.single (fun i => Gs i) i) ⁅H i, K i⁆ ≤ ⁅pi Set.univ H, pi Set.univ K⁆\n[PROOFSTEP]\nintro i hi\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\ni : η\nhi : (i : η) → Gs i\n⊢ hi ∈ map (MonoidHom.single (fun i => Gs i) i) ⁅H i, K i⁆ → hi ∈ ⁅pi Set.univ H, pi Set.univ K⁆\n[PROOFSTEP]\nrw [map_commutator]\n[GOAL]\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\ni : η\nhi : (i : η) → Gs i\n⊢ hi ∈ ⁅map (MonoidHom.single (fun i => Gs i) i) (H i), map (MonoidHom.single (fun i => Gs i) i) (K i)⁆ →\n hi ∈ ⁅pi Set.univ H, pi Set.univ K⁆\n[PROOFSTEP]\napply commutator_mono\n[GOAL]\ncase h₁\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\ni : η\nhi : (i : η) → Gs i\n⊢ map (MonoidHom.single (fun i => Gs i) i) (H i) ≤ pi Set.univ H\n[PROOFSTEP]\nrw [le_pi_iff]\n[GOAL]\ncase h₁\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\ni : η\nhi : (i : η) → Gs i\n⊢ ∀ (i_1 : η),\n i_1 ∈ Set.univ → map (Pi.evalMonoidHom (fun i => Gs i) i_1) (map (MonoidHom.single (fun i => Gs i) i) (H i)) ≤ H i_1\n[PROOFSTEP]\nintro j _hj\n[GOAL]\ncase h₁\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\ni : η\nhi : (i : η) → Gs i\nj : η\n_hj : j ∈ Set.univ\n⊢ map (Pi.evalMonoidHom (fun i => Gs i) j) (map (MonoidHom.single (fun i => Gs i) i) (H i)) ≤ H j\n[PROOFSTEP]\nrintro _ ⟨_, ⟨x, hx, rfl⟩, rfl⟩\n[GOAL]\ncase h₁.intro.intro.intro.intro\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\ni : η\nhi : (i : η) → Gs i\nj : η\n_hj : j ∈ Set.univ\nx : Gs i\nhx : x ∈ ↑(H i)\n⊢ ↑(Pi.evalMonoidHom (fun i => Gs i) j) (↑(MonoidHom.single (fun i => Gs i) i) x) ∈ H j\n[PROOFSTEP]\nby_cases h : j = i\n[GOAL]\ncase pos\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\ni : η\nhi : (i : η) → Gs i\nj : η\n_hj : j ∈ Set.univ\nx : Gs i\nhx : x ∈ ↑(H i)\nh : j = i\n⊢ ↑(Pi.evalMonoidHom (fun i => Gs i) j) (↑(MonoidHom.single (fun i => Gs i) i) x) ∈ H j\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\nhi : (i : η) → Gs i\nj : η\n_hj : j ∈ Set.univ\nx : Gs j\nhx : x ∈ ↑(H j)\n⊢ ↑(Pi.evalMonoidHom (fun i => Gs i) j) (↑(MonoidHom.single (fun i => Gs i) j) x) ∈ H j\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\ncase neg\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\ni : η\nhi : (i : η) → Gs i\nj : η\n_hj : j ∈ Set.univ\nx : Gs i\nhx : x ∈ ↑(H i)\nh : ¬j = i\n⊢ ↑(Pi.evalMonoidHom (fun i => Gs i) j) (↑(MonoidHom.single (fun i => Gs i) i) x) ∈ H j\n[PROOFSTEP]\nsimp [h, one_mem]\n[GOAL]\ncase h₂\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\ni : η\nhi : (i : η) → Gs i\n⊢ map (MonoidHom.single (fun i => Gs i) i) (K i) ≤ pi Set.univ K\n[PROOFSTEP]\nrw [le_pi_iff]\n[GOAL]\ncase h₂\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\ni : η\nhi : (i : η) → Gs i\n⊢ ∀ (i_1 : η),\n i_1 ∈ Set.univ → map (Pi.evalMonoidHom (fun i => Gs i) i_1) (map (MonoidHom.single (fun i => Gs i) i) (K i)) ≤ K i_1\n[PROOFSTEP]\nintro j _hj\n[GOAL]\ncase h₂\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\ni : η\nhi : (i : η) → Gs i\nj : η\n_hj : j ∈ Set.univ\n⊢ map (Pi.evalMonoidHom (fun i => Gs i) j) (map (MonoidHom.single (fun i => Gs i) i) (K i)) ≤ K j\n[PROOFSTEP]\nrintro _ ⟨_, ⟨x, hx, rfl⟩, rfl⟩\n[GOAL]\ncase h₂.intro.intro.intro.intro\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\ni : η\nhi : (i : η) → Gs i\nj : η\n_hj : j ∈ Set.univ\nx : Gs i\nhx : x ∈ ↑(K i)\n⊢ ↑(Pi.evalMonoidHom (fun i => Gs i) j) (↑(MonoidHom.single (fun i => Gs i) i) x) ∈ K j\n[PROOFSTEP]\nby_cases h : j = i\n[GOAL]\ncase pos\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\ni : η\nhi : (i : η) → Gs i\nj : η\n_hj : j ∈ Set.univ\nx : Gs i\nhx : x ∈ ↑(K i)\nh : j = i\n⊢ ↑(Pi.evalMonoidHom (fun i => Gs i) j) (↑(MonoidHom.single (fun i => Gs i) i) x) ∈ K j\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\nhi : (i : η) → Gs i\nj : η\n_hj : j ∈ Set.univ\nx : Gs j\nhx : x ∈ ↑(K j)\n⊢ ↑(Pi.evalMonoidHom (fun i => Gs i) j) (↑(MonoidHom.single (fun i => Gs i) j) x) ∈ K j\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\ncase neg\nG : Type u_1\nG' : Type u_2\nF : Type u_3\ninst✝⁴ : Group G\ninst✝³ : Group G'\ninst✝² : MonoidHomClass F G G'\nf : F\ng₁ g₂ g₃ g : G\nH₁ H₂ H₃ K₁ K₂ : Subgroup G\nη : Type u_4\ninst✝¹ : Finite η\nGs : η → Type u_5\ninst✝ : (i : η) → Group (Gs i)\nH K : (i : η) → Subgroup (Gs i)\ni : η\nhi : (i : η) → Gs i\nj : η\n_hj : j ∈ Set.univ\nx : Gs i\nhx : x ∈ ↑(K i)\nh : ¬j = i\n⊢ ↑(Pi.evalMonoidHom (fun i => Gs i) j) (↑(MonoidHom.single (fun i => Gs i) i) x) ∈ K j\n[PROOFSTEP]\nsimp [h, one_mem]\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.Commutator", "llama_tokens": 14379, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.851952809486198, "lm_q2_score": 0.6893056167854461, "lm_q1q2_score": 0.5872558568149774}} {"text": "[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : Fintype α\ninst✝ : LinearOrderedField 𝕜\nG H : SimpleGraph α\nε δ : 𝕜\nn : ℕ\ns : Finset α\nhε : FarFromTriangleFree G ε\nh : δ ≤ ε\n⊢ δ * ↑(Fintype.card α ^ 2) ≤ ε * ↑(Fintype.card α ^ 2)\n[PROOFSTEP]\ngcongr\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝² : Fintype α\ninst✝¹ : LinearOrderedField 𝕜\nG H : SimpleGraph α\nε δ : 𝕜\nn : ℕ\ns : Finset α\ninst✝ : Nonempty α\nh₀ : FarFromTriangleFree G ε\nh₁ : CliqueFree G 3\n⊢ ε ≤ 0\n[PROOFSTEP]\nhave := h₀ (empty_subset _)\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝² : Fintype α\ninst✝¹ : LinearOrderedField 𝕜\nG H : SimpleGraph α\nε δ : 𝕜\nn : ℕ\ns : Finset α\ninst✝ : Nonempty α\nh₀ : FarFromTriangleFree G ε\nh₁ : CliqueFree G 3\nthis : (fun H => CliqueFree H 3) (deleteEdges G ↑∅) → ε * ↑(Fintype.card α ^ 2) ≤ ↑(Finset.card ∅)\n⊢ ε ≤ 0\n[PROOFSTEP]\nrw [coe_empty, Finset.card_empty, cast_zero, deleteEdges_empty_eq] at this \n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝² : Fintype α\ninst✝¹ : LinearOrderedField 𝕜\nG H : SimpleGraph α\nε δ : 𝕜\nn : ℕ\ns : Finset α\ninst✝ : Nonempty α\nh₀ : FarFromTriangleFree G ε\nh₁ : CliqueFree G 3\nthis : (fun H => CliqueFree H 3) G → ε * ↑(Fintype.card α ^ 2) ≤ 0\n⊢ ε ≤ 0\n[PROOFSTEP]\nexact nonpos_of_mul_nonpos_left (this h₁) (cast_pos.2 <| sq_pos_of_pos Fintype.card_pos)\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.SimpleGraph.Triangle.Basic", "llama_tokens": 647, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8244619220634456, "lm_q2_score": 0.7122321781307374, "lm_q1q2_score": 0.5872083105371021}} {"text": "[GOAL]\nα : Type u\ninst✝ : MulZeroClass α\nx✝ : ULift α\n⊢ ↑Equiv.ulift (0 * x✝) = ↑Equiv.ulift 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\ninst✝ : MulZeroClass α\nx✝ : ULift α\n⊢ ↑Equiv.ulift (x✝ * 0) = ↑Equiv.ulift 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\ninst✝ : Distrib α\nx✝² x✝¹ x✝ : ULift α\n⊢ ↑Equiv.ulift (x✝² * (x✝¹ + x✝)) = ↑Equiv.ulift (x✝² * x✝¹ + x✝² * x✝)\n[PROOFSTEP]\nsimp [left_distrib]\n[GOAL]\nα : Type u\ninst✝ : Distrib α\nx✝² x✝¹ x✝ : ULift α\n⊢ ↑Equiv.ulift ((x✝² + x✝¹) * x✝) = ↑Equiv.ulift (x✝² * x✝ + x✝¹ * x✝)\n[PROOFSTEP]\nsimp [right_distrib]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Ring.ULift", "llama_tokens": 360, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8397339837155239, "lm_q2_score": 0.6992544210587586, "lm_q1q2_score": 0.5871877006263636}} {"text": "[GOAL]\nlo hi a : ℕ\nh : Nat.succ lo ≤ a ∧ a ≤ hi\n⊢ Nat.succ (Nat.pred a) ≤ hi\n[PROOFSTEP]\nrw [Nat.succ_pred_eq_of_pos]\n[GOAL]\nlo hi a : ℕ\nh : Nat.succ lo ≤ a ∧ a ≤ hi\n⊢ a ≤ hi\nlo hi a : ℕ h : Nat.succ lo ≤ a ∧ a ≤ hi ⊢ 0 < a\n[PROOFSTEP]\nexact h.right\n[GOAL]\nlo hi a : ℕ\nh : Nat.succ lo ≤ a ∧ a ≤ hi\n⊢ 0 < a\n[PROOFSTEP]\nexact lt_of_le_of_lt (Nat.zero_le lo) h.left\n", "meta": {"mathlib_filename": "Mathlib.Testing.SlimCheck.Gen", "llama_tokens": 213, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.880797071719777, "lm_q2_score": 0.6654105653819836, "lm_q1q2_score": 0.5860916774798524}} {"text": "[GOAL]\nM : Type u_1\ninst✝² : Monoid M\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : MulSemiringAction M R\nm : M\n⊢ HSMul.hSMul m = map (MulSemiringAction.toRingHom M R m)\n[PROOFSTEP]\nsuffices DistribMulAction.toAddMonoidHom R[X] m = (mapRingHom (MulSemiringAction.toRingHom M R m)).toAddMonoidHom\n by\n ext1 r\n exact FunLike.congr_fun this r\n[GOAL]\nM : Type u_1\ninst✝² : Monoid M\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : MulSemiringAction M R\nm : M\nthis : DistribMulAction.toAddMonoidHom R[X] m = RingHom.toAddMonoidHom (mapRingHom (MulSemiringAction.toRingHom M R m))\n⊢ HSMul.hSMul m = map (MulSemiringAction.toRingHom M R m)\n[PROOFSTEP]\next1 r\n[GOAL]\ncase h\nM : Type u_1\ninst✝² : Monoid M\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : MulSemiringAction M R\nm : M\nthis : DistribMulAction.toAddMonoidHom R[X] m = RingHom.toAddMonoidHom (mapRingHom (MulSemiringAction.toRingHom M R m))\nr : R[X]\n⊢ m • r = map (MulSemiringAction.toRingHom M R m) r\n[PROOFSTEP]\nexact FunLike.congr_fun this r\n[GOAL]\nM : Type u_1\ninst✝² : Monoid M\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : MulSemiringAction M R\nm : M\n⊢ DistribMulAction.toAddMonoidHom R[X] m = RingHom.toAddMonoidHom (mapRingHom (MulSemiringAction.toRingHom M R m))\n[PROOFSTEP]\next n r : 2\n[GOAL]\ncase h.h\nM : Type u_1\ninst✝² : Monoid M\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : MulSemiringAction M R\nm : M\nn : ℕ\nr : R\n⊢ ↑(AddMonoidHom.comp (DistribMulAction.toAddMonoidHom R[X] m) (LinearMap.toAddMonoidHom (monomial n))) r =\n ↑(AddMonoidHom.comp (RingHom.toAddMonoidHom (mapRingHom (MulSemiringAction.toRingHom M R m)))\n (LinearMap.toAddMonoidHom (monomial n)))\n r\n[PROOFSTEP]\nchange m • monomial n r = map (MulSemiringAction.toRingHom M R m) (monomial n r)\n[GOAL]\ncase h.h\nM : Type u_1\ninst✝² : Monoid M\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : MulSemiringAction M R\nm : M\nn : ℕ\nr : R\n⊢ m • ↑(monomial n) r = map (MulSemiringAction.toRingHom M R m) (↑(monomial n) r)\n[PROOFSTEP]\nrw [Polynomial.map_monomial, Polynomial.smul_monomial, MulSemiringAction.toRingHom_apply]\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nR : Type u_2\ninst✝³ : Semiring R\ninst✝² : MulSemiringAction M R\nS : Type u_3\ninst✝¹ : CommSemiring S\ninst✝ : MulSemiringAction M S\nm : M\nf : S[X]\nx r : S\n⊢ eval (m • x) (m • ↑C r) = m • eval x (↑C r)\n[PROOFSTEP]\nrw [smul_C, eval_C, eval_C]\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nR : Type u_2\ninst✝³ : Semiring R\ninst✝² : MulSemiringAction M R\nS : Type u_3\ninst✝¹ : CommSemiring S\ninst✝ : MulSemiringAction M S\nm : M\nf✝ : S[X]\nx : S\nf g : S[X]\nihf : eval (m • x) (m • f) = m • eval x f\nihg : eval (m • x) (m • g) = m • eval x g\n⊢ eval (m • x) (m • (f + g)) = m • eval x (f + g)\n[PROOFSTEP]\nrw [smul_add, eval_add, ihf, ihg, eval_add, smul_add]\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nR : Type u_2\ninst✝³ : Semiring R\ninst✝² : MulSemiringAction M R\nS : Type u_3\ninst✝¹ : CommSemiring S\ninst✝ : MulSemiringAction M S\nm : M\nf : S[X]\nx : S\nn : ℕ\nr : S\nx✝ : eval (m • x) (m • (↑C r * X ^ n)) = m • eval x (↑C r * X ^ n)\n⊢ eval (m • x) (m • (↑C r * X ^ (n + 1))) = m • eval x (↑C r * X ^ (n + 1))\n[PROOFSTEP]\nrw [smul_mul', smul_pow', smul_C, smul_X, eval_mul, eval_C, eval_pow, eval_X, eval_mul, eval_C, eval_pow, eval_X,\n smul_mul', smul_pow']\n[GOAL]\nM : Type u_1\ninst✝⁶ : Monoid M\nR : Type u_2\ninst✝⁵ : Semiring R\ninst✝⁴ : MulSemiringAction M R\nS : Type u_3\ninst✝³ : CommSemiring S\ninst✝² : MulSemiringAction M S\nG : Type u_4\ninst✝¹ : Group G\ninst✝ : MulSemiringAction G S\ng : G\nf : S[X]\nx : S\n⊢ eval (g • x) f = g • eval x (g⁻¹ • f)\n[PROOFSTEP]\nrw [← smul_eval_smul, smul_inv_smul]\n[GOAL]\nM : Type u_1\ninst✝⁶ : Monoid M\nR : Type u_2\ninst✝⁵ : Semiring R\ninst✝⁴ : MulSemiringAction M R\nS : Type u_3\ninst✝³ : CommSemiring S\ninst✝² : MulSemiringAction M S\nG : Type u_4\ninst✝¹ : Group G\ninst✝ : MulSemiringAction G S\ng : G\nf : S[X]\nx : S\n⊢ eval x (g • f) = g • eval (g⁻¹ • x) f\n[PROOFSTEP]\nrw [← smul_eval_smul, smul_inv_smul]\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nG : Type u_2\ninst✝³ : Group G\ninst✝² : Fintype G\nR : Type u_3\ninst✝¹ : CommRing R\ninst✝ : MulSemiringAction G R\nx : R\n⊢ ↑↑↑(aeval x) (X - ↑C (ofQuotientStabilizer G x ↑1)) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nG : Type u_2\ninst✝³ : Group G\ninst✝² : Fintype G\nR : Type u_3\ninst✝¹ : CommRing R\ninst✝ : MulSemiringAction G R\nx : R\ng : G\ng' : G ⧸ stabilizer G x\n⊢ g • (X - ↑C (ofQuotientStabilizer G x g')) = X - ↑C (ofQuotientStabilizer G x ((fun x_1 x_2 => x_1 • x_2) g g'))\n[PROOFSTEP]\nrw [ofQuotientStabilizer_smul, smul_sub, Polynomial.smul_X, Polynomial.smul_C]\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nG : Type u_2\ninst✝³ : Group G\ninst✝² : Fintype G\nR : Type u_3\ninst✝¹ : CommRing R\ninst✝ : MulSemiringAction G R\nx : R\ng : G\nn : ℕ\n⊢ g • Polynomial.coeff (prodXSubSmul G R x) n = Polynomial.coeff (prodXSubSmul G R x) n\n[PROOFSTEP]\nrw [← Polynomial.coeff_smul, prodXSubSmul.smul]\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nP : Type u_2\ninst✝³ : CommSemiring P\ninst✝² : MulSemiringAction M P\nQ : Type u_3\ninst✝¹ : CommSemiring Q\ninst✝ : MulSemiringAction M Q\ng : P →+*[M] Q\nm : M\np : P[X]\nb : P\n⊢ map (↑g) (m • ↑C b) = m • map (↑g) (↑C b)\n[PROOFSTEP]\nrw [smul_C, map_C, coe_fn_coe, g.map_smul, map_C, coe_fn_coe, smul_C]\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nP : Type u_2\ninst✝³ : CommSemiring P\ninst✝² : MulSemiringAction M P\nQ : Type u_3\ninst✝¹ : CommSemiring Q\ninst✝ : MulSemiringAction M Q\ng : P →+*[M] Q\nm : M\np✝ p q : P[X]\nihp : map (↑g) (m • p) = m • map (↑g) p\nihq : map (↑g) (m • q) = m • map (↑g) q\n⊢ map (↑g) (m • (p + q)) = m • map (↑g) (p + q)\n[PROOFSTEP]\nrw [smul_add, Polynomial.map_add, ihp, ihq, Polynomial.map_add, smul_add]\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nP : Type u_2\ninst✝³ : CommSemiring P\ninst✝² : MulSemiringAction M P\nQ : Type u_3\ninst✝¹ : CommSemiring Q\ninst✝ : MulSemiringAction M Q\ng : P →+*[M] Q\nm : M\np : P[X]\nn : ℕ\nb : P\nx✝ : map (↑g) (m • (↑C b * X ^ n)) = m • map (↑g) (↑C b * X ^ n)\n⊢ map (↑g) (m • (↑C b * X ^ (n + 1))) = m • map (↑g) (↑C b * X ^ (n + 1))\n[PROOFSTEP]\nrw [smul_mul', smul_C, smul_pow', smul_X, Polynomial.map_mul, map_C, Polynomial.map_pow, map_X, coe_fn_coe, g.map_smul,\n Polynomial.map_mul, map_C, Polynomial.map_pow, map_X, smul_mul', smul_C, smul_pow', smul_X, coe_fn_coe]\n -- porting note: added `.toRingHom`\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Polynomial.GroupRingAction", "llama_tokens": 3130, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8499711680567799, "lm_q2_score": 0.6893056231680121, "lm_q1q2_score": 0.5858899056722218}} {"text": "[GOAL]\np : ℕ → Prop\nx : ℕ\nh : p x\n⊢ WellFounded (Upto.GT p)\n[PROOFSTEP]\nsuffices Upto.GT p = InvImage (· < ·) fun y : Nat.Upto p => x - y.val\n by\n rw [this]\n exact (measure _).wf\n[GOAL]\np : ℕ → Prop\nx : ℕ\nh : p x\nthis : Upto.GT p = InvImage (fun x x_1 => x < x_1) fun y => x - ↑y\n⊢ WellFounded (Upto.GT p)\n[PROOFSTEP]\nrw [this]\n[GOAL]\np : ℕ → Prop\nx : ℕ\nh : p x\nthis : Upto.GT p = InvImage (fun x x_1 => x < x_1) fun y => x - ↑y\n⊢ WellFounded (InvImage (fun x x_1 => x < x_1) fun y => x - ↑y)\n[PROOFSTEP]\nexact (measure _).wf\n[GOAL]\np : ℕ → Prop\nx : ℕ\nh : p x\n⊢ Upto.GT p = InvImage (fun x x_1 => x < x_1) fun y => x - ↑y\n[PROOFSTEP]\next ⟨a, ha⟩ ⟨b, _⟩\n[GOAL]\ncase h.mk.h.mk.a\np : ℕ → Prop\nx : ℕ\nh : p x\na : ℕ\nha : ∀ (j : ℕ), j < a → ¬p j\nb : ℕ\nproperty✝ : ∀ (j : ℕ), j < b → ¬p j\n⊢ Upto.GT p { val := a, property := ha } { val := b, property := property✝ } ↔\n InvImage (fun x x_1 => x < x_1) (fun y => x - ↑y) { val := a, property := ha } { val := b, property := property✝ }\n[PROOFSTEP]\ndsimp [InvImage, Upto.GT]\n[GOAL]\ncase h.mk.h.mk.a\np : ℕ → Prop\nx : ℕ\nh : p x\na : ℕ\nha : ∀ (j : ℕ), j < a → ¬p j\nb : ℕ\nproperty✝ : ∀ (j : ℕ), j < b → ¬p j\n⊢ a > b ↔ x - a < x - b\n[PROOFSTEP]\nrw [tsub_lt_tsub_iff_left_of_le (le_of_not_lt fun h' => ha _ h' h)]\n[GOAL]\np : ℕ → Prop\nx : Upto p\nh : ¬p ↑x\nj : ℕ\nh' : j < Nat.succ ↑x\n⊢ ¬p j\n[PROOFSTEP]\nrcases Nat.lt_succ_iff_lt_or_eq.1 h' with (h' | rfl) <;> [exact x.2 _ h'; exact h]\n[GOAL]\np : ℕ → Prop\nx : Upto p\nh : ¬p ↑x\nj : ℕ\nh' : j < Nat.succ ↑x\n⊢ ¬p j\n[PROOFSTEP]\nrcases Nat.lt_succ_iff_lt_or_eq.1 h' with (h' | rfl)\n[GOAL]\ncase inl\np : ℕ → Prop\nx : Upto p\nh : ¬p ↑x\nj : ℕ\nh'✝ : j < Nat.succ ↑x\nh' : j < ↑x\n⊢ ¬p j\n[PROOFSTEP]\nexact x.2 _ h'\n[GOAL]\ncase inr\np : ℕ → Prop\nx : Upto p\nh : ¬p ↑x\nh' : ↑x < Nat.succ ↑x\n⊢ ¬p ↑x\n[PROOFSTEP]\nexact h\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Upto", "llama_tokens": 1002, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.837619947119304, "lm_q2_score": 0.6992544085240401, "lm_q1q2_score": 0.5857094406908466}} {"text": "[GOAL]\nι : Type u_1\nA : ι → Type u_2\ninst✝¹ : AddMonoid ι\ninst✝ : GMonoid A\ni : ι\na : A i\nn : ℕ\n⊢ mk i a ^ n = mk (n • i) (GMonoid.gnpow n a)\n[PROOFSTEP]\nmatch n with\n| 0 =>\n rw [pow_zero]\n exact (GMonoid.gnpow_zero' ⟨_, a⟩).symm\n| n + 1 =>\n rw [pow_succ, mk_pow a n, mk_mul_mk]\n exact (GMonoid.gnpow_succ' n ⟨_, a⟩).symm\n[GOAL]\nι : Type u_1\nA : ι → Type u_2\ninst✝¹ : AddMonoid ι\ninst✝ : GMonoid A\ni : ι\na : A i\nn : ℕ\n⊢ mk i a ^ 0 = mk (0 • i) (GMonoid.gnpow 0 a)\n[PROOFSTEP]\nrw [pow_zero]\n[GOAL]\nι : Type u_1\nA : ι → Type u_2\ninst✝¹ : AddMonoid ι\ninst✝ : GMonoid A\ni : ι\na : A i\nn : ℕ\n⊢ 1 = mk (0 • i) (GMonoid.gnpow 0 a)\n[PROOFSTEP]\nexact (GMonoid.gnpow_zero' ⟨_, a⟩).symm\n[GOAL]\nι : Type u_1\nA : ι → Type u_2\ninst✝¹ : AddMonoid ι\ninst✝ : GMonoid A\ni : ι\na : A i\nn✝ n : ℕ\n⊢ mk i a ^ (n + 1) = mk ((n + 1) • i) (GMonoid.gnpow (n + 1) a)\n[PROOFSTEP]\nrw [pow_succ, mk_pow a n, mk_mul_mk]\n[GOAL]\nι : Type u_1\nA : ι → Type u_2\ninst✝¹ : AddMonoid ι\ninst✝ : GMonoid A\ni : ι\na : A i\nn✝ n : ℕ\n⊢ mk (i + n • i) (GMul.mul a (GMonoid.gnpow n a)) = mk ((n + 1) • i) (GMonoid.gnpow (n + 1) a)\n[PROOFSTEP]\nexact (GMonoid.gnpow_succ' n ⟨_, a⟩).symm\n[GOAL]\nι : Type u_1\nα : Type u_2\nA : ι → Type u_3\ninst✝¹ : AddMonoid ι\ninst✝ : GradedMonoid.GMonoid A\nl : List α\nfι : α → ι\n⊢ dProdIndex l fι = sum (map fι l)\n[PROOFSTEP]\nmatch l with\n| [] => simp\n| head :: tail => simp [List.dProdIndex_eq_map_sum tail fι]\n[GOAL]\nι : Type u_1\nα : Type u_2\nA : ι → Type u_3\ninst✝¹ : AddMonoid ι\ninst✝ : GradedMonoid.GMonoid A\nl : List α\nfι : α → ι\n⊢ dProdIndex [] fι = sum (map fι [])\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nA : ι → Type u_3\ninst✝¹ : AddMonoid ι\ninst✝ : GradedMonoid.GMonoid A\nl : List α\nfι : α → ι\nhead : α\ntail : List α\n⊢ dProdIndex (head :: tail) fι = sum (map fι (head :: tail))\n[PROOFSTEP]\nsimp [List.dProdIndex_eq_map_sum tail fι]\n[GOAL]\nι : Type u_1\nα : Type u_2\nA : ι → Type u_3\ninst✝¹ : AddMonoid ι\ninst✝ : GMonoid A\nl : List α\nfι : α → ι\nfA : (a : α) → A (fι a)\n⊢ mk (List.dProdIndex l fι) (List.dProd l fι fA) = List.prod (List.map (fun a => mk (fι a) (fA a)) l)\n[PROOFSTEP]\nmatch l with\n| [] => simp; rfl\n| head :: tail => simp [← GradedMonoid.mk_list_dProd tail _ _, GradedMonoid.mk_mul_mk, List.prod_cons]\n[GOAL]\nι : Type u_1\nα : Type u_2\nA : ι → Type u_3\ninst✝¹ : AddMonoid ι\ninst✝ : GMonoid A\nl : List α\nfι : α → ι\nfA : (a : α) → A (fι a)\n⊢ mk (List.dProdIndex [] fι) (List.dProd [] fι fA) = List.prod (List.map (fun a => mk (fι a) (fA a)) [])\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nA : ι → Type u_3\ninst✝¹ : AddMonoid ι\ninst✝ : GMonoid A\nl : List α\nfι : α → ι\nfA : (a : α) → A (fι a)\n⊢ mk 0 GOne.one = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u_2\nA : ι → Type u_3\ninst✝¹ : AddMonoid ι\ninst✝ : GMonoid A\nl : List α\nfι : α → ι\nfA : (a : α) → A (fι a)\nhead : α\ntail : List α\n⊢ mk (List.dProdIndex (head :: tail) fι) (List.dProd (head :: tail) fι fA) =\n List.prod (List.map (fun a => mk (fι a) (fA a)) (head :: tail))\n[PROOFSTEP]\nsimp [← GradedMonoid.mk_list_dProd tail _ _, GradedMonoid.mk_mul_mk, List.prod_cons]\n[GOAL]\nι : Type u_1\nα : Type u_2\nA : ι → Type u_3\ninst✝¹ : AddMonoid ι\ninst✝ : GMonoid A\nl : List α\nf : α → GradedMonoid A\n⊢ List.prod (List.map f l) =\n mk (List.dProdIndex l fun i => (f i).fst) (List.dProd l (fun i => (f i).fst) fun i => (f i).snd)\n[PROOFSTEP]\nrw [GradedMonoid.mk_list_dProd, GradedMonoid.mk]\n[GOAL]\nι : Type u_1\nα : Type u_2\nA : ι → Type u_3\ninst✝¹ : AddMonoid ι\ninst✝ : GMonoid A\nl : List α\nf : α → GradedMonoid A\n⊢ List.prod (List.map f l) = List.prod (List.map (fun a => { fst := (f a).fst, snd := (f a).snd }) l)\n[PROOFSTEP]\nsimp_rw [Sigma.eta]\n[GOAL]\nι : Type u_1\nα : Type u_2\nA : ι → Type u_3\ninst✝¹ : AddMonoid ι\ninst✝ : GMonoid A\nn : ℕ\nf : Fin n → GradedMonoid A\n⊢ List.prod (List.ofFn f) =\n mk (List.dProdIndex (List.finRange n) fun i => (f i).fst)\n (List.dProd (List.finRange n) (fun i => (f i).fst) fun i => (f i).snd)\n[PROOFSTEP]\nrw [List.ofFn_eq_map, GradedMonoid.list_prod_map_eq_dProd]\n[GOAL]\nι : Type u_1\nR : Type u_2\nα : Type u_3\ninst✝¹ : AddMonoid ι\ninst✝ : Monoid R\nl : List α\nfι : α → ι\nfA : α → R\n⊢ dProd l fι fA = prod (map fA l)\n[PROOFSTEP]\nmatch l with\n| [] =>\n rw [List.dProd_nil, List.map_nil, List.prod_nil]\n rfl\n| head :: tail =>\n rw [List.dProd_cons, List.map_cons, List.prod_cons, List.dProd_monoid tail _ _]\n rfl\n[GOAL]\nι : Type u_1\nR : Type u_2\nα : Type u_3\ninst✝¹ : AddMonoid ι\ninst✝ : Monoid R\nl : List α\nfι : α → ι\nfA : α → R\n⊢ dProd [] fι fA = prod (map fA [])\n[PROOFSTEP]\nrw [List.dProd_nil, List.map_nil, List.prod_nil]\n[GOAL]\nι : Type u_1\nR : Type u_2\nα : Type u_3\ninst✝¹ : AddMonoid ι\ninst✝ : Monoid R\nl : List α\nfι : α → ι\nfA : α → R\n⊢ GradedMonoid.GOne.one = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nR : Type u_2\nα : Type u_3\ninst✝¹ : AddMonoid ι\ninst✝ : Monoid R\nl : List α\nfι : α → ι\nfA : α → R\nhead : α\ntail : List α\n⊢ dProd (head :: tail) fι fA = prod (map fA (head :: tail))\n[PROOFSTEP]\nrw [List.dProd_cons, List.map_cons, List.prod_cons, List.dProd_monoid tail _ _]\n[GOAL]\nι : Type u_1\nR : Type u_2\nα : Type u_3\ninst✝¹ : AddMonoid ι\ninst✝ : Monoid R\nl : List α\nfι : α → ι\nfA : α → R\nhead : α\ntail : List α\n⊢ GradedMonoid.GMul.mul (fA head) (prod (map fA tail)) = fA head * prod (map fA tail)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝³ : SetLike S R\ninst✝² : Monoid R\ninst✝¹ : AddMonoid ι\nA : ι → S\ninst✝ : GradedMonoid A\nn : ℕ\nr : R\ni : ι\nh : r ∈ A i\n⊢ r ^ n ∈ A (n • i)\n[PROOFSTEP]\nmatch n with\n| 0 =>\n rw [pow_zero, zero_nsmul]\n exact one_mem_graded _\n| n + 1 =>\n rw [pow_succ', succ_nsmul']\n exact mul_mem_graded (pow_mem_graded n h) h\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝³ : SetLike S R\ninst✝² : Monoid R\ninst✝¹ : AddMonoid ι\nA : ι → S\ninst✝ : GradedMonoid A\nn : ℕ\nr : R\ni : ι\nh : r ∈ A i\n⊢ r ^ 0 ∈ A (0 • i)\n[PROOFSTEP]\nrw [pow_zero, zero_nsmul]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝³ : SetLike S R\ninst✝² : Monoid R\ninst✝¹ : AddMonoid ι\nA : ι → S\ninst✝ : GradedMonoid A\nn : ℕ\nr : R\ni : ι\nh : r ∈ A i\n⊢ 1 ∈ A 0\n[PROOFSTEP]\nexact one_mem_graded _\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝³ : SetLike S R\ninst✝² : Monoid R\ninst✝¹ : AddMonoid ι\nA : ι → S\ninst✝ : GradedMonoid A\nn✝ : ℕ\nr : R\ni : ι\nh : r ∈ A i\nn : ℕ\n⊢ r ^ (n + 1) ∈ A ((n + 1) • i)\n[PROOFSTEP]\nrw [pow_succ', succ_nsmul']\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝³ : SetLike S R\ninst✝² : Monoid R\ninst✝¹ : AddMonoid ι\nA : ι → S\ninst✝ : GradedMonoid A\nn✝ : ℕ\nr : R\ni : ι\nh : r ∈ A i\nn : ℕ\n⊢ r ^ n * r ∈ A (n • i + i)\n[PROOFSTEP]\nexact mul_mem_graded (pow_mem_graded n h) h\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝³ : SetLike S R\ninst✝² : Monoid R\ninst✝¹ : AddMonoid ι\nA : ι → S\ninst✝ : GradedMonoid A\nι' : Type u_4\nl : List ι'\ni : ι' → ι\nr : ι' → R\nh : ∀ (j : ι'), j ∈ l → r j ∈ A (i j)\n⊢ List.prod (List.map r l) ∈ A (List.sum (List.map i l))\n[PROOFSTEP]\nmatch l with\n| [] =>\n rw [List.map_nil, List.map_nil, List.prod_nil, List.sum_nil]\n exact one_mem_graded _\n| head :: tail =>\n rw [List.map_cons, List.map_cons, List.prod_cons, List.sum_cons]\n exact\n mul_mem_graded (h _ <| List.mem_cons_self _ _)\n (list_prod_map_mem_graded tail _ _ <| fun j hj => h _ <| List.mem_cons_of_mem _ hj)\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝³ : SetLike S R\ninst✝² : Monoid R\ninst✝¹ : AddMonoid ι\nA : ι → S\ninst✝ : GradedMonoid A\nι' : Type u_4\nl : List ι'\ni : ι' → ι\nr : ι' → R\nh : ∀ (j : ι'), j ∈ [] → r j ∈ A (i j)\n⊢ List.prod (List.map r []) ∈ A (List.sum (List.map i []))\n[PROOFSTEP]\nrw [List.map_nil, List.map_nil, List.prod_nil, List.sum_nil]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝³ : SetLike S R\ninst✝² : Monoid R\ninst✝¹ : AddMonoid ι\nA : ι → S\ninst✝ : GradedMonoid A\nι' : Type u_4\nl : List ι'\ni : ι' → ι\nr : ι' → R\nh : ∀ (j : ι'), j ∈ [] → r j ∈ A (i j)\n⊢ 1 ∈ A 0\n[PROOFSTEP]\nexact one_mem_graded _\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝³ : SetLike S R\ninst✝² : Monoid R\ninst✝¹ : AddMonoid ι\nA : ι → S\ninst✝ : GradedMonoid A\nι' : Type u_4\nl : List ι'\ni : ι' → ι\nr : ι' → R\nhead : ι'\ntail : List ι'\nh : ∀ (j : ι'), j ∈ head :: tail → r j ∈ A (i j)\n⊢ List.prod (List.map r (head :: tail)) ∈ A (List.sum (List.map i (head :: tail)))\n[PROOFSTEP]\nrw [List.map_cons, List.map_cons, List.prod_cons, List.sum_cons]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝³ : SetLike S R\ninst✝² : Monoid R\ninst✝¹ : AddMonoid ι\nA : ι → S\ninst✝ : GradedMonoid A\nι' : Type u_4\nl : List ι'\ni : ι' → ι\nr : ι' → R\nhead : ι'\ntail : List ι'\nh : ∀ (j : ι'), j ∈ head :: tail → r j ∈ A (i j)\n⊢ r head * List.prod (List.map r tail) ∈ A (i head + List.sum (List.map i tail))\n[PROOFSTEP]\nexact\n mul_mem_graded (h _ <| List.mem_cons_self _ _)\n (list_prod_map_mem_graded tail _ _ <| fun j hj => h _ <| List.mem_cons_of_mem _ hj)\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝³ : SetLike S R\ninst✝² : Monoid R\ninst✝¹ : AddMonoid ι\nA : ι → S\ninst✝ : GradedMonoid A\nn : ℕ\ni : Fin n → ι\nr : Fin n → R\nh : ∀ (j : Fin n), r j ∈ A (i j)\n⊢ List.prod (List.ofFn r) ∈ A (List.sum (List.ofFn i))\n[PROOFSTEP]\nrw [List.ofFn_eq_map, List.ofFn_eq_map]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝³ : SetLike S R\ninst✝² : Monoid R\ninst✝¹ : AddMonoid ι\nA : ι → S\ninst✝ : GradedMonoid A\nn : ℕ\ni : Fin n → ι\nr : Fin n → R\nh : ∀ (j : Fin n), r j ∈ A (i j)\n⊢ List.prod (List.map r (List.finRange n)) ∈ A (List.sum (List.map i (List.finRange n)))\n[PROOFSTEP]\nexact list_prod_map_mem_graded _ _ _ fun _ _ => h _\n[GOAL]\nι : Type u_1\nR : Type u_2\nα : Type u_3\nS : Type u_4\ninst✝³ : SetLike S R\ninst✝² : Monoid R\ninst✝¹ : AddMonoid ι\nA : ι → S\ninst✝ : GradedMonoid A\nfι : α → ι\nfA : (a : α) → { x // x ∈ A (fι a) }\nl : List α\n⊢ ↑(List.dProd l fι fA) = List.prod (List.map (fun a => ↑(fA a)) l)\n[PROOFSTEP]\nmatch l with\n| [] => rw [List.dProd_nil, coe_gOne, List.map_nil, List.prod_nil]\n| head :: tail => rw [List.dProd_cons, coe_gMul, List.map_cons, List.prod_cons, SetLike.coe_list_dProd _ _ _ tail]\n[GOAL]\nι : Type u_1\nR : Type u_2\nα : Type u_3\nS : Type u_4\ninst✝³ : SetLike S R\ninst✝² : Monoid R\ninst✝¹ : AddMonoid ι\nA : ι → S\ninst✝ : GradedMonoid A\nfι : α → ι\nfA : (a : α) → { x // x ∈ A (fι a) }\nl : List α\n⊢ ↑(List.dProd [] fι fA) = List.prod (List.map (fun a => ↑(fA a)) [])\n[PROOFSTEP]\nrw [List.dProd_nil, coe_gOne, List.map_nil, List.prod_nil]\n[GOAL]\nι : Type u_1\nR : Type u_2\nα : Type u_3\nS : Type u_4\ninst✝³ : SetLike S R\ninst✝² : Monoid R\ninst✝¹ : AddMonoid ι\nA : ι → S\ninst✝ : GradedMonoid A\nfι : α → ι\nfA : (a : α) → { x // x ∈ A (fι a) }\nl : List α\nhead : α\ntail : List α\n⊢ ↑(List.dProd (head :: tail) fι fA) = List.prod (List.map (fun a => ↑(fA a)) (head :: tail))\n[PROOFSTEP]\nrw [List.dProd_cons, coe_gMul, List.map_cons, List.prod_cons, SetLike.coe_list_dProd _ _ _ tail]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.GradedMonoid", "llama_tokens": 5744, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8577681122619883, "lm_q2_score": 0.682573740869499, "lm_q1q2_score": 0.5854899891852338}} {"text": "[GOAL]\nα : Type u_1\nG : Type u_2\ninst✝ : Group G\nf : α → G\nrels : Set (FreeGroup α)\nh : ∀ (r : FreeGroup α), r ∈ rels → ↑(↑FreeGroup.lift f) r = 1\ng : PresentedGroup rels →* G\nhg : ∀ (x : α), ↑g (PresentedGroup.of x) = f x\n⊢ ∀ {x : PresentedGroup rels}, ↑g x = ↑(toGroup h) x\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nG : Type u_2\ninst✝ : Group G\nf : α → G\nrels : Set (FreeGroup α)\nh : ∀ (r : FreeGroup α), r ∈ rels → ↑(↑FreeGroup.lift f) r = 1\ng : PresentedGroup rels →* G\nhg : ∀ (x : α), ↑g (PresentedGroup.of x) = f x\nx : PresentedGroup rels\n⊢ ↑g x = ↑(toGroup h) x\n[PROOFSTEP]\nrefine' QuotientGroup.induction_on x _\n[GOAL]\nα : Type u_1\nG : Type u_2\ninst✝ : Group G\nf : α → G\nrels : Set (FreeGroup α)\nh : ∀ (r : FreeGroup α), r ∈ rels → ↑(↑FreeGroup.lift f) r = 1\ng : PresentedGroup rels →* G\nhg : ∀ (x : α), ↑g (PresentedGroup.of x) = f x\nx : PresentedGroup rels\n⊢ ∀ (z : FreeGroup α), ↑g ↑z = ↑(toGroup h) ↑z\n[PROOFSTEP]\nexact fun _ ↦ FreeGroup.lift.unique (g.comp (QuotientGroup.mk' _)) hg\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.PresentedGroup", "llama_tokens": 492, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.86153820232079, "lm_q2_score": 0.679178692681616, "lm_q1q2_score": 0.5851383899475038}} {"text": "[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\n⊢ ∀ (a b c : F ⟶ G), a + b + c = a + (b + c)\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\na✝ b✝ c✝ : F ⟶ G\n⊢ a✝ + b✝ + c✝ = a✝ + (b✝ + c✝)\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\na✝ b✝ c✝ : F ⟶ G\nx✝ : C\n⊢ NatTrans.app (a✝ + b✝ + c✝) x✝ = NatTrans.app (a✝ + (b✝ + c✝)) x✝\n[PROOFSTEP]\napply add_assoc\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\n⊢ ∀ (a : F ⟶ G), 0 + a = a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\na✝ : F ⟶ G\n⊢ 0 + a✝ = a✝\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\na✝ : F ⟶ G\nx✝ : C\n⊢ NatTrans.app (0 + a✝) x✝ = NatTrans.app a✝ x✝\n[PROOFSTEP]\napply zero_add\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\n⊢ ∀ (a : F ⟶ G), a + 0 = a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\na✝ : F ⟶ G\n⊢ a✝ + 0 = a✝\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\na✝ : F ⟶ G\nx✝ : C\n⊢ NatTrans.app (a✝ + 0) x✝ = NatTrans.app a✝ x✝\n[PROOFSTEP]\napply add_zero\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\n⊢ ∀ (a b : F ⟶ G), a - b = a + -b\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\na✝ b✝ : F ⟶ G\n⊢ a✝ - b✝ = a✝ + -b✝\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\na✝ b✝ : F ⟶ G\nx✝ : C\n⊢ NatTrans.app (a✝ - b✝) x✝ = NatTrans.app (a✝ + -b✝) x✝\n[PROOFSTEP]\napply sub_eq_add_neg\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\n⊢ ∀ (a : F ⟶ G), -a + a = 0\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\na✝ : F ⟶ G\n⊢ -a✝ + a✝ = 0\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\na✝ : F ⟶ G\nx✝ : C\n⊢ NatTrans.app (-a✝ + a✝) x✝ = NatTrans.app 0 x✝\n[PROOFSTEP]\napply add_left_neg\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\n⊢ ∀ (a b : F ⟶ G), a + b = b + a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\na✝ b✝ : F ⟶ G\n⊢ a✝ + b✝ = b✝ + a✝\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\na✝ b✝ : F ⟶ G\nx✝ : C\n⊢ NatTrans.app (a✝ + b✝) x✝ = NatTrans.app (b✝ + a✝) x✝\n[PROOFSTEP]\napply add_comm\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\n⊢ ∀ (P Q R : C ⥤ D) (f f' : P ⟶ Q) (g : Q ⟶ R), (f + f') ≫ g = f ≫ g + f' ≫ g\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nP✝ Q✝ R✝ : C ⥤ D\nf✝ f'✝ : P✝ ⟶ Q✝\ng✝ : Q✝ ⟶ R✝\n⊢ (f✝ + f'✝) ≫ g✝ = f✝ ≫ g✝ + f'✝ ≫ g✝\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nP✝ Q✝ R✝ : C ⥤ D\nf✝ f'✝ : P✝ ⟶ Q✝\ng✝ : Q✝ ⟶ R✝\nx✝ : C\n⊢ NatTrans.app ((f✝ + f'✝) ≫ g✝) x✝ = NatTrans.app (f✝ ≫ g✝ + f'✝ ≫ g✝) x✝\n[PROOFSTEP]\napply add_comp\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\n⊢ ∀ (P Q R : C ⥤ D) (f : P ⟶ Q) (g g' : Q ⟶ R), f ≫ (g + g') = f ≫ g + f ≫ g'\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nP✝ Q✝ R✝ : C ⥤ D\nf✝ : P✝ ⟶ Q✝\ng✝ g'✝ : Q✝ ⟶ R✝\n⊢ f✝ ≫ (g✝ + g'✝) = f✝ ≫ g✝ + f✝ ≫ g'✝\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.38, u_1} C\ninst✝¹ : Category.{?u.42, u_2} D\ninst✝ : Preadditive D\nP✝ Q✝ R✝ : C ⥤ D\nf✝ : P✝ ⟶ Q✝\ng✝ g'✝ : Q✝ ⟶ R✝\nx✝ : C\n⊢ NatTrans.app (f✝ ≫ (g✝ + g'✝)) x✝ = NatTrans.app (f✝ ≫ g✝ + f✝ ≫ g'✝) x✝\n[PROOFSTEP]\napply comp_add\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{u_5, u_1} C\ninst✝¹ : Category.{u_4, u_2} D\ninst✝ : Preadditive D\nF G : C ⥤ D\nι : Type u_3\ns : Finset ι\nX : C\nα : ι → (F ⟶ G)\n⊢ app (∑ i in s, α i) X = ∑ i in s, app (α i) X\n[PROOFSTEP]\nsimp only [← appHom_apply, map_sum]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Preadditive.FunctorCategory", "llama_tokens": 3531, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8289387914176259, "lm_q2_score": 0.7057850154599562, "lm_q1q2_score": 0.5850525777160466}} {"text": "[GOAL]\nn a b n' a' b' : ℕ\nH : IsFibAux n a b\nhn : 2 * n = n'\nh1 : a * (2 * b - a) = a'\nh2 : a * a + b * b = b'\n⊢ fib n' = a'\n[PROOFSTEP]\nrw [← hn, fib_two_mul, H.1, H.2, ← h1]\n[GOAL]\nn a b n' a' b' : ℕ\nH : IsFibAux n a b\nhn : 2 * n = n'\nh1 : a * (2 * b - a) = a'\nh2 : a * a + b * b = b'\n⊢ fib (n' + 1) = b'\n[PROOFSTEP]\nrw [← hn, fib_two_mul_add_one, H.1, H.2, pow_two, pow_two, add_comm, h2]\n[GOAL]\nn a b n' a' b' : ℕ\nH : IsFibAux n a b\nhn : 2 * n + 1 = n'\nh1 : a * a + b * b = a'\nh2 : b * (2 * a + b) = b'\n⊢ fib n' = a'\n[PROOFSTEP]\nrw [← hn, fib_two_mul_add_one, H.1, H.2, pow_two, pow_two, add_comm, h1]\n[GOAL]\nn a b n' a' b' : ℕ\nH : IsFibAux n a b\nhn : 2 * n + 1 = n'\nh1 : a * a + b * b = a'\nh2 : b * (2 * a + b) = b'\n⊢ fib (n' + 1) = b'\n[PROOFSTEP]\nrw [← hn, fib_two_mul_add_two, H.1, H.2, h2]\n", "meta": {"mathlib_filename": "Mathlib.Tactic.NormNum.NatFib", "llama_tokens": 486, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8397339676722393, "lm_q2_score": 0.6959583250334526, "lm_q1q2_score": 0.584419845614867}} {"text": "[GOAL]\n⊢ ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0} →\n (fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q))) x ∈ Ioi 0 ×ˢ Ioo (-π) π\n[PROOFSTEP]\nrintro ⟨x, y⟩ hxy\n[GOAL]\ncase mk\nx y : ℝ\nhxy : (x, y) ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}\n⊢ (fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q))) (x, y) ∈ Ioi 0 ×ˢ Ioo (-π) π\n[PROOFSTEP]\nsimp only [prod_mk_mem_set_prod_eq, mem_Ioi, sqrt_pos, mem_Ioo, Complex.neg_pi_lt_arg, true_and_iff,\n Complex.arg_lt_pi_iff]\n[GOAL]\ncase mk\nx y : ℝ\nhxy : (x, y) ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}\n⊢ 0 < x ^ 2 + y ^ 2 ∧ (0 ≤ (↑Complex.equivRealProd.symm (x, y)).re ∨ (↑Complex.equivRealProd.symm (x, y)).im ≠ 0)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mk.left\nx y : ℝ\nhxy : (x, y) ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}\n⊢ 0 < x ^ 2 + y ^ 2\n[PROOFSTEP]\ncases' hxy with hxy hxy\n[GOAL]\ncase mk.left.inl\nx y : ℝ\nhxy : (x, y) ∈ {q | 0 < q.fst}\n⊢ 0 < x ^ 2 + y ^ 2\n[PROOFSTEP]\ndsimp at hxy \n[GOAL]\ncase mk.left.inl\nx y : ℝ\nhxy : 0 < x\n⊢ 0 < x ^ 2 + y ^ 2\n[PROOFSTEP]\nlinarith [sq_pos_of_ne_zero _ hxy.ne', sq_nonneg y]\n[GOAL]\ncase mk.left.inr\nx y : ℝ\nhxy : (x, y) ∈ {q | q.snd ≠ 0}\n⊢ 0 < x ^ 2 + y ^ 2\n[PROOFSTEP]\nlinarith [sq_nonneg x, sq_pos_of_ne_zero _ hxy]\n[GOAL]\ncase mk.right\nx y : ℝ\nhxy : (x, y) ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}\n⊢ 0 ≤ (↑Complex.equivRealProd.symm (x, y)).re ∨ (↑Complex.equivRealProd.symm (x, y)).im ≠ 0\n[PROOFSTEP]\ncases' hxy with hxy hxy\n[GOAL]\ncase mk.right.inl\nx y : ℝ\nhxy : (x, y) ∈ {q | 0 < q.fst}\n⊢ 0 ≤ (↑Complex.equivRealProd.symm (x, y)).re ∨ (↑Complex.equivRealProd.symm (x, y)).im ≠ 0\n[PROOFSTEP]\nexact Or.inl (le_of_lt hxy)\n[GOAL]\ncase mk.right.inr\nx y : ℝ\nhxy : (x, y) ∈ {q | q.snd ≠ 0}\n⊢ 0 ≤ (↑Complex.equivRealProd.symm (x, y)).re ∨ (↑Complex.equivRealProd.symm (x, y)).im ≠ 0\n[PROOFSTEP]\nexact Or.inr hxy\n[GOAL]\n⊢ ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ Ioi 0 ×ˢ Ioo (-π) π → (fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) x ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}\n[PROOFSTEP]\nrintro ⟨r, θ⟩ ⟨hr, hθ⟩\n[GOAL]\ncase mk.intro\nr θ : ℝ\nhr : (r, θ).fst ∈ Ioi 0\nhθ : (r, θ).snd ∈ Ioo (-π) π\n⊢ (fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) (r, θ) ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}\n[PROOFSTEP]\ndsimp at hr hθ \n[GOAL]\ncase mk.intro\nr θ : ℝ\nhr : r ∈ Ioi 0\nhθ : θ ∈ Ioo (-π) π\n⊢ (fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) (r, θ) ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}\n[PROOFSTEP]\nrcases eq_or_ne θ 0 with (rfl | h'θ)\n[GOAL]\ncase mk.intro.inl\nr : ℝ\nhr : r ∈ Ioi 0\nhθ : 0 ∈ Ioo (-π) π\n⊢ (fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) (r, 0) ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}\n[PROOFSTEP]\nsimpa using hr\n[GOAL]\ncase mk.intro.inr\nr θ : ℝ\nhr : r ∈ Ioi 0\nhθ : θ ∈ Ioo (-π) π\nh'θ : θ ≠ 0\n⊢ (fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) (r, θ) ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}\n[PROOFSTEP]\nright\n[GOAL]\ncase mk.intro.inr.h\nr θ : ℝ\nhr : r ∈ Ioi 0\nhθ : θ ∈ Ioo (-π) π\nh'θ : θ ≠ 0\n⊢ (fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) (r, θ) ∈ {q | q.snd ≠ 0}\n[PROOFSTEP]\nsimp at hr \n[GOAL]\ncase mk.intro.inr.h\nr θ : ℝ\nhθ : θ ∈ Ioo (-π) π\nh'θ : θ ≠ 0\nhr : 0 < r\n⊢ (fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) (r, θ) ∈ {q | q.snd ≠ 0}\n[PROOFSTEP]\nsimpa only [ne_of_gt hr, Ne.def, mem_setOf_eq, mul_eq_zero, false_or_iff, sin_eq_zero_iff_of_lt_of_lt hθ.1 hθ.2] using\n h'θ\n[GOAL]\n⊢ ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0} →\n (fun p => (p.fst * cos p.snd, p.fst * sin p.snd))\n ((fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q))) x) =\n x\n[PROOFSTEP]\nrintro ⟨x, y⟩ _\n[GOAL]\ncase mk\nx y : ℝ\na✝ : (x, y) ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}\n⊢ (fun p => (p.fst * cos p.snd, p.fst * sin p.snd))\n ((fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q))) (x, y)) =\n (x, y)\n[PROOFSTEP]\nhave A : sqrt (x ^ 2 + y ^ 2) = Complex.abs (x + y * Complex.I) := by\n simp [Complex.abs_def, Complex.normSq, pow_two, MonoidWithZeroHom.coe_mk, Complex.add_re, Complex.ofReal_re,\n Complex.mul_re, Complex.I_re, mul_zero, Complex.ofReal_im, Complex.I_im, sub_self, add_zero, Complex.add_im,\n Complex.mul_im, mul_one, zero_add]\n[GOAL]\nx y : ℝ\na✝ : (x, y) ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}\n⊢ sqrt (x ^ 2 + y ^ 2) = ↑Complex.abs (↑x + ↑y * Complex.I)\n[PROOFSTEP]\nsimp [Complex.abs_def, Complex.normSq, pow_two, MonoidWithZeroHom.coe_mk, Complex.add_re, Complex.ofReal_re,\n Complex.mul_re, Complex.I_re, mul_zero, Complex.ofReal_im, Complex.I_im, sub_self, add_zero, Complex.add_im,\n Complex.mul_im, mul_one, zero_add]\n[GOAL]\ncase mk\nx y : ℝ\na✝ : (x, y) ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}\nA : sqrt (x ^ 2 + y ^ 2) = ↑Complex.abs (↑x + ↑y * Complex.I)\n⊢ (fun p => (p.fst * cos p.snd, p.fst * sin p.snd))\n ((fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q))) (x, y)) =\n (x, y)\n[PROOFSTEP]\nhave Z := Complex.abs_mul_cos_add_sin_mul_I (x + y * Complex.I)\n[GOAL]\ncase mk\nx y : ℝ\na✝ : (x, y) ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}\nA : sqrt (x ^ 2 + y ^ 2) = ↑Complex.abs (↑x + ↑y * Complex.I)\nZ :\n ↑(↑Complex.abs (↑x + ↑y * Complex.I)) *\n (Complex.cos ↑(Complex.arg (↑x + ↑y * Complex.I)) +\n Complex.sin ↑(Complex.arg (↑x + ↑y * Complex.I)) * Complex.I) =\n ↑x + ↑y * Complex.I\n⊢ (fun p => (p.fst * cos p.snd, p.fst * sin p.snd))\n ((fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q))) (x, y)) =\n (x, y)\n[PROOFSTEP]\nsimp only [← Complex.ofReal_cos, ← Complex.ofReal_sin, mul_add, ← Complex.ofReal_mul, ← mul_assoc] at Z \n[GOAL]\ncase mk\nx y : ℝ\na✝ : (x, y) ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}\nA : sqrt (x ^ 2 + y ^ 2) = ↑Complex.abs (↑x + ↑y * Complex.I)\nZ :\n ↑(↑Complex.abs (↑x + ↑y * Complex.I) * cos (Complex.arg (↑x + ↑y * Complex.I))) +\n ↑(↑Complex.abs (↑x + ↑y * Complex.I) * sin (Complex.arg (↑x + ↑y * Complex.I))) * Complex.I =\n ↑x + ↑y * Complex.I\n⊢ (fun p => (p.fst * cos p.snd, p.fst * sin p.snd))\n ((fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q))) (x, y)) =\n (x, y)\n[PROOFSTEP]\nsimpa [A, -Complex.ofReal_cos, -Complex.ofReal_sin] using Complex.ext_iff.1 Z\n[GOAL]\n⊢ ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ Ioi 0 ×ˢ Ioo (-π) π →\n (fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q)))\n ((fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) x) =\n x\n[PROOFSTEP]\nrintro ⟨r, θ⟩ ⟨hr, hθ⟩\n[GOAL]\ncase mk.intro\nr θ : ℝ\nhr : (r, θ).fst ∈ Ioi 0\nhθ : (r, θ).snd ∈ Ioo (-π) π\n⊢ (fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q)))\n ((fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) (r, θ)) =\n (r, θ)\n[PROOFSTEP]\ndsimp at hr hθ \n[GOAL]\ncase mk.intro\nr θ : ℝ\nhr : r ∈ Ioi 0\nhθ : θ ∈ Ioo (-π) π\n⊢ (fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q)))\n ((fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) (r, θ)) =\n (r, θ)\n[PROOFSTEP]\nsimp only [Prod.mk.inj_iff]\n[GOAL]\ncase mk.intro\nr θ : ℝ\nhr : r ∈ Ioi 0\nhθ : θ ∈ Ioo (-π) π\n⊢ sqrt ((r * cos θ) ^ 2 + (r * sin θ) ^ 2) = r ∧ Complex.arg (↑Complex.equivRealProd.symm (r * cos θ, r * sin θ)) = θ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mk.intro.left\nr θ : ℝ\nhr : r ∈ Ioi 0\nhθ : θ ∈ Ioo (-π) π\n⊢ sqrt ((r * cos θ) ^ 2 + (r * sin θ) ^ 2) = r\n[PROOFSTEP]\nconv_rhs => rw [← sqrt_sq (le_of_lt hr), ← one_mul (r ^ 2), ← sin_sq_add_cos_sq θ]\n[GOAL]\nr θ : ℝ\nhr : r ∈ Ioi 0\nhθ : θ ∈ Ioo (-π) π\n| r\n[PROOFSTEP]\nrw [← sqrt_sq (le_of_lt hr), ← one_mul (r ^ 2), ← sin_sq_add_cos_sq θ]\n[GOAL]\nr θ : ℝ\nhr : r ∈ Ioi 0\nhθ : θ ∈ Ioo (-π) π\n| r\n[PROOFSTEP]\nrw [← sqrt_sq (le_of_lt hr), ← one_mul (r ^ 2), ← sin_sq_add_cos_sq θ]\n[GOAL]\nr θ : ℝ\nhr : r ∈ Ioi 0\nhθ : θ ∈ Ioo (-π) π\n| r\n[PROOFSTEP]\nrw [← sqrt_sq (le_of_lt hr), ← one_mul (r ^ 2), ← sin_sq_add_cos_sq θ]\n[GOAL]\ncase mk.intro.left\nr θ : ℝ\nhr : r ∈ Ioi 0\nhθ : θ ∈ Ioo (-π) π\n⊢ sqrt ((r * cos θ) ^ 2 + (r * sin θ) ^ 2) = sqrt ((sin θ ^ 2 + cos θ ^ 2) * r ^ 2)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase mk.intro.left.e_x\nr θ : ℝ\nhr : r ∈ Ioi 0\nhθ : θ ∈ Ioo (-π) π\n⊢ (r * cos θ) ^ 2 + (r * sin θ) ^ 2 = (sin θ ^ 2 + cos θ ^ 2) * r ^ 2\n[PROOFSTEP]\nring\n[GOAL]\ncase mk.intro.right\nr θ : ℝ\nhr : r ∈ Ioi 0\nhθ : θ ∈ Ioo (-π) π\n⊢ Complex.arg (↑Complex.equivRealProd.symm (r * cos θ, r * sin θ)) = θ\n[PROOFSTEP]\nconvert Complex.arg_mul_cos_add_sin_mul_I hr ⟨hθ.1, hθ.2.le⟩\n[GOAL]\ncase h.e'_2.h.e'_1\nr θ : ℝ\nhr : r ∈ Ioi 0\nhθ : θ ∈ Ioo (-π) π\n⊢ ↑Complex.equivRealProd.symm (r * cos θ, r * sin θ) = ↑r * (Complex.cos ↑θ + Complex.sin ↑θ * Complex.I)\n[PROOFSTEP]\nsimp only [Complex.equivRealProd_symm_apply, Complex.ofReal_mul, Complex.ofReal_cos, Complex.ofReal_sin]\n[GOAL]\ncase h.e'_2.h.e'_1\nr θ : ℝ\nhr : r ∈ Ioi 0\nhθ : θ ∈ Ioo (-π) π\n⊢ ↑r * Complex.cos ↑θ + ↑r * Complex.sin ↑θ * Complex.I = ↑r * (Complex.cos ↑θ + Complex.sin ↑θ * Complex.I)\n[PROOFSTEP]\nring\n[GOAL]\n⊢ ContinuousOn\n ↑{ toFun := fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q)),\n invFun := fun p => (p.fst * cos p.snd, p.fst * sin p.snd), source := {q | 0 < q.fst} ∪ {q | q.snd ≠ 0},\n target := Ioi 0 ×ˢ Ioo (-π) π,\n map_source' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0} →\n (fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q))) x ∈\n Ioi 0 ×ˢ Ioo (-π) π),\n map_target' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ Ioi 0 ×ˢ Ioo (-π) π →\n (fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) x ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}),\n left_inv' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0} →\n (fun p => (p.fst * cos p.snd, p.fst * sin p.snd))\n ((fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q))) x) =\n x),\n right_inv' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ Ioi 0 ×ˢ Ioo (-π) π →\n (fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q)))\n ((fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) x) =\n x) }\n { toFun := fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q)),\n invFun := fun p => (p.fst * cos p.snd, p.fst * sin p.snd), source := {q | 0 < q.fst} ∪ {q | q.snd ≠ 0},\n target := Ioi 0 ×ˢ Ioo (-π) π,\n map_source' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0} →\n (fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q))) x ∈\n Ioi 0 ×ˢ Ioo (-π) π),\n map_target' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ Ioi 0 ×ˢ Ioo (-π) π →\n (fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) x ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}),\n left_inv' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0} →\n (fun p => (p.fst * cos p.snd, p.fst * sin p.snd))\n ((fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q))) x) =\n x),\n right_inv' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ Ioi 0 ×ˢ Ioo (-π) π →\n (fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q)))\n ((fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) x) =\n x) }.source\n[PROOFSTEP]\napply ((continuous_fst.pow 2).add (continuous_snd.pow 2)).sqrt.continuousOn.prod\n[GOAL]\n⊢ ContinuousOn (fun x => Complex.arg (↑Complex.equivRealProd.symm x))\n { toFun := fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q)),\n invFun := fun p => (p.fst * cos p.snd, p.fst * sin p.snd), source := {q | 0 < q.fst} ∪ {q | q.snd ≠ 0},\n target := Ioi 0 ×ˢ Ioo (-π) π,\n map_source' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0} →\n (fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q))) x ∈\n Ioi 0 ×ˢ Ioo (-π) π),\n map_target' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ Ioi 0 ×ˢ Ioo (-π) π →\n (fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) x ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}),\n left_inv' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0} →\n (fun p => (p.fst * cos p.snd, p.fst * sin p.snd))\n ((fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q))) x) =\n x),\n right_inv' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ Ioi 0 ×ˢ Ioo (-π) π →\n (fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q)))\n ((fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) x) =\n x) }.source\n[PROOFSTEP]\nhave A : MapsTo Complex.equivRealProd.symm ({q : ℝ × ℝ | 0 < q.1} ∪ {q : ℝ × ℝ | q.2 ≠ 0}) {z | 0 < z.re ∨ z.im ≠ 0} :=\n by rintro ⟨x, y⟩ hxy; simpa only using hxy\n[GOAL]\n⊢ MapsTo (↑Complex.equivRealProd.symm) ({q | 0 < q.fst} ∪ {q | q.snd ≠ 0}) {z | 0 < z.re ∨ z.im ≠ 0}\n[PROOFSTEP]\nrintro ⟨x, y⟩ hxy\n[GOAL]\ncase mk\nx y : ℝ\nhxy : (x, y) ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}\n⊢ ↑Complex.equivRealProd.symm (x, y) ∈ {z | 0 < z.re ∨ z.im ≠ 0}\n[PROOFSTEP]\nsimpa only using hxy\n[GOAL]\nA : MapsTo (↑Complex.equivRealProd.symm) ({q | 0 < q.fst} ∪ {q | q.snd ≠ 0}) {z | 0 < z.re ∨ z.im ≠ 0}\n⊢ ContinuousOn (fun x => Complex.arg (↑Complex.equivRealProd.symm x))\n { toFun := fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q)),\n invFun := fun p => (p.fst * cos p.snd, p.fst * sin p.snd), source := {q | 0 < q.fst} ∪ {q | q.snd ≠ 0},\n target := Ioi 0 ×ˢ Ioo (-π) π,\n map_source' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0} →\n (fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q))) x ∈\n Ioi 0 ×ˢ Ioo (-π) π),\n map_target' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ Ioi 0 ×ˢ Ioo (-π) π →\n (fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) x ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}),\n left_inv' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0} →\n (fun p => (p.fst * cos p.snd, p.fst * sin p.snd))\n ((fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q))) x) =\n x),\n right_inv' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ Ioi 0 ×ˢ Ioo (-π) π →\n (fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q)))\n ((fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) x) =\n x) }.source\n[PROOFSTEP]\nrefine' ContinuousOn.comp (f := Complex.equivRealProd.symm) (g := Complex.arg) (fun z hz => _) _ A\n[GOAL]\ncase refine'_1\nA : MapsTo (↑Complex.equivRealProd.symm) ({q | 0 < q.fst} ∪ {q | q.snd ≠ 0}) {z | 0 < z.re ∨ z.im ≠ 0}\nz : ℂ\nhz : z ∈ {z | 0 < z.re ∨ z.im ≠ 0}\n⊢ ContinuousWithinAt Complex.arg {z | 0 < z.re ∨ z.im ≠ 0} z\n[PROOFSTEP]\nexact (Complex.continuousAt_arg hz).continuousWithinAt\n[GOAL]\ncase refine'_2\nA : MapsTo (↑Complex.equivRealProd.symm) ({q | 0 < q.fst} ∪ {q | q.snd ≠ 0}) {z | 0 < z.re ∨ z.im ≠ 0}\n⊢ ContinuousOn ↑Complex.equivRealProd.symm\n { toFun := fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q)),\n invFun := fun p => (p.fst * cos p.snd, p.fst * sin p.snd), source := {q | 0 < q.fst} ∪ {q | q.snd ≠ 0},\n target := Ioi 0 ×ˢ Ioo (-π) π,\n map_source' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0} →\n (fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q))) x ∈\n Ioi 0 ×ˢ Ioo (-π) π),\n map_target' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ Ioi 0 ×ˢ Ioo (-π) π →\n (fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) x ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0}),\n left_inv' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ {q | 0 < q.fst} ∪ {q | q.snd ≠ 0} →\n (fun p => (p.fst * cos p.snd, p.fst * sin p.snd))\n ((fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q))) x) =\n x),\n right_inv' :=\n (_ :\n ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ Ioi 0 ×ˢ Ioo (-π) π →\n (fun q => (sqrt (q.fst ^ 2 + q.snd ^ 2), Complex.arg (↑Complex.equivRealProd.symm q)))\n ((fun p => (p.fst * cos p.snd, p.fst * sin p.snd)) x) =\n x) }.source\n[PROOFSTEP]\nexact Complex.equivRealProdClm.symm.continuous.continuousOn\n[GOAL]\np : ℝ × ℝ\n⊢ HasFDerivAt (↑(LocalHomeomorph.symm polarCoord))\n (↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]])))\n p\n[PROOFSTEP]\nrw [Matrix.toLin_finTwoProd_toContinuousLinearMap]\n[GOAL]\np : ℝ × ℝ\n⊢ HasFDerivAt (↑(LocalHomeomorph.symm polarCoord))\n (ContinuousLinearMap.prod\n (cos p.snd • ContinuousLinearMap.fst ℝ ℝ ℝ + (-p.fst * sin p.snd) • ContinuousLinearMap.snd ℝ ℝ ℝ)\n (sin p.snd • ContinuousLinearMap.fst ℝ ℝ ℝ + (p.fst * cos p.snd) • ContinuousLinearMap.snd ℝ ℝ ℝ))\n p\n[PROOFSTEP]\nconvert\n HasFDerivAt.prod (𝕜 := ℝ) (hasFDerivAt_fst.mul ((hasDerivAt_cos p.2).comp_hasFDerivAt p hasFDerivAt_snd))\n (hasFDerivAt_fst.mul ((hasDerivAt_sin p.2).comp_hasFDerivAt p hasFDerivAt_snd)) using\n 2\n[GOAL]\ncase h.e'_10.h.e'_15.h.h.h\np : ℝ × ℝ\ne_4✝ : instTopologicalSpaceProd = UniformSpace.toTopologicalSpace\ne_5✝ : Prod.instAddCommMonoid = AddCommGroup.toAddCommMonoid\ne_8✝ : NonUnitalNonAssocSemiring.toAddCommMonoid = AddCommGroup.toAddCommMonoid\nhe✝¹ : Prod.instModule = NormedSpace.toModule\nhe✝ : NormedSpace.toModule = NormedSpace.toModule\n⊢ cos p.snd • ContinuousLinearMap.fst ℝ ℝ ℝ + (-p.fst * sin p.snd) • ContinuousLinearMap.snd ℝ ℝ ℝ =\n p.fst • -sin p.snd • ContinuousLinearMap.snd ℝ ℝ ℝ + (cos ∘ Prod.snd) p • ContinuousLinearMap.fst ℝ ℝ ℝ\n[PROOFSTEP]\nsimp [smul_smul, add_comm, neg_mul, neg_smul, smul_neg]\n[GOAL]\ncase h.e'_10.h.e'_16.h.h.h\np : ℝ × ℝ\ne_4✝ : instTopologicalSpaceProd = UniformSpace.toTopologicalSpace\ne_5✝ : Prod.instAddCommMonoid = AddCommGroup.toAddCommMonoid\ne_11✝ : NonUnitalNonAssocSemiring.toAddCommMonoid = AddCommGroup.toAddCommMonoid\nhe✝¹ : Prod.instModule = NormedSpace.toModule\nhe✝ : NormedSpace.toModule = NormedSpace.toModule\n⊢ sin p.snd • ContinuousLinearMap.fst ℝ ℝ ℝ + (p.fst * cos p.snd) • ContinuousLinearMap.snd ℝ ℝ ℝ =\n p.fst • cos p.snd • ContinuousLinearMap.snd ℝ ℝ ℝ + (sin ∘ Prod.snd) p • ContinuousLinearMap.fst ℝ ℝ ℝ\n[PROOFSTEP]\nsimp [smul_smul, add_comm, neg_mul, neg_smul, smul_neg]\n[GOAL]\n⊢ polarCoord.source =ᵐ[volume] univ\n[PROOFSTEP]\nhave A : polarCoord.sourceᶜ ⊆ LinearMap.ker (LinearMap.snd ℝ ℝ ℝ) :=\n by\n intro x hx\n simp only [polarCoord_source, compl_union, mem_inter_iff, mem_compl_iff, mem_setOf_eq, not_lt, Classical.not_not] at\n hx \n exact hx.2\n[GOAL]\n⊢ polarCoord.sourceᶜ ⊆ ↑(LinearMap.ker (LinearMap.snd ℝ ℝ ℝ))\n[PROOFSTEP]\nintro x hx\n[GOAL]\nx : ℝ × ℝ\nhx : x ∈ polarCoord.sourceᶜ\n⊢ x ∈ ↑(LinearMap.ker (LinearMap.snd ℝ ℝ ℝ))\n[PROOFSTEP]\nsimp only [polarCoord_source, compl_union, mem_inter_iff, mem_compl_iff, mem_setOf_eq, not_lt, Classical.not_not] at hx \n[GOAL]\nx : ℝ × ℝ\nhx : x.fst ≤ 0 ∧ x.snd = 0\n⊢ x ∈ ↑(LinearMap.ker (LinearMap.snd ℝ ℝ ℝ))\n[PROOFSTEP]\nexact hx.2\n[GOAL]\nA : polarCoord.sourceᶜ ⊆ ↑(LinearMap.ker (LinearMap.snd ℝ ℝ ℝ))\n⊢ polarCoord.source =ᵐ[volume] univ\n[PROOFSTEP]\nhave B : volume (LinearMap.ker (LinearMap.snd ℝ ℝ ℝ) : Set (ℝ × ℝ)) = 0 :=\n by\n apply Measure.addHaar_submodule\n rw [Ne.def, LinearMap.ker_eq_top]\n intro h\n have : (LinearMap.snd ℝ ℝ ℝ) (0, 1) = (0 : ℝ × ℝ →ₗ[ℝ] ℝ) (0, 1) := by rw [h]\n simp at this \n[GOAL]\nA : polarCoord.sourceᶜ ⊆ ↑(LinearMap.ker (LinearMap.snd ℝ ℝ ℝ))\n⊢ ↑↑volume ↑(LinearMap.ker (LinearMap.snd ℝ ℝ ℝ)) = 0\n[PROOFSTEP]\napply Measure.addHaar_submodule\n[GOAL]\ncase hs\nA : polarCoord.sourceᶜ ⊆ ↑(LinearMap.ker (LinearMap.snd ℝ ℝ ℝ))\n⊢ LinearMap.ker (LinearMap.snd ℝ ℝ ℝ) ≠ ⊤\n[PROOFSTEP]\nrw [Ne.def, LinearMap.ker_eq_top]\n[GOAL]\ncase hs\nA : polarCoord.sourceᶜ ⊆ ↑(LinearMap.ker (LinearMap.snd ℝ ℝ ℝ))\n⊢ ¬LinearMap.snd ℝ ℝ ℝ = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase hs\nA : polarCoord.sourceᶜ ⊆ ↑(LinearMap.ker (LinearMap.snd ℝ ℝ ℝ))\nh : LinearMap.snd ℝ ℝ ℝ = 0\n⊢ False\n[PROOFSTEP]\nhave : (LinearMap.snd ℝ ℝ ℝ) (0, 1) = (0 : ℝ × ℝ →ₗ[ℝ] ℝ) (0, 1) := by rw [h]\n[GOAL]\nA : polarCoord.sourceᶜ ⊆ ↑(LinearMap.ker (LinearMap.snd ℝ ℝ ℝ))\nh : LinearMap.snd ℝ ℝ ℝ = 0\n⊢ ↑(LinearMap.snd ℝ ℝ ℝ) (0, 1) = ↑0 (0, 1)\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase hs\nA : polarCoord.sourceᶜ ⊆ ↑(LinearMap.ker (LinearMap.snd ℝ ℝ ℝ))\nh : LinearMap.snd ℝ ℝ ℝ = 0\nthis : ↑(LinearMap.snd ℝ ℝ ℝ) (0, 1) = ↑0 (0, 1)\n⊢ False\n[PROOFSTEP]\nsimp at this \n[GOAL]\nA : polarCoord.sourceᶜ ⊆ ↑(LinearMap.ker (LinearMap.snd ℝ ℝ ℝ))\nB : ↑↑volume ↑(LinearMap.ker (LinearMap.snd ℝ ℝ ℝ)) = 0\n⊢ polarCoord.source =ᵐ[volume] univ\n[PROOFSTEP]\nsimp only [ae_eq_univ]\n[GOAL]\nA : polarCoord.sourceᶜ ⊆ ↑(LinearMap.ker (LinearMap.snd ℝ ℝ ℝ))\nB : ↑↑volume ↑(LinearMap.ker (LinearMap.snd ℝ ℝ ℝ)) = 0\n⊢ ↑↑volume polarCoord.sourceᶜ = 0\n[PROOFSTEP]\nexact le_antisymm ((measure_mono A).trans (le_of_eq B)) bot_le\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\n⊢ ∫ (p : ℝ × ℝ) in polarCoord.target, p.fst • f (↑(LocalHomeomorph.symm polarCoord) p) = ∫ (p : ℝ × ℝ), f p\n[PROOFSTEP]\nset B : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ := fun p =>\n LinearMap.toContinuousLinearMap\n (Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ) !![cos p.2, -p.1 * sin p.2; sin p.2, p.1 * cos p.2])\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\nB : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ :=\n fun p =>\n ↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]]))\n⊢ ∫ (p : ℝ × ℝ) in polarCoord.target, p.fst • f (↑(LocalHomeomorph.symm polarCoord) p) = ∫ (p : ℝ × ℝ), f p\n[PROOFSTEP]\nhave A : ∀ p ∈ polarCoord.symm.source, HasFDerivAt polarCoord.symm (B p) p := fun p _ => hasFDerivAt_polarCoord_symm p\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\nB : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ :=\n fun p =>\n ↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]]))\nA :\n ∀ (p : ℝ × ℝ),\n p ∈ (LocalHomeomorph.symm polarCoord).toLocalEquiv.source → HasFDerivAt (↑(LocalHomeomorph.symm polarCoord)) (B p) p\n⊢ ∫ (p : ℝ × ℝ) in polarCoord.target, p.fst • f (↑(LocalHomeomorph.symm polarCoord) p) = ∫ (p : ℝ × ℝ), f p\n[PROOFSTEP]\nhave B_det : ∀ p, (B p).det = p.1 := by\n intro p\n conv_rhs => rw [← one_mul p.1, ← cos_sq_add_sin_sq p.2]\n simp only [neg_mul, LinearMap.det_toContinuousLinearMap, LinearMap.det_toLin, Matrix.det_fin_two_of, sub_neg_eq_add]\n ring\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\nB : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ :=\n fun p =>\n ↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]]))\nA :\n ∀ (p : ℝ × ℝ),\n p ∈ (LocalHomeomorph.symm polarCoord).toLocalEquiv.source → HasFDerivAt (↑(LocalHomeomorph.symm polarCoord)) (B p) p\n⊢ ∀ (p : ℝ × ℝ), ContinuousLinearMap.det (B p) = p.fst\n[PROOFSTEP]\nintro p\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\nB : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ :=\n fun p =>\n ↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]]))\nA :\n ∀ (p : ℝ × ℝ),\n p ∈ (LocalHomeomorph.symm polarCoord).toLocalEquiv.source → HasFDerivAt (↑(LocalHomeomorph.symm polarCoord)) (B p) p\np : ℝ × ℝ\n⊢ ContinuousLinearMap.det (B p) = p.fst\n[PROOFSTEP]\nconv_rhs => rw [← one_mul p.1, ← cos_sq_add_sin_sq p.2]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\nB : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ :=\n fun p =>\n ↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]]))\nA :\n ∀ (p : ℝ × ℝ),\n p ∈ (LocalHomeomorph.symm polarCoord).toLocalEquiv.source → HasFDerivAt (↑(LocalHomeomorph.symm polarCoord)) (B p) p\np : ℝ × ℝ\n| p.fst\n[PROOFSTEP]\nrw [← one_mul p.1, ← cos_sq_add_sin_sq p.2]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\nB : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ :=\n fun p =>\n ↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]]))\nA :\n ∀ (p : ℝ × ℝ),\n p ∈ (LocalHomeomorph.symm polarCoord).toLocalEquiv.source → HasFDerivAt (↑(LocalHomeomorph.symm polarCoord)) (B p) p\np : ℝ × ℝ\n| p.fst\n[PROOFSTEP]\nrw [← one_mul p.1, ← cos_sq_add_sin_sq p.2]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\nB : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ :=\n fun p =>\n ↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]]))\nA :\n ∀ (p : ℝ × ℝ),\n p ∈ (LocalHomeomorph.symm polarCoord).toLocalEquiv.source → HasFDerivAt (↑(LocalHomeomorph.symm polarCoord)) (B p) p\np : ℝ × ℝ\n| p.fst\n[PROOFSTEP]\nrw [← one_mul p.1, ← cos_sq_add_sin_sq p.2]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\nB : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ :=\n fun p =>\n ↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]]))\nA :\n ∀ (p : ℝ × ℝ),\n p ∈ (LocalHomeomorph.symm polarCoord).toLocalEquiv.source → HasFDerivAt (↑(LocalHomeomorph.symm polarCoord)) (B p) p\np : ℝ × ℝ\n⊢ ContinuousLinearMap.det (B p) = (cos p.snd ^ 2 + sin p.snd ^ 2) * p.fst\n[PROOFSTEP]\nsimp only [neg_mul, LinearMap.det_toContinuousLinearMap, LinearMap.det_toLin, Matrix.det_fin_two_of, sub_neg_eq_add]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\nB : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ :=\n fun p =>\n ↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]]))\nA :\n ∀ (p : ℝ × ℝ),\n p ∈ (LocalHomeomorph.symm polarCoord).toLocalEquiv.source → HasFDerivAt (↑(LocalHomeomorph.symm polarCoord)) (B p) p\np : ℝ × ℝ\n⊢ cos p.snd * (p.fst * cos p.snd) + p.fst * sin p.snd * sin p.snd = (cos p.snd ^ 2 + sin p.snd ^ 2) * p.fst\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\nB : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ :=\n fun p =>\n ↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]]))\nA :\n ∀ (p : ℝ × ℝ),\n p ∈ (LocalHomeomorph.symm polarCoord).toLocalEquiv.source → HasFDerivAt (↑(LocalHomeomorph.symm polarCoord)) (B p) p\nB_det : ∀ (p : ℝ × ℝ), ContinuousLinearMap.det (B p) = p.fst\n⊢ ∫ (p : ℝ × ℝ) in polarCoord.target, p.fst • f (↑(LocalHomeomorph.symm polarCoord) p) = ∫ (p : ℝ × ℝ), f p\n[PROOFSTEP]\nsymm\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\nB : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ :=\n fun p =>\n ↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]]))\nA :\n ∀ (p : ℝ × ℝ),\n p ∈ (LocalHomeomorph.symm polarCoord).toLocalEquiv.source → HasFDerivAt (↑(LocalHomeomorph.symm polarCoord)) (B p) p\nB_det : ∀ (p : ℝ × ℝ), ContinuousLinearMap.det (B p) = p.fst\n⊢ ∫ (p : ℝ × ℝ), f p = ∫ (p : ℝ × ℝ) in polarCoord.target, p.fst • f (↑(LocalHomeomorph.symm polarCoord) p)\n[PROOFSTEP]\ncalc\n ∫ p, f p = ∫ p in polarCoord.source, f p := by\n rw [← integral_univ]\n apply set_integral_congr_set_ae\n exact polarCoord_source_ae_eq_univ.symm\n _ = ∫ p in polarCoord.target, abs (B p).det • f (polarCoord.symm p) := by\n apply integral_target_eq_integral_abs_det_fderiv_smul volume A\n _ = ∫ p in polarCoord.target, p.1 • f (polarCoord.symm p) :=\n by\n apply set_integral_congr polarCoord.open_target.measurableSet fun x hx => ?_\n rw [B_det, abs_of_pos]\n exact hx.1\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\nB : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ :=\n fun p =>\n ↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]]))\nA :\n ∀ (p : ℝ × ℝ),\n p ∈ (LocalHomeomorph.symm polarCoord).toLocalEquiv.source → HasFDerivAt (↑(LocalHomeomorph.symm polarCoord)) (B p) p\nB_det : ∀ (p : ℝ × ℝ), ContinuousLinearMap.det (B p) = p.fst\n⊢ ∫ (p : ℝ × ℝ), f p = ∫ (p : ℝ × ℝ) in polarCoord.source, f p\n[PROOFSTEP]\nrw [← integral_univ]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\nB : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ :=\n fun p =>\n ↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]]))\nA :\n ∀ (p : ℝ × ℝ),\n p ∈ (LocalHomeomorph.symm polarCoord).toLocalEquiv.source → HasFDerivAt (↑(LocalHomeomorph.symm polarCoord)) (B p) p\nB_det : ∀ (p : ℝ × ℝ), ContinuousLinearMap.det (B p) = p.fst\n⊢ ∫ (x : ℝ × ℝ) in univ, f x = ∫ (p : ℝ × ℝ) in polarCoord.source, f p\n[PROOFSTEP]\napply set_integral_congr_set_ae\n[GOAL]\ncase hst\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\nB : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ :=\n fun p =>\n ↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]]))\nA :\n ∀ (p : ℝ × ℝ),\n p ∈ (LocalHomeomorph.symm polarCoord).toLocalEquiv.source → HasFDerivAt (↑(LocalHomeomorph.symm polarCoord)) (B p) p\nB_det : ∀ (p : ℝ × ℝ), ContinuousLinearMap.det (B p) = p.fst\n⊢ univ =ᵐ[volume] polarCoord.source\n[PROOFSTEP]\nexact polarCoord_source_ae_eq_univ.symm\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\nB : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ :=\n fun p =>\n ↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]]))\nA :\n ∀ (p : ℝ × ℝ),\n p ∈ (LocalHomeomorph.symm polarCoord).toLocalEquiv.source → HasFDerivAt (↑(LocalHomeomorph.symm polarCoord)) (B p) p\nB_det : ∀ (p : ℝ × ℝ), ContinuousLinearMap.det (B p) = p.fst\n⊢ ∫ (p : ℝ × ℝ) in polarCoord.source, f p =\n ∫ (p : ℝ × ℝ) in polarCoord.target, |ContinuousLinearMap.det (B p)| • f (↑(LocalHomeomorph.symm polarCoord) p)\n[PROOFSTEP]\napply integral_target_eq_integral_abs_det_fderiv_smul volume A\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\nB : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ :=\n fun p =>\n ↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]]))\nA :\n ∀ (p : ℝ × ℝ),\n p ∈ (LocalHomeomorph.symm polarCoord).toLocalEquiv.source → HasFDerivAt (↑(LocalHomeomorph.symm polarCoord)) (B p) p\nB_det : ∀ (p : ℝ × ℝ), ContinuousLinearMap.det (B p) = p.fst\n⊢ ∫ (p : ℝ × ℝ) in polarCoord.target, |ContinuousLinearMap.det (B p)| • f (↑(LocalHomeomorph.symm polarCoord) p) =\n ∫ (p : ℝ × ℝ) in polarCoord.target, p.fst • f (↑(LocalHomeomorph.symm polarCoord) p)\n[PROOFSTEP]\napply set_integral_congr polarCoord.open_target.measurableSet fun x hx => ?_\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\nB : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ :=\n fun p =>\n ↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]]))\nA :\n ∀ (p : ℝ × ℝ),\n p ∈ (LocalHomeomorph.symm polarCoord).toLocalEquiv.source → HasFDerivAt (↑(LocalHomeomorph.symm polarCoord)) (B p) p\nB_det : ∀ (p : ℝ × ℝ), ContinuousLinearMap.det (B p) = p.fst\nx : ℝ × ℝ\nhx : x ∈ polarCoord.target\n⊢ |ContinuousLinearMap.det (B x)| • f (↑(LocalHomeomorph.symm polarCoord) x) =\n x.fst • f (↑(LocalHomeomorph.symm polarCoord) x)\n[PROOFSTEP]\nrw [B_det, abs_of_pos]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ × ℝ → E\nB : ℝ × ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ :=\n fun p =>\n ↑LinearMap.toContinuousLinearMap\n (↑(Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))\n (↑Matrix.of ![![cos p.snd, -p.fst * sin p.snd], ![sin p.snd, p.fst * cos p.snd]]))\nA :\n ∀ (p : ℝ × ℝ),\n p ∈ (LocalHomeomorph.symm polarCoord).toLocalEquiv.source → HasFDerivAt (↑(LocalHomeomorph.symm polarCoord)) (B p) p\nB_det : ∀ (p : ℝ × ℝ), ContinuousLinearMap.det (B p) = p.fst\nx : ℝ × ℝ\nhx : x ∈ polarCoord.target\n⊢ 0 < x.fst\n[PROOFSTEP]\nexact hx.1\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.PolarCoord", "llama_tokens": 17567, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8558511506439707, "lm_q2_score": 0.682573740869499, "lm_q1q2_score": 0.5841815215225201}} {"text": "[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R✝\nm n : ℕ\nR : Type u_1\ninst✝ : CommSemiring R\nx y : R\n⊢ (x + y) ^ 0 = x ^ 0 + ↑0 * x ^ (0 - 1) * y + 0 * y ^ 2\n[PROOFSTEP]\nsimp\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R✝\nm n : ℕ\nR : Type u_1\ninst✝ : CommSemiring R\nx y : R\n⊢ (x + y) ^ 1 = x ^ 1 + ↑1 * x ^ (1 - 1) * y + 0 * y ^ 2\n[PROOFSTEP]\nsimp\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R✝\nm n✝ : ℕ\nR : Type u_1\ninst✝ : CommSemiring R\nx y : R\nn : ℕ\n⊢ { k // (x + y) ^ (n + 2) = x ^ (n + 2) + ↑(n + 2) * x ^ (n + 2 - 1) * y + k * y ^ 2 }\n[PROOFSTEP]\ncases' (powAddExpansion x y (n + 1)) with z hz\n[GOAL]\ncase mk\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R✝\nm n✝ : ℕ\nR : Type u_1\ninst✝ : CommSemiring R\nx y : R\nn : ℕ\nz : R\nhz : (x + y) ^ (n + 1) = x ^ (n + 1) + ↑(n + 1) * x ^ (n + 1 - 1) * y + z * y ^ 2\n⊢ { k // (x + y) ^ (n + 2) = x ^ (n + 2) + ↑(n + 2) * x ^ (n + 2 - 1) * y + k * y ^ 2 }\n[PROOFSTEP]\nexists x * z + (n + 1) * x ^ n + z * y\n[GOAL]\ncase mk\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R✝\nm n✝ : ℕ\nR : Type u_1\ninst✝ : CommSemiring R\nx y : R\nn : ℕ\nz : R\nhz : (x + y) ^ (n + 1) = x ^ (n + 1) + ↑(n + 1) * x ^ (n + 1 - 1) * y + z * y ^ 2\n⊢ (x + y) ^ (n + 2) = x ^ (n + 2) + ↑(n + 2) * x ^ (n + 2 - 1) * y + (x * z + (↑n + 1) * x ^ n + z * y) * y ^ 2\n[PROOFSTEP]\ncalc\n (x + y) ^ (n + 2) = (x + y) * (x + y) ^ (n + 1) := by ring\n _ = (x + y) * (x ^ (n + 1) + ↑(n + 1) * x ^ (n + 1 - 1) * y + z * y ^ 2) := by rw [hz]\n _ = x ^ (n + 2) + ↑(n + 2) * x ^ (n + 1) * y + (x * z + (n + 1) * x ^ n + z * y) * y ^ 2 :=\n by\n push_cast\n ring!\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R✝\nm n✝ : ℕ\nR : Type u_1\ninst✝ : CommSemiring R\nx y : R\nn : ℕ\nz : R\nhz : (x + y) ^ (n + 1) = x ^ (n + 1) + ↑(n + 1) * x ^ (n + 1 - 1) * y + z * y ^ 2\n⊢ (x + y) ^ (n + 2) = (x + y) * (x + y) ^ (n + 1)\n[PROOFSTEP]\nring\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R✝\nm n✝ : ℕ\nR : Type u_1\ninst✝ : CommSemiring R\nx y : R\nn : ℕ\nz : R\nhz : (x + y) ^ (n + 1) = x ^ (n + 1) + ↑(n + 1) * x ^ (n + 1 - 1) * y + z * y ^ 2\n⊢ (x + y) * (x + y) ^ (n + 1) = (x + y) * (x ^ (n + 1) + ↑(n + 1) * x ^ (n + 1 - 1) * y + z * y ^ 2)\n[PROOFSTEP]\nrw [hz]\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R✝\nm n✝ : ℕ\nR : Type u_1\ninst✝ : CommSemiring R\nx y : R\nn : ℕ\nz : R\nhz : (x + y) ^ (n + 1) = x ^ (n + 1) + ↑(n + 1) * x ^ (n + 1 - 1) * y + z * y ^ 2\n⊢ (x + y) * (x ^ (n + 1) + ↑(n + 1) * x ^ (n + 1 - 1) * y + z * y ^ 2) =\n x ^ (n + 2) + ↑(n + 2) * x ^ (n + 1) * y + (x * z + (↑n + 1) * x ^ n + z * y) * y ^ 2\n[PROOFSTEP]\npush_cast\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R✝\nm n✝ : ℕ\nR : Type u_1\ninst✝ : CommSemiring R\nx y : R\nn : ℕ\nz : R\nhz : (x + y) ^ (n + 1) = x ^ (n + 1) + ↑(n + 1) * x ^ (n + 1 - 1) * y + z * y ^ 2\n⊢ (x + y) * (x ^ (n + 1) + (↑n + 1) * x ^ (n + 1 - 1) * y + z * y ^ 2) =\n x ^ (n + 2) + (↑n + 2) * x ^ (n + 1) * y + (x * z + (↑n + 1) * x ^ n + z * y) * y ^ 2\n[PROOFSTEP]\nring!\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na✝ b : R\nm n : ℕ\ninst✝ : CommRing R\nx y : R\ne : ℕ\na : R\n⊢ { k // a * (x + y) ^ e = a * (x ^ e + ↑e * x ^ (e - 1) * y + k * y ^ 2) }\n[PROOFSTEP]\nexists (powAddExpansion x y e).val\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na✝ b : R\nm n : ℕ\ninst✝ : CommRing R\nx y : R\ne : ℕ\na : R\n⊢ a * (x + y) ^ e = a * (x ^ e + ↑e * x ^ (e - 1) * y + ↑(powAddExpansion x y e) * y ^ 2)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na✝ b : R\nm n : ℕ\ninst✝ : CommRing R\nx y : R\ne : ℕ\na : R\n⊢ (x + y) ^ e = x ^ e + ↑e * x ^ (e - 1) * y + ↑(powAddExpansion x y e) * y ^ 2\n[PROOFSTEP]\napply (powAddExpansion _ _ _).property\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\n⊢ eval (x + y) f = sum f fun e a => a * (x ^ e + ↑e * x ^ (e - 1) * y + ↑(Polynomial.polyBinomAux1 x y e a) * y ^ 2)\n[PROOFSTEP]\nunfold eval\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\n⊢ eval₂ (RingHom.id R) (x + y) f =\n sum f fun e a => a * (x ^ e + ↑e * x ^ (e - 1) * y + ↑(Polynomial.polyBinomAux1 x y e a) * y ^ 2)\n[PROOFSTEP]\nrw [eval₂_eq_sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\n⊢ (sum f fun e a => ↑(RingHom.id R) a * (x + y) ^ e) =\n sum f fun e a => a * (x ^ e + ↑e * x ^ (e - 1) * y + ↑(Polynomial.polyBinomAux1 x y e a) * y ^ 2)\n[PROOFSTEP]\ncongr with (n z)\n[GOAL]\ncase e_f.h.h\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n✝ : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\nn : ℕ\nz : R\n⊢ ↑(RingHom.id R) z * (x + y) ^ n = z * (x ^ n + ↑n * x ^ (n - 1) * y + ↑(Polynomial.polyBinomAux1 x y n z) * y ^ 2)\n[PROOFSTEP]\napply (polyBinomAux1 x y _ _).property\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\n⊢ eval (x + y) f =\n ((sum f fun e a => a * x ^ e) + sum f fun e a => a * ↑e * x ^ (e - 1) * y) +\n sum f fun e a => a * ↑(Polynomial.polyBinomAux1 x y e a) * y ^ 2\n[PROOFSTEP]\nrw [poly_binom_aux2]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\n⊢ (sum f fun e a => a * (x ^ e + ↑e * x ^ (e - 1) * y + ↑(Polynomial.polyBinomAux1 x y e a) * y ^ 2)) =\n ((sum f fun e a => a * x ^ e) + sum f fun e a => a * ↑e * x ^ (e - 1) * y) +\n sum f fun e a => a * ↑(Polynomial.polyBinomAux1 x y e a) * y ^ 2\n[PROOFSTEP]\nsimp [left_distrib, sum_add, mul_assoc]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\n⊢ { k // eval (x + y) f = eval x f + eval x (↑derivative f) * y + k * y ^ 2 }\n[PROOFSTEP]\nexists f.sum fun e a => a * (polyBinomAux1 x y e a).val\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\n⊢ eval (x + y) f =\n eval x f + eval x (↑derivative f) * y + (sum f fun e a => a * ↑(Polynomial.polyBinomAux1 x y e a)) * y ^ 2\n[PROOFSTEP]\nrw [poly_binom_aux3]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\n⊢ (((sum f fun e a => a * x ^ e) + sum f fun e a => a * ↑e * x ^ (e - 1) * y) +\n sum f fun e a => a * ↑(Polynomial.polyBinomAux1 x y e a) * y ^ 2) =\n eval x f + eval x (↑derivative f) * y + (sum f fun e a => a * ↑(Polynomial.polyBinomAux1 x y e a)) * y ^ 2\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_a\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\n⊢ (sum f fun e a => a * x ^ e) = eval x f\n[PROOFSTEP]\nrw [← eval_eq_sum]\n[GOAL]\ncase e_a.e_a\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\n⊢ (sum f fun e a => a * ↑e * x ^ (e - 1) * y) = eval x (↑derivative f) * y\n[PROOFSTEP]\nrw [derivative_eval]\n[GOAL]\ncase e_a.e_a\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\n⊢ (sum f fun e a => a * ↑e * x ^ (e - 1) * y) = (sum f fun n a => a * ↑n * x ^ (n - 1)) * y\n[PROOFSTEP]\nexact Finset.sum_mul.symm\n[GOAL]\ncase e_a\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\n⊢ (sum f fun e a => a * ↑(Polynomial.polyBinomAux1 x y e a) * y ^ 2) =\n (sum f fun e a => a * ↑(Polynomial.polyBinomAux1 x y e a)) * y ^ 2\n[PROOFSTEP]\nexact Finset.sum_mul.symm\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nx y : R\n⊢ x ^ 0 - y ^ 0 = 0 * (x - y)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nx y : R\n⊢ x ^ 1 - y ^ 1 = 1 * (x - y)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk✝ : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nx y : R\nk : ℕ\n⊢ { z // x ^ (k + 2) - y ^ (k + 2) = z * (x - y) }\n[PROOFSTEP]\ncases' @powSubPowFactor x y (k + 1) with z hz\n[GOAL]\ncase mk\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk✝ : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nx y : R\nk : ℕ\nz : R\nhz : x ^ (k + 1) - y ^ (k + 1) = z * (x - y)\n⊢ { z // x ^ (k + 2) - y ^ (k + 2) = z * (x - y) }\n[PROOFSTEP]\nexists z * x + y ^ (k + 1)\n[GOAL]\ncase mk\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk✝ : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nx y : R\nk : ℕ\nz : R\nhz : x ^ (k + 1) - y ^ (k + 1) = z * (x - y)\n⊢ x ^ (k + 2) - y ^ (k + 2) = (z * x + y ^ (k + 1)) * (x - y)\n[PROOFSTEP]\nlinear_combination (norm := ring) x * hz\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk✝ : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nx y : R\nk : ℕ\nz : R\nhz : x ^ (k + 1) - y ^ (k + 1) = z * (x - y)\n⊢ x ^ (k + 2) - y ^ (k + 2) - (z * x + y ^ (k + 1)) * (x - y) - (x * (x ^ (k + 1) - y ^ (k + 1)) - x * (z * (x - y))) =\n 0\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\n⊢ { z // eval x f - eval y f = z * (x - y) }\n[PROOFSTEP]\nrefine' ⟨f.sum fun i r => r * (powSubPowFactor x y i).val, _⟩\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\n⊢ eval x f - eval y f = (sum f fun i r => r * ↑(powSubPowFactor x y i)) * (x - y)\n[PROOFSTEP]\ndelta eval\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\n⊢ eval₂ (RingHom.id R) x f - eval₂ (RingHom.id R) y f = (sum f fun i r => r * ↑(powSubPowFactor x y i)) * (x - y)\n[PROOFSTEP]\nrw [eval₂_eq_sum, eval₂_eq_sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\n⊢ ((sum f fun e a => ↑(RingHom.id R) a * x ^ e) - sum f fun e a => ↑(RingHom.id R) a * y ^ e) =\n (sum f fun i r => r * ↑(powSubPowFactor x y i)) * (x - y)\n[PROOFSTEP]\nsimp only [sum, ← Finset.sum_sub_distrib, Finset.sum_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\n⊢ (Finset.sum (support f) fun x_1 =>\n ↑(RingHom.id R) (coeff f x_1) * x ^ x_1 - ↑(RingHom.id R) (coeff f x_1) * y ^ x_1) =\n Finset.sum (support f) fun x_1 => coeff f x_1 * ↑(powSubPowFactor x y x_1) * (x - y)\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\n⊢ (Finset.sum (support f) fun x_1 => coeff f x_1 * x ^ x_1 - coeff f x_1 * y ^ x_1) =\n Finset.sum (support f) fun x_1 => coeff f x_1 * ↑(powSubPowFactor x y x_1) * (x - y)\n[PROOFSTEP]\ncongr with i\n[GOAL]\ncase e_f.h\nR : Type u\nS : Type v\nT : Type w\nι : Type x\nk : Type y\nA : Type z\na b : R\nm n : ℕ\ninst✝ : CommRing R\nf : R[X]\nx y : R\ni : ℕ\n⊢ coeff f i * x ^ i - coeff f i * y ^ i = coeff f i * ↑(powSubPowFactor x y i) * (x - y)\n[PROOFSTEP]\nrw [mul_assoc, ← (powSubPowFactor x y _).prop, mul_sub]\n", "meta": {"mathlib_filename": "Mathlib.Data.Polynomial.Identities", "llama_tokens": 6331, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8774767906859264, "lm_q2_score": 0.665410572017153, "lm_q1q2_score": 0.5838823332220979}} {"text": "[GOAL]\np : ℕ\nh : 0 < p\n⊢ 0 < mersenne p\n[PROOFSTEP]\ndsimp [mersenne]\n[GOAL]\np : ℕ\nh : 0 < p\n⊢ 0 < 2 ^ p - 1\n[PROOFSTEP]\ncalc\n 0 < 2 ^ 1 - 1 := by norm_num\n _ ≤ 2 ^ p - 1 := Nat.sub_le_sub_right (Nat.pow_le_pow_of_le_right (Nat.succ_pos 1) h) 1\n[GOAL]\np : ℕ\nh : 0 < p\n⊢ 0 < 2 ^ 1 - 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\np : ℕ\nhp : 1 < p\n⊢ 1 + 1 = 2 ^ 1\n[PROOFSTEP]\nrw [one_add_one_eq_two, pow_one]\n[GOAL]\nk : ℕ\n⊢ mersenne k + 1 = 2 ^ k\n[PROOFSTEP]\nrw [mersenne, tsub_add_cancel_of_le]\n[GOAL]\nk : ℕ\n⊢ 1 ≤ 2 ^ k\n[PROOFSTEP]\nexact one_le_pow_of_one_le (by norm_num) k\n[GOAL]\nk : ℕ\n⊢ 1 ≤ 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\np : ℕ\nhp : 0 < p\n⊢ 1 < 2 ^ p\n[PROOFSTEP]\nexact_mod_cast Nat.one_lt_two_pow p hp\n[GOAL]\np : ℕ\nw : 0 < p\ni : ℕ\n⊢ 0 ≤ sMod p i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase zero\np : ℕ\nw : 0 < p\n⊢ 0 ≤ sMod p zero\n[PROOFSTEP]\ndsimp [sMod]\n[GOAL]\ncase succ\np : ℕ\nw : 0 < p\nn✝ : ℕ\n⊢ 0 ≤ sMod p (succ n✝)\n[PROOFSTEP]\ndsimp [sMod]\n[GOAL]\ncase zero\np : ℕ\nw : 0 < p\n⊢ 0 ≤ 4 % (2 ^ p - 1)\n[PROOFSTEP]\nexact sup_eq_right.mp rfl\n[GOAL]\ncase succ\np : ℕ\nw : 0 < p\nn✝ : ℕ\n⊢ 0 ≤ (sMod p n✝ ^ 2 - 2) % (2 ^ p - 1)\n[PROOFSTEP]\napply Int.emod_nonneg\n[GOAL]\ncase succ.a\np : ℕ\nw : 0 < p\nn✝ : ℕ\n⊢ 2 ^ p - 1 ≠ 0\n[PROOFSTEP]\nexact mersenne_int_ne_zero p w\n[GOAL]\np i : ℕ\n⊢ sMod p i % (2 ^ p - 1) = sMod p i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase zero\np : ℕ\n⊢ sMod p zero % (2 ^ p - 1) = sMod p zero\n[PROOFSTEP]\nsimp [sMod]\n[GOAL]\ncase succ\np n✝ : ℕ\n⊢ sMod p (succ n✝) % (2 ^ p - 1) = sMod p (succ n✝)\n[PROOFSTEP]\nsimp [sMod]\n[GOAL]\np : ℕ\nw : 0 < p\ni : ℕ\n⊢ sMod p i < 2 ^ p - 1\n[PROOFSTEP]\nrw [← sMod_mod]\n[GOAL]\np : ℕ\nw : 0 < p\ni : ℕ\n⊢ sMod p i % (2 ^ p - 1) < 2 ^ p - 1\n[PROOFSTEP]\nrefine (Int.emod_lt _ (mersenne_int_ne_zero p w)).trans_eq ?_\n[GOAL]\np : ℕ\nw : 0 < p\ni : ℕ\n⊢ |2 ^ p - 1| = 2 ^ p - 1\n[PROOFSTEP]\nexact abs_of_nonneg (mersenne_int_pos w).le\n[GOAL]\np' i : ℕ\n⊢ sZMod (p' + 2) i = ↑(s i)\n[PROOFSTEP]\ninduction' i with i ih\n[GOAL]\ncase zero\np' : ℕ\n⊢ sZMod (p' + 2) zero = ↑(s zero)\n[PROOFSTEP]\ndsimp [s, sZMod]\n[GOAL]\ncase zero\np' : ℕ\n⊢ 4 = ↑4\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase succ\np' i : ℕ\nih : sZMod (p' + 2) i = ↑(s i)\n⊢ sZMod (p' + 2) (succ i) = ↑(s (succ i))\n[PROOFSTEP]\npush_cast [s, sZMod, ih]\n[GOAL]\ncase succ\np' i : ℕ\nih : sZMod (p' + 2) i = ↑(s i)\n⊢ ↑(s i) ^ 2 - 2 = ↑(s i) ^ 2 - 2\n[PROOFSTEP]\nrfl\n[GOAL]\nb p : ℕ\nw : 0 < b\n⊢ ↑(b ^ p - 1) = ↑b ^ p - 1\n[PROOFSTEP]\nhave : 1 ≤ b ^ p := Nat.one_le_pow p b w\n[GOAL]\nb p : ℕ\nw : 0 < b\nthis : 1 ≤ b ^ p\n⊢ ↑(b ^ p - 1) = ↑b ^ p - 1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np : ℕ\n⊢ 0 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\np i : ℕ\n⊢ sZMod p i = ↑(sMod p i)\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase zero\np : ℕ\n⊢ sZMod p zero = ↑(sMod p zero)\n[PROOFSTEP]\npush_cast [← Int.coe_nat_two_pow_pred p, sMod, sZMod, *]\n[GOAL]\ncase succ\np n✝ : ℕ\nn_ih✝ : sZMod p n✝ = ↑(sMod p n✝)\n⊢ sZMod p (succ n✝) = ↑(sMod p (succ n✝))\n[PROOFSTEP]\npush_cast [← Int.coe_nat_two_pow_pred p, sMod, sZMod, *]\n[GOAL]\ncase zero\np : ℕ\n⊢ 4 = 4\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\np n✝ : ℕ\nn_ih✝ : sZMod p n✝ = ↑(sMod p n✝)\n⊢ ↑(sMod p n✝) ^ 2 - 2 = ↑(sMod p n✝) ^ 2 - 2\n[PROOFSTEP]\nrfl\n[GOAL]\np : ℕ\nw : 1 < p\n⊢ lucasLehmerResidue p = 0 ↔ sMod p (p - 2) = 0\n[PROOFSTEP]\ndsimp [lucasLehmerResidue]\n[GOAL]\np : ℕ\nw : 1 < p\n⊢ sZMod p (p - 2) = 0 ↔ sMod p (p - 2) = 0\n[PROOFSTEP]\nrw [sZMod_eq_sMod p]\n[GOAL]\np : ℕ\nw : 1 < p\n⊢ ↑(sMod p (p - 2)) = 0 ↔ sMod p (p - 2) = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\np : ℕ\nw : 1 < p\n⊢ ↑(sMod p (p - 2)) = 0 → sMod p (p - 2) = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\np : ℕ\nw : 1 < p\nh : ↑(sMod p (p - 2)) = 0\n⊢ sMod p (p - 2) = 0\n[PROOFSTEP]\nsimp [ZMod.int_cast_zmod_eq_zero_iff_dvd] at h \n[GOAL]\ncase mp\np : ℕ\nw : 1 < p\nh : 2 ^ p - 1 ∣ sMod p (p - 2)\n⊢ sMod p (p - 2) = 0\n[PROOFSTEP]\napply Int.eq_zero_of_dvd_of_nonneg_of_lt _ _ h\n[GOAL]\np : ℕ\nw : 1 < p\nh : 2 ^ p - 1 ∣ sMod p (p - 2)\n⊢ 0 ≤ sMod p (p - 2)\n[PROOFSTEP]\nclear h\n[GOAL]\np : ℕ\nw : 1 < p\nh : 2 ^ p - 1 ∣ sMod p (p - 2)\n⊢ sMod p (p - 2) < 2 ^ p - 1\n[PROOFSTEP]\nclear h\n[GOAL]\np : ℕ\nw : 1 < p\n⊢ 0 ≤ sMod p (p - 2)\n[PROOFSTEP]\napply sMod_nonneg _ (Nat.lt_of_succ_lt w)\n[GOAL]\np : ℕ\nw : 1 < p\n⊢ sMod p (p - 2) < 2 ^ p - 1\n[PROOFSTEP]\nexact sMod_lt _ (Nat.lt_of_succ_lt w) (p - 2)\n[GOAL]\ncase mpr\np : ℕ\nw : 1 < p\n⊢ sMod p (p - 2) = 0 → ↑(sMod p (p - 2)) = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\np : ℕ\nw : 1 < p\nh : sMod p (p - 2) = 0\n⊢ ↑(sMod p (p - 2)) = 0\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase mpr\np : ℕ\nw : 1 < p\nh : sMod p (p - 2) = 0\n⊢ ↑0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nq : ℕ+\nx y : X q\nh₁ : x.fst = y.fst\nh₂ : x.snd = y.snd\n⊢ x = y\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nq : ℕ+\ny : X q\nfst✝ snd✝ : ZMod ↑q\nh₁ : (fst✝, snd✝).fst = y.fst\nh₂ : (fst✝, snd✝).snd = y.snd\n⊢ (fst✝, snd✝) = y\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nq : ℕ+\nfst✝¹ snd✝¹ fst✝ snd✝ : ZMod ↑q\nh₁ : (fst✝¹, snd✝¹).fst = (fst✝, snd✝).fst\nh₂ : (fst✝¹, snd✝¹).snd = (fst✝, snd✝).snd\n⊢ (fst✝¹, snd✝¹) = (fst✝, snd✝)\n[PROOFSTEP]\ncongr\n[GOAL]\nq : ℕ+\nsrc✝¹ : Mul (X q) := inferInstanceAs (Mul (X q))\nsrc✝ : One (X q) := inferInstanceAs (One (X q))\nx y z : X q\n⊢ x * y * z = x * (y * z)\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nq : ℕ+\nsrc✝¹ : Mul (X q) := inferInstanceAs (Mul (X q))\nsrc✝ : One (X q) := inferInstanceAs (One (X q))\nx y z : X q\n⊢ (x * y * z).fst = (x * (y * z)).fst\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₂\nq : ℕ+\nsrc✝¹ : Mul (X q) := inferInstanceAs (Mul (X q))\nsrc✝ : One (X q) := inferInstanceAs (One (X q))\nx y z : X q\n⊢ (x * y * z).snd = (x * (y * z)).snd\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₁\nq : ℕ+\nsrc✝¹ : Mul (X q) := inferInstanceAs (Mul (X q))\nsrc✝ : One (X q) := inferInstanceAs (One (X q))\nx y z : X q\n⊢ (x.fst * y.fst + 3 * x.snd * y.snd) * z.fst + 3 * (x.fst * y.snd + x.snd * y.fst) * z.snd =\n x.fst * (y.fst * z.fst + 3 * y.snd * z.snd) + 3 * x.snd * (y.fst * z.snd + y.snd * z.fst)\n[PROOFSTEP]\nring\n[GOAL]\ncase h₂\nq : ℕ+\nsrc✝¹ : Mul (X q) := inferInstanceAs (Mul (X q))\nsrc✝ : One (X q) := inferInstanceAs (One (X q))\nx y z : X q\n⊢ (x.fst * y.fst + 3 * x.snd * y.snd) * z.snd + (x.fst * y.snd + x.snd * y.fst) * z.fst =\n x.fst * (y.fst * z.snd + y.snd * z.fst) + x.snd * (y.fst * z.fst + 3 * y.snd * z.snd)\n[PROOFSTEP]\nring\n[GOAL]\nq : ℕ+\nsrc✝¹ : Mul (X q) := inferInstanceAs (Mul (X q))\nsrc✝ : One (X q) := inferInstanceAs (One (X q))\nx : X q\n⊢ 1 * x = x\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nq : ℕ+\nsrc✝¹ : Mul (X q) := inferInstanceAs (Mul (X q))\nsrc✝ : One (X q) := inferInstanceAs (One (X q))\nx : X q\n⊢ (1 * x).fst = x.fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nq : ℕ+\nsrc✝¹ : Mul (X q) := inferInstanceAs (Mul (X q))\nsrc✝ : One (X q) := inferInstanceAs (One (X q))\nx : X q\n⊢ (1 * x).snd = x.snd\n[PROOFSTEP]\nsimp\n[GOAL]\nq : ℕ+\nsrc✝¹ : Mul (X q) := inferInstanceAs (Mul (X q))\nsrc✝ : One (X q) := inferInstanceAs (One (X q))\nx : X q\n⊢ x * 1 = x\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nq : ℕ+\nsrc✝¹ : Mul (X q) := inferInstanceAs (Mul (X q))\nsrc✝ : One (X q) := inferInstanceAs (One (X q))\nx : X q\n⊢ (x * 1).fst = x.fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nq : ℕ+\nsrc✝¹ : Mul (X q) := inferInstanceAs (Mul (X q))\nsrc✝ : One (X q) := inferInstanceAs (One (X q))\nx : X q\n⊢ (x * 1).snd = x.snd\n[PROOFSTEP]\nsimp\n[GOAL]\nq : ℕ+\nsrc✝² : Monoid (X q) := inferInstanceAs (Monoid (X q))\nsrc✝¹ : AddCommGroup (X q) := inferInstanceAs (AddCommGroup (X q))\nsrc✝ : NatCast (X q) := inferInstanceAs (NatCast (X q))\n⊢ NatCast.natCast 0 = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nq : ℕ+\nsrc✝² : Monoid (X q) := inferInstanceAs (Monoid (X q))\nsrc✝¹ : AddCommGroup (X q) := inferInstanceAs (AddCommGroup (X q))\nsrc✝ : NatCast (X q) := inferInstanceAs (NatCast (X q))\n⊢ (NatCast.natCast 0).fst = 0.fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nq : ℕ+\nsrc✝² : Monoid (X q) := inferInstanceAs (Monoid (X q))\nsrc✝¹ : AddCommGroup (X q) := inferInstanceAs (AddCommGroup (X q))\nsrc✝ : NatCast (X q) := inferInstanceAs (NatCast (X q))\n⊢ (NatCast.natCast 0).snd = 0.snd\n[PROOFSTEP]\nsimp\n[GOAL]\nq : ℕ+\nsrc✝² : Monoid (X q) := inferInstanceAs (Monoid (X q))\nsrc✝¹ : AddCommGroup (X q) := inferInstanceAs (AddCommGroup (X q))\nsrc✝ : NatCast (X q) := inferInstanceAs (NatCast (X q))\nx✝ : ℕ\n⊢ NatCast.natCast (x✝ + 1) = NatCast.natCast x✝ + 1\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nq : ℕ+\nsrc✝² : Monoid (X q) := inferInstanceAs (Monoid (X q))\nsrc✝¹ : AddCommGroup (X q) := inferInstanceAs (AddCommGroup (X q))\nsrc✝ : NatCast (X q) := inferInstanceAs (NatCast (X q))\nx✝ : ℕ\n⊢ (NatCast.natCast (x✝ + 1)).fst = (NatCast.natCast x✝ + 1).fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nq : ℕ+\nsrc✝² : Monoid (X q) := inferInstanceAs (Monoid (X q))\nsrc✝¹ : AddCommGroup (X q) := inferInstanceAs (AddCommGroup (X q))\nsrc✝ : NatCast (X q) := inferInstanceAs (NatCast (X q))\nx✝ : ℕ\n⊢ (NatCast.natCast (x✝ + 1)).snd = (NatCast.natCast x✝ + 1).snd\n[PROOFSTEP]\nsimp\n[GOAL]\nq : ℕ+\nsrc✝² : Monoid (X q) := inferInstanceAs (Monoid (X q))\nsrc✝¹ : AddCommGroup (X q) := inferInstanceAs (AddCommGroup (X q))\nsrc✝ : NatCast (X q) := inferInstanceAs (NatCast (X q))\nn : ℕ\n⊢ IntCast.intCast ↑n = ↑n\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nq : ℕ+\nsrc✝² : Monoid (X q) := inferInstanceAs (Monoid (X q))\nsrc✝¹ : AddCommGroup (X q) := inferInstanceAs (AddCommGroup (X q))\nsrc✝ : NatCast (X q) := inferInstanceAs (NatCast (X q))\nn : ℕ\n⊢ (IntCast.intCast ↑n).fst = (↑n).fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nq : ℕ+\nsrc✝² : Monoid (X q) := inferInstanceAs (Monoid (X q))\nsrc✝¹ : AddCommGroup (X q) := inferInstanceAs (AddCommGroup (X q))\nsrc✝ : NatCast (X q) := inferInstanceAs (NatCast (X q))\nn : ℕ\n⊢ (IntCast.intCast ↑n).snd = (↑n).snd\n[PROOFSTEP]\nsimp\n[GOAL]\nq : ℕ+\nsrc✝² : Monoid (X q) := inferInstanceAs (Monoid (X q))\nsrc✝¹ : AddCommGroup (X q) := inferInstanceAs (AddCommGroup (X q))\nsrc✝ : NatCast (X q) := inferInstanceAs (NatCast (X q))\nn : ℕ\n⊢ IntCast.intCast (Int.negSucc n) = -↑(n + 1)\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nq : ℕ+\nsrc✝² : Monoid (X q) := inferInstanceAs (Monoid (X q))\nsrc✝¹ : AddCommGroup (X q) := inferInstanceAs (AddCommGroup (X q))\nsrc✝ : NatCast (X q) := inferInstanceAs (NatCast (X q))\nn : ℕ\n⊢ (IntCast.intCast (Int.negSucc n)).fst = (-↑(n + 1)).fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nq : ℕ+\nsrc✝² : Monoid (X q) := inferInstanceAs (Monoid (X q))\nsrc✝¹ : AddCommGroup (X q) := inferInstanceAs (AddCommGroup (X q))\nsrc✝ : NatCast (X q) := inferInstanceAs (NatCast (X q))\nn : ℕ\n⊢ (IntCast.intCast (Int.negSucc n)).snd = (-↑(n + 1)).snd\n[PROOFSTEP]\nsimp\n[GOAL]\nq : ℕ+\nx y z : X q\n⊢ x * (y + z) = x * y + x * z\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nq : ℕ+\nx y z : X q\n⊢ (x * (y + z)).fst = (x * y + x * z).fst\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₂\nq : ℕ+\nx y z : X q\n⊢ (x * (y + z)).snd = (x * y + x * z).snd\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₁\nq : ℕ+\nx y z : X q\n⊢ x.fst * (y.fst + z.fst) + 3 * x.snd * (y.snd + z.snd) =\n x.fst * y.fst + 3 * x.snd * y.snd + (x.fst * z.fst + 3 * x.snd * z.snd)\n[PROOFSTEP]\nring\n[GOAL]\ncase h₂\nq : ℕ+\nx y z : X q\n⊢ x.fst * (y.snd + z.snd) + x.snd * (y.fst + z.fst) = x.fst * y.snd + x.snd * y.fst + (x.fst * z.snd + x.snd * z.fst)\n[PROOFSTEP]\nring\n[GOAL]\nq : ℕ+\nx y z : X q\n⊢ (x + y) * z = x * z + y * z\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nq : ℕ+\nx y z : X q\n⊢ ((x + y) * z).fst = (x * z + y * z).fst\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₂\nq : ℕ+\nx y z : X q\n⊢ ((x + y) * z).snd = (x * z + y * z).snd\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₁\nq : ℕ+\nx y z : X q\n⊢ (x.fst + y.fst) * z.fst + 3 * (x.snd + y.snd) * z.snd =\n x.fst * z.fst + 3 * x.snd * z.snd + (y.fst * z.fst + 3 * y.snd * z.snd)\n[PROOFSTEP]\nring\n[GOAL]\ncase h₂\nq : ℕ+\nx y z : X q\n⊢ (x.fst + y.fst) * z.snd + (x.snd + y.snd) * z.fst = x.fst * z.snd + x.snd * z.fst + (y.fst * z.snd + y.snd * z.fst)\n[PROOFSTEP]\nring\n[GOAL]\nq : ℕ+\nsrc✝² : AddGroupWithOne (X q) := inferInstanceAs (AddGroupWithOne (X q))\nsrc✝¹ : AddCommGroup (X q) := inferInstanceAs (AddCommGroup (X q))\nsrc✝ : Monoid (X q) := inferInstanceAs (Monoid (X q))\nx✝ : X q\n⊢ 0 * x✝ = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nq : ℕ+\nsrc✝² : AddGroupWithOne (X q) := inferInstanceAs (AddGroupWithOne (X q))\nsrc✝¹ : AddCommGroup (X q) := inferInstanceAs (AddCommGroup (X q))\nsrc✝ : Monoid (X q) := inferInstanceAs (Monoid (X q))\nx✝ : X q\n⊢ (0 * x✝).fst = 0.fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nq : ℕ+\nsrc✝² : AddGroupWithOne (X q) := inferInstanceAs (AddGroupWithOne (X q))\nsrc✝¹ : AddCommGroup (X q) := inferInstanceAs (AddCommGroup (X q))\nsrc✝ : Monoid (X q) := inferInstanceAs (Monoid (X q))\nx✝ : X q\n⊢ (0 * x✝).snd = 0.snd\n[PROOFSTEP]\nsimp\n[GOAL]\nq : ℕ+\nsrc✝² : AddGroupWithOne (X q) := inferInstanceAs (AddGroupWithOne (X q))\nsrc✝¹ : AddCommGroup (X q) := inferInstanceAs (AddCommGroup (X q))\nsrc✝ : Monoid (X q) := inferInstanceAs (Monoid (X q))\nx✝ : X q\n⊢ x✝ * 0 = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nq : ℕ+\nsrc✝² : AddGroupWithOne (X q) := inferInstanceAs (AddGroupWithOne (X q))\nsrc✝¹ : AddCommGroup (X q) := inferInstanceAs (AddCommGroup (X q))\nsrc✝ : Monoid (X q) := inferInstanceAs (Monoid (X q))\nx✝ : X q\n⊢ (x✝ * 0).fst = 0.fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nq : ℕ+\nsrc✝² : AddGroupWithOne (X q) := inferInstanceAs (AddGroupWithOne (X q))\nsrc✝¹ : AddCommGroup (X q) := inferInstanceAs (AddCommGroup (X q))\nsrc✝ : Monoid (X q) := inferInstanceAs (Monoid (X q))\nx✝ : X q\n⊢ (x✝ * 0).snd = 0.snd\n[PROOFSTEP]\nsimp\n[GOAL]\nq : ℕ+\nsrc✝ : Ring (X q) := inferInstanceAs (Ring (X q))\nx✝¹ x✝ : X q\n⊢ x✝¹ * x✝ = x✝ * x✝¹\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nq : ℕ+\nsrc✝ : Ring (X q) := inferInstanceAs (Ring (X q))\nx✝¹ x✝ : X q\n⊢ (x✝¹ * x✝).fst = (x✝ * x✝¹).fst\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₂\nq : ℕ+\nsrc✝ : Ring (X q) := inferInstanceAs (Ring (X q))\nx✝¹ x✝ : X q\n⊢ (x✝¹ * x✝).snd = (x✝ * x✝¹).snd\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₁\nq : ℕ+\nsrc✝ : Ring (X q) := inferInstanceAs (Ring (X q))\nx✝¹ x✝ : X q\n⊢ x✝¹.fst * x✝.fst + 3 * x✝¹.snd * x✝.snd = x✝.fst * x✝¹.fst + 3 * x✝.snd * x✝¹.snd\n[PROOFSTEP]\nring\n[GOAL]\ncase h₂\nq : ℕ+\nsrc✝ : Ring (X q) := inferInstanceAs (Ring (X q))\nx✝¹ x✝ : X q\n⊢ x✝¹.fst * x✝.snd + x✝¹.snd * x✝.fst = x✝.fst * x✝¹.snd + x✝.snd * x✝¹.fst\n[PROOFSTEP]\nring\n[GOAL]\nq : ℕ+\nn m : ℤ\n⊢ ↑(n * m) = ↑n * ↑m\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nq : ℕ+\nn m : ℤ\n⊢ (↑(n * m)).fst = (↑n * ↑m).fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nq : ℕ+\nn m : ℤ\n⊢ (↑(n * m)).snd = (↑n * ↑m).snd\n[PROOFSTEP]\nsimp\n[GOAL]\nq : ℕ+\nn : ℕ\n⊢ ↑↑n = ↑n\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nq : ℕ+\nn : ℕ\n⊢ (↑↑n).fst = (↑n).fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nq : ℕ+\nn : ℕ\n⊢ (↑↑n).snd = (↑n).snd\n[PROOFSTEP]\nsimp\n[GOAL]\nq : ℕ+\n⊢ Fintype.card (X q) = ↑q ^ 2\n[PROOFSTEP]\ndsimp [X]\n[GOAL]\nq : ℕ+\n⊢ Fintype.card (ZMod ↑q × ZMod ↑q) = ↑q ^ 2\n[PROOFSTEP]\nrw [Fintype.card_prod, ZMod.card q, sq]\n[GOAL]\nq : ℕ+\nw : 1 < q\n⊢ Fintype.card (X q)ˣ < ↑q ^ 2\n[PROOFSTEP]\nhave : Fact (1 < (q : ℕ)) := ⟨w⟩\n[GOAL]\nq : ℕ+\nw : 1 < q\nthis : Fact (1 < ↑q)\n⊢ Fintype.card (X q)ˣ < ↑q ^ 2\n[PROOFSTEP]\nconvert card_units_lt (X q)\n[GOAL]\ncase h.e'_4\nq : ℕ+\nw : 1 < q\nthis : Fact (1 < ↑q)\n⊢ ↑q ^ 2 = Fintype.card (X q)\n[PROOFSTEP]\nrw [card_eq]\n[GOAL]\nq✝ q : ℕ+\n⊢ ω * ωb = 1\n[PROOFSTEP]\ndsimp [ω, ωb]\n[GOAL]\nq✝ q : ℕ+\n⊢ (2, 1) * (2, -1) = 1\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nq✝ q : ℕ+\n⊢ ((2, 1) * (2, -1)).fst = 1.fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nq✝ q : ℕ+\n⊢ ((2, 1) * (2, -1)).snd = 1.snd\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₁\nq✝ q : ℕ+\n⊢ 2 * 2 + -3 = 1\n[PROOFSTEP]\nring\n[GOAL]\nq✝ q : ℕ+\n⊢ ωb * ω = 1\n[PROOFSTEP]\nrw [mul_comm, ω_mul_ωb]\n[GOAL]\nq : ℕ+\ni : ℕ\n⊢ ↑(s i) = ω ^ 2 ^ i + ωb ^ 2 ^ i\n[PROOFSTEP]\ninduction' i with i ih\n[GOAL]\ncase zero\nq : ℕ+\n⊢ ↑(s zero) = ω ^ 2 ^ zero + ωb ^ 2 ^ zero\n[PROOFSTEP]\ndsimp [s, ω, ωb]\n[GOAL]\ncase zero\nq : ℕ+\n⊢ ↑4 = (2, 1) ^ 1 + (2, -1) ^ 1\n[PROOFSTEP]\next\n[GOAL]\ncase zero.h₁\nq : ℕ+\n⊢ (↑4).fst = ((2, 1) ^ 1 + (2, -1) ^ 1).fst\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase zero.h₂\nq : ℕ+\n⊢ (↑4).snd = ((2, 1) ^ 1 + (2, -1) ^ 1).snd\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase succ\nq : ℕ+\ni : ℕ\nih : ↑(s i) = ω ^ 2 ^ i + ωb ^ 2 ^ i\n⊢ ↑(s (succ i)) = ω ^ 2 ^ succ i + ωb ^ 2 ^ succ i\n[PROOFSTEP]\ncalc\n (s (i + 1) : X q) = (s i ^ 2 - 2 : ℤ) := rfl\n _ = (s i : X q) ^ 2 - 2 := by push_cast ; rfl\n _ = (ω ^ 2 ^ i + ωb ^ 2 ^ i) ^ 2 - 2 := by rw [ih]\n _ = (ω ^ 2 ^ i) ^ 2 + (ωb ^ 2 ^ i) ^ 2 + 2 * (ωb ^ 2 ^ i * ω ^ 2 ^ i) - 2 := by ring\n _ = (ω ^ 2 ^ i) ^ 2 + (ωb ^ 2 ^ i) ^ 2 := by rw [← mul_pow ωb ω, ωb_mul_ω, one_pow, mul_one, add_sub_cancel]\n _ = ω ^ 2 ^ (i + 1) + ωb ^ 2 ^ (i + 1) := by rw [← pow_mul, ← pow_mul, _root_.pow_succ']\n[GOAL]\nq : ℕ+\ni : ℕ\nih : ↑(s i) = ω ^ 2 ^ i + ωb ^ 2 ^ i\n⊢ ↑(s i ^ 2 - 2) = ↑(s i) ^ 2 - 2\n[PROOFSTEP]\npush_cast\n[GOAL]\nq : ℕ+\ni : ℕ\nih : ↑(s i) = ω ^ 2 ^ i + ωb ^ 2 ^ i\n⊢ ↑(s i) ^ 2 - 2 = ↑(s i) ^ 2 - 2\n[PROOFSTEP]\nrfl\n[GOAL]\nq : ℕ+\ni : ℕ\nih : ↑(s i) = ω ^ 2 ^ i + ωb ^ 2 ^ i\n⊢ ↑(s i) ^ 2 - 2 = (ω ^ 2 ^ i + ωb ^ 2 ^ i) ^ 2 - 2\n[PROOFSTEP]\nrw [ih]\n[GOAL]\nq : ℕ+\ni : ℕ\nih : ↑(s i) = ω ^ 2 ^ i + ωb ^ 2 ^ i\n⊢ (ω ^ 2 ^ i + ωb ^ 2 ^ i) ^ 2 - 2 = (ω ^ 2 ^ i) ^ 2 + (ωb ^ 2 ^ i) ^ 2 + 2 * (ωb ^ 2 ^ i * ω ^ 2 ^ i) - 2\n[PROOFSTEP]\nring\n[GOAL]\nq : ℕ+\ni : ℕ\nih : ↑(s i) = ω ^ 2 ^ i + ωb ^ 2 ^ i\n⊢ (ω ^ 2 ^ i) ^ 2 + (ωb ^ 2 ^ i) ^ 2 + 2 * (ωb ^ 2 ^ i * ω ^ 2 ^ i) - 2 = (ω ^ 2 ^ i) ^ 2 + (ωb ^ 2 ^ i) ^ 2\n[PROOFSTEP]\nrw [← mul_pow ωb ω, ωb_mul_ω, one_pow, mul_one, add_sub_cancel]\n[GOAL]\nq : ℕ+\ni : ℕ\nih : ↑(s i) = ω ^ 2 ^ i + ωb ^ 2 ^ i\n⊢ (ω ^ 2 ^ i) ^ 2 + (ωb ^ 2 ^ i) ^ 2 = ω ^ 2 ^ (i + 1) + ωb ^ 2 ^ (i + 1)\n[PROOFSTEP]\nrw [← pow_mul, ← pow_mul, _root_.pow_succ']\n[GOAL]\np' : ℕ\n⊢ 2 < q (p' + 2)\n[PROOFSTEP]\nrefine (minFac_prime (one_lt_mersenne ?_).ne').two_le.lt_of_ne' ?_\n[GOAL]\ncase refine_1\np' : ℕ\n⊢ 1 < p' + 2\n[PROOFSTEP]\nexact le_add_left _ _\n[GOAL]\ncase refine_2\np' : ℕ\n⊢ minFac (mersenne (p' + 2)) ≠ 2\n[PROOFSTEP]\nrw [Ne.def, minFac_eq_two_iff, mersenne, Nat.pow_succ']\n[GOAL]\ncase refine_2\np' : ℕ\n⊢ ¬2 ∣ 2 * 2 ^ (p' + 1) - 1\n[PROOFSTEP]\nexact Nat.two_not_dvd_two_mul_sub_one (Nat.one_le_two_pow _)\n[GOAL]\np' : ℕ\nh : lucasLehmerResidue (p' + 2) = 0\n⊢ ∃ k, ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * ω ^ 2 ^ p' - 1\n[PROOFSTEP]\ndsimp [lucasLehmerResidue] at h \n[GOAL]\np' : ℕ\nh : sZMod (p' + 2) (p' + 2 - 2) = 0\n⊢ ∃ k, ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * ω ^ 2 ^ p' - 1\n[PROOFSTEP]\nrw [sZMod_eq_s p'] at h \n[GOAL]\np' : ℕ\nh : ↑(s (p' + 2 - 2)) = 0\n⊢ ∃ k, ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * ω ^ 2 ^ p' - 1\n[PROOFSTEP]\nsimp [ZMod.int_cast_zmod_eq_zero_iff_dvd] at h \n[GOAL]\np' : ℕ\nh : 2 ^ (p' + 2) - 1 ∣ s p'\n⊢ ∃ k, ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * ω ^ 2 ^ p' - 1\n[PROOFSTEP]\ncases' h with k h\n[GOAL]\ncase intro\np' : ℕ\nk : ℤ\nh : s p' = (2 ^ (p' + 2) - 1) * k\n⊢ ∃ k, ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * ω ^ 2 ^ p' - 1\n[PROOFSTEP]\nuse k\n[GOAL]\ncase h\np' : ℕ\nk : ℤ\nh : s p' = (2 ^ (p' + 2) - 1) * k\n⊢ ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * ω ^ 2 ^ p' - 1\n[PROOFSTEP]\nreplace h := congr_arg (fun n : ℤ => (n : X (q (p' + 2)))) h\n[GOAL]\ncase h\np' : ℕ\nk : ℤ\nh : (fun n => ↑n) (s p') = (fun n => ↑n) ((2 ^ (p' + 2) - 1) * k)\n⊢ ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * ω ^ 2 ^ p' - 1\n[PROOFSTEP]\ndsimp at h \n[GOAL]\ncase h\np' : ℕ\nk : ℤ\nh : ↑(s p') = ↑((2 ^ (p' + 2) - 1) * k)\n⊢ ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * ω ^ 2 ^ p' - 1\n[PROOFSTEP]\nrw [closed_form] at h \n[GOAL]\ncase h\np' : ℕ\nk : ℤ\nh : ω ^ 2 ^ p' + ωb ^ 2 ^ p' = ↑((2 ^ (p' + 2) - 1) * k)\n⊢ ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * ω ^ 2 ^ p' - 1\n[PROOFSTEP]\nreplace h := congr_arg (fun x => ω ^ 2 ^ p' * x) h\n[GOAL]\ncase h\np' : ℕ\nk : ℤ\nh : (fun x => ω ^ 2 ^ p' * x) (ω ^ 2 ^ p' + ωb ^ 2 ^ p') = (fun x => ω ^ 2 ^ p' * x) ↑((2 ^ (p' + 2) - 1) * k)\n⊢ ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * ω ^ 2 ^ p' - 1\n[PROOFSTEP]\ndsimp at h \n[GOAL]\ncase h\np' : ℕ\nk : ℤ\nh : ω ^ 2 ^ p' * (ω ^ 2 ^ p' + ωb ^ 2 ^ p') = ω ^ 2 ^ p' * ↑((2 ^ (p' + 2) - 1) * k)\n⊢ ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * ω ^ 2 ^ p' - 1\n[PROOFSTEP]\nhave t : 2 ^ p' + 2 ^ p' = 2 ^ (p' + 1) := by ring\n[GOAL]\np' : ℕ\nk : ℤ\nh : ω ^ 2 ^ p' * (ω ^ 2 ^ p' + ωb ^ 2 ^ p') = ω ^ 2 ^ p' * ↑((2 ^ (p' + 2) - 1) * k)\n⊢ 2 ^ p' + 2 ^ p' = 2 ^ (p' + 1)\n[PROOFSTEP]\nring\n[GOAL]\ncase h\np' : ℕ\nk : ℤ\nh : ω ^ 2 ^ p' * (ω ^ 2 ^ p' + ωb ^ 2 ^ p') = ω ^ 2 ^ p' * ↑((2 ^ (p' + 2) - 1) * k)\nt : 2 ^ p' + 2 ^ p' = 2 ^ (p' + 1)\n⊢ ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * ω ^ 2 ^ p' - 1\n[PROOFSTEP]\nrw [mul_add, ← pow_add ω, t, ← mul_pow ω ωb (2 ^ p'), ω_mul_ωb, one_pow] at h \n[GOAL]\ncase h\np' : ℕ\nk : ℤ\nh : ω ^ 2 ^ (p' + 1) + 1 = ω ^ 2 ^ p' * ↑((2 ^ (p' + 2) - 1) * k)\nt : 2 ^ p' + 2 ^ p' = 2 ^ (p' + 1)\n⊢ ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * ω ^ 2 ^ p' - 1\n[PROOFSTEP]\nrw [mul_comm, coe_mul] at h \n[GOAL]\ncase h\np' : ℕ\nk : ℤ\nh : ω ^ 2 ^ (p' + 1) + 1 = ↑(2 ^ (p' + 2) - 1) * ↑k * ω ^ 2 ^ p'\nt : 2 ^ p' + 2 ^ p' = 2 ^ (p' + 1)\n⊢ ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * ω ^ 2 ^ p' - 1\n[PROOFSTEP]\nrw [mul_comm _ (k : X (q (p' + 2)))] at h \n[GOAL]\ncase h\np' : ℕ\nk : ℤ\nh : ω ^ 2 ^ (p' + 1) + 1 = ↑k * ↑(2 ^ (p' + 2) - 1) * ω ^ 2 ^ p'\nt : 2 ^ p' + 2 ^ p' = 2 ^ (p' + 1)\n⊢ ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * ω ^ 2 ^ p' - 1\n[PROOFSTEP]\nreplace h := eq_sub_of_add_eq h\n[GOAL]\ncase h\np' : ℕ\nk : ℤ\nt : 2 ^ p' + 2 ^ p' = 2 ^ (p' + 1)\nh : ω ^ 2 ^ (p' + 1) = ↑k * ↑(2 ^ (p' + 2) - 1) * ω ^ 2 ^ p' - 1\n⊢ ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * ω ^ 2 ^ p' - 1\n[PROOFSTEP]\nhave : 1 ≤ 2 ^ (p' + 2) := Nat.one_le_pow _ _ (by decide)\n[GOAL]\np' : ℕ\nk : ℤ\nt : 2 ^ p' + 2 ^ p' = 2 ^ (p' + 1)\nh : ω ^ 2 ^ (p' + 1) = ↑k * ↑(2 ^ (p' + 2) - 1) * ω ^ 2 ^ p' - 1\n⊢ 0 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\ncase h\np' : ℕ\nk : ℤ\nt : 2 ^ p' + 2 ^ p' = 2 ^ (p' + 1)\nh : ω ^ 2 ^ (p' + 1) = ↑k * ↑(2 ^ (p' + 2) - 1) * ω ^ 2 ^ p' - 1\nthis : 1 ≤ 2 ^ (p' + 2)\n⊢ ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * ω ^ 2 ^ p' - 1\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\np : ℕ\n⊢ ↑(mersenne p) = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\np : ℕ\n⊢ (↑(mersenne p)).fst = 0.fst\n[PROOFSTEP]\nsimp [mersenne, q, ZMod.nat_cast_zmod_eq_zero_iff_dvd, -pow_pos]\n[GOAL]\ncase h₂\np : ℕ\n⊢ (↑(mersenne p)).snd = 0.snd\n[PROOFSTEP]\nsimp [mersenne, q, ZMod.nat_cast_zmod_eq_zero_iff_dvd, -pow_pos]\n[GOAL]\ncase h₁\np : ℕ\n⊢ minFac (2 ^ p - 1) ∣ 2 ^ p - 1\n[PROOFSTEP]\napply Nat.minFac_dvd\n[GOAL]\np' : ℕ\nh : lucasLehmerResidue (p' + 2) = 0\n⊢ ω ^ 2 ^ (p' + 1) = -1\n[PROOFSTEP]\ncases' ω_pow_formula p' h with k w\n[GOAL]\ncase intro\np' : ℕ\nh : lucasLehmerResidue (p' + 2) = 0\nk : ℤ\nw : ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * ω ^ 2 ^ p' - 1\n⊢ ω ^ 2 ^ (p' + 1) = -1\n[PROOFSTEP]\nrw [mersenne_coe_X] at w \n[GOAL]\ncase intro\np' : ℕ\nh : lucasLehmerResidue (p' + 2) = 0\nk : ℤ\nw : ω ^ 2 ^ (p' + 1) = ↑k * 0 * ω ^ 2 ^ p' - 1\n⊢ ω ^ 2 ^ (p' + 1) = -1\n[PROOFSTEP]\nsimpa using w\n[GOAL]\np' : ℕ\nh : lucasLehmerResidue (p' + 2) = 0\n⊢ ω ^ 2 ^ (p' + 2) = (ω ^ 2 ^ (p' + 1)) ^ 2\n[PROOFSTEP]\nrw [← pow_mul, ← Nat.pow_succ]\n[GOAL]\np' : ℕ\nh : lucasLehmerResidue (p' + 2) = 0\n⊢ (ω ^ 2 ^ (p' + 1)) ^ 2 = (-1) ^ 2\n[PROOFSTEP]\nrw [ω_pow_eq_neg_one p' h]\n[GOAL]\np' : ℕ\nh : lucasLehmerResidue (p' + 2) = 0\n⊢ (-1) ^ 2 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\np' : ℕ\nh : lucasLehmerResidue (p' + 2) = 0\n⊢ orderOf (ωUnit (p' + 2)) = 2 ^ (p' + 2)\n[PROOFSTEP]\napply Nat.eq_prime_pow_of_dvd_least_prime_pow\n[GOAL]\ncase pp\np' : ℕ\nh : lucasLehmerResidue (p' + 2) = 0\n⊢ Nat.Prime 2\n[PROOFSTEP]\nexact Nat.prime_two\n[GOAL]\ncase h₁\np' : ℕ\nh : lucasLehmerResidue (p' + 2) = 0\n⊢ ¬orderOf (ωUnit (p' + 2)) ∣ 2 ^ (p' + 1)\n[PROOFSTEP]\nintro o\n[GOAL]\ncase h₁\np' : ℕ\nh : lucasLehmerResidue (p' + 2) = 0\no : orderOf (ωUnit (p' + 2)) ∣ 2 ^ (p' + 1)\n⊢ False\n[PROOFSTEP]\nhave ω_pow := orderOf_dvd_iff_pow_eq_one.1 o\n[GOAL]\ncase h₁\np' : ℕ\nh : lucasLehmerResidue (p' + 2) = 0\no : orderOf (ωUnit (p' + 2)) ∣ 2 ^ (p' + 1)\nω_pow : ωUnit (p' + 2) ^ 2 ^ (p' + 1) = 1\n⊢ False\n[PROOFSTEP]\nreplace ω_pow := congr_arg (Units.coeHom (X (q (p' + 2))) : Units (X (q (p' + 2))) → X (q (p' + 2))) ω_pow\n[GOAL]\ncase h₁\np' : ℕ\nh : lucasLehmerResidue (p' + 2) = 0\no : orderOf (ωUnit (p' + 2)) ∣ 2 ^ (p' + 1)\nω_pow : ↑(Units.coeHom (X (q (p' + 2)))) (ωUnit (p' + 2) ^ 2 ^ (p' + 1)) = ↑(Units.coeHom (X (q (p' + 2)))) 1\n⊢ False\n[PROOFSTEP]\nsimp at ω_pow \n[GOAL]\ncase h₁\np' : ℕ\nh : lucasLehmerResidue (p' + 2) = 0\no : orderOf (ωUnit (p' + 2)) ∣ 2 ^ (p' + 1)\nω_pow : ω ^ 2 ^ (p' + 1) = 1\n⊢ False\n[PROOFSTEP]\nhave h : (1 : ZMod (q (p' + 2))) = -1 := congr_arg Prod.fst (ω_pow.symm.trans (ω_pow_eq_neg_one p' h))\n[GOAL]\ncase h₁\np' : ℕ\nh✝ : lucasLehmerResidue (p' + 2) = 0\no : orderOf (ωUnit (p' + 2)) ∣ 2 ^ (p' + 1)\nω_pow : ω ^ 2 ^ (p' + 1) = 1\nh : 1 = -1\n⊢ False\n[PROOFSTEP]\nhaveI : Fact (2 < (q (p' + 2) : ℕ)) := ⟨two_lt_q _⟩\n[GOAL]\ncase h₁\np' : ℕ\nh✝ : lucasLehmerResidue (p' + 2) = 0\no : orderOf (ωUnit (p' + 2)) ∣ 2 ^ (p' + 1)\nω_pow : ω ^ 2 ^ (p' + 1) = 1\nh : 1 = -1\nthis : Fact (2 < ↑(q (p' + 2)))\n⊢ False\n[PROOFSTEP]\napply ZMod.neg_one_ne_one h.symm\n[GOAL]\ncase h₂\np' : ℕ\nh : lucasLehmerResidue (p' + 2) = 0\n⊢ orderOf (ωUnit (p' + 2)) ∣ 2 ^ (p' + 1 + 1)\n[PROOFSTEP]\napply orderOf_dvd_iff_pow_eq_one.2\n[GOAL]\ncase h₂\np' : ℕ\nh : lucasLehmerResidue (p' + 2) = 0\n⊢ ωUnit (p' + 2) ^ 2 ^ (p' + 1 + 1) = 1\n[PROOFSTEP]\napply Units.ext\n[GOAL]\ncase h₂.a\np' : ℕ\nh : lucasLehmerResidue (p' + 2) = 0\n⊢ ↑(ωUnit (p' + 2) ^ 2 ^ (p' + 1 + 1)) = ↑1\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h₂.a\np' : ℕ\nh : lucasLehmerResidue (p' + 2) = 0\n⊢ ↑(ωUnit (p' + 2)) ^ 2 ^ (p' + 1 + 1) = 1\n[PROOFSTEP]\nexact ω_pow_eq_one p' h\n[GOAL]\np : ℕ\nw : 1 < p\n⊢ LucasLehmerTest p → Nat.Prime (mersenne p)\n[PROOFSTEP]\nlet p' := p - 2\n[GOAL]\np : ℕ\nw : 1 < p\np' : ℕ := p - 2\n⊢ LucasLehmerTest p → Nat.Prime (mersenne p)\n[PROOFSTEP]\nhave z : p = p' + 2 := (tsub_eq_iff_eq_add_of_le w.nat_succ_le).mp rfl\n[GOAL]\np : ℕ\nw : 1 < p\np' : ℕ := p - 2\nz : p = p' + 2\n⊢ LucasLehmerTest p → Nat.Prime (mersenne p)\n[PROOFSTEP]\nhave w : 1 < p' + 2 := Nat.lt_of_sub_eq_succ rfl\n[GOAL]\np : ℕ\nw✝ : 1 < p\np' : ℕ := p - 2\nz : p = p' + 2\nw : 1 < p' + 2\n⊢ LucasLehmerTest p → Nat.Prime (mersenne p)\n[PROOFSTEP]\ncontrapose\n[GOAL]\np : ℕ\nw✝ : 1 < p\np' : ℕ := p - 2\nz : p = p' + 2\nw : 1 < p' + 2\n⊢ ¬Nat.Prime (mersenne p) → ¬LucasLehmerTest p\n[PROOFSTEP]\nintro a t\n[GOAL]\np : ℕ\nw✝ : 1 < p\np' : ℕ := p - 2\nz : p = p' + 2\nw : 1 < p' + 2\na : ¬Nat.Prime (mersenne p)\nt : LucasLehmerTest p\n⊢ False\n[PROOFSTEP]\nrw [z] at a \n[GOAL]\np : ℕ\nw✝ : 1 < p\np' : ℕ := p - 2\nz : p = p' + 2\nw : 1 < p' + 2\na : ¬Nat.Prime (mersenne (p' + 2))\nt : LucasLehmerTest p\n⊢ False\n[PROOFSTEP]\nrw [z] at t \n[GOAL]\np : ℕ\nw✝ : 1 < p\np' : ℕ := p - 2\nz : p = p' + 2\nw : 1 < p' + 2\na : ¬Nat.Prime (mersenne (p' + 2))\nt : LucasLehmerTest (p' + 2)\n⊢ False\n[PROOFSTEP]\nhave h₁ := order_ineq p' t\n[GOAL]\np : ℕ\nw✝ : 1 < p\np' : ℕ := p - 2\nz : p = p' + 2\nw : 1 < p' + 2\na : ¬Nat.Prime (mersenne (p' + 2))\nt : LucasLehmerTest (p' + 2)\nh₁ : 2 ^ (p' + 2) < ↑(q (p' + 2)) ^ 2\n⊢ False\n[PROOFSTEP]\nhave h₂ := Nat.minFac_sq_le_self (mersenne_pos (Nat.lt_of_succ_lt w)) a\n[GOAL]\np : ℕ\nw✝ : 1 < p\np' : ℕ := p - 2\nz : p = p' + 2\nw : 1 < p' + 2\na : ¬Nat.Prime (mersenne (p' + 2))\nt : LucasLehmerTest (p' + 2)\nh₁ : 2 ^ (p' + 2) < ↑(q (p' + 2)) ^ 2\nh₂ : Nat.minFac (mersenne (p' + 2)) ^ 2 ≤ mersenne (p' + 2)\n⊢ False\n[PROOFSTEP]\nhave h := lt_of_lt_of_le h₁ h₂\n[GOAL]\np : ℕ\nw✝ : 1 < p\np' : ℕ := p - 2\nz : p = p' + 2\nw : 1 < p' + 2\na : ¬Nat.Prime (mersenne (p' + 2))\nt : LucasLehmerTest (p' + 2)\nh₁ : 2 ^ (p' + 2) < ↑(q (p' + 2)) ^ 2\nh₂ : Nat.minFac (mersenne (p' + 2)) ^ 2 ≤ mersenne (p' + 2)\nh : 2 ^ (p' + 2) < mersenne (p' + 2)\n⊢ False\n[PROOFSTEP]\nexact not_lt_of_ge (Nat.sub_le _ _) h\n[GOAL]\np k : ℕ\nhp : 2 ≤ p\n⊢ ↑(sMod' (2 ^ p - 1) k) = sMod p k\n[PROOFSTEP]\nhave h1 :=\n calc\n 4 = 2 ^ 2 := by norm_num\n _ ≤ 2 ^ p := Nat.pow_le_pow_of_le_right (by norm_num) hp\n[GOAL]\np k : ℕ\nhp : 2 ≤ p\n⊢ 4 = 2 ^ 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\np k : ℕ\nhp : 2 ≤ p\n⊢ 2 > 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\np k : ℕ\nhp : 2 ≤ p\nh1 : 4 ≤ 2 ^ p\n⊢ ↑(sMod' (2 ^ p - 1) k) = sMod p k\n[PROOFSTEP]\nhave h2 : 1 ≤ 2 ^ p := by linarith\n[GOAL]\np k : ℕ\nhp : 2 ≤ p\nh1 : 4 ≤ 2 ^ p\n⊢ 1 ≤ 2 ^ p\n[PROOFSTEP]\nlinarith\n[GOAL]\np k : ℕ\nhp : 2 ≤ p\nh1 : 4 ≤ 2 ^ p\nh2 : 1 ≤ 2 ^ p\n⊢ ↑(sMod' (2 ^ p - 1) k) = sMod p k\n[PROOFSTEP]\ninduction k with\n| zero =>\n rw [sMod', sMod, Int.ofNat_emod]\n simp [h2]\n| succ k ih =>\n rw [sMod', sMod, ← ih]\n have h3 : 2 ≤ 2 ^ p - 1 := by\n zify [h2]\n calc\n (2 : Int) ≤ 4 - 1 := by norm_num\n _ ≤ 2 ^ p - 1 := by zify at h1 ; exact Int.sub_le_sub_right h1 _\n zify [h2, h3]\n rw [← add_sub_assoc, sub_eq_add_neg, add_assoc, add_comm _ (-2), ← add_assoc, Int.add_emod_self, ← sub_eq_add_neg]\n[GOAL]\np k : ℕ\nhp : 2 ≤ p\nh1 : 4 ≤ 2 ^ p\nh2 : 1 ≤ 2 ^ p\n⊢ ↑(sMod' (2 ^ p - 1) k) = sMod p k\n[PROOFSTEP]\ninduction k with\n| zero =>\n rw [sMod', sMod, Int.ofNat_emod]\n simp [h2]\n| succ k ih =>\n rw [sMod', sMod, ← ih]\n have h3 : 2 ≤ 2 ^ p - 1 := by\n zify [h2]\n calc\n (2 : Int) ≤ 4 - 1 := by norm_num\n _ ≤ 2 ^ p - 1 := by zify at h1 ; exact Int.sub_le_sub_right h1 _\n zify [h2, h3]\n rw [← add_sub_assoc, sub_eq_add_neg, add_assoc, add_comm _ (-2), ← add_assoc, Int.add_emod_self, ← sub_eq_add_neg]\n[GOAL]\ncase zero\np : ℕ\nhp : 2 ≤ p\nh1 : 4 ≤ 2 ^ p\nh2 : 1 ≤ 2 ^ p\n⊢ ↑(sMod' (2 ^ p - 1) Nat.zero) = sMod p Nat.zero\n[PROOFSTEP]\n\n| zero =>\n rw [sMod', sMod, Int.ofNat_emod]\n simp [h2]\n[GOAL]\ncase zero\np : ℕ\nhp : 2 ≤ p\nh1 : 4 ≤ 2 ^ p\nh2 : 1 ≤ 2 ^ p\n⊢ ↑(sMod' (2 ^ p - 1) Nat.zero) = sMod p Nat.zero\n[PROOFSTEP]\nrw [sMod', sMod, Int.ofNat_emod]\n[GOAL]\ncase zero\np : ℕ\nhp : 2 ≤ p\nh1 : 4 ≤ 2 ^ p\nh2 : 1 ≤ 2 ^ p\n⊢ ↑4 % ↑(2 ^ p - 1) = 4 % (2 ^ p - 1)\n[PROOFSTEP]\nsimp [h2]\n[GOAL]\ncase succ\np : ℕ\nhp : 2 ≤ p\nh1 : 4 ≤ 2 ^ p\nh2 : 1 ≤ 2 ^ p\nk : ℕ\nih : ↑(sMod' (2 ^ p - 1) k) = sMod p k\n⊢ ↑(sMod' (2 ^ p - 1) (Nat.succ k)) = sMod p (Nat.succ k)\n[PROOFSTEP]\n\n| succ k ih =>\n rw [sMod', sMod, ← ih]\n have h3 : 2 ≤ 2 ^ p - 1 := by\n zify [h2]\n calc\n (2 : Int) ≤ 4 - 1 := by norm_num\n _ ≤ 2 ^ p - 1 := by zify at h1 ; exact Int.sub_le_sub_right h1 _\n zify [h2, h3]\n rw [← add_sub_assoc, sub_eq_add_neg, add_assoc, add_comm _ (-2), ← add_assoc, Int.add_emod_self, ← sub_eq_add_neg]\n[GOAL]\ncase succ\np : ℕ\nhp : 2 ≤ p\nh1 : 4 ≤ 2 ^ p\nh2 : 1 ≤ 2 ^ p\nk : ℕ\nih : ↑(sMod' (2 ^ p - 1) k) = sMod p k\n⊢ ↑(sMod' (2 ^ p - 1) (Nat.succ k)) = sMod p (Nat.succ k)\n[PROOFSTEP]\nrw [sMod', sMod, ← ih]\n[GOAL]\ncase succ\np : ℕ\nhp : 2 ≤ p\nh1 : 4 ≤ 2 ^ p\nh2 : 1 ≤ 2 ^ p\nk : ℕ\nih : ↑(sMod' (2 ^ p - 1) k) = sMod p k\n⊢ ↑((sMod' (2 ^ p - 1) k ^ 2 + (2 ^ p - 1 - 2)) % (2 ^ p - 1)) = (↑(sMod' (2 ^ p - 1) k) ^ 2 - 2) % (2 ^ p - 1)\n[PROOFSTEP]\nhave h3 : 2 ≤ 2 ^ p - 1 := by\n zify [h2]\n calc\n (2 : Int) ≤ 4 - 1 := by norm_num\n _ ≤ 2 ^ p - 1 := by zify at h1 ; exact Int.sub_le_sub_right h1 _\n[GOAL]\np : ℕ\nhp : 2 ≤ p\nh1 : 4 ≤ 2 ^ p\nh2 : 1 ≤ 2 ^ p\nk : ℕ\nih : ↑(sMod' (2 ^ p - 1) k) = sMod p k\n⊢ 2 ≤ 2 ^ p - 1\n[PROOFSTEP]\nzify [h2]\n[GOAL]\np : ℕ\nhp : 2 ≤ p\nh1 : 4 ≤ 2 ^ p\nh2 : 1 ≤ 2 ^ p\nk : ℕ\nih : ↑(sMod' (2 ^ p - 1) k) = sMod p k\n⊢ 2 ≤ 2 ^ p - 1\n[PROOFSTEP]\ncalc\n (2 : Int) ≤ 4 - 1 := by norm_num\n _ ≤ 2 ^ p - 1 := by zify at h1 ; exact Int.sub_le_sub_right h1 _\n[GOAL]\np : ℕ\nhp : 2 ≤ p\nh1 : 4 ≤ 2 ^ p\nh2 : 1 ≤ 2 ^ p\nk : ℕ\nih : ↑(sMod' (2 ^ p - 1) k) = sMod p k\n⊢ 2 ≤ 4 - 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\np : ℕ\nhp : 2 ≤ p\nh1 : 4 ≤ 2 ^ p\nh2 : 1 ≤ 2 ^ p\nk : ℕ\nih : ↑(sMod' (2 ^ p - 1) k) = sMod p k\n⊢ 4 - 1 ≤ 2 ^ p - 1\n[PROOFSTEP]\nzify at h1 \n[GOAL]\np : ℕ\nhp : 2 ≤ p\nh2 : 1 ≤ 2 ^ p\nk : ℕ\nih : ↑(sMod' (2 ^ p - 1) k) = sMod p k\nh1 : 4 ≤ 2 ^ p\n⊢ 4 - 1 ≤ 2 ^ p - 1\n[PROOFSTEP]\nexact Int.sub_le_sub_right h1 _\n[GOAL]\ncase succ\np : ℕ\nhp : 2 ≤ p\nh1 : 4 ≤ 2 ^ p\nh2 : 1 ≤ 2 ^ p\nk : ℕ\nih : ↑(sMod' (2 ^ p - 1) k) = sMod p k\nh3 : 2 ≤ 2 ^ p - 1\n⊢ ↑((sMod' (2 ^ p - 1) k ^ 2 + (2 ^ p - 1 - 2)) % (2 ^ p - 1)) = (↑(sMod' (2 ^ p - 1) k) ^ 2 - 2) % (2 ^ p - 1)\n[PROOFSTEP]\nzify [h2, h3]\n[GOAL]\ncase succ\np : ℕ\nhp : 2 ≤ p\nh1 : 4 ≤ 2 ^ p\nh2 : 1 ≤ 2 ^ p\nk : ℕ\nih : ↑(sMod' (2 ^ p - 1) k) = sMod p k\nh3 : 2 ≤ 2 ^ p - 1\n⊢ (↑(sMod' (2 ^ p - 1) k) ^ 2 + (2 ^ p - 1 - 2)) % (2 ^ p - 1) = (↑(sMod' (2 ^ p - 1) k) ^ 2 - 2) % (2 ^ p - 1)\n[PROOFSTEP]\nrw [← add_sub_assoc, sub_eq_add_neg, add_assoc, add_comm _ (-2), ← add_assoc, Int.add_emod_self, ← sub_eq_add_neg]\n[GOAL]\np : ℕ\nhp : Nat.blt 1 p = true\nh : sMod' (2 ^ p - 1) (p - 2) = 0\n⊢ LucasLehmerTest p\n[PROOFSTEP]\nrw [Nat.blt_eq] at hp \n[GOAL]\np : ℕ\nhp : 1 < p\nh : sMod' (2 ^ p - 1) (p - 2) = 0\n⊢ LucasLehmerTest p\n[PROOFSTEP]\nrw [LucasLehmerTest, LucasLehmer.residue_eq_zero_iff_sMod_eq_zero p hp, ← sMod'_eq_sMod p _ hp, h]\n[GOAL]\np : ℕ\nhp : 1 < p\nh : sMod' (2 ^ p - 1) (p - 2) = 0\n⊢ ↑0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\np : ℕ\nhp : Nat.blt 1 p = true\nh : Nat.ble 1 (sMod' (2 ^ p - 1) (p - 2)) = true\n⊢ ¬LucasLehmerTest p\n[PROOFSTEP]\nrw [Nat.blt_eq] at hp \n[GOAL]\np : ℕ\nhp : 1 < p\nh : Nat.ble 1 (sMod' (2 ^ p - 1) (p - 2)) = true\n⊢ ¬LucasLehmerTest p\n[PROOFSTEP]\nrw [Nat.ble_eq, Nat.succ_le, Nat.pos_iff_ne_zero] at h \n[GOAL]\np : ℕ\nhp : 1 < p\nh : sMod' (2 ^ p - 1) (p - 2) ≠ 0\n⊢ ¬LucasLehmerTest p\n[PROOFSTEP]\nrw [LucasLehmerTest, LucasLehmer.residue_eq_zero_iff_sMod_eq_zero p hp, ← sMod'_eq_sMod p _ hp]\n[GOAL]\np : ℕ\nhp : 1 < p\nh : sMod' (2 ^ p - 1) (p - 2) ≠ 0\n⊢ ¬↑(sMod' (2 ^ p - 1) (p - 2)) = 0\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nn k : ℕ\n⊢ 1 * (k / 2 ^ n) + k % 2 ^ n = k / 2 ^ n + k % 2 ^ n\n[PROOFSTEP]\nrw [one_mul]\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.LucasLehmer", "llama_tokens": 19564, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8633916099737806, "lm_q2_score": 0.6757645879592641, "lm_q1q2_score": 0.5834494755614175}} {"text": "[GOAL]\nL : Language\nM : Type u_1\ns : Setoid M\nps : Prestructure L s\nn : ℕ\nf : Functions L n\nx : Fin n → M\n⊢ (funMap f fun i => Quotient.mk s (x i)) = Quotient.mk s (funMap f x)\n[PROOFSTEP]\nchange Quotient.map (@funMap L M ps.toStructure n f) Prestructure.fun_equiv (Quotient.finChoice _) = _\n[GOAL]\nL : Language\nM : Type u_1\ns : Setoid M\nps : Prestructure L s\nn : ℕ\nf : Functions L n\nx : Fin n → M\n⊢ Quotient.map (funMap f) (_ : ∀ (x y : Fin n → M), x ≈ y → funMap f x ≈ funMap f y)\n (Quotient.finChoice fun i => Quotient.mk s (x i)) =\n Quotient.mk s (funMap f x)\n[PROOFSTEP]\nrw [Quotient.finChoice_eq, Quotient.map_mk]\n[GOAL]\nL : Language\nM : Type u_1\ns : Setoid M\nps : Prestructure L s\nn : ℕ\nr : Relations L n\nx : Fin n → M\n⊢ (RelMap r fun i => Quotient.mk s (x i)) ↔ RelMap r x\n[PROOFSTEP]\nchange Quotient.lift (@RelMap L M ps.toStructure n r) Prestructure.rel_equiv (Quotient.finChoice _) ↔ _\n[GOAL]\nL : Language\nM : Type u_1\ns : Setoid M\nps : Prestructure L s\nn : ℕ\nr : Relations L n\nx : Fin n → M\n⊢ Quotient.lift (RelMap r) (_ : ∀ (x y : Fin n → M), x ≈ y → RelMap r x = RelMap r y)\n (Quotient.finChoice fun i => Quotient.mk s (x i)) ↔\n RelMap r x\n[PROOFSTEP]\nrw [Quotient.finChoice_eq, Quotient.lift_mk]\n[GOAL]\nL : Language\nM : Type u_1\ns : Setoid M\nps : Prestructure L s\nβ : Type u_2\nt : Term L β\nx : β → M\n⊢ realize (fun i => Quotient.mk s (x i)) t = Quotient.mk s (realize x t)\n[PROOFSTEP]\ninduction' t with _ _ _ _ ih\n[GOAL]\ncase var\nL : Language\nM : Type u_1\ns : Setoid M\nps : Prestructure L s\nβ : Type u_2\nx : β → M\n_a✝ : β\n⊢ realize (fun i => Quotient.mk s (x i)) (var _a✝) = Quotient.mk s (realize x (var _a✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase func\nL : Language\nM : Type u_1\ns : Setoid M\nps : Prestructure L s\nβ : Type u_2\nx : β → M\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L β\nih : ∀ (a : Fin l✝), realize (fun i => Quotient.mk s (x i)) (_ts✝ a) = Quotient.mk s (realize x (_ts✝ a))\n⊢ realize (fun i => Quotient.mk s (x i)) (func _f✝ _ts✝) = Quotient.mk s (realize x (func _f✝ _ts✝))\n[PROOFSTEP]\nsimp only [ih, funMap_quotient_mk', Term.realize]\n", "meta": {"mathlib_filename": "Mathlib.ModelTheory.Quotients", "llama_tokens": 986, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8152324893520001, "lm_q2_score": 0.7154239957834733, "lm_q1q2_score": 0.5832368850247157}} {"text": "[GOAL]\nt : ℝ\n⊢ t ∈ I ↔ 1 - t ∈ I\n[PROOFSTEP]\nrw [mem_Icc, mem_Icc]\n[GOAL]\nt : ℝ\n⊢ 0 ≤ t ∧ t ≤ 1 ↔ 0 ≤ 1 - t ∧ 1 - t ≤ 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nt : ℝ\n⊢ 0 ≤ t ∧ t ≤ 1 → 0 ≤ 1 - t ∧ 1 - t ≤ 1\n[PROOFSTEP]\nintro\n[GOAL]\ncase mpr\nt : ℝ\n⊢ 0 ≤ 1 - t ∧ 1 - t ≤ 1 → 0 ≤ t ∧ t ≤ 1\n[PROOFSTEP]\nintro\n[GOAL]\ncase mp\nt : ℝ\na✝ : 0 ≤ t ∧ t ≤ 1\n⊢ 0 ≤ 1 - t ∧ 1 - t ≤ 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr\nt : ℝ\na✝ : 0 ≤ 1 - t ∧ 1 - t ≤ 1\n⊢ 0 ≤ t ∧ t ≤ 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.left\nt : ℝ\na✝ : 0 ≤ t ∧ t ≤ 1\n⊢ 0 ≤ 1 - t\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase mp.right\nt : ℝ\na✝ : 0 ≤ t ∧ t ≤ 1\n⊢ 1 - t ≤ 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase mpr.left\nt : ℝ\na✝ : 0 ≤ 1 - t ∧ 1 - t ≤ 1\n⊢ 0 ≤ t\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase mpr.right\nt : ℝ\na✝ : 0 ≤ 1 - t ∧ 1 - t ≤ 1\n⊢ t ≤ 1\n[PROOFSTEP]\nlinarith\n[GOAL]\n⊢ 1 ∈ I\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\n⊢ 0 ≤ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase right\n⊢ 1 ≤ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\n⊢ ↑(σ 0) = ↑1\n[PROOFSTEP]\nsimp [symm]\n[GOAL]\n⊢ ↑(σ 1) = ↑0\n[PROOFSTEP]\nsimp [symm]\n[GOAL]\nx : ↑I\n⊢ ↑(σ (σ x)) = ↑x\n[PROOFSTEP]\nsimp [symm]\n[GOAL]\n⊢ CompactSpace ↑I\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nx : ↑I\n⊢ 0 ≤ 1 - ↑x\n[PROOFSTEP]\nsimpa using x.2.2\n[GOAL]\nx : ↑I\n⊢ 1 - ↑x ≤ 1\n[PROOFSTEP]\nsimpa using x.2.1\n[GOAL]\na t : ℝ\nha : 0 < a\n⊢ a * t ∈ I ↔ t ∈ Icc 0 (1 / a)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\na t : ℝ\nha : 0 < a\n⊢ a * t ∈ I → t ∈ Icc 0 (1 / a)\n[PROOFSTEP]\nrintro ⟨h₁, h₂⟩\n[GOAL]\ncase mpr\na t : ℝ\nha : 0 < a\n⊢ t ∈ Icc 0 (1 / a) → a * t ∈ I\n[PROOFSTEP]\nrintro ⟨h₁, h₂⟩\n[GOAL]\ncase mp.intro\na t : ℝ\nha : 0 < a\nh₁ : 0 ≤ a * t\nh₂ : a * t ≤ 1\n⊢ t ∈ Icc 0 (1 / a)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.intro\na t : ℝ\nha : 0 < a\nh₁ : 0 ≤ t\nh₂ : t ≤ 1 / a\n⊢ a * t ∈ I\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.intro.left\na t : ℝ\nha : 0 < a\nh₁ : 0 ≤ a * t\nh₂ : a * t ≤ 1\n⊢ 0 ≤ t\n[PROOFSTEP]\nexact nonneg_of_mul_nonneg_right h₁ ha\n[GOAL]\ncase mp.intro.right\na t : ℝ\nha : 0 < a\nh₁ : 0 ≤ a * t\nh₂ : a * t ≤ 1\n⊢ t ≤ 1 / a\n[PROOFSTEP]\nrwa [le_div_iff ha, mul_comm]\n[GOAL]\ncase mpr.intro.left\na t : ℝ\nha : 0 < a\nh₁ : 0 ≤ t\nh₂ : t ≤ 1 / a\n⊢ 0 ≤ a * t\n[PROOFSTEP]\nexact mul_nonneg ha.le h₁\n[GOAL]\ncase mpr.intro.right\na t : ℝ\nha : 0 < a\nh₁ : 0 ≤ t\nh₂ : t ≤ 1 / a\n⊢ a * t ≤ 1\n[PROOFSTEP]\nrwa [le_div_iff ha, mul_comm] at h₂ \n[GOAL]\nt : ℝ\n⊢ 2 * t - 1 ∈ I ↔ t ∈ Icc (1 / 2) 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nt : ℝ\n⊢ 2 * t - 1 ∈ I → t ∈ Icc (1 / 2) 1\n[PROOFSTEP]\nrintro ⟨h₁, h₂⟩\n[GOAL]\ncase mpr\nt : ℝ\n⊢ t ∈ Icc (1 / 2) 1 → 2 * t - 1 ∈ I\n[PROOFSTEP]\nrintro ⟨h₁, h₂⟩\n[GOAL]\ncase mp.intro\nt : ℝ\nh₁ : 0 ≤ 2 * t - 1\nh₂ : 2 * t - 1 ≤ 1\n⊢ t ∈ Icc (1 / 2) 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.intro\nt : ℝ\nh₁ : 1 / 2 ≤ t\nh₂ : t ≤ 1\n⊢ 2 * t - 1 ∈ I\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.intro.left\nt : ℝ\nh₁ : 0 ≤ 2 * t - 1\nh₂ : 2 * t - 1 ≤ 1\n⊢ 1 / 2 ≤ t\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase mp.intro.right\nt : ℝ\nh₁ : 0 ≤ 2 * t - 1\nh₂ : 2 * t - 1 ≤ 1\n⊢ t ≤ 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase mpr.intro.left\nt : ℝ\nh₁ : 1 / 2 ≤ t\nh₂ : t ≤ 1\n⊢ 0 ≤ 2 * t - 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase mpr.intro.right\nt : ℝ\nh₁ : 1 / 2 ≤ t\nh₂ : t ≤ 1\n⊢ 2 * t - 1 ≤ 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nx : ↑unitInterval\n⊢ 0 ≤ ↑x\n[PROOFSTEP]\nunit_interval\n[GOAL]\n𝕜 : Type u_1\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : TopologicalRing 𝕜\na b : 𝕜\nh : 0 < a\n⊢ ↑(affineHomeomorph a b (_ : a ≠ 0)) '' Icc 0 1 = Icc b (a + b)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : TopologicalRing 𝕜\na b : 𝕜\nh : a < b\n⊢ ↑(Icc a b) ≃ₜ ↑(Icc 0 1)\n[PROOFSTEP]\nlet e := Homeomorph.image (affineHomeomorph (b - a) a (sub_pos.mpr h).ne.symm) (Set.Icc 0 1)\n[GOAL]\n𝕜 : Type u_1\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : TopologicalRing 𝕜\na b : 𝕜\nh : a < b\ne : ↑(Icc 0 1) ≃ₜ ↑(↑(affineHomeomorph (b - a) a (_ : b - a ≠ 0)) '' Icc 0 1) :=\n Homeomorph.image (affineHomeomorph (b - a) a (_ : b - a ≠ 0)) (Icc 0 1)\n⊢ ↑(Icc a b) ≃ₜ ↑(Icc 0 1)\n[PROOFSTEP]\nrefine' (e.trans _).symm\n[GOAL]\n𝕜 : Type u_1\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : TopologicalRing 𝕜\na b : 𝕜\nh : a < b\ne : ↑(Icc 0 1) ≃ₜ ↑(↑(affineHomeomorph (b - a) a (_ : b - a ≠ 0)) '' Icc 0 1) :=\n Homeomorph.image (affineHomeomorph (b - a) a (_ : b - a ≠ 0)) (Icc 0 1)\n⊢ ↑(↑(affineHomeomorph (b - a) a (_ : b - a ≠ 0)) '' Icc 0 1) ≃ₜ ↑(Icc a b)\n[PROOFSTEP]\napply Homeomorph.setCongr\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : TopologicalRing 𝕜\na b : 𝕜\nh : a < b\ne : ↑(Icc 0 1) ≃ₜ ↑(↑(affineHomeomorph (b - a) a (_ : b - a ≠ 0)) '' Icc 0 1) :=\n Homeomorph.image (affineHomeomorph (b - a) a (_ : b - a ≠ 0)) (Icc 0 1)\n⊢ ↑(affineHomeomorph (b - a) a (_ : b - a ≠ 0)) '' Icc 0 1 = Icc a b\n[PROOFSTEP]\nrw [affineHomeomorph_image_I _ _ (sub_pos.2 h)]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : TopologicalRing 𝕜\na b : 𝕜\nh : a < b\ne : ↑(Icc 0 1) ≃ₜ ↑(↑(affineHomeomorph (b - a) a (_ : b - a ≠ 0)) '' Icc 0 1) :=\n Homeomorph.image (affineHomeomorph (b - a) a (_ : b - a ≠ 0)) (Icc 0 1)\n⊢ Icc a (b - a + a) = Icc a b\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Topology.UnitInterval", "llama_tokens": 3057, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8376199592797929, "lm_q2_score": 0.6959583250334527, "lm_q1q2_score": 0.5829485838749535}} {"text": "[GOAL]\nn : Type u_1\ninst✝⁴ : Fintype n\nR : Type u_2\nM : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\nb : Basis n R M\ninst✝ : DecidableEq n\nA : Matrix n n R\nhA : IsUnit (det A)\n⊢ M ≃ₗ[R] M\n[PROOFSTEP]\nrefine'\n { toLin b b A with\n toFun := toLin b b A\n invFun := toLin b b A⁻¹\n left_inv := fun x => _\n right_inv := fun x => _ }\n[GOAL]\ncase refine'_1\nn : Type u_1\ninst✝⁴ : Fintype n\nR : Type u_2\nM : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\nb : Basis n R M\ninst✝ : DecidableEq n\nA : Matrix n n R\nhA : IsUnit (det A)\nsrc✝ : (fun x => M →ₗ[R] M) A := ↑(toLin b b) A\nx : M\n⊢ ↑(↑(toLin b b) A⁻¹)\n (AddHom.toFun\n {\n toAddHom :=\n { toFun := ↑(↑(toLin b b) A),\n map_add' :=\n (_ :\n ∀ (x y : M),\n AddHom.toFun src✝.toAddHom (x + y) =\n AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : M),\n AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n x) =\n x\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase refine'_2\nn : Type u_1\ninst✝⁴ : Fintype n\nR : Type u_2\nM : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\nb : Basis n R M\ninst✝ : DecidableEq n\nA : Matrix n n R\nhA : IsUnit (det A)\nsrc✝ : (fun x => M →ₗ[R] M) A := ↑(toLin b b) A\nx : M\n⊢ AddHom.toFun\n {\n toAddHom :=\n { toFun := ↑(↑(toLin b b) A),\n map_add' :=\n (_ :\n ∀ (x y : M),\n AddHom.toFun src✝.toAddHom (x + y) = AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : M),\n AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n (↑(↑(toLin b b) A⁻¹) x) =\n x\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase refine'_1\nn : Type u_1\ninst✝⁴ : Fintype n\nR : Type u_2\nM : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\nb : Basis n R M\ninst✝ : DecidableEq n\nA : Matrix n n R\nhA : IsUnit (det A)\nsrc✝ : (fun x => M →ₗ[R] M) A := ↑(toLin b b) A\nx : M\n⊢ ↑(↑(toLin b b) A⁻¹) (↑(↑(toLin b b) A) x) = x\n[PROOFSTEP]\nrw [← LinearMap.comp_apply]\n[GOAL]\ncase refine'_2\nn : Type u_1\ninst✝⁴ : Fintype n\nR : Type u_2\nM : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\nb : Basis n R M\ninst✝ : DecidableEq n\nA : Matrix n n R\nhA : IsUnit (det A)\nsrc✝ : (fun x => M →ₗ[R] M) A := ↑(toLin b b) A\nx : M\n⊢ ↑(↑(toLin b b) A) (↑(↑(toLin b b) A⁻¹) x) = x\n[PROOFSTEP]\nrw [← LinearMap.comp_apply]\n[GOAL]\ncase refine'_1\nn : Type u_1\ninst✝⁴ : Fintype n\nR : Type u_2\nM : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\nb : Basis n R M\ninst✝ : DecidableEq n\nA : Matrix n n R\nhA : IsUnit (det A)\nsrc✝ : (fun x => M →ₗ[R] M) A := ↑(toLin b b) A\nx : M\n⊢ ↑(comp (↑(toLin b b) A⁻¹) (↑(toLin b b) A)) x = x\n[PROOFSTEP]\nsimp only [← Matrix.toLin_mul b b b, Matrix.nonsing_inv_mul _ hA, Matrix.mul_nonsing_inv _ hA, toLin_one,\n LinearMap.id_apply]\n[GOAL]\ncase refine'_2\nn : Type u_1\ninst✝⁴ : Fintype n\nR : Type u_2\nM : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\nb : Basis n R M\ninst✝ : DecidableEq n\nA : Matrix n n R\nhA : IsUnit (det A)\nsrc✝ : (fun x => M →ₗ[R] M) A := ↑(toLin b b) A\nx : M\n⊢ ↑(comp (↑(toLin b b) A) (↑(toLin b b) A⁻¹)) x = x\n[PROOFSTEP]\nsimp only [← Matrix.toLin_mul b b b, Matrix.nonsing_inv_mul _ hA, Matrix.mul_nonsing_inv _ hA, toLin_one,\n LinearMap.id_apply]\n[GOAL]\nn : Type u_1\ninst✝⁵ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M✝\ninst✝² : Module R M✝\nK : Type u_4\ninst✝¹ : DecidableEq n\ninst✝ : Field K\nM : Matrix n n K\n⊢ (∃ v x, mulVec M v = 0) ↔ det M = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn : Type u_1\ninst✝⁵ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M✝\ninst✝² : Module R M✝\nK : Type u_4\ninst✝¹ : DecidableEq n\ninst✝ : Field K\nM : Matrix n n K\n⊢ (∃ v x, mulVec M v = 0) → det M = 0\n[PROOFSTEP]\nrintro ⟨v, hv, mul_eq⟩\n[GOAL]\ncase mp.intro.intro\nn : Type u_1\ninst✝⁵ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M✝\ninst✝² : Module R M✝\nK : Type u_4\ninst✝¹ : DecidableEq n\ninst✝ : Field K\nM : Matrix n n K\nv : n → K\nhv : v ≠ 0\nmul_eq : mulVec M v = 0\n⊢ det M = 0\n[PROOFSTEP]\ncontrapose! hv\n[GOAL]\ncase mp.intro.intro\nn : Type u_1\ninst✝⁵ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M✝\ninst✝² : Module R M✝\nK : Type u_4\ninst✝¹ : DecidableEq n\ninst✝ : Field K\nM : Matrix n n K\nv : n → K\nmul_eq : mulVec M v = 0\nhv : det M ≠ 0\n⊢ v = 0\n[PROOFSTEP]\nexact eq_zero_of_mulVec_eq_zero hv mul_eq\n[GOAL]\ncase mpr\nn : Type u_1\ninst✝⁵ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M✝\ninst✝² : Module R M✝\nK : Type u_4\ninst✝¹ : DecidableEq n\ninst✝ : Field K\nM : Matrix n n K\n⊢ det M = 0 → ∃ v x, mulVec M v = 0\n[PROOFSTEP]\ncontrapose!\n[GOAL]\ncase mpr\nn : Type u_1\ninst✝⁵ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M✝\ninst✝² : Module R M✝\nK : Type u_4\ninst✝¹ : DecidableEq n\ninst✝ : Field K\nM : Matrix n n K\n⊢ (∀ (v : n → K), v ≠ 0 → mulVec M v ≠ 0) → det M ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nn : Type u_1\ninst✝⁵ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M✝\ninst✝² : Module R M✝\nK : Type u_4\ninst✝¹ : DecidableEq n\ninst✝ : Field K\nM : Matrix n n K\nh : ∀ (v : n → K), v ≠ 0 → mulVec M v ≠ 0\n⊢ det M ≠ 0\n[PROOFSTEP]\nhave : Function.Injective (Matrix.toLin' M) := by\n simpa only [← LinearMap.ker_eq_bot, ker_toLin'_eq_bot_iff, not_imp_not] using h\n[GOAL]\nn : Type u_1\ninst✝⁵ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M✝\ninst✝² : Module R M✝\nK : Type u_4\ninst✝¹ : DecidableEq n\ninst✝ : Field K\nM : Matrix n n K\nh : ∀ (v : n → K), v ≠ 0 → mulVec M v ≠ 0\n⊢ Function.Injective ↑(↑toLin' M)\n[PROOFSTEP]\nsimpa only [← LinearMap.ker_eq_bot, ker_toLin'_eq_bot_iff, not_imp_not] using h\n[GOAL]\ncase mpr\nn : Type u_1\ninst✝⁵ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M✝\ninst✝² : Module R M✝\nK : Type u_4\ninst✝¹ : DecidableEq n\ninst✝ : Field K\nM : Matrix n n K\nh : ∀ (v : n → K), v ≠ 0 → mulVec M v ≠ 0\nthis : Function.Injective ↑(↑toLin' M)\n⊢ det M ≠ 0\n[PROOFSTEP]\nhave : M * LinearMap.toMatrix' ((LinearEquiv.ofInjectiveEndo (Matrix.toLin' M) this).symm : (n → K) →ₗ[K] n → K) = 1 :=\n by\n refine' Matrix.toLin'.injective (LinearMap.ext fun v => _)\n rw [Matrix.toLin'_mul, Matrix.toLin'_one, Matrix.toLin'_toMatrix', LinearMap.comp_apply]\n exact (LinearEquiv.ofInjectiveEndo (Matrix.toLin' M) this).apply_symm_apply v\n[GOAL]\nn : Type u_1\ninst✝⁵ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M✝\ninst✝² : Module R M✝\nK : Type u_4\ninst✝¹ : DecidableEq n\ninst✝ : Field K\nM : Matrix n n K\nh : ∀ (v : n → K), v ≠ 0 → mulVec M v ≠ 0\nthis : Function.Injective ↑(↑toLin' M)\n⊢ M * ↑toMatrix' ↑(LinearEquiv.symm (LinearEquiv.ofInjectiveEndo (↑toLin' M) this)) = 1\n[PROOFSTEP]\nrefine' Matrix.toLin'.injective (LinearMap.ext fun v => _)\n[GOAL]\nn : Type u_1\ninst✝⁵ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M✝\ninst✝² : Module R M✝\nK : Type u_4\ninst✝¹ : DecidableEq n\ninst✝ : Field K\nM : Matrix n n K\nh : ∀ (v : n → K), v ≠ 0 → mulVec M v ≠ 0\nthis : Function.Injective ↑(↑toLin' M)\nv : n → K\n⊢ ↑(↑toLin' (M * ↑toMatrix' ↑(LinearEquiv.symm (LinearEquiv.ofInjectiveEndo (↑toLin' M) this)))) v = ↑(↑toLin' 1) v\n[PROOFSTEP]\nrw [Matrix.toLin'_mul, Matrix.toLin'_one, Matrix.toLin'_toMatrix', LinearMap.comp_apply]\n[GOAL]\nn : Type u_1\ninst✝⁵ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M✝\ninst✝² : Module R M✝\nK : Type u_4\ninst✝¹ : DecidableEq n\ninst✝ : Field K\nM : Matrix n n K\nh : ∀ (v : n → K), v ≠ 0 → mulVec M v ≠ 0\nthis : Function.Injective ↑(↑toLin' M)\nv : n → K\n⊢ ↑(↑toLin' M) (↑↑(LinearEquiv.symm (LinearEquiv.ofInjectiveEndo (↑toLin' M) this)) v) = ↑LinearMap.id v\n[PROOFSTEP]\nexact (LinearEquiv.ofInjectiveEndo (Matrix.toLin' M) this).apply_symm_apply v\n[GOAL]\ncase mpr\nn : Type u_1\ninst✝⁵ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M✝\ninst✝² : Module R M✝\nK : Type u_4\ninst✝¹ : DecidableEq n\ninst✝ : Field K\nM : Matrix n n K\nh : ∀ (v : n → K), v ≠ 0 → mulVec M v ≠ 0\nthis✝ : Function.Injective ↑(↑toLin' M)\nthis : M * ↑toMatrix' ↑(LinearEquiv.symm (LinearEquiv.ofInjectiveEndo (↑toLin' M) this✝)) = 1\n⊢ det M ≠ 0\n[PROOFSTEP]\nexact Matrix.det_ne_zero_of_right_inverse this\n[GOAL]\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\n⊢ (∃ v x, mulVec M v = 0) ↔ det M = 0\n[PROOFSTEP]\nhave : (∃ (v : _) (_ : v ≠ 0), mulVec ((algebraMap A K).mapMatrix M) v = 0) ↔ _ := exists_mulVec_eq_zero_iff_aux\n[GOAL]\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis :\n (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det (↑(RingHom.mapMatrix (algebraMap A K)) M) = 0\n⊢ (∃ v x, mulVec M v = 0) ↔ det M = 0\n[PROOFSTEP]\nrw [← RingHom.map_det, IsFractionRing.to_map_eq_zero_iff] at this \n[GOAL]\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\n⊢ (∃ v x, mulVec M v = 0) ↔ det M = 0\n[PROOFSTEP]\nrefine' Iff.trans _ this\n[GOAL]\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\n⊢ (∃ v x, mulVec M v = 0) ↔ ∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\n⊢ (∃ v x, mulVec M v = 0) → ∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0\n[PROOFSTEP]\nrintro ⟨v, hv, mul_eq⟩\n[GOAL]\ncase mpr\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\n⊢ (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) → ∃ v x, mulVec M v = 0\n[PROOFSTEP]\nrintro ⟨v, hv, mul_eq⟩\n[GOAL]\ncase mp.intro.intro\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\nv : n → A\nhv : v ≠ 0\nmul_eq : mulVec M v = 0\n⊢ ∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0\n[PROOFSTEP]\nrefine' ⟨fun i => algebraMap _ _ (v i), mt (fun h => funext fun i => _) hv, _⟩\n[GOAL]\ncase mp.intro.intro.refine'_1\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\nv : n → A\nhv : v ≠ 0\nmul_eq : mulVec M v = 0\nh : (fun i => ↑(algebraMap A K) (v i)) = 0\ni : n\n⊢ v i = OfNat.ofNat 0 i\n[PROOFSTEP]\nexact IsFractionRing.to_map_eq_zero_iff.mp (congr_fun h i)\n[GOAL]\ncase mp.intro.intro.refine'_2\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\nv : n → A\nhv : v ≠ 0\nmul_eq : mulVec M v = 0\n⊢ (mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) fun i => ↑(algebraMap A K) (v i)) = 0\n[PROOFSTEP]\next i\n[GOAL]\ncase mp.intro.intro.refine'_2.h\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\nv : n → A\nhv : v ≠ 0\nmul_eq : mulVec M v = 0\ni : n\n⊢ mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) (fun i => ↑(algebraMap A K) (v i)) i = OfNat.ofNat 0 i\n[PROOFSTEP]\nrefine' (RingHom.map_mulVec _ _ _ i).symm.trans _\n[GOAL]\ncase mp.intro.intro.refine'_2.h\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\nv : n → A\nhv : v ≠ 0\nmul_eq : mulVec M v = 0\ni : n\n⊢ ↑(algebraMap A K) (mulVec (fun i j => M i j) (fun i => v i) i) = OfNat.ofNat 0 i\n[PROOFSTEP]\nrw [mul_eq, Pi.zero_apply, RingHom.map_zero, Pi.zero_apply]\n[GOAL]\ncase mpr.intro.intro\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\nv : n → K\nhv : v ≠ 0\nmul_eq : mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0\n⊢ ∃ v x, mulVec M v = 0\n[PROOFSTEP]\nletI := Classical.decEq K\n[GOAL]\ncase mpr.intro.intro\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis✝ : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\nv : n → K\nhv : v ≠ 0\nmul_eq : mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0\nthis : DecidableEq K := Classical.decEq K\n⊢ ∃ v x, mulVec M v = 0\n[PROOFSTEP]\nobtain ⟨⟨b, hb⟩, ba_eq⟩ := IsLocalization.exist_integer_multiples_of_finset (nonZeroDivisors A) (Finset.univ.image v)\n[GOAL]\ncase mpr.intro.intro.intro.mk\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis✝ : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\nv : n → K\nhv : v ≠ 0\nmul_eq : mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0\nthis : DecidableEq K := Classical.decEq K\nb : A\nhb : b ∈ nonZeroDivisors A\nba_eq : ∀ (a : K), a ∈ Finset.image v Finset.univ → IsLocalization.IsInteger A (↑{ val := b, property := hb } • a)\n⊢ ∃ v x, mulVec M v = 0\n[PROOFSTEP]\nchoose f hf using ba_eq\n[GOAL]\ncase mpr.intro.intro.intro.mk\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis✝ : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\nv : n → K\nhv : v ≠ 0\nmul_eq : mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0\nthis : DecidableEq K := Classical.decEq K\nb : A\nhb : b ∈ nonZeroDivisors A\nf : (a : K) → a ∈ Finset.image v Finset.univ → A\nhf : ∀ (a : K) (a_1 : a ∈ Finset.image v Finset.univ), ↑(algebraMap A K) (f a a_1) = ↑{ val := b, property := hb } • a\n⊢ ∃ v x, mulVec M v = 0\n[PROOFSTEP]\nrefine' ⟨fun i => f _ (Finset.mem_image.mpr ⟨i, Finset.mem_univ i, rfl⟩), mt (fun h => funext fun i => _) hv, _⟩\n[GOAL]\ncase mpr.intro.intro.intro.mk.refine'_1\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis✝ : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\nv : n → K\nhv : v ≠ 0\nmul_eq : mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0\nthis : DecidableEq K := Classical.decEq K\nb : A\nhb : b ∈ nonZeroDivisors A\nf : (a : K) → a ∈ Finset.image v Finset.univ → A\nhf : ∀ (a : K) (a_1 : a ∈ Finset.image v Finset.univ), ↑(algebraMap A K) (f a a_1) = ↑{ val := b, property := hb } • a\nh : (fun i => f (v i) (_ : v i ∈ Finset.image v Finset.univ)) = 0\ni : n\n⊢ v i = OfNat.ofNat 0 i\n[PROOFSTEP]\nhave := congr_arg (algebraMap A K) (congr_fun h i)\n[GOAL]\ncase mpr.intro.intro.intro.mk.refine'_1\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis✝¹ : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\nv : n → K\nhv : v ≠ 0\nmul_eq : mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0\nthis✝ : DecidableEq K := Classical.decEq K\nb : A\nhb : b ∈ nonZeroDivisors A\nf : (a : K) → a ∈ Finset.image v Finset.univ → A\nhf : ∀ (a : K) (a_1 : a ∈ Finset.image v Finset.univ), ↑(algebraMap A K) (f a a_1) = ↑{ val := b, property := hb } • a\nh : (fun i => f (v i) (_ : v i ∈ Finset.image v Finset.univ)) = 0\ni : n\nthis : ↑(algebraMap A K) (f (v i) (_ : v i ∈ Finset.image v Finset.univ)) = ↑(algebraMap A K) (OfNat.ofNat 0 i)\n⊢ v i = OfNat.ofNat 0 i\n[PROOFSTEP]\nrw [hf, Subtype.coe_mk, Pi.zero_apply, RingHom.map_zero, Algebra.smul_def, mul_eq_zero,\n IsFractionRing.to_map_eq_zero_iff] at this \n[GOAL]\ncase mpr.intro.intro.intro.mk.refine'_1\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis✝¹ : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\nv : n → K\nhv : v ≠ 0\nmul_eq : mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0\nthis✝ : DecidableEq K := Classical.decEq K\nb : A\nhb : b ∈ nonZeroDivisors A\nf : (a : K) → a ∈ Finset.image v Finset.univ → A\nhf : ∀ (a : K) (a_1 : a ∈ Finset.image v Finset.univ), ↑(algebraMap A K) (f a a_1) = ↑{ val := b, property := hb } • a\nh : (fun i => f (v i) (_ : v i ∈ Finset.image v Finset.univ)) = 0\ni : n\nthis : b = 0 ∨ v i = 0\n⊢ v i = OfNat.ofNat 0 i\n[PROOFSTEP]\nexact this.resolve_left (nonZeroDivisors.ne_zero hb)\n[GOAL]\ncase mpr.intro.intro.intro.mk.refine'_2\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis✝ : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\nv : n → K\nhv : v ≠ 0\nmul_eq : mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0\nthis : DecidableEq K := Classical.decEq K\nb : A\nhb : b ∈ nonZeroDivisors A\nf : (a : K) → a ∈ Finset.image v Finset.univ → A\nhf : ∀ (a : K) (a_1 : a ∈ Finset.image v Finset.univ), ↑(algebraMap A K) (f a a_1) = ↑{ val := b, property := hb } • a\n⊢ (mulVec M fun i => f (v i) (_ : v i ∈ Finset.image v Finset.univ)) = 0\n[PROOFSTEP]\next i\n[GOAL]\ncase mpr.intro.intro.intro.mk.refine'_2.h\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis✝ : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\nv : n → K\nhv : v ≠ 0\nmul_eq : mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0\nthis : DecidableEq K := Classical.decEq K\nb : A\nhb : b ∈ nonZeroDivisors A\nf : (a : K) → a ∈ Finset.image v Finset.univ → A\nhf : ∀ (a : K) (a_1 : a ∈ Finset.image v Finset.univ), ↑(algebraMap A K) (f a a_1) = ↑{ val := b, property := hb } • a\ni : n\n⊢ mulVec M (fun i => f (v i) (_ : v i ∈ Finset.image v Finset.univ)) i = OfNat.ofNat 0 i\n[PROOFSTEP]\nrefine' IsFractionRing.injective A K _\n[GOAL]\ncase mpr.intro.intro.intro.mk.refine'_2.h\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis✝ : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\nv : n → K\nhv : v ≠ 0\nmul_eq : mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0\nthis : DecidableEq K := Classical.decEq K\nb : A\nhb : b ∈ nonZeroDivisors A\nf : (a : K) → a ∈ Finset.image v Finset.univ → A\nhf : ∀ (a : K) (a_1 : a ∈ Finset.image v Finset.univ), ↑(algebraMap A K) (f a a_1) = ↑{ val := b, property := hb } • a\ni : n\n⊢ ↑(algebraMap A K) (mulVec M (fun i => f (v i) (_ : v i ∈ Finset.image v Finset.univ)) i) =\n ↑(algebraMap A K) (OfNat.ofNat 0 i)\n[PROOFSTEP]\ncalc\n algebraMap A K (M.mulVec (fun i : n => f (v i) _) i) =\n ((algebraMap A K).mapMatrix M).mulVec (algebraMap _ K b • v) i :=\n ?_\n _ = 0 := ?_\n _ = algebraMap A K 0 := (RingHom.map_zero _).symm\n[GOAL]\ncase mpr.intro.intro.intro.mk.refine'_2.h.calc_1\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis✝ : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\nv : n → K\nhv : v ≠ 0\nmul_eq : mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0\nthis : DecidableEq K := Classical.decEq K\nb : A\nhb : b ∈ nonZeroDivisors A\nf : (a : K) → a ∈ Finset.image v Finset.univ → A\nhf : ∀ (a : K) (a_1 : a ∈ Finset.image v Finset.univ), ↑(algebraMap A K) (f a a_1) = ↑{ val := b, property := hb } • a\ni : n\n⊢ ↑(algebraMap A K) (mulVec M (fun i => f (v i) (_ : v i ∈ Finset.image v Finset.univ)) i) =\n mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) (↑(algebraMap A K) b • v) i\n[PROOFSTEP]\nsimp_rw [RingHom.map_mulVec, mulVec, dotProduct, Function.comp_apply, hf, RingHom.mapMatrix_apply, Pi.smul_apply,\n smul_eq_mul, Algebra.smul_def]\n[GOAL]\ncase mpr.intro.intro.intro.mk.refine'_2.h.calc_2\nn : Type u_1\ninst✝⁹ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : Module R M✝\nA : Type u_4\nK : Type u_5\ninst✝⁵ : DecidableEq n\ninst✝⁴ : CommRing A\ninst✝³ : Nontrivial A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nM : Matrix n n A\nthis✝ : (∃ v x, mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0) ↔ det M = 0\nv : n → K\nhv : v ≠ 0\nmul_eq : mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) v = 0\nthis : DecidableEq K := Classical.decEq K\nb : A\nhb : b ∈ nonZeroDivisors A\nf : (a : K) → a ∈ Finset.image v Finset.univ → A\nhf : ∀ (a : K) (a_1 : a ∈ Finset.image v Finset.univ), ↑(algebraMap A K) (f a a_1) = ↑{ val := b, property := hb } • a\ni : n\n⊢ mulVec (↑(RingHom.mapMatrix (algebraMap A K)) M) (↑(algebraMap A K) b • v) i = 0\n[PROOFSTEP]\nrw [mulVec_smul, mul_eq, Pi.smul_apply, Pi.zero_apply, smul_zero]\n[GOAL]\nn : Type u_1\ninst✝⁶ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M✝\ninst✝³ : Module R M✝\nA : Type u_4\ninst✝² : DecidableEq n\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nM : Matrix n n A\n⊢ (∃ v x, vecMul v M = 0) ↔ det M = 0\n[PROOFSTEP]\nsimpa only [← M.det_transpose, ← mulVec_transpose] using exists_mulVec_eq_zero_iff\n[GOAL]\nn : Type u_1\ninst✝⁶ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M✝\ninst✝³ : Module R M✝\nA : Type u_4\ninst✝² : DecidableEq n\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nM : Matrix n n A\n⊢ Nondegenerate M ↔ det M ≠ 0\n[PROOFSTEP]\nrefine' Iff.trans _ (not_iff_not.mpr exists_vecMul_eq_zero_iff)\n[GOAL]\nn : Type u_1\ninst✝⁶ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M✝\ninst✝³ : Module R M✝\nA : Type u_4\ninst✝² : DecidableEq n\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nM : Matrix n n A\n⊢ Nondegenerate M ↔ ¬∃ v x, vecMul v M = 0\n[PROOFSTEP]\nsimp only [not_exists]\n[GOAL]\nn : Type u_1\ninst✝⁶ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M✝\ninst✝³ : Module R M✝\nA : Type u_4\ninst✝² : DecidableEq n\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nM : Matrix n n A\n⊢ Nondegenerate M ↔ ∀ (x : n → A), x ≠ 0 → ¬vecMul x M = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn : Type u_1\ninst✝⁶ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M✝\ninst✝³ : Module R M✝\nA : Type u_4\ninst✝² : DecidableEq n\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nM : Matrix n n A\n⊢ Nondegenerate M → ∀ (x : n → A), x ≠ 0 → ¬vecMul x M = 0\n[PROOFSTEP]\nintro hM v hv hMv\n[GOAL]\ncase mp\nn : Type u_1\ninst✝⁶ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M✝\ninst✝³ : Module R M✝\nA : Type u_4\ninst✝² : DecidableEq n\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nM : Matrix n n A\nhM : Nondegenerate M\nv : n → A\nhv : v ≠ 0\nhMv : vecMul v M = 0\n⊢ False\n[PROOFSTEP]\nobtain ⟨w, hwMv⟩ := hM.exists_not_ortho_of_ne_zero hv\n[GOAL]\ncase mp.intro\nn : Type u_1\ninst✝⁶ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M✝\ninst✝³ : Module R M✝\nA : Type u_4\ninst✝² : DecidableEq n\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nM : Matrix n n A\nhM : Nondegenerate M\nv : n → A\nhv : v ≠ 0\nhMv : vecMul v M = 0\nw : n → A\nhwMv : v ⬝ᵥ mulVec M w ≠ 0\n⊢ False\n[PROOFSTEP]\nsimp [dotProduct_mulVec, hMv, zero_dotProduct, ne_eq, not_true] at hwMv \n[GOAL]\ncase mpr\nn : Type u_1\ninst✝⁶ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M✝\ninst✝³ : Module R M✝\nA : Type u_4\ninst✝² : DecidableEq n\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nM : Matrix n n A\n⊢ (∀ (x : n → A), x ≠ 0 → ¬vecMul x M = 0) → Nondegenerate M\n[PROOFSTEP]\nintro h v hv\n[GOAL]\ncase mpr\nn : Type u_1\ninst✝⁶ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M✝\ninst✝³ : Module R M✝\nA : Type u_4\ninst✝² : DecidableEq n\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nM : Matrix n n A\nh : ∀ (x : n → A), x ≠ 0 → ¬vecMul x M = 0\nv : n → A\nhv : ∀ (w : n → A), v ⬝ᵥ mulVec M w = 0\n⊢ v = 0\n[PROOFSTEP]\nrefine' not_imp_not.mp (h v) (funext fun i => _)\n[GOAL]\ncase mpr\nn : Type u_1\ninst✝⁶ : Fintype n\nR : Type u_2\nM✝ : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M✝\ninst✝³ : Module R M✝\nA : Type u_4\ninst✝² : DecidableEq n\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nM : Matrix n n A\nh : ∀ (x : n → A), x ≠ 0 → ¬vecMul x M = 0\nv : n → A\nhv : ∀ (w : n → A), v ⬝ᵥ mulVec M w = 0\ni : n\n⊢ vecMul v M i = OfNat.ofNat 0 i\n[PROOFSTEP]\nsimpa only [dotProduct_mulVec, dotProduct_single, mul_one] using hv (Pi.single i 1)\n[GOAL]\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh2 : ∀ (j : n), 0 < ∑ i : n, A i j\n⊢ det A ≠ 0\n[PROOFSTEP]\ncases isEmpty_or_nonempty n\n[GOAL]\ncase inl\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh2 : ∀ (j : n), 0 < ∑ i : n, A i j\nh✝ : IsEmpty n\n⊢ det A ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh2 : ∀ (j : n), 0 < ∑ i : n, A i j\nh✝ : Nonempty n\n⊢ det A ≠ 0\n[PROOFSTEP]\ncontrapose! h2\n[GOAL]\ncase inr\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\n⊢ ∃ j, ∑ i : n, A i j ≤ 0\n[PROOFSTEP]\nobtain ⟨v, ⟨h_vnz, h_vA⟩⟩ := Matrix.exists_vecMul_eq_zero_iff.mpr h2\n[GOAL]\ncase inr.intro.intro\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\n⊢ ∃ j, ∑ i : n, A i j ≤ 0\n[PROOFSTEP]\nwlog h_sup : 0 < Finset.sup' Finset.univ Finset.univ_nonempty v\n[GOAL]\ncase inr.intro.intro.inr\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\nthis :\n ∀ {n : Type u_1} [inst : Fintype n] [inst_1 : DecidableEq n] {S : Type u_2} [inst_2 : LinearOrderedCommRing S]\n {A : Matrix n n S},\n (∀ (i j : n), i ≠ j → A i j < 0) →\n ∀ (h : Nonempty n),\n det A = 0 →\n ∀ (v : n → S),\n v ≠ 0 →\n vecMul v A = 0 → 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v → ∃ j, ∑ i : n, A i j ≤ 0\nh_sup : ¬0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v\n⊢ ∃ j, ∑ i : n, A i j ≤ 0\n[PROOFSTEP]\nrefine this h1 inferInstance h2 (-1 • v) ?_ ?_ ?_\n[GOAL]\ncase inr.intro.intro.inr.refine_1\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\nthis :\n ∀ {n : Type u_1} [inst : Fintype n] [inst_1 : DecidableEq n] {S : Type u_2} [inst_2 : LinearOrderedCommRing S]\n {A : Matrix n n S},\n (∀ (i j : n), i ≠ j → A i j < 0) →\n ∀ (h : Nonempty n),\n det A = 0 →\n ∀ (v : n → S),\n v ≠ 0 →\n vecMul v A = 0 → 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v → ∃ j, ∑ i : n, A i j ≤ 0\nh_sup : ¬0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v\n⊢ -1 • v ≠ 0\n[PROOFSTEP]\nexact smul_ne_zero (by norm_num) h_vnz\n[GOAL]\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\nthis :\n ∀ {n : Type u_1} [inst : Fintype n] [inst_1 : DecidableEq n] {S : Type u_2} [inst_2 : LinearOrderedCommRing S]\n {A : Matrix n n S},\n (∀ (i j : n), i ≠ j → A i j < 0) →\n ∀ (h : Nonempty n),\n det A = 0 →\n ∀ (v : n → S),\n v ≠ 0 →\n vecMul v A = 0 → 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v → ∃ j, ∑ i : n, A i j ≤ 0\nh_sup : ¬0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v\n⊢ -1 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase inr.intro.intro.inr.refine_2\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\nthis :\n ∀ {n : Type u_1} [inst : Fintype n] [inst_1 : DecidableEq n] {S : Type u_2} [inst_2 : LinearOrderedCommRing S]\n {A : Matrix n n S},\n (∀ (i j : n), i ≠ j → A i j < 0) →\n ∀ (h : Nonempty n),\n det A = 0 →\n ∀ (v : n → S),\n v ≠ 0 →\n vecMul v A = 0 → 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v → ∃ j, ∑ i : n, A i j ≤ 0\nh_sup : ¬0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v\n⊢ (vecMul (-1 • v) fun i j => A i j) = 0\n[PROOFSTEP]\nrw [Matrix.vecMul_smul, h_vA, smul_zero]\n[GOAL]\ncase inr.intro.intro.inr.refine_3\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\nthis :\n ∀ {n : Type u_1} [inst : Fintype n] [inst_1 : DecidableEq n] {S : Type u_2} [inst_2 : LinearOrderedCommRing S]\n {A : Matrix n n S},\n (∀ (i j : n), i ≠ j → A i j < 0) →\n ∀ (h : Nonempty n),\n det A = 0 →\n ∀ (v : n → S),\n v ≠ 0 →\n vecMul v A = 0 → 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v → ∃ j, ∑ i : n, A i j ≤ 0\nh_sup : ¬0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v\n⊢ 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) (-1 • v)\n[PROOFSTEP]\nobtain ⟨i, hi⟩ := Function.ne_iff.mp h_vnz\n[GOAL]\ncase inr.intro.intro.inr.refine_3.intro\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\nthis :\n ∀ {n : Type u_1} [inst : Fintype n] [inst_1 : DecidableEq n] {S : Type u_2} [inst_2 : LinearOrderedCommRing S]\n {A : Matrix n n S},\n (∀ (i j : n), i ≠ j → A i j < 0) →\n ∀ (h : Nonempty n),\n det A = 0 →\n ∀ (v : n → S),\n v ≠ 0 →\n vecMul v A = 0 → 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v → ∃ j, ∑ i : n, A i j ≤ 0\nh_sup : ¬0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v\ni : n\nhi : v i ≠ OfNat.ofNat 0 i\n⊢ 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) (-1 • v)\n[PROOFSTEP]\nsimp_rw [Finset.lt_sup'_iff, Finset.mem_univ, true_and] at h_sup ⊢\n[GOAL]\ncase inr.intro.intro.inr.refine_3.intro\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\nthis :\n ∀ {n : Type u_1} [inst : Fintype n] [inst_1 : DecidableEq n] {S : Type u_2} [inst_2 : LinearOrderedCommRing S]\n {A : Matrix n n S},\n (∀ (i j : n), i ≠ j → A i j < 0) →\n ∀ (h : Nonempty n),\n det A = 0 →\n ∀ (v : n → S),\n v ≠ 0 →\n vecMul v A = 0 → 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v → ∃ j, ∑ i : n, A i j ≤ 0\ni : n\nhi : v i ≠ OfNat.ofNat 0 i\nh_sup : ¬∃ b, 0 < v b\n⊢ ∃ b, 0 < (-1 • v) b\n[PROOFSTEP]\nsimp_rw [not_exists, not_lt] at h_sup \n[GOAL]\ncase inr.intro.intro.inr.refine_3.intro\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\nthis :\n ∀ {n : Type u_1} [inst : Fintype n] [inst_1 : DecidableEq n] {S : Type u_2} [inst_2 : LinearOrderedCommRing S]\n {A : Matrix n n S},\n (∀ (i j : n), i ≠ j → A i j < 0) →\n ∀ (h : Nonempty n),\n det A = 0 →\n ∀ (v : n → S),\n v ≠ 0 →\n vecMul v A = 0 → 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v → ∃ j, ∑ i : n, A i j ≤ 0\ni : n\nhi : v i ≠ OfNat.ofNat 0 i\nh_sup : ∀ (x : n), v x ≤ 0\n⊢ ∃ b, 0 < (-1 • v) b\n[PROOFSTEP]\nrefine ⟨i, ?_⟩\n[GOAL]\ncase inr.intro.intro.inr.refine_3.intro\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\nthis :\n ∀ {n : Type u_1} [inst : Fintype n] [inst_1 : DecidableEq n] {S : Type u_2} [inst_2 : LinearOrderedCommRing S]\n {A : Matrix n n S},\n (∀ (i j : n), i ≠ j → A i j < 0) →\n ∀ (h : Nonempty n),\n det A = 0 →\n ∀ (v : n → S),\n v ≠ 0 →\n vecMul v A = 0 → 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v → ∃ j, ∑ i : n, A i j ≤ 0\ni : n\nhi : v i ≠ OfNat.ofNat 0 i\nh_sup : ∀ (x : n), v x ≤ 0\n⊢ 0 < (-1 • v) i\n[PROOFSTEP]\nrw [Pi.smul_apply, neg_smul, one_smul, Left.neg_pos_iff]\n[GOAL]\ncase inr.intro.intro.inr.refine_3.intro\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\nthis :\n ∀ {n : Type u_1} [inst : Fintype n] [inst_1 : DecidableEq n] {S : Type u_2} [inst_2 : LinearOrderedCommRing S]\n {A : Matrix n n S},\n (∀ (i j : n), i ≠ j → A i j < 0) →\n ∀ (h : Nonempty n),\n det A = 0 →\n ∀ (v : n → S),\n v ≠ 0 →\n vecMul v A = 0 → 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v → ∃ j, ∑ i : n, A i j ≤ 0\ni : n\nhi : v i ≠ OfNat.ofNat 0 i\nh_sup : ∀ (x : n), v x ≤ 0\n⊢ v i < 0\n[PROOFSTEP]\nrefine Ne.lt_of_le hi (h_sup i)\n[GOAL]\nn✝ : Type u_1\ninst✝³ : Fintype n✝\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\nh_sup : 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v\n⊢ ∃ j, ∑ i : n, A i j ≤ 0\n[PROOFSTEP]\nobtain ⟨j₀, -, h_j₀⟩ := Finset.exists_mem_eq_sup' Finset.univ_nonempty v\n[GOAL]\ncase intro.intro\nn✝ : Type u_1\ninst✝³ : Fintype n✝\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\nh_sup : 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v\nj₀ : n\nh_j₀ : Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v = v j₀\n⊢ ∃ j, ∑ i : n, A i j ≤ 0\n[PROOFSTEP]\nrefine ⟨j₀, ?_⟩\n[GOAL]\ncase intro.intro\nn✝ : Type u_1\ninst✝³ : Fintype n✝\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\nh_sup : 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v\nj₀ : n\nh_j₀ : Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v = v j₀\n⊢ ∑ i : n, A i j₀ ≤ 0\n[PROOFSTEP]\nrw [← mul_le_mul_left (h_j₀ ▸ h_sup), Finset.mul_sum, mul_zero]\n[GOAL]\ncase intro.intro\nn✝ : Type u_1\ninst✝³ : Fintype n✝\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\nh_sup : 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v\nj₀ : n\nh_j₀ : Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v = v j₀\n⊢ ∑ x : n, v j₀ * A x j₀ ≤ 0\n[PROOFSTEP]\nrw [show 0 = ∑ i, v i * A i j₀ from (congrFun h_vA j₀).symm]\n[GOAL]\ncase intro.intro\nn✝ : Type u_1\ninst✝³ : Fintype n✝\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\nh_sup : 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v\nj₀ : n\nh_j₀ : Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v = v j₀\n⊢ ∑ x : n, v j₀ * A x j₀ ≤ ∑ i : n, v i * A i j₀\n[PROOFSTEP]\nrefine Finset.sum_le_sum (fun i hi => ?_)\n[GOAL]\ncase intro.intro\nn✝ : Type u_1\ninst✝³ : Fintype n✝\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\nh_sup : 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v\nj₀ : n\nh_j₀ : Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v = v j₀\ni : n\nhi : i ∈ Finset.univ\n⊢ v j₀ * A i j₀ ≤ v i * A i j₀\n[PROOFSTEP]\nby_cases h : i = j₀\n[GOAL]\ncase pos\nn✝ : Type u_1\ninst✝³ : Fintype n✝\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\nh_sup : 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v\nj₀ : n\nh_j₀ : Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v = v j₀\ni : n\nhi : i ∈ Finset.univ\nh : i = j₀\n⊢ v j₀ * A i j₀ ≤ v i * A i j₀\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase neg\nn✝ : Type u_1\ninst✝³ : Fintype n✝\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh✝ : Nonempty n\nh2 : det A = 0\nv : n → S\nh_vnz : v ≠ 0\nh_vA : vecMul v A = 0\nh_sup : 0 < Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v\nj₀ : n\nh_j₀ : Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) v = v j₀\ni : n\nhi : i ∈ Finset.univ\nh : ¬i = j₀\n⊢ v j₀ * A i j₀ ≤ v i * A i j₀\n[PROOFSTEP]\nexact (mul_le_mul_right_of_neg (h1 i j₀ h)).mpr (h_j₀ ▸ Finset.le_sup' v hi)\n[GOAL]\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh2 : ∀ (i : n), 0 < ∑ j : n, A i j\n⊢ det A ≠ 0\n[PROOFSTEP]\nrw [← Matrix.det_transpose]\n[GOAL]\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh2 : ∀ (i : n), 0 < ∑ j : n, A i j\n⊢ det Aᵀ ≠ 0\n[PROOFSTEP]\nrefine det_ne_zero_of_sum_col_pos ?_ ?_\n[GOAL]\ncase refine_1\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh2 : ∀ (i : n), 0 < ∑ j : n, A i j\n⊢ ∀ (i j : n), i ≠ j → Aᵀ i j < 0\n[PROOFSTEP]\nsimp_rw [Matrix.transpose_apply]\n[GOAL]\ncase refine_1\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh2 : ∀ (i : n), 0 < ∑ j : n, A i j\n⊢ ∀ (i j : n), i ≠ j → A j i < 0\n[PROOFSTEP]\nexact fun i j h => h1 j i h.symm\n[GOAL]\ncase refine_2\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh2 : ∀ (i : n), 0 < ∑ j : n, A i j\n⊢ ∀ (j : n), 0 < ∑ i : n, Aᵀ i j\n[PROOFSTEP]\nsimp_rw [Matrix.transpose_apply]\n[GOAL]\ncase refine_2\nn : Type u_1\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nS : Type u_2\ninst✝ : LinearOrderedCommRing S\nA : Matrix n n S\nh1 : ∀ (i j : n), i ≠ j → A i j < 0\nh2 : ∀ (i : n), 0 < ∑ j : n, A i j\n⊢ ∀ (j : n), 0 < ∑ x : n, A j x\n[PROOFSTEP]\nexact h2\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.ToLinearEquiv", "llama_tokens": 22978, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.800691997339971, "lm_q2_score": 0.727975443004307, "lm_q1q2_score": 0.5828841114735688}} {"text": "[GOAL]\nF : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ : C(X, Y)\nf g : Homotopy f₀ f₁\nh : (fun f => f.toFun) f = (fun f => f.toFun) g\n⊢ f = g\n[PROOFSTEP]\nobtain ⟨⟨_, _⟩, _⟩ := f\n[GOAL]\ncase mk.mk\nF : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ : C(X, Y)\ng : Homotopy f₀ f₁\ntoFun✝ : ↑I × X → Y\ncontinuous_toFun✝ : Continuous toFun✝\nmap_zero_left✝ : ∀ (x : X), ContinuousMap.toFun (ContinuousMap.mk toFun✝) (0, x) = ↑f₀ x\nmap_one_left✝ : ∀ (x : X), ContinuousMap.toFun (ContinuousMap.mk toFun✝) (1, x) = ↑f₁ x\nh :\n (fun f => f.toFun)\n { toContinuousMap := ContinuousMap.mk toFun✝, map_zero_left := map_zero_left✝, map_one_left := map_one_left✝ } =\n (fun f => f.toFun) g\n⊢ { toContinuousMap := ContinuousMap.mk toFun✝, map_zero_left := map_zero_left✝, map_one_left := map_one_left✝ } = g\n[PROOFSTEP]\nobtain ⟨⟨_, _⟩, _⟩ := g\n[GOAL]\ncase mk.mk.mk.mk\nF : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ : C(X, Y)\ntoFun✝¹ : ↑I × X → Y\ncontinuous_toFun✝¹ : Continuous toFun✝¹\nmap_zero_left✝¹ : ∀ (x : X), ContinuousMap.toFun (ContinuousMap.mk toFun✝¹) (0, x) = ↑f₀ x\nmap_one_left✝¹ : ∀ (x : X), ContinuousMap.toFun (ContinuousMap.mk toFun✝¹) (1, x) = ↑f₁ x\ntoFun✝ : ↑I × X → Y\ncontinuous_toFun✝ : Continuous toFun✝\nmap_zero_left✝ : ∀ (x : X), ContinuousMap.toFun (ContinuousMap.mk toFun✝) (0, x) = ↑f₀ x\nmap_one_left✝ : ∀ (x : X), ContinuousMap.toFun (ContinuousMap.mk toFun✝) (1, x) = ↑f₁ x\nh :\n (fun f => f.toFun)\n { toContinuousMap := ContinuousMap.mk toFun✝¹, map_zero_left := map_zero_left✝¹,\n map_one_left := map_one_left✝¹ } =\n (fun f => f.toFun)\n { toContinuousMap := ContinuousMap.mk toFun✝, map_zero_left := map_zero_left✝, map_one_left := map_one_left✝ }\n⊢ { toContinuousMap := ContinuousMap.mk toFun✝¹, map_zero_left := map_zero_left✝¹, map_one_left := map_one_left✝¹ } =\n { toContinuousMap := ContinuousMap.mk toFun✝, map_zero_left := map_zero_left✝, map_one_left := map_one_left✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ : C(X, Y)\nF : Homotopy f₀ f₁\nt : ℝ\nht : t ≤ 0\nx : X\n⊢ ↑(↑(extend F) t) x = ↑f₀ x\n[PROOFSTEP]\nrw [← F.apply_zero]\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ : C(X, Y)\nF : Homotopy f₀ f₁\nt : ℝ\nht : t ≤ 0\nx : X\n⊢ ↑(↑(extend F) t) x = ↑F (0, x)\n[PROOFSTEP]\nexact ContinuousMap.congr_fun (Set.IccExtend_of_le_left (zero_le_one' ℝ) F.curry ht) x\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ : C(X, Y)\nF : Homotopy f₀ f₁\nt : ℝ\nht : 1 ≤ t\nx : X\n⊢ ↑(↑(extend F) t) x = ↑f₁ x\n[PROOFSTEP]\nrw [← F.apply_one]\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ : C(X, Y)\nF : Homotopy f₀ f₁\nt : ℝ\nht : 1 ≤ t\nx : X\n⊢ ↑(↑(extend F) t) x = ↑F (1, x)\n[PROOFSTEP]\nexact ContinuousMap.congr_fun (Set.IccExtend_of_right_le (zero_le_one' ℝ) F.curry ht) x\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ : C(X, Y)\nF : Homotopy f₀ f₁\n⊢ ∀ (x : X), ContinuousMap.toFun (ContinuousMap.mk fun x => ↑F (σ x.fst, x.snd)) (0, x) = ↑f₁ x\n[PROOFSTEP]\nnorm_num\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ : C(X, Y)\nF : Homotopy f₀ f₁\n⊢ ∀ (x : X), ContinuousMap.toFun (ContinuousMap.mk fun x => ↑F (σ x.fst, x.snd)) (1, x) = ↑f₀ x\n[PROOFSTEP]\nnorm_num\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ : C(X, Y)\nF : Homotopy f₀ f₁\n⊢ symm (symm F) = F\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ : C(X, Y)\nF : Homotopy f₀ f₁\nx✝ : ↑I × X\n⊢ ↑(symm (symm F)) x✝ = ↑F x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\n⊢ Continuous fun x =>\n if ↑x.fst ≤ 1 / 2 then ↑(↑(extend F) (2 * ↑x.fst)) x.snd else ↑(↑(extend G) (2 * ↑x.fst - 1)) x.snd\n[PROOFSTEP]\nrefine'\n continuous_if_le (continuous_induced_dom.comp continuous_fst) continuous_const\n (F.continuous.comp (by continuity)).continuousOn (G.continuous.comp (by continuity)).continuousOn _\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\n⊢ Continuous fun x => (Set.projIcc 0 1 extend.proof_1 (2 * ↑x.fst), x.snd)\n[PROOFSTEP]\ncontinuity\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\n⊢ Continuous fun x => (Set.projIcc 0 1 extend.proof_1 (2 * ↑x.fst - 1), x.snd)\n[PROOFSTEP]\ncontinuity\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\n⊢ ∀ (x : ↑I × X), ↑x.fst = 1 / 2 → ↑(↑(extend F) (2 * ↑x.fst)) x.snd = ↑(↑(extend G) (2 * ↑x.fst - 1)) x.snd\n[PROOFSTEP]\nrintro x hx\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nx : ↑I × X\nhx : ↑x.fst = 1 / 2\n⊢ ↑(↑(extend F) (2 * ↑x.fst)) x.snd = ↑(↑(extend G) (2 * ↑x.fst - 1)) x.snd\n[PROOFSTEP]\nrw [hx]\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nx : ↑I × X\nhx : ↑x.fst = 1 / 2\n⊢ ↑(↑(extend F) (2 * (1 / 2))) x.snd = ↑(↑(extend G) (2 * (1 / 2) - 1)) x.snd\n[PROOFSTEP]\nnorm_num\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nx : X\n⊢ ContinuousMap.toFun\n (ContinuousMap.mk fun x =>\n if ↑x.fst ≤ 1 / 2 then ↑(↑(extend F) (2 * ↑x.fst)) x.snd else ↑(↑(extend G) (2 * ↑x.fst - 1)) x.snd)\n (0, x) =\n ↑f₀ x\n[PROOFSTEP]\nnorm_num\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nx : X\n⊢ ContinuousMap.toFun\n (ContinuousMap.mk fun x =>\n if ↑x.fst ≤ 1 / 2 then ↑(↑(extend F) (2 * ↑x.fst)) x.snd else ↑(↑(extend G) (2 * ↑x.fst - 1)) x.snd)\n (1, x) =\n ↑f₂ x\n[PROOFSTEP]\nnorm_num\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nx : ↑I × X\n⊢ (if ↑x.fst ≤ 1 / 2 then ↑(↑(extend F) (2 * ↑x.fst)) x.snd else ↑(↑(extend G) (2 * ↑x.fst - 1)) x.snd) =\n if h : ↑x.fst ≤ 1 / 2 then ↑F ({ val := 2 * ↑x.fst, property := (_ : 2 * ↑x.fst ∈ I) }, x.snd)\n else ↑G ({ val := 2 * ↑x.fst - 1, property := (_ : 2 * ↑x.fst - 1 ∈ I) }, x.snd)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nx : ↑I × X\nh✝ : ↑x.fst ≤ 1 / 2\n⊢ ↑(↑(extend F) (2 * ↑x.fst)) x.snd = ↑F ({ val := 2 * ↑x.fst, property := (_ : 2 * ↑x.fst ∈ I) }, x.snd)\n[PROOFSTEP]\nrw [extend, ContinuousMap.coe_IccExtend, Set.IccExtend_of_mem]\n[GOAL]\ncase pos\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nx : ↑I × X\nh✝ : ↑x.fst ≤ 1 / 2\n⊢ ↑(↑(curry F) { val := 2 * ↑x.fst, property := ?pos.hx✝ }) x.snd =\n ↑F ({ val := 2 * ↑x.fst, property := (_ : 2 * ↑x.fst ∈ I) }, x.snd)\ncase pos.hx\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nx : ↑I × X\nh✝ : ↑x.fst ≤ 1 / 2\n⊢ 2 * ↑x.fst ∈ Set.Icc 0 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nx : ↑I × X\nh✝ : ¬↑x.fst ≤ 1 / 2\n⊢ ↑(↑(extend G) (2 * ↑x.fst - 1)) x.snd = ↑G ({ val := 2 * ↑x.fst - 1, property := (_ : 2 * ↑x.fst - 1 ∈ I) }, x.snd)\n[PROOFSTEP]\nrw [extend, ContinuousMap.coe_IccExtend, Set.IccExtend_of_mem]\n[GOAL]\ncase neg\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nx : ↑I × X\nh✝ : ¬↑x.fst ≤ 1 / 2\n⊢ ↑(↑(curry G) { val := 2 * ↑x.fst - 1, property := ?neg.hx✝ }) x.snd =\n ↑G ({ val := 2 * ↑x.fst - 1, property := (_ : 2 * ↑x.fst - 1 ∈ I) }, x.snd)\ncase neg.hx\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nx : ↑I × X\nh✝ : ¬↑x.fst ≤ 1 / 2\n⊢ 2 * ↑x.fst - 1 ∈ Set.Icc 0 1\n[PROOFSTEP]\nrfl\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\n⊢ symm (trans F G) = trans (symm G) (symm F)\n[PROOFSTEP]\next ⟨t, _⟩\n[GOAL]\ncase h.mk\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nt : ↑I\nsnd✝ : X\n⊢ ↑(symm (trans F G)) (t, snd✝) = ↑(trans (symm G) (symm F)) (t, snd✝)\n[PROOFSTEP]\nrw [trans_apply, symm_apply, trans_apply]\n[GOAL]\ncase h.mk\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nt : ↑I\nsnd✝ : X\n⊢ (if h : ↑(σ (t, snd✝).fst, (t, snd✝).snd).fst ≤ 1 / 2 then\n ↑F\n ({ val := 2 * ↑(σ (t, snd✝).fst, (t, snd✝).snd).fst,\n property := (_ : 2 * ↑(σ (t, snd✝).fst, (t, snd✝).snd).fst ∈ I) },\n (σ (t, snd✝).fst, (t, snd✝).snd).snd)\n else\n ↑G\n ({ val := 2 * ↑(σ (t, snd✝).fst, (t, snd✝).snd).fst - 1,\n property := (_ : 2 * ↑(σ (t, snd✝).fst, (t, snd✝).snd).fst - 1 ∈ I) },\n (σ (t, snd✝).fst, (t, snd✝).snd).snd)) =\n if h : ↑(t, snd✝).fst ≤ 1 / 2 then\n ↑(symm G) ({ val := 2 * ↑(t, snd✝).fst, property := (_ : 2 * ↑(t, snd✝).fst ∈ I) }, (t, snd✝).snd)\n else ↑(symm F) ({ val := 2 * ↑(t, snd✝).fst - 1, property := (_ : 2 * ↑(t, snd✝).fst - 1 ∈ I) }, (t, snd✝).snd)\n[PROOFSTEP]\nsimp only [coe_symm_eq, symm_apply]\n[GOAL]\ncase h.mk\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nt : ↑I\nsnd✝ : X\n⊢ (if h : 1 - ↑t ≤ 1 / 2 then ↑F ({ val := 2 * (1 - ↑t), property := (_ : (fun x => x ∈ I) (2 * (1 - ↑t))) }, snd✝)\n else ↑G ({ val := 2 * (1 - ↑t) - 1, property := (_ : (fun x => x ∈ I) (2 * (1 - ↑t) - 1)) }, snd✝)) =\n if h : ↑t ≤ 1 / 2 then ↑G (σ { val := 2 * ↑t, property := (_ : 2 * ↑(t, snd✝).fst ∈ I) }, snd✝)\n else ↑F (σ { val := 2 * ↑t - 1, property := (_ : 2 * ↑(t, snd✝).fst - 1 ∈ I) }, snd✝)\n[PROOFSTEP]\nsplit_ifs with h₁ h₂ h₂\n[GOAL]\ncase pos\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nt : ↑I\nsnd✝ : X\nh₁ : 1 - ↑t ≤ 1 / 2\nh₂ : ↑t ≤ 1 / 2\n⊢ ↑F ({ val := 2 * (1 - ↑t), property := (_ : (fun x => x ∈ I) (2 * (1 - ↑t))) }, snd✝) =\n ↑G (σ { val := 2 * ↑t, property := (_ : 2 * ↑(t, snd✝).fst ∈ I) }, snd✝)\n[PROOFSTEP]\nhave ht : (t : ℝ) = 1 / 2 := by linarith\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nt : ↑I\nsnd✝ : X\nh₁ : 1 - ↑t ≤ 1 / 2\nh₂ : ↑t ≤ 1 / 2\n⊢ ↑t = 1 / 2\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase pos\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nt : ↑I\nsnd✝ : X\nh₁ : 1 - ↑t ≤ 1 / 2\nh₂ : ↑t ≤ 1 / 2\nht : ↑t = 1 / 2\n⊢ ↑F ({ val := 2 * (1 - ↑t), property := (_ : (fun x => x ∈ I) (2 * (1 - ↑t))) }, snd✝) =\n ↑G (σ { val := 2 * ↑t, property := (_ : 2 * ↑(t, snd✝).fst ∈ I) }, snd✝)\n[PROOFSTEP]\nsimp only [ht]\n[GOAL]\ncase pos\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nt : ↑I\nsnd✝ : X\nh₁ : 1 - ↑t ≤ 1 / 2\nh₂ : ↑t ≤ 1 / 2\nht : ↑t = 1 / 2\n⊢ ↑F ({ val := 2 * (1 - 1 / 2), property := (_ : (fun x => x ∈ I) (2 * (1 - 1 / 2))) }, snd✝) =\n ↑G (σ { val := 2 * (1 / 2), property := (_ : (fun x => x ∈ I) (2 * (1 / 2))) }, snd✝)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase neg\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nt : ↑I\nsnd✝ : X\nh₁ : 1 - ↑t ≤ 1 / 2\nh₂ : ¬↑t ≤ 1 / 2\n⊢ ↑F ({ val := 2 * (1 - ↑t), property := (_ : (fun x => x ∈ I) (2 * (1 - ↑t))) }, snd✝) =\n ↑F (σ { val := 2 * ↑t - 1, property := (_ : 2 * ↑(t, snd✝).fst - 1 ∈ I) }, snd✝)\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase neg.h.e_6.h.e_fst\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nt : ↑I\nsnd✝ : X\nh₁ : 1 - ↑t ≤ 1 / 2\nh₂ : ¬↑t ≤ 1 / 2\n⊢ { val := 2 * (1 - ↑t), property := (_ : (fun x => x ∈ I) (2 * (1 - ↑t))) } =\n σ { val := 2 * ↑t - 1, property := (_ : 2 * ↑(t, snd✝).fst - 1 ∈ I) }\n[PROOFSTEP]\napply Subtype.ext\n[GOAL]\ncase neg.h.e_6.h.e_fst.a\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nt : ↑I\nsnd✝ : X\nh₁ : 1 - ↑t ≤ 1 / 2\nh₂ : ¬↑t ≤ 1 / 2\n⊢ ↑{ val := 2 * (1 - ↑t), property := (_ : (fun x => x ∈ I) (2 * (1 - ↑t))) } =\n ↑(σ { val := 2 * ↑t - 1, property := (_ : 2 * ↑(t, snd✝).fst - 1 ∈ I) })\n[PROOFSTEP]\nsimp only [coe_symm_eq]\n[GOAL]\ncase neg.h.e_6.h.e_fst.a\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nt : ↑I\nsnd✝ : X\nh₁ : 1 - ↑t ≤ 1 / 2\nh₂ : ¬↑t ≤ 1 / 2\n⊢ 2 * (1 - ↑t) = 1 - (2 * ↑t - 1)\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase pos\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nt : ↑I\nsnd✝ : X\nh₁ : ¬1 - ↑t ≤ 1 / 2\nh₂ : ↑t ≤ 1 / 2\n⊢ ↑G ({ val := 2 * (1 - ↑t) - 1, property := (_ : (fun x => x ∈ I) (2 * (1 - ↑t) - 1)) }, snd✝) =\n ↑G (σ { val := 2 * ↑t, property := (_ : 2 * ↑(t, snd✝).fst ∈ I) }, snd✝)\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase pos.h.e_6.h.e_fst\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nt : ↑I\nsnd✝ : X\nh₁ : ¬1 - ↑t ≤ 1 / 2\nh₂ : ↑t ≤ 1 / 2\n⊢ { val := 2 * (1 - ↑t) - 1, property := (_ : (fun x => x ∈ I) (2 * (1 - ↑t) - 1)) } =\n σ { val := 2 * ↑t, property := (_ : 2 * ↑(t, snd✝).fst ∈ I) }\n[PROOFSTEP]\napply Subtype.ext\n[GOAL]\ncase pos.h.e_6.h.e_fst.a\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nt : ↑I\nsnd✝ : X\nh₁ : ¬1 - ↑t ≤ 1 / 2\nh₂ : ↑t ≤ 1 / 2\n⊢ ↑{ val := 2 * (1 - ↑t) - 1, property := (_ : (fun x => x ∈ I) (2 * (1 - ↑t) - 1)) } =\n ↑(σ { val := 2 * ↑t, property := (_ : 2 * ↑(t, snd✝).fst ∈ I) })\n[PROOFSTEP]\nsimp only [coe_symm_eq]\n[GOAL]\ncase pos.h.e_6.h.e_fst.a\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nt : ↑I\nsnd✝ : X\nh₁ : ¬1 - ↑t ≤ 1 / 2\nh₂ : ↑t ≤ 1 / 2\n⊢ 2 * (1 - ↑t) - 1 = 1 - 2 * ↑t\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nt : ↑I\nsnd✝ : X\nh₁ : ¬1 - ↑t ≤ 1 / 2\nh₂ : ¬↑t ≤ 1 / 2\n⊢ ↑G ({ val := 2 * (1 - ↑t) - 1, property := (_ : (fun x => x ∈ I) (2 * (1 - ↑t) - 1)) }, snd✝) =\n ↑F (σ { val := 2 * ↑t - 1, property := (_ : 2 * ↑(t, snd✝).fst - 1 ∈ I) }, snd✝)\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase neg.h\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nF : Homotopy f₀ f₁\nG : Homotopy f₁ f₂\nt : ↑I\nsnd✝ : X\nh₁ : ¬1 - ↑t ≤ 1 / 2\nh₂ : ¬↑t ≤ 1 / 2\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ g₀ g₁ : C(X, Y)\nF : Homotopy f₀ f₁\nh₀ : f₀ = g₀\nh₁ : f₁ = g₁\n⊢ ∀ (x : X), ContinuousMap.toFun (ContinuousMap.mk ↑F) (0, x) = ↑g₀ x\n[PROOFSTEP]\nsimp [← h₀]\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ g₀ g₁ : C(X, Y)\nF : Homotopy f₀ f₁\nh₀ : f₀ = g₀\nh₁ : f₁ = g₁\n⊢ ∀ (x : X), ContinuousMap.toFun (ContinuousMap.mk ↑F) (1, x) = ↑g₁ x\n[PROOFSTEP]\nsimp [← h₁]\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ : C(X, Y)\ng₀ g₁ : C(Y, Z)\nF : Homotopy f₀ f₁\nG : Homotopy g₀ g₁\n⊢ ∀ (x : X), ContinuousMap.toFun (ContinuousMap.mk fun x => ↑G (x.fst, ↑F x)) (0, x) = ↑(comp g₀ f₀) x\n[PROOFSTEP]\nsimp\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ : C(X, Y)\ng₀ g₁ : C(Y, Z)\nF : Homotopy f₀ f₁\nG : Homotopy g₀ g₁\n⊢ ∀ (x : X), ContinuousMap.toFun (ContinuousMap.mk fun x => ↑G (x.fst, ↑F x)) (1, x) = ↑(comp g₁ f₁) x\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\n⊢ ∀ {x y : C(X, Y)}, Homotopic x y → Homotopic y x\n[PROOFSTEP]\napply symm\n[GOAL]\nF : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\n⊢ ∀ {x y z : C(X, Y)}, Homotopic x y → Homotopic y z → Homotopic x z\n[PROOFSTEP]\napply trans\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nP : C(X, Y) → Prop\nf₀ f₁ f₂ : C(X, Y)\nF : HomotopyWith f₀ f₁ P\nG : HomotopyWith f₁ f₂ P\nsrc✝ : Homotopy f₀ f₂ := Homotopy.trans F.toHomotopy G.toHomotopy\nt : ↑I\n⊢ P\n (ContinuousMap.mk fun x =>\n ContinuousMap.toFun\n { toContinuousMap := src✝.toContinuousMap,\n map_zero_left := (_ : ∀ (x : X), ContinuousMap.toFun src✝.toContinuousMap (0, x) = ↑f₀ x),\n map_one_left := (_ : ∀ (x : X), ContinuousMap.toFun src✝.toContinuousMap (1, x) = ↑f₂ x) }.toContinuousMap\n (t, x))\n[PROOFSTEP]\nsimp only [Homotopy.trans]\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nP : C(X, Y) → Prop\nf₀ f₁ f₂ : C(X, Y)\nF : HomotopyWith f₀ f₁ P\nG : HomotopyWith f₁ f₂ P\nsrc✝ : Homotopy f₀ f₂ := Homotopy.trans F.toHomotopy G.toHomotopy\nt : ↑I\n⊢ P\n (ContinuousMap.mk fun x =>\n if ↑t ≤ 1 / 2 then ↑(↑(Homotopy.extend F.toHomotopy) (2 * ↑t)) x\n else ↑(↑(Homotopy.extend G.toHomotopy) (2 * ↑t - 1)) x)\n[PROOFSTEP]\nchange P ⟨fun _ => ite ((t : ℝ) ≤ _) _ _, _⟩\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nP : C(X, Y) → Prop\nf₀ f₁ f₂ : C(X, Y)\nF : HomotopyWith f₀ f₁ P\nG : HomotopyWith f₁ f₂ P\nsrc✝ : Homotopy f₀ f₂ := Homotopy.trans F.toHomotopy G.toHomotopy\nt : ↑I\n⊢ P\n (ContinuousMap.mk fun x =>\n if ↑t ≤ 1 / 2 then ↑(↑(Homotopy.extend F.toHomotopy) (2 * ↑t)) x\n else ↑(↑(Homotopy.extend G.toHomotopy) (2 * ↑t - 1)) x)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nP : C(X, Y) → Prop\nf₀ f₁ f₂ : C(X, Y)\nF : HomotopyWith f₀ f₁ P\nG : HomotopyWith f₁ f₂ P\nsrc✝ : Homotopy f₀ f₂ := Homotopy.trans F.toHomotopy G.toHomotopy\nt : ↑I\nh✝ : ↑t ≤ 1 / 2\n⊢ P (ContinuousMap.mk fun x => ↑(↑(Homotopy.extend F.toHomotopy) (2 * ↑t)) x)\n[PROOFSTEP]\nexact F.extendProp _\n[GOAL]\ncase neg\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nP : C(X, Y) → Prop\nf₀ f₁ f₂ : C(X, Y)\nF : HomotopyWith f₀ f₁ P\nG : HomotopyWith f₁ f₂ P\nsrc✝ : Homotopy f₀ f₂ := Homotopy.trans F.toHomotopy G.toHomotopy\nt : ↑I\nh✝ : ¬↑t ≤ 1 / 2\n⊢ P (ContinuousMap.mk fun x => ↑(↑(Homotopy.extend G.toHomotopy) (2 * ↑t - 1)) x)\n[PROOFSTEP]\nexact G.extendProp _\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nS : Set X\nF : HomotopyRel f₀ f₁ S\nG : HomotopyRel f₁ f₂ S\nsrc✝ : Homotopy f₀ f₂ := Homotopy.trans F.toHomotopy G.toHomotopy\nt : ↑I\nx : X\nhx : x ∈ S\n⊢ ↑(mk fun x =>\n ContinuousMap.toFun\n { toContinuousMap := src✝.toContinuousMap,\n map_zero_left := (_ : ∀ (x : X), ContinuousMap.toFun src✝.toContinuousMap (0, x) = ↑f₀ x),\n map_one_left :=\n (_ : ∀ (x : X), ContinuousMap.toFun src✝.toContinuousMap (1, x) = ↑f₂ x) }.toContinuousMap\n (t, x))\n x =\n ↑f₀ x ∧\n ↑(mk fun x =>\n ContinuousMap.toFun\n { toContinuousMap := src✝.toContinuousMap,\n map_zero_left := (_ : ∀ (x : X), ContinuousMap.toFun src✝.toContinuousMap (0, x) = ↑f₀ x),\n map_one_left :=\n (_ : ∀ (x : X), ContinuousMap.toFun src✝.toContinuousMap (1, x) = ↑f₂ x) }.toContinuousMap\n (t, x))\n x =\n ↑f₂ x\n[PROOFSTEP]\nsimp only [Homotopy.trans]\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nS : Set X\nF : HomotopyRel f₀ f₁ S\nG : HomotopyRel f₁ f₂ S\nsrc✝ : Homotopy f₀ f₂ := Homotopy.trans F.toHomotopy G.toHomotopy\nt : ↑I\nx : X\nhx : x ∈ S\n⊢ ↑(mk fun x =>\n if ↑t ≤ 1 / 2 then ↑(↑(Homotopy.extend F.toHomotopy) (2 * ↑t)) x\n else ↑(↑(Homotopy.extend G.toHomotopy) (2 * ↑t - 1)) x)\n x =\n ↑f₀ x ∧\n ↑(mk fun x =>\n if ↑t ≤ 1 / 2 then ↑(↑(Homotopy.extend F.toHomotopy) (2 * ↑t)) x\n else ↑(↑(Homotopy.extend G.toHomotopy) (2 * ↑t - 1)) x)\n x =\n ↑f₂ x\n[PROOFSTEP]\nchange (⟨fun _ => ite ((t : ℝ) ≤ _) _ _, _⟩ : C(X, Y)) _ = _ ∧ _ = _\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nS : Set X\nF : HomotopyRel f₀ f₁ S\nG : HomotopyRel f₁ f₂ S\nsrc✝ : Homotopy f₀ f₂ := Homotopy.trans F.toHomotopy G.toHomotopy\nt : ↑I\nx : X\nhx : x ∈ S\n⊢ ↑(mk fun x =>\n if ↑t ≤ 1 / 2 then ↑(↑(Homotopy.extend F.toHomotopy) (2 * ↑t)) x\n else ↑(↑(Homotopy.extend G.toHomotopy) (2 * ↑t - 1)) x)\n x =\n ↑f₀ x ∧\n ↑(mk fun x =>\n if ↑t ≤ 1 / 2 then ↑(↑(Homotopy.extend F.toHomotopy) (2 * ↑t)) x\n else ↑(↑(Homotopy.extend G.toHomotopy) (2 * ↑t - 1)) x)\n x =\n ↑f₂ x\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nS : Set X\nF : HomotopyRel f₀ f₁ S\nG : HomotopyRel f₁ f₂ S\nsrc✝ : Homotopy f₀ f₂ := Homotopy.trans F.toHomotopy G.toHomotopy\nt : ↑I\nx : X\nhx : x ∈ S\nh✝ : ↑t ≤ 1 / 2\n⊢ ↑(mk fun x => ↑(↑(Homotopy.extend F.toHomotopy) (2 * ↑t)) x) x = ↑f₀ x ∧\n ↑(mk fun x => ↑(↑(Homotopy.extend F.toHomotopy) (2 * ↑t)) x) x = ↑f₂ x\n[PROOFSTEP]\nsimp [(HomotopyWith.extendProp F (2 * t) x hx).1, F.fst_eq_snd hx, G.fst_eq_snd hx]\n[GOAL]\ncase neg\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀ f₁ f₂ : C(X, Y)\nS : Set X\nF : HomotopyRel f₀ f₁ S\nG : HomotopyRel f₁ f₂ S\nsrc✝ : Homotopy f₀ f₂ := Homotopy.trans F.toHomotopy G.toHomotopy\nt : ↑I\nx : X\nhx : x ∈ S\nh✝ : ¬↑t ≤ 1 / 2\n⊢ ↑(mk fun x => ↑(↑(Homotopy.extend G.toHomotopy) (2 * ↑t - 1)) x) x = ↑f₀ x ∧\n ↑(mk fun x => ↑(↑(Homotopy.extend G.toHomotopy) (2 * ↑t - 1)) x) x = ↑f₂ x\n[PROOFSTEP]\nsimp [(HomotopyWith.extendProp G (2 * t - 1) x hx).1, F.fst_eq_snd hx, G.fst_eq_snd hx]\n[GOAL]\nF✝ : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nf₀✝ f₁✝ f₂ : C(X, Y)\nS : Set X\nf₀ f₁ g₀ g₁ : C(X, Y)\nF : HomotopyRel f₀ f₁ S\nh₀ : f₀ = g₀\nh₁ : f₁ = g₁\nt : ↑I\nx : X\nhx : x ∈ S\n⊢ ↑(mk fun x => ContinuousMap.toFun (Homotopy.cast F.toHomotopy h₀ h₁).toContinuousMap (t, x)) x = ↑g₀ x ∧\n ↑(mk fun x => ContinuousMap.toFun (Homotopy.cast F.toHomotopy h₀ h₁).toContinuousMap (t, x)) x = ↑g₁ x\n[PROOFSTEP]\nsimpa only [← h₀, ← h₁] using F.prop t x hx\n[GOAL]\nF : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nS : Set X\n⊢ ∀ {x y : C(X, Y)}, HomotopicRel x y S → HomotopicRel y x S\n[PROOFSTEP]\napply symm\n[GOAL]\nF : Type u_1\nX : Type u\nY : Type v\nZ : Type w\nZ' : Type x\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace Z'\nS : Set X\n⊢ ∀ {x y z : C(X, Y)}, HomotopicRel x y S → HomotopicRel y z S → HomotopicRel x z S\n[PROOFSTEP]\napply trans\n", "meta": {"mathlib_filename": "Mathlib.Topology.Homotopy.Basic", "llama_tokens": 15468, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8333245870332531, "lm_q2_score": 0.6992544210587585, "lm_q1q2_score": 0.5827059016599664}} {"text": "[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\na✝ b✝ c✝ d✝ : LocallyDiscrete C\nf : a✝ ⟶ b✝\ng : b✝ ⟶ c✝\nh : c✝ ⟶ d✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\napply Discrete.ext\n[GOAL]\ncase as\nC : Type u\ninst✝ : Category.{v, u} C\na✝ b✝ c✝ d✝ : LocallyDiscrete C\nf : a✝ ⟶ b✝\ng : b✝ ⟶ c✝\nh : c✝ ⟶ d✝\n⊢ ((f ≫ g) ≫ h).as = (f ≫ g ≫ h).as\n[PROOFSTEP]\nchange (f.as ≫ g.as) ≫ h.as = f.as ≫ (g.as ≫ h.as)\n[GOAL]\ncase as\nC : Type u\ninst✝ : Category.{v, u} C\na✝ b✝ c✝ d✝ : LocallyDiscrete C\nf : a✝ ⟶ b✝\ng : b✝ ⟶ c✝\nh : c✝ ⟶ d✝\n⊢ (f.as ≫ g.as) ≫ h.as = f.as ≫ g.as ≫ h.as\n[PROOFSTEP]\nrw [Category.assoc]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\na✝ b✝ : LocallyDiscrete C\nf : a✝ ⟶ b✝\n⊢ 𝟙 a✝ ≫ f = f\n[PROOFSTEP]\napply Discrete.ext\n[GOAL]\ncase as\nC : Type u\ninst✝ : Category.{v, u} C\na✝ b✝ : LocallyDiscrete C\nf : a✝ ⟶ b✝\n⊢ (𝟙 a✝ ≫ f).as = f.as\n[PROOFSTEP]\nchange 𝟙 _ ≫ _ = _\n[GOAL]\ncase as\nC : Type u\ninst✝ : Category.{v, u} C\na✝ b✝ : LocallyDiscrete C\nf : a✝ ⟶ b✝\n⊢ 𝟙 a✝ ≫ f.as = f.as\n[PROOFSTEP]\nrw [Category.id_comp]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\na✝ b✝ : LocallyDiscrete C\nf : a✝ ⟶ b✝\n⊢ f ≫ 𝟙 b✝ = f\n[PROOFSTEP]\napply Discrete.ext\n[GOAL]\ncase as\nC : Type u\ninst✝ : Category.{v, u} C\na✝ b✝ : LocallyDiscrete C\nf : a✝ ⟶ b✝\n⊢ (f ≫ 𝟙 b✝).as = f.as\n[PROOFSTEP]\nchange _ ≫ 𝟙 _ = _\n[GOAL]\ncase as\nC : Type u\ninst✝ : Category.{v, u} C\na✝ b✝ : LocallyDiscrete C\nf : a✝ ⟶ b✝\n⊢ f.as ≫ 𝟙 b✝ = f.as\n[PROOFSTEP]\nrw [Category.comp_id]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\n⊢ ∀ {a b : LocallyDiscrete C} (f : a ⟶ b), 𝟙 a ≫ f = f\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\na✝ b✝ : LocallyDiscrete C\nf✝ : a✝ ⟶ b✝\n⊢ 𝟙 a✝ ≫ f✝ = f✝\n[PROOFSTEP]\napply Discrete.ext\n[GOAL]\ncase as\nC : Type u\ninst✝ : Category.{v, u} C\na✝ b✝ : LocallyDiscrete C\nf✝ : a✝ ⟶ b✝\n⊢ (𝟙 a✝ ≫ f✝).as = f✝.as\n[PROOFSTEP]\napply Category.id_comp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\n⊢ ∀ {a b : LocallyDiscrete C} (f : a ⟶ b), f ≫ 𝟙 b = f\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\na✝ b✝ : LocallyDiscrete C\nf✝ : a✝ ⟶ b✝\n⊢ f✝ ≫ 𝟙 b✝ = f✝\n[PROOFSTEP]\napply Discrete.ext\n[GOAL]\ncase as\nC : Type u\ninst✝ : Category.{v, u} C\na✝ b✝ : LocallyDiscrete C\nf✝ : a✝ ⟶ b✝\n⊢ (f✝ ≫ 𝟙 b✝).as = f✝.as\n[PROOFSTEP]\napply Category.comp_id\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\n⊢ ∀ {a b c d : LocallyDiscrete C} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d), (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\na✝ b✝ c✝ d✝ : LocallyDiscrete C\nf✝ : a✝ ⟶ b✝\ng✝ : b✝ ⟶ c✝\nh✝ : c✝ ⟶ d✝\n⊢ (f✝ ≫ g✝) ≫ h✝ = f✝ ≫ g✝ ≫ h✝\n[PROOFSTEP]\napply Discrete.ext\n[GOAL]\ncase as\nC : Type u\ninst✝ : Category.{v, u} C\na✝ b✝ c✝ d✝ : LocallyDiscrete C\nf✝ : a✝ ⟶ b✝\ng✝ : b✝ ⟶ c✝\nh✝ : c✝ ⟶ d✝\n⊢ ((f✝ ≫ g✝) ≫ h✝).as = (f✝ ≫ g✝ ≫ h✝).as\n[PROOFSTEP]\napply Category.assoc\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Bicategory.LocallyDiscrete", "llama_tokens": 1839, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8175744939732856, "lm_q2_score": 0.7122321781307375, "lm_q1q2_score": 0.5823028626267287}} {"text": "[GOAL]\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF : Presheaf CommRingCat X\nG : SubmonoidPresheaf F\nU : (Opens ↑X)ᵒᵖ\n⊢ { obj := fun U => CommRingCat.of (Localization (obj G U)),\n map := fun {U V} i =>\n CommRingCat.ofHom\n (IsLocalization.map (Localization (obj G V)) (F.map i)\n (_ : obj G U ≤ Submonoid.comap (F.map i) (obj G V))) }.map\n (𝟙 U) =\n 𝟙\n ({ obj := fun U => CommRingCat.of (Localization (obj G U)),\n map := fun {U V} i =>\n CommRingCat.ofHom\n (IsLocalization.map (Localization (obj G V)) (F.map i)\n (_ : obj G U ≤ Submonoid.comap (F.map i) (obj G V))) }.obj\n U)\n[PROOFSTEP]\nsimp_rw [F.map_id]\n[GOAL]\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF : Presheaf CommRingCat X\nG : SubmonoidPresheaf F\nU : (Opens ↑X)ᵒᵖ\n⊢ CommRingCat.ofHom\n (IsLocalization.map (Localization (obj G U)) (𝟙 (F.obj U))\n (_ : obj G U ≤ Submonoid.comap (𝟙 (F.obj U)) (obj G U))) =\n 𝟙 (CommRingCat.of (Localization (obj G U)))\n[PROOFSTEP]\next x\n[GOAL]\ncase w\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF : Presheaf CommRingCat X\nG : SubmonoidPresheaf F\nU : (Opens ↑X)ᵒᵖ\nx : (forget CommRingCat).obj (CommRingCat.of (Localization (obj G U)))\n⊢ ↑(CommRingCat.ofHom\n (IsLocalization.map (Localization (obj G U)) (𝟙 (F.obj U))\n (_ : obj G U ≤ Submonoid.comap (𝟙 (F.obj U)) (obj G U))))\n x =\n ↑(𝟙 (CommRingCat.of (Localization (obj G U)))) x\n[PROOFSTEP]\nexact IsLocalization.map_id (M := G.obj U) (S := Localization (G.obj U)) x\n[GOAL]\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF : Presheaf CommRingCat X\nG : SubmonoidPresheaf F\nU V W : (Opens ↑X)ᵒᵖ\ni : U ⟶ V\nj : V ⟶ W\n⊢ { obj := fun U => CommRingCat.of (Localization (obj G U)),\n map := fun {U V} i =>\n CommRingCat.ofHom\n (IsLocalization.map (Localization (obj G V)) (F.map i)\n (_ : obj G U ≤ Submonoid.comap (F.map i) (obj G V))) }.map\n (i ≫ j) =\n { obj := fun U => CommRingCat.of (Localization (obj G U)),\n map := fun {U V} i =>\n CommRingCat.ofHom\n (IsLocalization.map (Localization (obj G V)) (F.map i)\n (_ : obj G U ≤ Submonoid.comap (F.map i) (obj G V))) }.map\n i ≫\n { obj := fun U => CommRingCat.of (Localization (obj G U)),\n map := fun {U V} i =>\n CommRingCat.ofHom\n (IsLocalization.map (Localization (obj G V)) (F.map i)\n (_ : obj G U ≤ Submonoid.comap (F.map i) (obj G V))) }.map\n j\n[PROOFSTEP]\ndelta CommRingCat.ofHom CommRingCat.of Bundled.of\n[GOAL]\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF : Presheaf CommRingCat X\nG : SubmonoidPresheaf F\nU V W : (Opens ↑X)ᵒᵖ\ni : U ⟶ V\nj : V ⟶ W\n⊢ { obj := fun U => Bundled.mk (Localization (obj G U)),\n map := fun {U V} i =>\n IsLocalization.map (Localization (obj G V)) (F.map i)\n (_ : obj G U ≤ Submonoid.comap (F.map i) (obj G V)) }.map\n (i ≫ j) =\n { obj := fun U => Bundled.mk (Localization (obj G U)),\n map := fun {U V} i =>\n IsLocalization.map (Localization (obj G V)) (F.map i)\n (_ : obj G U ≤ Submonoid.comap (F.map i) (obj G V)) }.map\n i ≫\n { obj := fun U => Bundled.mk (Localization (obj G U)),\n map := fun {U V} i =>\n IsLocalization.map (Localization (obj G V)) (F.map i)\n (_ : obj G U ≤ Submonoid.comap (F.map i) (obj G V)) }.map\n j\n[PROOFSTEP]\nsimp_rw [F.map_comp, CommRingCat.comp_eq_ring_hom_comp]\n[GOAL]\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF : Presheaf CommRingCat X\nG : SubmonoidPresheaf F\nU V W : (Opens ↑X)ᵒᵖ\ni : U ⟶ V\nj : V ⟶ W\n⊢ IsLocalization.map (Localization (obj G W)) (RingHom.comp (F.map j) (F.map i))\n (_ : obj G U ≤ Submonoid.comap (RingHom.comp (F.map j) (F.map i)) (obj G W)) =\n RingHom.comp\n (IsLocalization.map (Localization (obj G W)) (F.map j) (_ : obj G V ≤ Submonoid.comap (F.map j) (obj G W)))\n (IsLocalization.map (Localization (obj G V)) (F.map i) (_ : obj G U ≤ Submonoid.comap (F.map i) (obj G V)))\n[PROOFSTEP]\nrw [IsLocalization.map_comp_map]\n[GOAL]\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF : Presheaf CommRingCat X\nG : SubmonoidPresheaf F\nS : (x : ↑X) → Submonoid ↑(stalk F x)\nU V : (Opens ↑X)ᵒᵖ\ni : U ⟶ V\n⊢ (fun U => ⨅ (x : { x // x ∈ U.unop }), Submonoid.comap (germ F x) (S ↑x)) U ≤\n Submonoid.comap (F.map i) ((fun U => ⨅ (x : { x // x ∈ U.unop }), Submonoid.comap (germ F x) (S ↑x)) V)\n[PROOFSTEP]\nintro s hs\n[GOAL]\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF : Presheaf CommRingCat X\nG : SubmonoidPresheaf F\nS : (x : ↑X) → Submonoid ↑(stalk F x)\nU V : (Opens ↑X)ᵒᵖ\ni : U ⟶ V\ns : (forget CommRingCat).obj (F.obj U)\nhs : s ∈ (fun U => ⨅ (x : { x // x ∈ U.unop }), Submonoid.comap (germ F x) (S ↑x)) U\n⊢ s ∈ Submonoid.comap (F.map i) ((fun U => ⨅ (x : { x // x ∈ U.unop }), Submonoid.comap (germ F x) (S ↑x)) V)\n[PROOFSTEP]\nsimp only [Submonoid.mem_comap, Submonoid.mem_iInf] at hs ⊢\n[GOAL]\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF : Presheaf CommRingCat X\nG : SubmonoidPresheaf F\nS : (x : ↑X) → Submonoid ↑(stalk F x)\nU V : (Opens ↑X)ᵒᵖ\ni : U ⟶ V\ns : (forget CommRingCat).obj (F.obj U)\nhs : ∀ (i : { x // x ∈ U.unop }), ↑(germ F i) s ∈ S ↑i\n⊢ ∀ (i_1 : { x // x ∈ V.unop }), ↑(germ F i_1) (↑(F.map i) s) ∈ S ↑i_1\n[PROOFSTEP]\nintro x\n[GOAL]\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF : Presheaf CommRingCat X\nG : SubmonoidPresheaf F\nS : (x : ↑X) → Submonoid ↑(stalk F x)\nU V : (Opens ↑X)ᵒᵖ\ni : U ⟶ V\ns : (forget CommRingCat).obj (F.obj U)\nhs : ∀ (i : { x // x ∈ U.unop }), ↑(germ F i) s ∈ S ↑i\nx : { x // x ∈ V.unop }\n⊢ ↑(germ F x) (↑(F.map i) s) ∈ S ↑x\n[PROOFSTEP]\nchange (F.map i.unop.op ≫ F.germ x) s ∈ _\n[GOAL]\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF : Presheaf CommRingCat X\nG : SubmonoidPresheaf F\nS : (x : ↑X) → Submonoid ↑(stalk F x)\nU V : (Opens ↑X)ᵒᵖ\ni : U ⟶ V\ns : (forget CommRingCat).obj (F.obj U)\nhs : ∀ (i : { x // x ∈ U.unop }), ↑(germ F i) s ∈ S ↑i\nx : { x // x ∈ V.unop }\n⊢ ↑(F.map i.unop.op ≫ germ F x) s ∈ S ↑x\n[PROOFSTEP]\nrw [F.germ_res]\n[GOAL]\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF : Presheaf CommRingCat X\nG : SubmonoidPresheaf F\nS : (x : ↑X) → Submonoid ↑(stalk F x)\nU V : (Opens ↑X)ᵒᵖ\ni : U ⟶ V\ns : (forget CommRingCat).obj (F.obj U)\nhs : ∀ (i : { x // x ∈ U.unop }), ↑(germ F i) s ∈ S ↑i\nx : { x // x ∈ V.unop }\n⊢ ↑(germ F ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) s ∈ S ↑x\n[PROOFSTEP]\nexact hs _\n[GOAL]\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF✝ : Presheaf CommRingCat X\nG : SubmonoidPresheaf F✝\nF : Sheaf CommRingCat X\n⊢ Mono (toTotalQuotientPresheaf (Sheaf.presheaf F))\n[PROOFSTEP]\nsuffices : ∀ (U : (Opens ↑X)ᵒᵖ), Mono (F.presheaf.toTotalQuotientPresheaf.app U)\n[GOAL]\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF✝ : Presheaf CommRingCat X\nG : SubmonoidPresheaf F✝\nF : Sheaf CommRingCat X\nthis : ∀ (U : (Opens ↑X)ᵒᵖ), Mono (NatTrans.app (toTotalQuotientPresheaf (Sheaf.presheaf F)) U)\n⊢ Mono (toTotalQuotientPresheaf (Sheaf.presheaf F))\n[PROOFSTEP]\napply NatTrans.mono_of_mono_app\n[GOAL]\ncase this\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF✝ : Presheaf CommRingCat X\nG : SubmonoidPresheaf F✝\nF : Sheaf CommRingCat X\n⊢ ∀ (U : (Opens ↑X)ᵒᵖ), Mono (NatTrans.app (toTotalQuotientPresheaf (Sheaf.presheaf F)) U)\n[PROOFSTEP]\nintro U\n[GOAL]\ncase this\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF✝ : Presheaf CommRingCat X\nG : SubmonoidPresheaf F✝\nF : Sheaf CommRingCat X\nU : (Opens ↑X)ᵒᵖ\n⊢ Mono (NatTrans.app (toTotalQuotientPresheaf (Sheaf.presheaf F)) U)\n[PROOFSTEP]\napply ConcreteCategory.mono_of_injective\n[GOAL]\ncase this.i\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF✝ : Presheaf CommRingCat X\nG : SubmonoidPresheaf F✝\nF : Sheaf CommRingCat X\nU : (Opens ↑X)ᵒᵖ\n⊢ Function.Injective ↑(NatTrans.app (toTotalQuotientPresheaf (Sheaf.presheaf F)) U)\n[PROOFSTEP]\ndsimp [toTotalQuotientPresheaf, CommRingCat.ofHom]\n -- Porting note : this is a hack to make the `refine` below works\n[GOAL]\ncase this.i\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF✝ : Presheaf CommRingCat X\nG : SubmonoidPresheaf F✝\nF : Sheaf CommRingCat X\nU : (Opens ↑X)ᵒᵖ\n⊢ Function.Injective\n ↑(algebraMap (↑((Sheaf.presheaf F).obj U))\n (Localization\n (⨅ (x : { x // x ∈ U.unop }), Submonoid.comap (germ (Sheaf.presheaf F) x) (↑(stalk (Sheaf.presheaf F) ↑x))⁰)))\n[PROOFSTEP]\nset m := _\n[GOAL]\ncase this.i\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF✝ : Presheaf CommRingCat X\nG : SubmonoidPresheaf F✝\nF : Sheaf CommRingCat X\nU : (Opens ↑X)ᵒᵖ\nm : ?m.65485 := ?m.65486\n⊢ Function.Injective\n ↑(algebraMap (↑((Sheaf.presheaf F).obj U))\n (Localization\n (⨅ (x : { x // x ∈ U.unop }), Submonoid.comap (germ (Sheaf.presheaf F) x) (↑(stalk (Sheaf.presheaf F) ↑x))⁰)))\n[PROOFSTEP]\nchange Function.Injective (algebraMap _ (Localization m))\n[GOAL]\ncase this.i\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF✝ : Presheaf CommRingCat X\nG : SubmonoidPresheaf F✝\nF : Sheaf CommRingCat X\nU : (Opens ↑X)ᵒᵖ\nm : Submonoid ((forget CommRingCat).obj ((Sheaf.presheaf F).obj U)) :=\n ⨅ (x : { x // x ∈ U.unop }), Submonoid.comap (germ (Sheaf.presheaf F) x) (↑(stalk (Sheaf.presheaf F) ↑x))⁰\n⊢ Function.Injective ↑(algebraMap ((forget CommRingCat).obj ((Sheaf.presheaf F).obj U)) (Localization m))\n[PROOFSTEP]\nchange Function.Injective (algebraMap (F.presheaf.obj U) _)\n[GOAL]\ncase this.i\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF✝ : Presheaf CommRingCat X\nG : SubmonoidPresheaf F✝\nF : Sheaf CommRingCat X\nU : (Opens ↑X)ᵒᵖ\nm : Submonoid ((forget CommRingCat).obj ((Sheaf.presheaf F).obj U)) :=\n ⨅ (x : { x // x ∈ U.unop }), Submonoid.comap (germ (Sheaf.presheaf F) x) (↑(stalk (Sheaf.presheaf F) ↑x))⁰\n⊢ Function.Injective ↑(algebraMap (↑((Sheaf.presheaf F).obj U)) (Localization m))\n[PROOFSTEP]\nhaveI : IsLocalization _ (Localization m) := Localization.isLocalization\n[GOAL]\ncase this.i\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF✝ : Presheaf CommRingCat X\nG : SubmonoidPresheaf F✝\nF : Sheaf CommRingCat X\nU : (Opens ↑X)ᵒᵖ\nm : Submonoid ((forget CommRingCat).obj ((Sheaf.presheaf F).obj U)) :=\n ⨅ (x : { x // x ∈ U.unop }), Submonoid.comap (germ (Sheaf.presheaf F) x) (↑(stalk (Sheaf.presheaf F) ↑x))⁰\nthis : IsLocalization m (Localization m)\n⊢ Function.Injective ↑(algebraMap (↑((Sheaf.presheaf F).obj U)) (Localization m))\n[PROOFSTEP]\nrefine IsLocalization.injective (M := m) (S := Localization m) ?_\n[GOAL]\ncase this.i\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF✝ : Presheaf CommRingCat X\nG : SubmonoidPresheaf F✝\nF : Sheaf CommRingCat X\nU : (Opens ↑X)ᵒᵖ\nm : Submonoid ((forget CommRingCat).obj ((Sheaf.presheaf F).obj U)) :=\n ⨅ (x : { x // x ∈ U.unop }), Submonoid.comap (germ (Sheaf.presheaf F) x) (↑(stalk (Sheaf.presheaf F) ↑x))⁰\nthis : IsLocalization m (Localization m)\n⊢ m ≤ ((forget CommRingCat).obj ((Sheaf.presheaf F).obj U))⁰\n[PROOFSTEP]\nintro s hs t e\n[GOAL]\ncase this.i\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF✝ : Presheaf CommRingCat X\nG : SubmonoidPresheaf F✝\nF : Sheaf CommRingCat X\nU : (Opens ↑X)ᵒᵖ\nm : Submonoid ((forget CommRingCat).obj ((Sheaf.presheaf F).obj U)) :=\n ⨅ (x : { x // x ∈ U.unop }), Submonoid.comap (germ (Sheaf.presheaf F) x) (↑(stalk (Sheaf.presheaf F) ↑x))⁰\nthis : IsLocalization m (Localization m)\ns : (forget CommRingCat).obj ((Sheaf.presheaf F).obj U)\nhs : s ∈ m\nt : (forget CommRingCat).obj ((Sheaf.presheaf F).obj U)\ne : t * s = 0\n⊢ t = 0\n[PROOFSTEP]\napply section_ext F (unop U)\n[GOAL]\ncase this.i.h\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF✝ : Presheaf CommRingCat X\nG : SubmonoidPresheaf F✝\nF : Sheaf CommRingCat X\nU : (Opens ↑X)ᵒᵖ\nm : Submonoid ((forget CommRingCat).obj ((Sheaf.presheaf F).obj U)) :=\n ⨅ (x : { x // x ∈ U.unop }), Submonoid.comap (germ (Sheaf.presheaf F) x) (↑(stalk (Sheaf.presheaf F) ↑x))⁰\nthis : IsLocalization m (Localization m)\ns : (forget CommRingCat).obj ((Sheaf.presheaf F).obj U)\nhs : s ∈ m\nt : (forget CommRingCat).obj ((Sheaf.presheaf F).obj U)\ne : t * s = 0\n⊢ ∀ (x : { x // x ∈ U.unop }), ↑(germ (Sheaf.presheaf F) x) t = ↑(germ (Sheaf.presheaf F) x) 0\n[PROOFSTEP]\nintro x\n[GOAL]\ncase this.i.h\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF✝ : Presheaf CommRingCat X\nG : SubmonoidPresheaf F✝\nF : Sheaf CommRingCat X\nU : (Opens ↑X)ᵒᵖ\nm : Submonoid ((forget CommRingCat).obj ((Sheaf.presheaf F).obj U)) :=\n ⨅ (x : { x // x ∈ U.unop }), Submonoid.comap (germ (Sheaf.presheaf F) x) (↑(stalk (Sheaf.presheaf F) ↑x))⁰\nthis : IsLocalization m (Localization m)\ns : (forget CommRingCat).obj ((Sheaf.presheaf F).obj U)\nhs : s ∈ m\nt : (forget CommRingCat).obj ((Sheaf.presheaf F).obj U)\ne : t * s = 0\nx : { x // x ∈ U.unop }\n⊢ ↑(germ (Sheaf.presheaf F) x) t = ↑(germ (Sheaf.presheaf F) x) 0\n[PROOFSTEP]\nrw [map_zero]\n[GOAL]\ncase this.i.h\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF✝ : Presheaf CommRingCat X\nG : SubmonoidPresheaf F✝\nF : Sheaf CommRingCat X\nU : (Opens ↑X)ᵒᵖ\nm : Submonoid ((forget CommRingCat).obj ((Sheaf.presheaf F).obj U)) :=\n ⨅ (x : { x // x ∈ U.unop }), Submonoid.comap (germ (Sheaf.presheaf F) x) (↑(stalk (Sheaf.presheaf F) ↑x))⁰\nthis : IsLocalization m (Localization m)\ns : (forget CommRingCat).obj ((Sheaf.presheaf F).obj U)\nhs : s ∈ m\nt : (forget CommRingCat).obj ((Sheaf.presheaf F).obj U)\ne : t * s = 0\nx : { x // x ∈ U.unop }\n⊢ ↑(germ (Sheaf.presheaf F) x) t = 0\n[PROOFSTEP]\napply Submonoid.mem_iInf.mp hs x\n[GOAL]\ncase this.i.h.a\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF✝ : Presheaf CommRingCat X\nG : SubmonoidPresheaf F✝\nF : Sheaf CommRingCat X\nU : (Opens ↑X)ᵒᵖ\nm : Submonoid ((forget CommRingCat).obj ((Sheaf.presheaf F).obj U)) :=\n ⨅ (x : { x // x ∈ U.unop }), Submonoid.comap (germ (Sheaf.presheaf F) x) (↑(stalk (Sheaf.presheaf F) ↑x))⁰\nthis : IsLocalization m (Localization m)\ns : (forget CommRingCat).obj ((Sheaf.presheaf F).obj U)\nhs : s ∈ m\nt : (forget CommRingCat).obj ((Sheaf.presheaf F).obj U)\ne : t * s = 0\nx : { x // x ∈ U.unop }\n⊢ ↑(germ (Sheaf.presheaf F) x) t * ↑(germ (Sheaf.presheaf F) x) s = 0\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase this.i.h.a\nX : TopCat\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ConcreteCategory C\nF✝ : Presheaf CommRingCat X\nG : SubmonoidPresheaf F✝\nF : Sheaf CommRingCat X\nU : (Opens ↑X)ᵒᵖ\nm : Submonoid ((forget CommRingCat).obj ((Sheaf.presheaf F).obj U)) :=\n ⨅ (x : { x // x ∈ U.unop }), Submonoid.comap (germ (Sheaf.presheaf F) x) (↑(stalk (Sheaf.presheaf F) ↑x))⁰\nthis : IsLocalization m (Localization m)\ns : (forget CommRingCat).obj ((Sheaf.presheaf F).obj U)\nhs : s ∈ m\nt : (forget CommRingCat).obj ((Sheaf.presheaf F).obj U)\ne : t * s = 0\nx : { x // x ∈ U.unop }\n⊢ ↑(germ (Sheaf.presheaf F) x) t * ↑(germ (Sheaf.presheaf F) x) s = 0\n[PROOFSTEP]\nrw [← map_mul, e, map_zero]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Sheaves.Operations", "llama_tokens": 7412, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8615382200964034, "lm_q2_score": 0.6757645944891558, "lm_q1q2_score": 0.582197025940355}} {"text": "[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\n⊢ 4 * b₈ W = b₂ W * b₆ W - b₄ W ^ 2\n[PROOFSTEP]\nsimp only [b₂, b₄, b₆, b₈]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\n⊢ 4 * (W.a₁ ^ 2 * W.a₆ + 4 * W.a₂ * W.a₆ - W.a₁ * W.a₃ * W.a₄ + W.a₂ * W.a₃ ^ 2 - W.a₄ ^ 2) =\n (W.a₁ ^ 2 + 4 * W.a₂) * (W.a₃ ^ 2 + 4 * W.a₆) - (2 * W.a₄ + W.a₁ * W.a₃) ^ 2\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\n⊢ 1728 * Δ W = c₄ W ^ 3 - c₆ W ^ 2\n[PROOFSTEP]\nsimp only [b₂, b₄, b₆, b₈, c₄, c₆, Δ]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\n⊢ 1728 *\n (-(W.a₁ ^ 2 + 4 * W.a₂) ^ 2 *\n (W.a₁ ^ 2 * W.a₆ + 4 * W.a₂ * W.a₆ - W.a₁ * W.a₃ * W.a₄ + W.a₂ * W.a₃ ^ 2 - W.a₄ ^ 2) -\n 8 * (2 * W.a₄ + W.a₁ * W.a₃) ^ 3 -\n 27 * (W.a₃ ^ 2 + 4 * W.a₆) ^ 2 +\n 9 * (W.a₁ ^ 2 + 4 * W.a₂) * (2 * W.a₄ + W.a₁ * W.a₃) * (W.a₃ ^ 2 + 4 * W.a₆)) =\n ((W.a₁ ^ 2 + 4 * W.a₂) ^ 2 - 24 * (2 * W.a₄ + W.a₁ * W.a₃)) ^ 3 -\n (-(W.a₁ ^ 2 + 4 * W.a₂) ^ 3 + 36 * (W.a₁ ^ 2 + 4 * W.a₂) * (2 * W.a₄ + W.a₁ * W.a₃) -\n 216 * (W.a₃ ^ 2 + 4 * W.a₆)) ^\n 2\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\n⊢ c₄ (ofJ0 R) = 0\n[PROOFSTEP]\nrw [ofJ0, c₄, b₂, b₄]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\n⊢ ({ a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₁ ^ 2 + 4 * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₂) ^\n 2 -\n 24 *\n (2 * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₄ +\n { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₁ * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₃) =\n 0\n[PROOFSTEP]\nnorm_num1\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\n⊢ Δ (ofJ0 R) = -27\n[PROOFSTEP]\nrw [ofJ0, Δ, b₂, b₄, b₆, b₈]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\n⊢ -({ a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₁ ^ 2 + 4 * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₂) ^\n 2 *\n ({ a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₁ ^ 2 *\n { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₆ +\n 4 * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₂ *\n { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₆ -\n { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₁ *\n { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₃ *\n { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₄ +\n { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₂ *\n { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₃ ^ 2 -\n { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₄ ^ 2) -\n 8 *\n (2 * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₄ +\n { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₁ *\n { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₃) ^\n 3 -\n 27 *\n ({ a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₃ ^ 2 +\n 4 * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₆) ^\n 2 +\n 9 *\n ({ a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₁ ^ 2 +\n 4 * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₂) *\n (2 * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₄ +\n { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₁ * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₃) *\n ({ a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₃ ^ 2 +\n 4 * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := 0, a₆ := 0 }.a₆) =\n -27\n[PROOFSTEP]\nnorm_num1\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\n⊢ c₄ (ofJ1728 R) = -48\n[PROOFSTEP]\nrw [ofJ1728, c₄, b₂, b₄]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\n⊢ ({ a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₁ ^ 2 + 4 * { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₂) ^\n 2 -\n 24 *\n (2 * { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₄ +\n { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₁ * { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₃) =\n -48\n[PROOFSTEP]\nnorm_num1\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\n⊢ Δ (ofJ1728 R) = -64\n[PROOFSTEP]\nrw [ofJ1728, Δ, b₂, b₄, b₆, b₈]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\n⊢ -({ a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₁ ^ 2 + 4 * { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₂) ^\n 2 *\n ({ a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₁ ^ 2 *\n { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₆ +\n 4 * { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₂ *\n { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₆ -\n { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₁ *\n { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₃ *\n { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₄ +\n { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₂ *\n { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₃ ^ 2 -\n { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₄ ^ 2) -\n 8 *\n (2 * { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₄ +\n { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₁ *\n { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₃) ^\n 3 -\n 27 *\n ({ a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₃ ^ 2 +\n 4 * { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₆) ^\n 2 +\n 9 *\n ({ a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₁ ^ 2 +\n 4 * { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₂) *\n (2 * { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₄ +\n { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₁ * { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₃) *\n ({ a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₃ ^ 2 +\n 4 * { a₁ := 0, a₂ := 0, a₃ := 0, a₄ := 1, a₆ := 0 }.a₆) =\n -64\n[PROOFSTEP]\nnorm_num1\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nj : R\n⊢ c₄ (ofJ j) = j * (j - 1728) ^ 3\n[PROOFSTEP]\nsimp only [ofJ, c₄, b₂, b₄]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nj : R\n⊢ ((j - 1728) ^ 2 + 4 * 0) ^ 2 - 24 * (2 * (-36 * (j - 1728) ^ 3) + (j - 1728) * 0) = j * (j - 1728) ^ 3\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nj : R\n⊢ Δ (ofJ j) = j ^ 2 * (j - 1728) ^ 9\n[PROOFSTEP]\nsimp only [ofJ, Δ, b₂, b₄, b₆, b₈]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nj : R\n⊢ -((j - 1728) ^ 2 + 4 * 0) ^ 2 *\n ((j - 1728) ^ 2 * -(j - 1728) ^ 5 + 4 * 0 * -(j - 1728) ^ 5 - (j - 1728) * 0 * (-36 * (j - 1728) ^ 3) +\n 0 * 0 ^ 2 -\n (-36 * (j - 1728) ^ 3) ^ 2) -\n 8 * (2 * (-36 * (j - 1728) ^ 3) + (j - 1728) * 0) ^ 3 -\n 27 * (0 ^ 2 + 4 * -(j - 1728) ^ 5) ^ 2 +\n 9 * ((j - 1728) ^ 2 + 4 * 0) * (2 * (-36 * (j - 1728) ^ 3) + (j - 1728) * 0) * (0 ^ 2 + 4 * -(j - 1728) ^ 5) =\n j ^ 2 * (j - 1728) ^ 9\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C' C'' C : VariableChange R\n⊢ comp id C = C\n[PROOFSTEP]\nsimp only [comp, id, zero_add, zero_mul, mul_zero, one_mul]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C' C'' C : VariableChange R\n⊢ comp C id = C\n[PROOFSTEP]\nsimp only [comp, id, add_zero, mul_zero, one_mul, mul_one, one_pow, Units.val_one]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C' C'' C : VariableChange R\n⊢ comp (inv C) C = id\n[PROOFSTEP]\nrw [comp, id, inv]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C' C'' C : VariableChange R\n⊢ { u := { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.u * C.u,\n r :=\n { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r * ↑C.u ^ 2 +\n C.r,\n s :=\n ↑C.u * { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.s + C.s,\n t :=\n { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.t * ↑C.u ^ 3 +\n { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r * C.s *\n ↑C.u ^ 2 +\n C.t } =\n { u := 1, r := 0, s := 0, t := 0 }\n[PROOFSTEP]\next\n[GOAL]\ncase u.a\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C' C'' C : VariableChange R\n⊢ ↑{ u := { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.u * C.u,\n r :=\n { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r *\n ↑C.u ^ 2 +\n C.r,\n s :=\n ↑C.u * { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.s +\n C.s,\n t :=\n { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.t *\n ↑C.u ^ 3 +\n { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r *\n C.s *\n ↑C.u ^ 2 +\n C.t }.u =\n ↑{ u := 1, r := 0, s := 0, t := 0 }.u\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase r\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C' C'' C : VariableChange R\n⊢ { u := { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.u * C.u,\n r :=\n { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r * ↑C.u ^ 2 +\n C.r,\n s :=\n ↑C.u * { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.s +\n C.s,\n t :=\n { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.t * ↑C.u ^ 3 +\n { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r * C.s *\n ↑C.u ^ 2 +\n C.t }.r =\n { u := 1, r := 0, s := 0, t := 0 }.r\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase s\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C' C'' C : VariableChange R\n⊢ { u := { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.u * C.u,\n r :=\n { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r * ↑C.u ^ 2 +\n C.r,\n s :=\n ↑C.u * { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.s +\n C.s,\n t :=\n { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.t * ↑C.u ^ 3 +\n { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r * C.s *\n ↑C.u ^ 2 +\n C.t }.s =\n { u := 1, r := 0, s := 0, t := 0 }.s\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase t\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C' C'' C : VariableChange R\n⊢ { u := { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.u * C.u,\n r :=\n { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r * ↑C.u ^ 2 +\n C.r,\n s :=\n ↑C.u * { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.s +\n C.s,\n t :=\n { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.t * ↑C.u ^ 3 +\n { u := C.u⁻¹, r := -C.r * ↑C.u⁻¹ ^ 2, s := -C.s * ↑C.u⁻¹, t := (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 }.r * C.s *\n ↑C.u ^ 2 +\n C.t }.t =\n { u := 1, r := 0, s := 0, t := 0 }.t\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase u.a\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C' C'' C : VariableChange R\n⊢ ↑(C.u⁻¹ * C.u) = ↑1\n[PROOFSTEP]\nexact C.u.inv_mul\n[GOAL]\ncase r\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C' C'' C : VariableChange R\n⊢ -C.r * ↑C.u⁻¹ ^ 2 * ↑C.u ^ 2 + C.r = 0\n[PROOFSTEP]\nlinear_combination (norm := ring1) -C.r * pow_mul_pow_eq_one 2 C.u.inv_mul\n[GOAL]\ncase a\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C' C'' C : VariableChange R\n⊢ -C.r * ↑C.u⁻¹ ^ 2 * ↑C.u ^ 2 + C.r - 0 - (-C.r * (↑C.u⁻¹ ^ 2 * ↑C.u ^ 2) - -C.r * 1) = 0\n[PROOFSTEP]\nring1\n[GOAL]\ncase s\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C' C'' C : VariableChange R\n⊢ ↑C.u * (-C.s * ↑C.u⁻¹) + C.s = 0\n[PROOFSTEP]\nlinear_combination (norm := ring1) -C.s * C.u.inv_mul\n[GOAL]\ncase a\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C' C'' C : VariableChange R\n⊢ ↑C.u * (-C.s * ↑C.u⁻¹) + C.s - 0 - (-C.s * (↑C.u⁻¹ * ↑C.u) - -C.s * 1) = 0\n[PROOFSTEP]\nring1\n[GOAL]\ncase t\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C' C'' C : VariableChange R\n⊢ (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 * ↑C.u ^ 3 + -C.r * ↑C.u⁻¹ ^ 2 * C.s * ↑C.u ^ 2 + C.t = 0\n[PROOFSTEP]\nlinear_combination (norm := ring1)\n (C.r * C.s - C.t) * pow_mul_pow_eq_one 3 C.u.inv_mul + -C.r * C.s * pow_mul_pow_eq_one 2 C.u.inv_mul\n[GOAL]\ncase a\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C' C'' C : VariableChange R\n⊢ (C.r * C.s - C.t) * ↑C.u⁻¹ ^ 3 * ↑C.u ^ 3 + -C.r * ↑C.u⁻¹ ^ 2 * C.s * ↑C.u ^ 2 + C.t - 0 -\n ((C.r * C.s - C.t) * (↑C.u⁻¹ ^ 3 * ↑C.u ^ 3) + -C.r * C.s * (↑C.u⁻¹ ^ 2 * ↑C.u ^ 2) -\n ((C.r * C.s - C.t) * 1 + -C.r * C.s * 1)) =\n 0\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C'✝ C''✝ C C' C'' : VariableChange R\n⊢ comp (comp C C') C'' = comp C (comp C' C'')\n[PROOFSTEP]\next\n[GOAL]\ncase u.a\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C'✝ C''✝ C C' C'' : VariableChange R\n⊢ ↑(comp (comp C C') C'').u = ↑(comp C (comp C' C'')).u\n[PROOFSTEP]\nsimp only [comp, Units.val_mul]\n[GOAL]\ncase r\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C'✝ C''✝ C C' C'' : VariableChange R\n⊢ (comp (comp C C') C'').r = (comp C (comp C' C'')).r\n[PROOFSTEP]\nsimp only [comp, Units.val_mul]\n[GOAL]\ncase s\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C'✝ C''✝ C C' C'' : VariableChange R\n⊢ (comp (comp C C') C'').s = (comp C (comp C' C'')).s\n[PROOFSTEP]\nsimp only [comp, Units.val_mul]\n[GOAL]\ncase t\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C'✝ C''✝ C C' C'' : VariableChange R\n⊢ (comp (comp C C') C'').t = (comp C (comp C' C'')).t\n[PROOFSTEP]\nsimp only [comp, Units.val_mul]\n[GOAL]\ncase u.a\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C'✝ C''✝ C C' C'' : VariableChange R\n⊢ ↑C.u * ↑C'.u * ↑C''.u = ↑C.u * (↑C'.u * ↑C''.u)\n[PROOFSTEP]\nring1\n[GOAL]\ncase r\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C'✝ C''✝ C C' C'' : VariableChange R\n⊢ (C.r * ↑C'.u ^ 2 + C'.r) * ↑C''.u ^ 2 + C''.r = C.r * (↑C'.u * ↑C''.u) ^ 2 + (C'.r * ↑C''.u ^ 2 + C''.r)\n[PROOFSTEP]\nring1\n[GOAL]\ncase s\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C'✝ C''✝ C C' C'' : VariableChange R\n⊢ ↑C''.u * (↑C'.u * C.s + C'.s) + C''.s = ↑C'.u * ↑C''.u * C.s + (↑C''.u * C'.s + C''.s)\n[PROOFSTEP]\nring1\n[GOAL]\ncase t\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC✝ C'✝ C''✝ C C' C'' : VariableChange R\n⊢ (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * ↑C''.u ^ 3 + (C.r * ↑C'.u ^ 2 + C'.r) * C''.s * ↑C''.u ^ 2 +\n C''.t =\n C.t * (↑C'.u * ↑C''.u) ^ 3 + C.r * (↑C''.u * C'.s + C''.s) * (↑C'.u * ↑C''.u) ^ 2 +\n (C'.t * ↑C''.u ^ 3 + C'.r * C''.s * ↑C''.u ^ 2 + C''.t)\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ variableChange W VariableChange.id = W\n[PROOFSTEP]\nrw [VariableChange.id, variableChange, inv_one, Units.val_one]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ { a₁ := 1 * (W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.s),\n a₂ :=\n 1 ^ 2 *\n (W.a₂ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₁ + 3 * { u := 1, r := 0, s := 0, t := 0 }.r -\n { u := 1, r := 0, s := 0, t := 0 }.s ^ 2),\n a₃ := 1 ^ 3 * (W.a₃ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.t),\n a₄ :=\n 1 ^ 4 *\n (W.a₄ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₃ + 2 * { u := 1, r := 0, s := 0, t := 0 }.r * W.a₂ -\n ({ u := 1, r := 0, s := 0, t := 0 }.t +\n { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.s) *\n W.a₁ +\n 3 * { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 -\n 2 * { u := 1, r := 0, s := 0, t := 0 }.s * { u := 1, r := 0, s := 0, t := 0 }.t),\n a₆ :=\n 1 ^ 6 *\n (W.a₆ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₄ + { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 * W.a₂ +\n { u := 1, r := 0, s := 0, t := 0 }.r ^ 3 -\n { u := 1, r := 0, s := 0, t := 0 }.t * W.a₃ -\n { u := 1, r := 0, s := 0, t := 0 }.t ^ 2 -\n { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.t * W.a₁) } =\n W\n[PROOFSTEP]\next\n[GOAL]\ncase a₁\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ { a₁ := 1 * (W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.s),\n a₂ :=\n 1 ^ 2 *\n (W.a₂ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₁ + 3 * { u := 1, r := 0, s := 0, t := 0 }.r -\n { u := 1, r := 0, s := 0, t := 0 }.s ^ 2),\n a₃ := 1 ^ 3 * (W.a₃ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.t),\n a₄ :=\n 1 ^ 4 *\n (W.a₄ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₃ + 2 * { u := 1, r := 0, s := 0, t := 0 }.r * W.a₂ -\n ({ u := 1, r := 0, s := 0, t := 0 }.t +\n { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.s) *\n W.a₁ +\n 3 * { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 -\n 2 * { u := 1, r := 0, s := 0, t := 0 }.s * { u := 1, r := 0, s := 0, t := 0 }.t),\n a₆ :=\n 1 ^ 6 *\n (W.a₆ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₄ + { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 * W.a₂ +\n { u := 1, r := 0, s := 0, t := 0 }.r ^ 3 -\n { u := 1, r := 0, s := 0, t := 0 }.t * W.a₃ -\n { u := 1, r := 0, s := 0, t := 0 }.t ^ 2 -\n { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.t * W.a₁) }.a₁ =\n W.a₁\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase a₁\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ 1 * (W.a₁ + 2 * 0) = W.a₁\n[PROOFSTEP]\nring1\n[GOAL]\ncase a₂\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ { a₁ := 1 * (W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.s),\n a₂ :=\n 1 ^ 2 *\n (W.a₂ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₁ + 3 * { u := 1, r := 0, s := 0, t := 0 }.r -\n { u := 1, r := 0, s := 0, t := 0 }.s ^ 2),\n a₃ := 1 ^ 3 * (W.a₃ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.t),\n a₄ :=\n 1 ^ 4 *\n (W.a₄ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₃ + 2 * { u := 1, r := 0, s := 0, t := 0 }.r * W.a₂ -\n ({ u := 1, r := 0, s := 0, t := 0 }.t +\n { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.s) *\n W.a₁ +\n 3 * { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 -\n 2 * { u := 1, r := 0, s := 0, t := 0 }.s * { u := 1, r := 0, s := 0, t := 0 }.t),\n a₆ :=\n 1 ^ 6 *\n (W.a₆ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₄ + { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 * W.a₂ +\n { u := 1, r := 0, s := 0, t := 0 }.r ^ 3 -\n { u := 1, r := 0, s := 0, t := 0 }.t * W.a₃ -\n { u := 1, r := 0, s := 0, t := 0 }.t ^ 2 -\n { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.t * W.a₁) }.a₂ =\n W.a₂\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase a₂\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ 1 ^ 2 * (W.a₂ - 0 * W.a₁ + 3 * 0 - 0 ^ 2) = W.a₂\n[PROOFSTEP]\nring1\n[GOAL]\ncase a₃\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ { a₁ := 1 * (W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.s),\n a₂ :=\n 1 ^ 2 *\n (W.a₂ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₁ + 3 * { u := 1, r := 0, s := 0, t := 0 }.r -\n { u := 1, r := 0, s := 0, t := 0 }.s ^ 2),\n a₃ := 1 ^ 3 * (W.a₃ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.t),\n a₄ :=\n 1 ^ 4 *\n (W.a₄ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₃ + 2 * { u := 1, r := 0, s := 0, t := 0 }.r * W.a₂ -\n ({ u := 1, r := 0, s := 0, t := 0 }.t +\n { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.s) *\n W.a₁ +\n 3 * { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 -\n 2 * { u := 1, r := 0, s := 0, t := 0 }.s * { u := 1, r := 0, s := 0, t := 0 }.t),\n a₆ :=\n 1 ^ 6 *\n (W.a₆ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₄ + { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 * W.a₂ +\n { u := 1, r := 0, s := 0, t := 0 }.r ^ 3 -\n { u := 1, r := 0, s := 0, t := 0 }.t * W.a₃ -\n { u := 1, r := 0, s := 0, t := 0 }.t ^ 2 -\n { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.t * W.a₁) }.a₃ =\n W.a₃\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase a₃\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ 1 ^ 3 * (W.a₃ + 0 * W.a₁ + 2 * 0) = W.a₃\n[PROOFSTEP]\nring1\n[GOAL]\ncase a₄\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ { a₁ := 1 * (W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.s),\n a₂ :=\n 1 ^ 2 *\n (W.a₂ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₁ + 3 * { u := 1, r := 0, s := 0, t := 0 }.r -\n { u := 1, r := 0, s := 0, t := 0 }.s ^ 2),\n a₃ := 1 ^ 3 * (W.a₃ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.t),\n a₄ :=\n 1 ^ 4 *\n (W.a₄ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₃ + 2 * { u := 1, r := 0, s := 0, t := 0 }.r * W.a₂ -\n ({ u := 1, r := 0, s := 0, t := 0 }.t +\n { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.s) *\n W.a₁ +\n 3 * { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 -\n 2 * { u := 1, r := 0, s := 0, t := 0 }.s * { u := 1, r := 0, s := 0, t := 0 }.t),\n a₆ :=\n 1 ^ 6 *\n (W.a₆ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₄ + { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 * W.a₂ +\n { u := 1, r := 0, s := 0, t := 0 }.r ^ 3 -\n { u := 1, r := 0, s := 0, t := 0 }.t * W.a₃ -\n { u := 1, r := 0, s := 0, t := 0 }.t ^ 2 -\n { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.t * W.a₁) }.a₄ =\n W.a₄\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase a₄\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ 1 ^ 4 * (W.a₄ - 0 * W.a₃ + 2 * 0 * W.a₂ - (0 + 0 * 0) * W.a₁ + 3 * 0 ^ 2 - 2 * 0 * 0) = W.a₄\n[PROOFSTEP]\nring1\n[GOAL]\ncase a₆\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ { a₁ := 1 * (W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.s),\n a₂ :=\n 1 ^ 2 *\n (W.a₂ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₁ + 3 * { u := 1, r := 0, s := 0, t := 0 }.r -\n { u := 1, r := 0, s := 0, t := 0 }.s ^ 2),\n a₃ := 1 ^ 3 * (W.a₃ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₁ + 2 * { u := 1, r := 0, s := 0, t := 0 }.t),\n a₄ :=\n 1 ^ 4 *\n (W.a₄ - { u := 1, r := 0, s := 0, t := 0 }.s * W.a₃ + 2 * { u := 1, r := 0, s := 0, t := 0 }.r * W.a₂ -\n ({ u := 1, r := 0, s := 0, t := 0 }.t +\n { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.s) *\n W.a₁ +\n 3 * { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 -\n 2 * { u := 1, r := 0, s := 0, t := 0 }.s * { u := 1, r := 0, s := 0, t := 0 }.t),\n a₆ :=\n 1 ^ 6 *\n (W.a₆ + { u := 1, r := 0, s := 0, t := 0 }.r * W.a₄ + { u := 1, r := 0, s := 0, t := 0 }.r ^ 2 * W.a₂ +\n { u := 1, r := 0, s := 0, t := 0 }.r ^ 3 -\n { u := 1, r := 0, s := 0, t := 0 }.t * W.a₃ -\n { u := 1, r := 0, s := 0, t := 0 }.t ^ 2 -\n { u := 1, r := 0, s := 0, t := 0 }.r * { u := 1, r := 0, s := 0, t := 0 }.t * W.a₁) }.a₆ =\n W.a₆\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase a₆\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ 1 ^ 6 * (W.a₆ + 0 * W.a₄ + 0 ^ 2 * W.a₂ + 0 ^ 3 - 0 * W.a₃ - 0 ^ 2 - 0 * 0 * W.a₁) = W.a₆\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW✝ : WeierstrassCurve R\nC✝ C C' : VariableChange R\nW : WeierstrassCurve R\n⊢ variableChange W (VariableChange.comp C C') = variableChange (variableChange W C') C\n[PROOFSTEP]\nsimp only [VariableChange.comp, variableChange]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW✝ : WeierstrassCurve R\nC✝ C C' : VariableChange R\nW : WeierstrassCurve R\n⊢ { a₁ := ↑(C.u * C'.u)⁻¹ * (W.a₁ + 2 * (↑C'.u * C.s + C'.s)),\n a₂ :=\n ↑(C.u * C'.u)⁻¹ ^ 2 *\n (W.a₂ - (↑C'.u * C.s + C'.s) * W.a₁ + 3 * (C.r * ↑C'.u ^ 2 + C'.r) - (↑C'.u * C.s + C'.s) ^ 2),\n a₃ :=\n ↑(C.u * C'.u)⁻¹ ^ 3 *\n (W.a₃ + (C.r * ↑C'.u ^ 2 + C'.r) * W.a₁ + 2 * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t)),\n a₄ :=\n ↑(C.u * C'.u)⁻¹ ^ 4 *\n (W.a₄ - (↑C'.u * C.s + C'.s) * W.a₃ + 2 * (C.r * ↑C'.u ^ 2 + C'.r) * W.a₂ -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t + (C.r * ↑C'.u ^ 2 + C'.r) * (↑C'.u * C.s + C'.s)) *\n W.a₁ +\n 3 * (C.r * ↑C'.u ^ 2 + C'.r) ^ 2 -\n 2 * (↑C'.u * C.s + C'.s) * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t)),\n a₆ :=\n ↑(C.u * C'.u)⁻¹ ^ 6 *\n (W.a₆ + (C.r * ↑C'.u ^ 2 + C'.r) * W.a₄ + (C.r * ↑C'.u ^ 2 + C'.r) ^ 2 * W.a₂ + (C.r * ↑C'.u ^ 2 + C'.r) ^ 3 -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * W.a₃ -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) ^ 2 -\n (C.r * ↑C'.u ^ 2 + C'.r) * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * W.a₁) } =\n { a₁ := ↑C.u⁻¹ * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s) + 2 * C.s),\n a₂ :=\n ↑C.u⁻¹ ^ 2 *\n (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2) - C.s * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) + 3 * C.r -\n C.s ^ 2),\n a₃ :=\n ↑C.u⁻¹ ^ 3 * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t) + C.r * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) + 2 * C.t),\n a₄ :=\n ↑C.u⁻¹ ^ 4 *\n (↑C'.u⁻¹ ^ 4 *\n (W.a₄ - C'.s * W.a₃ + 2 * C'.r * W.a₂ - (C'.t + C'.r * C'.s) * W.a₁ + 3 * C'.r ^ 2 -\n 2 * C'.s * C'.t) -\n C.s * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t)) +\n 2 * C.r * (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2)) -\n (C.t + C.r * C.s) * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) +\n 3 * C.r ^ 2 -\n 2 * C.s * C.t),\n a₆ :=\n ↑C.u⁻¹ ^ 6 *\n (↑C'.u⁻¹ ^ 6 *\n (W.a₆ + C'.r * W.a₄ + C'.r ^ 2 * W.a₂ + C'.r ^ 3 - C'.t * W.a₃ - C'.t ^ 2 -\n C'.r * C'.t * W.a₁) +\n C.r *\n (↑C'.u⁻¹ ^ 4 *\n (W.a₄ - C'.s * W.a₃ + 2 * C'.r * W.a₂ - (C'.t + C'.r * C'.s) * W.a₁ + 3 * C'.r ^ 2 -\n 2 * C'.s * C'.t)) +\n C.r ^ 2 * (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2)) +\n C.r ^ 3 -\n C.t * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t)) -\n C.t ^ 2 -\n C.r * C.t * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s))) }\n[PROOFSTEP]\next\n[GOAL]\ncase a₁\nR : Type u\ninst✝ : CommRing R\nW✝ : WeierstrassCurve R\nC✝ C C' : VariableChange R\nW : WeierstrassCurve R\n⊢ { a₁ := ↑(C.u * C'.u)⁻¹ * (W.a₁ + 2 * (↑C'.u * C.s + C'.s)),\n a₂ :=\n ↑(C.u * C'.u)⁻¹ ^ 2 *\n (W.a₂ - (↑C'.u * C.s + C'.s) * W.a₁ + 3 * (C.r * ↑C'.u ^ 2 + C'.r) - (↑C'.u * C.s + C'.s) ^ 2),\n a₃ :=\n ↑(C.u * C'.u)⁻¹ ^ 3 *\n (W.a₃ + (C.r * ↑C'.u ^ 2 + C'.r) * W.a₁ + 2 * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t)),\n a₄ :=\n ↑(C.u * C'.u)⁻¹ ^ 4 *\n (W.a₄ - (↑C'.u * C.s + C'.s) * W.a₃ + 2 * (C.r * ↑C'.u ^ 2 + C'.r) * W.a₂ -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t + (C.r * ↑C'.u ^ 2 + C'.r) * (↑C'.u * C.s + C'.s)) *\n W.a₁ +\n 3 * (C.r * ↑C'.u ^ 2 + C'.r) ^ 2 -\n 2 * (↑C'.u * C.s + C'.s) * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t)),\n a₆ :=\n ↑(C.u * C'.u)⁻¹ ^ 6 *\n (W.a₆ + (C.r * ↑C'.u ^ 2 + C'.r) * W.a₄ + (C.r * ↑C'.u ^ 2 + C'.r) ^ 2 * W.a₂ +\n (C.r * ↑C'.u ^ 2 + C'.r) ^ 3 -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * W.a₃ -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) ^ 2 -\n (C.r * ↑C'.u ^ 2 + C'.r) * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * W.a₁) }.a₁ =\n { a₁ := ↑C.u⁻¹ * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s) + 2 * C.s),\n a₂ :=\n ↑C.u⁻¹ ^ 2 *\n (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2) - C.s * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) + 3 * C.r -\n C.s ^ 2),\n a₃ :=\n ↑C.u⁻¹ ^ 3 * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t) + C.r * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) + 2 * C.t),\n a₄ :=\n ↑C.u⁻¹ ^ 4 *\n (↑C'.u⁻¹ ^ 4 *\n (W.a₄ - C'.s * W.a₃ + 2 * C'.r * W.a₂ - (C'.t + C'.r * C'.s) * W.a₁ + 3 * C'.r ^ 2 -\n 2 * C'.s * C'.t) -\n C.s * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t)) +\n 2 * C.r * (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2)) -\n (C.t + C.r * C.s) * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) +\n 3 * C.r ^ 2 -\n 2 * C.s * C.t),\n a₆ :=\n ↑C.u⁻¹ ^ 6 *\n (↑C'.u⁻¹ ^ 6 *\n (W.a₆ + C'.r * W.a₄ + C'.r ^ 2 * W.a₂ + C'.r ^ 3 - C'.t * W.a₃ - C'.t ^ 2 -\n C'.r * C'.t * W.a₁) +\n C.r *\n (↑C'.u⁻¹ ^ 4 *\n (W.a₄ - C'.s * W.a₃ + 2 * C'.r * W.a₂ - (C'.t + C'.r * C'.s) * W.a₁ + 3 * C'.r ^ 2 -\n 2 * C'.s * C'.t)) +\n C.r ^ 2 * (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2)) +\n C.r ^ 3 -\n C.t * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t)) -\n C.t ^ 2 -\n C.r * C.t * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s))) }.a₁\n[PROOFSTEP]\nsimp only [mul_inv, Units.val_mul]\n[GOAL]\ncase a₂\nR : Type u\ninst✝ : CommRing R\nW✝ : WeierstrassCurve R\nC✝ C C' : VariableChange R\nW : WeierstrassCurve R\n⊢ { a₁ := ↑(C.u * C'.u)⁻¹ * (W.a₁ + 2 * (↑C'.u * C.s + C'.s)),\n a₂ :=\n ↑(C.u * C'.u)⁻¹ ^ 2 *\n (W.a₂ - (↑C'.u * C.s + C'.s) * W.a₁ + 3 * (C.r * ↑C'.u ^ 2 + C'.r) - (↑C'.u * C.s + C'.s) ^ 2),\n a₃ :=\n ↑(C.u * C'.u)⁻¹ ^ 3 *\n (W.a₃ + (C.r * ↑C'.u ^ 2 + C'.r) * W.a₁ + 2 * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t)),\n a₄ :=\n ↑(C.u * C'.u)⁻¹ ^ 4 *\n (W.a₄ - (↑C'.u * C.s + C'.s) * W.a₃ + 2 * (C.r * ↑C'.u ^ 2 + C'.r) * W.a₂ -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t + (C.r * ↑C'.u ^ 2 + C'.r) * (↑C'.u * C.s + C'.s)) *\n W.a₁ +\n 3 * (C.r * ↑C'.u ^ 2 + C'.r) ^ 2 -\n 2 * (↑C'.u * C.s + C'.s) * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t)),\n a₆ :=\n ↑(C.u * C'.u)⁻¹ ^ 6 *\n (W.a₆ + (C.r * ↑C'.u ^ 2 + C'.r) * W.a₄ + (C.r * ↑C'.u ^ 2 + C'.r) ^ 2 * W.a₂ +\n (C.r * ↑C'.u ^ 2 + C'.r) ^ 3 -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * W.a₃ -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) ^ 2 -\n (C.r * ↑C'.u ^ 2 + C'.r) * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * W.a₁) }.a₂ =\n { a₁ := ↑C.u⁻¹ * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s) + 2 * C.s),\n a₂ :=\n ↑C.u⁻¹ ^ 2 *\n (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2) - C.s * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) + 3 * C.r -\n C.s ^ 2),\n a₃ :=\n ↑C.u⁻¹ ^ 3 * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t) + C.r * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) + 2 * C.t),\n a₄ :=\n ↑C.u⁻¹ ^ 4 *\n (↑C'.u⁻¹ ^ 4 *\n (W.a₄ - C'.s * W.a₃ + 2 * C'.r * W.a₂ - (C'.t + C'.r * C'.s) * W.a₁ + 3 * C'.r ^ 2 -\n 2 * C'.s * C'.t) -\n C.s * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t)) +\n 2 * C.r * (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2)) -\n (C.t + C.r * C.s) * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) +\n 3 * C.r ^ 2 -\n 2 * C.s * C.t),\n a₆ :=\n ↑C.u⁻¹ ^ 6 *\n (↑C'.u⁻¹ ^ 6 *\n (W.a₆ + C'.r * W.a₄ + C'.r ^ 2 * W.a₂ + C'.r ^ 3 - C'.t * W.a₃ - C'.t ^ 2 -\n C'.r * C'.t * W.a₁) +\n C.r *\n (↑C'.u⁻¹ ^ 4 *\n (W.a₄ - C'.s * W.a₃ + 2 * C'.r * W.a₂ - (C'.t + C'.r * C'.s) * W.a₁ + 3 * C'.r ^ 2 -\n 2 * C'.s * C'.t)) +\n C.r ^ 2 * (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2)) +\n C.r ^ 3 -\n C.t * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t)) -\n C.t ^ 2 -\n C.r * C.t * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s))) }.a₂\n[PROOFSTEP]\nsimp only [mul_inv, Units.val_mul]\n[GOAL]\ncase a₃\nR : Type u\ninst✝ : CommRing R\nW✝ : WeierstrassCurve R\nC✝ C C' : VariableChange R\nW : WeierstrassCurve R\n⊢ { a₁ := ↑(C.u * C'.u)⁻¹ * (W.a₁ + 2 * (↑C'.u * C.s + C'.s)),\n a₂ :=\n ↑(C.u * C'.u)⁻¹ ^ 2 *\n (W.a₂ - (↑C'.u * C.s + C'.s) * W.a₁ + 3 * (C.r * ↑C'.u ^ 2 + C'.r) - (↑C'.u * C.s + C'.s) ^ 2),\n a₃ :=\n ↑(C.u * C'.u)⁻¹ ^ 3 *\n (W.a₃ + (C.r * ↑C'.u ^ 2 + C'.r) * W.a₁ + 2 * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t)),\n a₄ :=\n ↑(C.u * C'.u)⁻¹ ^ 4 *\n (W.a₄ - (↑C'.u * C.s + C'.s) * W.a₃ + 2 * (C.r * ↑C'.u ^ 2 + C'.r) * W.a₂ -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t + (C.r * ↑C'.u ^ 2 + C'.r) * (↑C'.u * C.s + C'.s)) *\n W.a₁ +\n 3 * (C.r * ↑C'.u ^ 2 + C'.r) ^ 2 -\n 2 * (↑C'.u * C.s + C'.s) * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t)),\n a₆ :=\n ↑(C.u * C'.u)⁻¹ ^ 6 *\n (W.a₆ + (C.r * ↑C'.u ^ 2 + C'.r) * W.a₄ + (C.r * ↑C'.u ^ 2 + C'.r) ^ 2 * W.a₂ +\n (C.r * ↑C'.u ^ 2 + C'.r) ^ 3 -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * W.a₃ -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) ^ 2 -\n (C.r * ↑C'.u ^ 2 + C'.r) * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * W.a₁) }.a₃ =\n { a₁ := ↑C.u⁻¹ * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s) + 2 * C.s),\n a₂ :=\n ↑C.u⁻¹ ^ 2 *\n (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2) - C.s * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) + 3 * C.r -\n C.s ^ 2),\n a₃ :=\n ↑C.u⁻¹ ^ 3 * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t) + C.r * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) + 2 * C.t),\n a₄ :=\n ↑C.u⁻¹ ^ 4 *\n (↑C'.u⁻¹ ^ 4 *\n (W.a₄ - C'.s * W.a₃ + 2 * C'.r * W.a₂ - (C'.t + C'.r * C'.s) * W.a₁ + 3 * C'.r ^ 2 -\n 2 * C'.s * C'.t) -\n C.s * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t)) +\n 2 * C.r * (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2)) -\n (C.t + C.r * C.s) * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) +\n 3 * C.r ^ 2 -\n 2 * C.s * C.t),\n a₆ :=\n ↑C.u⁻¹ ^ 6 *\n (↑C'.u⁻¹ ^ 6 *\n (W.a₆ + C'.r * W.a₄ + C'.r ^ 2 * W.a₂ + C'.r ^ 3 - C'.t * W.a₃ - C'.t ^ 2 -\n C'.r * C'.t * W.a₁) +\n C.r *\n (↑C'.u⁻¹ ^ 4 *\n (W.a₄ - C'.s * W.a₃ + 2 * C'.r * W.a₂ - (C'.t + C'.r * C'.s) * W.a₁ + 3 * C'.r ^ 2 -\n 2 * C'.s * C'.t)) +\n C.r ^ 2 * (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2)) +\n C.r ^ 3 -\n C.t * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t)) -\n C.t ^ 2 -\n C.r * C.t * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s))) }.a₃\n[PROOFSTEP]\nsimp only [mul_inv, Units.val_mul]\n[GOAL]\ncase a₄\nR : Type u\ninst✝ : CommRing R\nW✝ : WeierstrassCurve R\nC✝ C C' : VariableChange R\nW : WeierstrassCurve R\n⊢ { a₁ := ↑(C.u * C'.u)⁻¹ * (W.a₁ + 2 * (↑C'.u * C.s + C'.s)),\n a₂ :=\n ↑(C.u * C'.u)⁻¹ ^ 2 *\n (W.a₂ - (↑C'.u * C.s + C'.s) * W.a₁ + 3 * (C.r * ↑C'.u ^ 2 + C'.r) - (↑C'.u * C.s + C'.s) ^ 2),\n a₃ :=\n ↑(C.u * C'.u)⁻¹ ^ 3 *\n (W.a₃ + (C.r * ↑C'.u ^ 2 + C'.r) * W.a₁ + 2 * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t)),\n a₄ :=\n ↑(C.u * C'.u)⁻¹ ^ 4 *\n (W.a₄ - (↑C'.u * C.s + C'.s) * W.a₃ + 2 * (C.r * ↑C'.u ^ 2 + C'.r) * W.a₂ -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t + (C.r * ↑C'.u ^ 2 + C'.r) * (↑C'.u * C.s + C'.s)) *\n W.a₁ +\n 3 * (C.r * ↑C'.u ^ 2 + C'.r) ^ 2 -\n 2 * (↑C'.u * C.s + C'.s) * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t)),\n a₆ :=\n ↑(C.u * C'.u)⁻¹ ^ 6 *\n (W.a₆ + (C.r * ↑C'.u ^ 2 + C'.r) * W.a₄ + (C.r * ↑C'.u ^ 2 + C'.r) ^ 2 * W.a₂ +\n (C.r * ↑C'.u ^ 2 + C'.r) ^ 3 -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * W.a₃ -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) ^ 2 -\n (C.r * ↑C'.u ^ 2 + C'.r) * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * W.a₁) }.a₄ =\n { a₁ := ↑C.u⁻¹ * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s) + 2 * C.s),\n a₂ :=\n ↑C.u⁻¹ ^ 2 *\n (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2) - C.s * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) + 3 * C.r -\n C.s ^ 2),\n a₃ :=\n ↑C.u⁻¹ ^ 3 * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t) + C.r * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) + 2 * C.t),\n a₄ :=\n ↑C.u⁻¹ ^ 4 *\n (↑C'.u⁻¹ ^ 4 *\n (W.a₄ - C'.s * W.a₃ + 2 * C'.r * W.a₂ - (C'.t + C'.r * C'.s) * W.a₁ + 3 * C'.r ^ 2 -\n 2 * C'.s * C'.t) -\n C.s * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t)) +\n 2 * C.r * (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2)) -\n (C.t + C.r * C.s) * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) +\n 3 * C.r ^ 2 -\n 2 * C.s * C.t),\n a₆ :=\n ↑C.u⁻¹ ^ 6 *\n (↑C'.u⁻¹ ^ 6 *\n (W.a₆ + C'.r * W.a₄ + C'.r ^ 2 * W.a₂ + C'.r ^ 3 - C'.t * W.a₃ - C'.t ^ 2 -\n C'.r * C'.t * W.a₁) +\n C.r *\n (↑C'.u⁻¹ ^ 4 *\n (W.a₄ - C'.s * W.a₃ + 2 * C'.r * W.a₂ - (C'.t + C'.r * C'.s) * W.a₁ + 3 * C'.r ^ 2 -\n 2 * C'.s * C'.t)) +\n C.r ^ 2 * (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2)) +\n C.r ^ 3 -\n C.t * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t)) -\n C.t ^ 2 -\n C.r * C.t * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s))) }.a₄\n[PROOFSTEP]\nsimp only [mul_inv, Units.val_mul]\n[GOAL]\ncase a₆\nR : Type u\ninst✝ : CommRing R\nW✝ : WeierstrassCurve R\nC✝ C C' : VariableChange R\nW : WeierstrassCurve R\n⊢ { a₁ := ↑(C.u * C'.u)⁻¹ * (W.a₁ + 2 * (↑C'.u * C.s + C'.s)),\n a₂ :=\n ↑(C.u * C'.u)⁻¹ ^ 2 *\n (W.a₂ - (↑C'.u * C.s + C'.s) * W.a₁ + 3 * (C.r * ↑C'.u ^ 2 + C'.r) - (↑C'.u * C.s + C'.s) ^ 2),\n a₃ :=\n ↑(C.u * C'.u)⁻¹ ^ 3 *\n (W.a₃ + (C.r * ↑C'.u ^ 2 + C'.r) * W.a₁ + 2 * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t)),\n a₄ :=\n ↑(C.u * C'.u)⁻¹ ^ 4 *\n (W.a₄ - (↑C'.u * C.s + C'.s) * W.a₃ + 2 * (C.r * ↑C'.u ^ 2 + C'.r) * W.a₂ -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t + (C.r * ↑C'.u ^ 2 + C'.r) * (↑C'.u * C.s + C'.s)) *\n W.a₁ +\n 3 * (C.r * ↑C'.u ^ 2 + C'.r) ^ 2 -\n 2 * (↑C'.u * C.s + C'.s) * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t)),\n a₆ :=\n ↑(C.u * C'.u)⁻¹ ^ 6 *\n (W.a₆ + (C.r * ↑C'.u ^ 2 + C'.r) * W.a₄ + (C.r * ↑C'.u ^ 2 + C'.r) ^ 2 * W.a₂ +\n (C.r * ↑C'.u ^ 2 + C'.r) ^ 3 -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * W.a₃ -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) ^ 2 -\n (C.r * ↑C'.u ^ 2 + C'.r) * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * W.a₁) }.a₆ =\n { a₁ := ↑C.u⁻¹ * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s) + 2 * C.s),\n a₂ :=\n ↑C.u⁻¹ ^ 2 *\n (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2) - C.s * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) + 3 * C.r -\n C.s ^ 2),\n a₃ :=\n ↑C.u⁻¹ ^ 3 * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t) + C.r * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) + 2 * C.t),\n a₄ :=\n ↑C.u⁻¹ ^ 4 *\n (↑C'.u⁻¹ ^ 4 *\n (W.a₄ - C'.s * W.a₃ + 2 * C'.r * W.a₂ - (C'.t + C'.r * C'.s) * W.a₁ + 3 * C'.r ^ 2 -\n 2 * C'.s * C'.t) -\n C.s * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t)) +\n 2 * C.r * (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2)) -\n (C.t + C.r * C.s) * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) +\n 3 * C.r ^ 2 -\n 2 * C.s * C.t),\n a₆ :=\n ↑C.u⁻¹ ^ 6 *\n (↑C'.u⁻¹ ^ 6 *\n (W.a₆ + C'.r * W.a₄ + C'.r ^ 2 * W.a₂ + C'.r ^ 3 - C'.t * W.a₃ - C'.t ^ 2 -\n C'.r * C'.t * W.a₁) +\n C.r *\n (↑C'.u⁻¹ ^ 4 *\n (W.a₄ - C'.s * W.a₃ + 2 * C'.r * W.a₂ - (C'.t + C'.r * C'.s) * W.a₁ + 3 * C'.r ^ 2 -\n 2 * C'.s * C'.t)) +\n C.r ^ 2 * (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2)) +\n C.r ^ 3 -\n C.t * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t)) -\n C.t ^ 2 -\n C.r * C.t * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s))) }.a₆\n[PROOFSTEP]\nsimp only [mul_inv, Units.val_mul]\n[GOAL]\ncase a₁\nR : Type u\ninst✝ : CommRing R\nW✝ : WeierstrassCurve R\nC✝ C C' : VariableChange R\nW : WeierstrassCurve R\n⊢ ↑C.u⁻¹ * ↑C'.u⁻¹ * (W.a₁ + 2 * (↑C'.u * C.s + C'.s)) = ↑C.u⁻¹ * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s) + 2 * C.s)\n[PROOFSTEP]\nlinear_combination (norm := ring1) ↑C.u⁻¹ * C.s * 2 * C'.u.inv_mul\n[GOAL]\ncase a\nR : Type u\ninst✝ : CommRing R\nW✝ : WeierstrassCurve R\nC✝ C C' : VariableChange R\nW : WeierstrassCurve R\n⊢ ↑C.u⁻¹ * ↑C'.u⁻¹ * (W.a₁ + 2 * (↑C'.u * C.s + C'.s)) - ↑C.u⁻¹ * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s) + 2 * C.s) -\n (↑C.u⁻¹ * C.s * 2 * (↑C'.u⁻¹ * ↑C'.u) - ↑C.u⁻¹ * C.s * 2 * 1) =\n 0\n[PROOFSTEP]\nring1\n[GOAL]\ncase a₂\nR : Type u\ninst✝ : CommRing R\nW✝ : WeierstrassCurve R\nC✝ C C' : VariableChange R\nW : WeierstrassCurve R\n⊢ (↑C.u⁻¹ * ↑C'.u⁻¹) ^ 2 *\n (W.a₂ - (↑C'.u * C.s + C'.s) * W.a₁ + 3 * (C.r * ↑C'.u ^ 2 + C'.r) - (↑C'.u * C.s + C'.s) ^ 2) =\n ↑C.u⁻¹ ^ 2 *\n (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2) - C.s * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) + 3 * C.r -\n C.s ^ 2)\n[PROOFSTEP]\nlinear_combination (norm := ring1)\n C.s * (-C'.s * 2 - W.a₁) * (↑C.u⁻¹ : R) ^ 2 * ↑C'.u⁻¹ * C'.u.inv_mul +\n (C.r * 3 - C.s ^ 2) * (↑C.u⁻¹ : R) ^ 2 * pow_mul_pow_eq_one 2 C'.u.inv_mul\n[GOAL]\ncase a\nR : Type u\ninst✝ : CommRing R\nW✝ : WeierstrassCurve R\nC✝ C C' : VariableChange R\nW : WeierstrassCurve R\n⊢ (↑C.u⁻¹ * ↑C'.u⁻¹) ^ 2 *\n (W.a₂ - (↑C'.u * C.s + C'.s) * W.a₁ + 3 * (C.r * ↑C'.u ^ 2 + C'.r) - (↑C'.u * C.s + C'.s) ^ 2) -\n ↑C.u⁻¹ ^ 2 *\n (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2) - C.s * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) + 3 * C.r -\n C.s ^ 2) -\n (C.s * (-C'.s * 2 - W.a₁) * ↑C.u⁻¹ ^ 2 * ↑C'.u⁻¹ * (↑C'.u⁻¹ * ↑C'.u) +\n (C.r * 3 - C.s ^ 2) * ↑C.u⁻¹ ^ 2 * (↑C'.u⁻¹ ^ 2 * ↑C'.u ^ 2) -\n (C.s * (-C'.s * 2 - W.a₁) * ↑C.u⁻¹ ^ 2 * ↑C'.u⁻¹ * 1 + (C.r * 3 - C.s ^ 2) * ↑C.u⁻¹ ^ 2 * 1)) =\n 0\n[PROOFSTEP]\nring1\n[GOAL]\ncase a₃\nR : Type u\ninst✝ : CommRing R\nW✝ : WeierstrassCurve R\nC✝ C C' : VariableChange R\nW : WeierstrassCurve R\n⊢ (↑C.u⁻¹ * ↑C'.u⁻¹) ^ 3 *\n (W.a₃ + (C.r * ↑C'.u ^ 2 + C'.r) * W.a₁ + 2 * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t)) =\n ↑C.u⁻¹ ^ 3 * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t) + C.r * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) + 2 * C.t)\n[PROOFSTEP]\nlinear_combination (norm := ring1)\n C.r * (C'.s * 2 + W.a₁) * (↑C.u⁻¹ : R) ^ 3 * ↑C'.u⁻¹ * pow_mul_pow_eq_one 2 C'.u.inv_mul +\n C.t * 2 * (↑C.u⁻¹ : R) ^ 3 * pow_mul_pow_eq_one 3 C'.u.inv_mul\n[GOAL]\ncase a\nR : Type u\ninst✝ : CommRing R\nW✝ : WeierstrassCurve R\nC✝ C C' : VariableChange R\nW : WeierstrassCurve R\n⊢ (↑C.u⁻¹ * ↑C'.u⁻¹) ^ 3 *\n (W.a₃ + (C.r * ↑C'.u ^ 2 + C'.r) * W.a₁ + 2 * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t)) -\n ↑C.u⁻¹ ^ 3 * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t) + C.r * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) + 2 * C.t) -\n (C.r * (C'.s * 2 + W.a₁) * ↑C.u⁻¹ ^ 3 * ↑C'.u⁻¹ * (↑C'.u⁻¹ ^ 2 * ↑C'.u ^ 2) +\n C.t * 2 * ↑C.u⁻¹ ^ 3 * (↑C'.u⁻¹ ^ 3 * ↑C'.u ^ 3) -\n (C.r * (C'.s * 2 + W.a₁) * ↑C.u⁻¹ ^ 3 * ↑C'.u⁻¹ * 1 + C.t * 2 * ↑C.u⁻¹ ^ 3 * 1)) =\n 0\n[PROOFSTEP]\nring1\n[GOAL]\ncase a₄\nR : Type u\ninst✝ : CommRing R\nW✝ : WeierstrassCurve R\nC✝ C C' : VariableChange R\nW : WeierstrassCurve R\n⊢ (↑C.u⁻¹ * ↑C'.u⁻¹) ^ 4 *\n (W.a₄ - (↑C'.u * C.s + C'.s) * W.a₃ + 2 * (C.r * ↑C'.u ^ 2 + C'.r) * W.a₂ -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t + (C.r * ↑C'.u ^ 2 + C'.r) * (↑C'.u * C.s + C'.s)) * W.a₁ +\n 3 * (C.r * ↑C'.u ^ 2 + C'.r) ^ 2 -\n 2 * (↑C'.u * C.s + C'.s) * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t)) =\n ↑C.u⁻¹ ^ 4 *\n (↑C'.u⁻¹ ^ 4 *\n (W.a₄ - C'.s * W.a₃ + 2 * C'.r * W.a₂ - (C'.t + C'.r * C'.s) * W.a₁ + 3 * C'.r ^ 2 -\n 2 * C'.s * C'.t) -\n C.s * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t)) +\n 2 * C.r * (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2)) -\n (C.t + C.r * C.s) * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) +\n 3 * C.r ^ 2 -\n 2 * C.s * C.t)\n[PROOFSTEP]\nlinear_combination (norm := ring1)\n C.s * (-W.a₃ - C'.r * W.a₁ - C'.t * 2) * (↑C.u⁻¹ : R) ^ 4 * (↑C'.u⁻¹ : R) ^ 3 * C'.u.inv_mul +\n (↑C.u⁻¹ : R) ^ 4 * (↑C'.u⁻¹ : R) ^ 2 *\n (C.r * C'.r * 6 + C.r * W.a₂ * 2 - C'.s * C.r * W.a₁ * 2 - C'.s ^ 2 * C.r * 2) *\n pow_mul_pow_eq_one 2 C'.u.inv_mul +\n -(↑C.u⁻¹ : R) ^ 4 * ↑C'.u⁻¹ * (C.s * C'.s * C.r * 2 + C.s * C.r * W.a₁ + C'.s * C.t * 2 + C.t * W.a₁) *\n pow_mul_pow_eq_one 3 C'.u.inv_mul +\n (↑C.u⁻¹ : R) ^ 4 * (C.r ^ 2 * 3 - C.s * C.t * 2) * pow_mul_pow_eq_one 4 C'.u.inv_mul\n[GOAL]\ncase a\nR : Type u\ninst✝ : CommRing R\nW✝ : WeierstrassCurve R\nC✝ C C' : VariableChange R\nW : WeierstrassCurve R\n⊢ (↑C.u⁻¹ * ↑C'.u⁻¹) ^ 4 *\n (W.a₄ - (↑C'.u * C.s + C'.s) * W.a₃ + 2 * (C.r * ↑C'.u ^ 2 + C'.r) * W.a₂ -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t + (C.r * ↑C'.u ^ 2 + C'.r) * (↑C'.u * C.s + C'.s)) *\n W.a₁ +\n 3 * (C.r * ↑C'.u ^ 2 + C'.r) ^ 2 -\n 2 * (↑C'.u * C.s + C'.s) * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t)) -\n ↑C.u⁻¹ ^ 4 *\n (↑C'.u⁻¹ ^ 4 *\n (W.a₄ - C'.s * W.a₃ + 2 * C'.r * W.a₂ - (C'.t + C'.r * C'.s) * W.a₁ + 3 * C'.r ^ 2 -\n 2 * C'.s * C'.t) -\n C.s * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t)) +\n 2 * C.r * (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2)) -\n (C.t + C.r * C.s) * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)) +\n 3 * C.r ^ 2 -\n 2 * C.s * C.t) -\n (C.s * (-W.a₃ - C'.r * W.a₁ - C'.t * 2) * ↑C.u⁻¹ ^ 4 * ↑C'.u⁻¹ ^ 3 * (↑C'.u⁻¹ * ↑C'.u) +\n ↑C.u⁻¹ ^ 4 * ↑C'.u⁻¹ ^ 2 *\n (C.r * C'.r * 6 + C.r * W.a₂ * 2 - C'.s * C.r * W.a₁ * 2 - C'.s ^ 2 * C.r * 2) *\n (↑C'.u⁻¹ ^ 2 * ↑C'.u ^ 2) +\n -↑C.u⁻¹ ^ 4 * ↑C'.u⁻¹ * (C.s * C'.s * C.r * 2 + C.s * C.r * W.a₁ + C'.s * C.t * 2 + C.t * W.a₁) *\n (↑C'.u⁻¹ ^ 3 * ↑C'.u ^ 3) +\n ↑C.u⁻¹ ^ 4 * (C.r ^ 2 * 3 - C.s * C.t * 2) * (↑C'.u⁻¹ ^ 4 * ↑C'.u ^ 4) -\n (C.s * (-W.a₃ - C'.r * W.a₁ - C'.t * 2) * ↑C.u⁻¹ ^ 4 * ↑C'.u⁻¹ ^ 3 * 1 +\n ↑C.u⁻¹ ^ 4 * ↑C'.u⁻¹ ^ 2 *\n (C.r * C'.r * 6 + C.r * W.a₂ * 2 - C'.s * C.r * W.a₁ * 2 - C'.s ^ 2 * C.r * 2) *\n 1 +\n -↑C.u⁻¹ ^ 4 * ↑C'.u⁻¹ * (C.s * C'.s * C.r * 2 + C.s * C.r * W.a₁ + C'.s * C.t * 2 + C.t * W.a₁) * 1 +\n ↑C.u⁻¹ ^ 4 * (C.r ^ 2 * 3 - C.s * C.t * 2) * 1)) =\n 0\n[PROOFSTEP]\nring1\n[GOAL]\ncase a₆\nR : Type u\ninst✝ : CommRing R\nW✝ : WeierstrassCurve R\nC✝ C C' : VariableChange R\nW : WeierstrassCurve R\n⊢ (↑C.u⁻¹ * ↑C'.u⁻¹) ^ 6 *\n (W.a₆ + (C.r * ↑C'.u ^ 2 + C'.r) * W.a₄ + (C.r * ↑C'.u ^ 2 + C'.r) ^ 2 * W.a₂ + (C.r * ↑C'.u ^ 2 + C'.r) ^ 3 -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * W.a₃ -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) ^ 2 -\n (C.r * ↑C'.u ^ 2 + C'.r) * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * W.a₁) =\n ↑C.u⁻¹ ^ 6 *\n (↑C'.u⁻¹ ^ 6 * (W.a₆ + C'.r * W.a₄ + C'.r ^ 2 * W.a₂ + C'.r ^ 3 - C'.t * W.a₃ - C'.t ^ 2 - C'.r * C'.t * W.a₁) +\n C.r *\n (↑C'.u⁻¹ ^ 4 *\n (W.a₄ - C'.s * W.a₃ + 2 * C'.r * W.a₂ - (C'.t + C'.r * C'.s) * W.a₁ + 3 * C'.r ^ 2 -\n 2 * C'.s * C'.t)) +\n C.r ^ 2 * (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2)) +\n C.r ^ 3 -\n C.t * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t)) -\n C.t ^ 2 -\n C.r * C.t * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s)))\n[PROOFSTEP]\nlinear_combination (norm := ring1)\n C.r * (↑C.u⁻¹ : R) ^ 6 * (↑C'.u⁻¹ : R) ^ 4 *\n (C'.r * W.a₂ * 2 - C'.r * C'.s * W.a₁ + C'.r ^ 2 * 3 + W.a₄ - C'.s * C'.t * 2 - C'.s * W.a₃ -\n C'.t * W.a₁) *\n pow_mul_pow_eq_one 2 C'.u.inv_mul +\n -(↑C.u⁻¹ : R) ^ 6 * (↑C'.u⁻¹ : R) ^ 3 * C.t * (C'.r * W.a₁ + C'.t * 2 + W.a₃) *\n pow_mul_pow_eq_one 3 C'.u.inv_mul +\n C.r ^ 2 * (↑C.u⁻¹ : R) ^ 6 * (↑C'.u⁻¹ : R) ^ 2 * (C'.r * 3 + W.a₂ - C'.s * W.a₁ - C'.s ^ 2) *\n pow_mul_pow_eq_one 4 C'.u.inv_mul +\n -C.r * C.t * (↑C.u⁻¹ : R) ^ 6 * ↑C'.u⁻¹ * (C'.s * 2 + W.a₁) * pow_mul_pow_eq_one 5 C'.u.inv_mul +\n (↑C.u⁻¹ : R) ^ 6 * (C.r ^ 3 - C.t ^ 2) * pow_mul_pow_eq_one 6 C'.u.inv_mul\n[GOAL]\ncase a\nR : Type u\ninst✝ : CommRing R\nW✝ : WeierstrassCurve R\nC✝ C C' : VariableChange R\nW : WeierstrassCurve R\n⊢ (↑C.u⁻¹ * ↑C'.u⁻¹) ^ 6 *\n (W.a₆ + (C.r * ↑C'.u ^ 2 + C'.r) * W.a₄ + (C.r * ↑C'.u ^ 2 + C'.r) ^ 2 * W.a₂ + (C.r * ↑C'.u ^ 2 + C'.r) ^ 3 -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * W.a₃ -\n (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) ^ 2 -\n (C.r * ↑C'.u ^ 2 + C'.r) * (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) * W.a₁) -\n ↑C.u⁻¹ ^ 6 *\n (↑C'.u⁻¹ ^ 6 *\n (W.a₆ + C'.r * W.a₄ + C'.r ^ 2 * W.a₂ + C'.r ^ 3 - C'.t * W.a₃ - C'.t ^ 2 -\n C'.r * C'.t * W.a₁) +\n C.r *\n (↑C'.u⁻¹ ^ 4 *\n (W.a₄ - C'.s * W.a₃ + 2 * C'.r * W.a₂ - (C'.t + C'.r * C'.s) * W.a₁ + 3 * C'.r ^ 2 -\n 2 * C'.s * C'.t)) +\n C.r ^ 2 * (↑C'.u⁻¹ ^ 2 * (W.a₂ - C'.s * W.a₁ + 3 * C'.r - C'.s ^ 2)) +\n C.r ^ 3 -\n C.t * (↑C'.u⁻¹ ^ 3 * (W.a₃ + C'.r * W.a₁ + 2 * C'.t)) -\n C.t ^ 2 -\n C.r * C.t * (↑C'.u⁻¹ * (W.a₁ + 2 * C'.s))) -\n (C.r * ↑C.u⁻¹ ^ 6 * ↑C'.u⁻¹ ^ 4 *\n (C'.r * W.a₂ * 2 - C'.r * C'.s * W.a₁ + C'.r ^ 2 * 3 + W.a₄ - C'.s * C'.t * 2 - C'.s * W.a₃ -\n C'.t * W.a₁) *\n (↑C'.u⁻¹ ^ 2 * ↑C'.u ^ 2) +\n -↑C.u⁻¹ ^ 6 * ↑C'.u⁻¹ ^ 3 * C.t * (C'.r * W.a₁ + C'.t * 2 + W.a₃) * (↑C'.u⁻¹ ^ 3 * ↑C'.u ^ 3) +\n C.r ^ 2 * ↑C.u⁻¹ ^ 6 * ↑C'.u⁻¹ ^ 2 * (C'.r * 3 + W.a₂ - C'.s * W.a₁ - C'.s ^ 2) *\n (↑C'.u⁻¹ ^ 4 * ↑C'.u ^ 4) +\n -C.r * C.t * ↑C.u⁻¹ ^ 6 * ↑C'.u⁻¹ * (C'.s * 2 + W.a₁) * (↑C'.u⁻¹ ^ 5 * ↑C'.u ^ 5) +\n ↑C.u⁻¹ ^ 6 * (C.r ^ 3 - C.t ^ 2) * (↑C'.u⁻¹ ^ 6 * ↑C'.u ^ 6) -\n (C.r * ↑C.u⁻¹ ^ 6 * ↑C'.u⁻¹ ^ 4 *\n (C'.r * W.a₂ * 2 - C'.r * C'.s * W.a₁ + C'.r ^ 2 * 3 + W.a₄ - C'.s * C'.t * 2 - C'.s * W.a₃ -\n C'.t * W.a₁) *\n 1 +\n -↑C.u⁻¹ ^ 6 * ↑C'.u⁻¹ ^ 3 * C.t * (C'.r * W.a₁ + C'.t * 2 + W.a₃) * 1 +\n C.r ^ 2 * ↑C.u⁻¹ ^ 6 * ↑C'.u⁻¹ ^ 2 * (C'.r * 3 + W.a₂ - C'.s * W.a₁ - C'.s ^ 2) * 1 +\n -C.r * C.t * ↑C.u⁻¹ ^ 6 * ↑C'.u⁻¹ * (C'.s * 2 + W.a₁) * 1 +\n ↑C.u⁻¹ ^ 6 * (C.r ^ 3 - C.t ^ 2) * 1)) =\n 0\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ b₂ (variableChange W C) = ↑C.u⁻¹ ^ 2 * (b₂ W + 12 * C.r)\n[PROOFSTEP]\nsimp only [b₂, variableChange_a₁, variableChange_a₂]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ (↑C.u⁻¹ * (W.a₁ + 2 * C.s)) ^ 2 + 4 * (↑C.u⁻¹ ^ 2 * (W.a₂ - C.s * W.a₁ + 3 * C.r - C.s ^ 2)) =\n ↑C.u⁻¹ ^ 2 * (W.a₁ ^ 2 + 4 * W.a₂ + 12 * C.r)\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ b₄ (variableChange W C) = ↑C.u⁻¹ ^ 4 * (b₄ W + C.r * b₂ W + 6 * C.r ^ 2)\n[PROOFSTEP]\nsimp only [b₂, b₄, variableChange_a₁, variableChange_a₃, variableChange_a₄]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ 2 * (↑C.u⁻¹ ^ 4 * (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)) +\n ↑C.u⁻¹ * (W.a₁ + 2 * C.s) * (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)) =\n ↑C.u⁻¹ ^ 4 * (2 * W.a₄ + W.a₁ * W.a₃ + C.r * (W.a₁ ^ 2 + 4 * W.a₂) + 6 * C.r ^ 2)\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ b₆ (variableChange W C) = ↑C.u⁻¹ ^ 6 * (b₆ W + 2 * C.r * b₄ W + C.r ^ 2 * b₂ W + 4 * C.r ^ 3)\n[PROOFSTEP]\nsimp only [b₂, b₄, b₆, variableChange_a₃, variableChange_a₆]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)) ^ 2 +\n 4 * (↑C.u⁻¹ ^ 6 * (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁)) =\n ↑C.u⁻¹ ^ 6 *\n (W.a₃ ^ 2 + 4 * W.a₆ + 2 * C.r * (2 * W.a₄ + W.a₁ * W.a₃) + C.r ^ 2 * (W.a₁ ^ 2 + 4 * W.a₂) + 4 * C.r ^ 3)\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ b₈ (variableChange W C) = ↑C.u⁻¹ ^ 8 * (b₈ W + 3 * C.r * b₆ W + 3 * C.r ^ 2 * b₄ W + C.r ^ 3 * b₂ W + 3 * C.r ^ 4)\n[PROOFSTEP]\nsimp only [b₂, b₄, b₆, b₈, variableChange_a₁, variableChange_a₂, variableChange_a₃, variableChange_a₄,\n variableChange_a₆]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ (↑C.u⁻¹ * (W.a₁ + 2 * C.s)) ^ 2 *\n (↑C.u⁻¹ ^ 6 * (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁)) +\n 4 * (↑C.u⁻¹ ^ 2 * (W.a₂ - C.s * W.a₁ + 3 * C.r - C.s ^ 2)) *\n (↑C.u⁻¹ ^ 6 * (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁)) -\n ↑C.u⁻¹ * (W.a₁ + 2 * C.s) * (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)) *\n (↑C.u⁻¹ ^ 4 *\n (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)) +\n ↑C.u⁻¹ ^ 2 * (W.a₂ - C.s * W.a₁ + 3 * C.r - C.s ^ 2) * (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)) ^ 2 -\n (↑C.u⁻¹ ^ 4 * (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)) ^ 2 =\n ↑C.u⁻¹ ^ 8 *\n (W.a₁ ^ 2 * W.a₆ + 4 * W.a₂ * W.a₆ - W.a₁ * W.a₃ * W.a₄ + W.a₂ * W.a₃ ^ 2 - W.a₄ ^ 2 +\n 3 * C.r * (W.a₃ ^ 2 + 4 * W.a₆) +\n 3 * C.r ^ 2 * (2 * W.a₄ + W.a₁ * W.a₃) +\n C.r ^ 3 * (W.a₁ ^ 2 + 4 * W.a₂) +\n 3 * C.r ^ 4)\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ c₄ (variableChange W C) = ↑C.u⁻¹ ^ 4 * c₄ W\n[PROOFSTEP]\nsimp only [c₄, variableChange_b₂, variableChange_b₄]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ (↑C.u⁻¹ ^ 2 * (b₂ W + 12 * C.r)) ^ 2 - 24 * (↑C.u⁻¹ ^ 4 * (b₄ W + C.r * b₂ W + 6 * C.r ^ 2)) =\n ↑C.u⁻¹ ^ 4 * (b₂ W ^ 2 - 24 * b₄ W)\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ c₆ (variableChange W C) = ↑C.u⁻¹ ^ 6 * c₆ W\n[PROOFSTEP]\nsimp only [c₆, variableChange_b₂, variableChange_b₄, variableChange_b₆]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ -(↑C.u⁻¹ ^ 2 * (b₂ W + 12 * C.r)) ^ 3 +\n 36 * (↑C.u⁻¹ ^ 2 * (b₂ W + 12 * C.r)) * (↑C.u⁻¹ ^ 4 * (b₄ W + C.r * b₂ W + 6 * C.r ^ 2)) -\n 216 * (↑C.u⁻¹ ^ 6 * (b₆ W + 2 * C.r * b₄ W + C.r ^ 2 * b₂ W + 4 * C.r ^ 3)) =\n ↑C.u⁻¹ ^ 6 * (-b₂ W ^ 3 + 36 * b₂ W * b₄ W - 216 * b₆ W)\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ Δ (variableChange W C) = ↑C.u⁻¹ ^ 12 * Δ W\n[PROOFSTEP]\nsimp only [b₂, b₄, b₆, b₈, Δ, variableChange_a₁, variableChange_a₂, variableChange_a₃, variableChange_a₄,\n variableChange_a₆]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nW : WeierstrassCurve R\nC : VariableChange R\n⊢ -((↑C.u⁻¹ * (W.a₁ + 2 * C.s)) ^ 2 + 4 * (↑C.u⁻¹ ^ 2 * (W.a₂ - C.s * W.a₁ + 3 * C.r - C.s ^ 2))) ^ 2 *\n ((↑C.u⁻¹ * (W.a₁ + 2 * C.s)) ^ 2 *\n (↑C.u⁻¹ ^ 6 *\n (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁)) +\n 4 * (↑C.u⁻¹ ^ 2 * (W.a₂ - C.s * W.a₁ + 3 * C.r - C.s ^ 2)) *\n (↑C.u⁻¹ ^ 6 *\n (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁)) -\n ↑C.u⁻¹ * (W.a₁ + 2 * C.s) * (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)) *\n (↑C.u⁻¹ ^ 4 *\n (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)) +\n ↑C.u⁻¹ ^ 2 * (W.a₂ - C.s * W.a₁ + 3 * C.r - C.s ^ 2) *\n (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)) ^ 2 -\n (↑C.u⁻¹ ^ 4 *\n (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)) ^\n 2) -\n 8 *\n (2 *\n (↑C.u⁻¹ ^ 4 *\n (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)) +\n ↑C.u⁻¹ * (W.a₁ + 2 * C.s) * (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t))) ^\n 3 -\n 27 *\n ((↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)) ^ 2 +\n 4 *\n (↑C.u⁻¹ ^ 6 *\n (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁))) ^\n 2 +\n 9 * ((↑C.u⁻¹ * (W.a₁ + 2 * C.s)) ^ 2 + 4 * (↑C.u⁻¹ ^ 2 * (W.a₂ - C.s * W.a₁ + 3 * C.r - C.s ^ 2))) *\n (2 *\n (↑C.u⁻¹ ^ 4 *\n (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)) +\n ↑C.u⁻¹ * (W.a₁ + 2 * C.s) * (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t))) *\n ((↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)) ^ 2 +\n 4 * (↑C.u⁻¹ ^ 6 * (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁))) =\n ↑C.u⁻¹ ^ 12 *\n (-(W.a₁ ^ 2 + 4 * W.a₂) ^ 2 *\n (W.a₁ ^ 2 * W.a₆ + 4 * W.a₂ * W.a₆ - W.a₁ * W.a₃ * W.a₄ + W.a₂ * W.a₃ ^ 2 - W.a₄ ^ 2) -\n 8 * (2 * W.a₄ + W.a₁ * W.a₃) ^ 3 -\n 27 * (W.a₃ ^ 2 + 4 * W.a₆) ^ 2 +\n 9 * (W.a₁ ^ 2 + 4 * W.a₂) * (2 * W.a₄ + W.a₁ * W.a₃) * (W.a₃ ^ 2 + 4 * W.a₆))\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ b₂ (baseChange W A) = ↑(algebraMap R A) (b₂ W)\n[PROOFSTEP]\nsimp only [b₂, baseChange_a₁, baseChange_a₂]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ ↑(algebraMap R A) W.a₁ ^ 2 + 4 * ↑(algebraMap R A) W.a₂ = ↑(algebraMap R A) (W.a₁ ^ 2 + 4 * W.a₂)\n[PROOFSTEP]\nmap_simp\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ b₄ (baseChange W A) = ↑(algebraMap R A) (b₄ W)\n[PROOFSTEP]\nsimp only [b₄, baseChange_a₁, baseChange_a₃, baseChange_a₄]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ 2 * ↑(algebraMap R A) W.a₄ + ↑(algebraMap R A) W.a₁ * ↑(algebraMap R A) W.a₃ =\n ↑(algebraMap R A) (2 * W.a₄ + W.a₁ * W.a₃)\n[PROOFSTEP]\nmap_simp\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ b₆ (baseChange W A) = ↑(algebraMap R A) (b₆ W)\n[PROOFSTEP]\nsimp only [b₆, baseChange_a₃, baseChange_a₆]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ ↑(algebraMap R A) W.a₃ ^ 2 + 4 * ↑(algebraMap R A) W.a₆ = ↑(algebraMap R A) (W.a₃ ^ 2 + 4 * W.a₆)\n[PROOFSTEP]\nmap_simp\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ b₈ (baseChange W A) = ↑(algebraMap R A) (b₈ W)\n[PROOFSTEP]\nsimp only [b₈, baseChange_a₁, baseChange_a₂, baseChange_a₃, baseChange_a₄, baseChange_a₆]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ ↑(algebraMap R A) W.a₁ ^ 2 * ↑(algebraMap R A) W.a₆ + 4 * ↑(algebraMap R A) W.a₂ * ↑(algebraMap R A) W.a₆ -\n ↑(algebraMap R A) W.a₁ * ↑(algebraMap R A) W.a₃ * ↑(algebraMap R A) W.a₄ +\n ↑(algebraMap R A) W.a₂ * ↑(algebraMap R A) W.a₃ ^ 2 -\n ↑(algebraMap R A) W.a₄ ^ 2 =\n ↑(algebraMap R A) (W.a₁ ^ 2 * W.a₆ + 4 * W.a₂ * W.a₆ - W.a₁ * W.a₃ * W.a₄ + W.a₂ * W.a₃ ^ 2 - W.a₄ ^ 2)\n[PROOFSTEP]\nmap_simp\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ c₄ (baseChange W A) = ↑(algebraMap R A) (c₄ W)\n[PROOFSTEP]\nsimp only [c₄, baseChange_b₂, baseChange_b₄]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ ↑(algebraMap R A) (b₂ W) ^ 2 - 24 * ↑(algebraMap R A) (b₄ W) = ↑(algebraMap R A) (b₂ W ^ 2 - 24 * b₄ W)\n[PROOFSTEP]\nmap_simp\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ c₆ (baseChange W A) = ↑(algebraMap R A) (c₆ W)\n[PROOFSTEP]\nsimp only [c₆, baseChange_b₂, baseChange_b₄, baseChange_b₆]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ -↑(algebraMap R A) (b₂ W) ^ 3 + 36 * ↑(algebraMap R A) (b₂ W) * ↑(algebraMap R A) (b₄ W) -\n 216 * ↑(algebraMap R A) (b₆ W) =\n ↑(algebraMap R A) (-b₂ W ^ 3 + 36 * b₂ W * b₄ W - 216 * b₆ W)\n[PROOFSTEP]\nmap_simp\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ Δ (baseChange W A) = ↑(algebraMap R A) (Δ W)\n[PROOFSTEP]\nsimp only [Δ, baseChange_b₂, baseChange_b₄, baseChange_b₆, baseChange_b₈]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ -↑(algebraMap R A) (b₂ W) ^ 2 * ↑(algebraMap R A) (b₈ W) - 8 * ↑(algebraMap R A) (b₄ W) ^ 3 -\n 27 * ↑(algebraMap R A) (b₆ W) ^ 2 +\n 9 * ↑(algebraMap R A) (b₂ W) * ↑(algebraMap R A) (b₄ W) * ↑(algebraMap R A) (b₆ W) =\n ↑(algebraMap R A) (-b₂ W ^ 2 * b₈ W - 8 * b₄ W ^ 3 - 27 * b₆ W ^ 2 + 9 * b₂ W * b₄ W * b₆ W)\n[PROOFSTEP]\nmap_simp\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ baseChange W R = W\n[PROOFSTEP]\next\n[GOAL]\ncase a₁\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ (baseChange W R).a₁ = W.a₁\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a₂\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ (baseChange W R).a₂ = W.a₂\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a₃\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ (baseChange W R).a₃ = W.a₃\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a₄\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ (baseChange W R).a₄ = W.a₄\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a₆\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ (baseChange W R).a₆ = W.a₆\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ baseChange (baseChange W A) B = baseChange W B\n[PROOFSTEP]\next\n[GOAL]\ncase a₁\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ (baseChange (baseChange W A) B).a₁ = (baseChange W B).a₁\n[PROOFSTEP]\nexact (IsScalarTower.algebraMap_apply R A B _).symm\n[GOAL]\ncase a₂\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ (baseChange (baseChange W A) B).a₂ = (baseChange W B).a₂\n[PROOFSTEP]\nexact (IsScalarTower.algebraMap_apply R A B _).symm\n[GOAL]\ncase a₃\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ (baseChange (baseChange W A) B).a₃ = (baseChange W B).a₃\n[PROOFSTEP]\nexact (IsScalarTower.algebraMap_apply R A B _).symm\n[GOAL]\ncase a₄\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ (baseChange (baseChange W A) B).a₄ = (baseChange W B).a₄\n[PROOFSTEP]\nexact (IsScalarTower.algebraMap_apply R A B _).symm\n[GOAL]\ncase a₆\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ (baseChange (baseChange W A) B).a₆ = (baseChange W B).a₆\n[PROOFSTEP]\nexact (IsScalarTower.algebraMap_apply R A B _).symm\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW✝ : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nh : Function.Injective ↑(algebraMap R A)\nW W' : WeierstrassCurve R\nh1 : (fun W => baseChange W A) W = (fun W => baseChange W A) W'\n⊢ W = W'\n[PROOFSTEP]\nrcases mk.inj h1 with ⟨_, _, _, _, _⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u\ninst✝⁶ : CommRing R\nW✝ : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nh : Function.Injective ↑(algebraMap R A)\nW W' : WeierstrassCurve R\nh1 : (fun W => baseChange W A) W = (fun W => baseChange W A) W'\nleft✝³ : ↑(algebraMap R A) W.a₁ = ↑(algebraMap R A) W'.a₁\nleft✝² : ↑(algebraMap R A) W.a₂ = ↑(algebraMap R A) W'.a₂\nleft✝¹ : ↑(algebraMap R A) W.a₃ = ↑(algebraMap R A) W'.a₃\nleft✝ : ↑(algebraMap R A) W.a₄ = ↑(algebraMap R A) W'.a₄\nright✝ : ↑(algebraMap R A) W.a₆ = ↑(algebraMap R A) W'.a₆\n⊢ W = W'\n[PROOFSTEP]\next\n[GOAL]\ncase intro.intro.intro.intro.a₁\nR : Type u\ninst✝⁶ : CommRing R\nW✝ : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nh : Function.Injective ↑(algebraMap R A)\nW W' : WeierstrassCurve R\nh1 : (fun W => baseChange W A) W = (fun W => baseChange W A) W'\nleft✝³ : ↑(algebraMap R A) W.a₁ = ↑(algebraMap R A) W'.a₁\nleft✝² : ↑(algebraMap R A) W.a₂ = ↑(algebraMap R A) W'.a₂\nleft✝¹ : ↑(algebraMap R A) W.a₃ = ↑(algebraMap R A) W'.a₃\nleft✝ : ↑(algebraMap R A) W.a₄ = ↑(algebraMap R A) W'.a₄\nright✝ : ↑(algebraMap R A) W.a₆ = ↑(algebraMap R A) W'.a₆\n⊢ W.a₁ = W'.a₁\n[PROOFSTEP]\napply_fun _ using h\n[GOAL]\ncase intro.intro.intro.intro.a₂\nR : Type u\ninst✝⁶ : CommRing R\nW✝ : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nh : Function.Injective ↑(algebraMap R A)\nW W' : WeierstrassCurve R\nh1 : (fun W => baseChange W A) W = (fun W => baseChange W A) W'\nleft✝³ : ↑(algebraMap R A) W.a₁ = ↑(algebraMap R A) W'.a₁\nleft✝² : ↑(algebraMap R A) W.a₂ = ↑(algebraMap R A) W'.a₂\nleft✝¹ : ↑(algebraMap R A) W.a₃ = ↑(algebraMap R A) W'.a₃\nleft✝ : ↑(algebraMap R A) W.a₄ = ↑(algebraMap R A) W'.a₄\nright✝ : ↑(algebraMap R A) W.a₆ = ↑(algebraMap R A) W'.a₆\n⊢ W.a₂ = W'.a₂\n[PROOFSTEP]\napply_fun _ using h\n[GOAL]\ncase intro.intro.intro.intro.a₃\nR : Type u\ninst✝⁶ : CommRing R\nW✝ : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nh : Function.Injective ↑(algebraMap R A)\nW W' : WeierstrassCurve R\nh1 : (fun W => baseChange W A) W = (fun W => baseChange W A) W'\nleft✝³ : ↑(algebraMap R A) W.a₁ = ↑(algebraMap R A) W'.a₁\nleft✝² : ↑(algebraMap R A) W.a₂ = ↑(algebraMap R A) W'.a₂\nleft✝¹ : ↑(algebraMap R A) W.a₃ = ↑(algebraMap R A) W'.a₃\nleft✝ : ↑(algebraMap R A) W.a₄ = ↑(algebraMap R A) W'.a₄\nright✝ : ↑(algebraMap R A) W.a₆ = ↑(algebraMap R A) W'.a₆\n⊢ W.a₃ = W'.a₃\n[PROOFSTEP]\napply_fun _ using h\n[GOAL]\ncase intro.intro.intro.intro.a₄\nR : Type u\ninst✝⁶ : CommRing R\nW✝ : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nh : Function.Injective ↑(algebraMap R A)\nW W' : WeierstrassCurve R\nh1 : (fun W => baseChange W A) W = (fun W => baseChange W A) W'\nleft✝³ : ↑(algebraMap R A) W.a₁ = ↑(algebraMap R A) W'.a₁\nleft✝² : ↑(algebraMap R A) W.a₂ = ↑(algebraMap R A) W'.a₂\nleft✝¹ : ↑(algebraMap R A) W.a₃ = ↑(algebraMap R A) W'.a₃\nleft✝ : ↑(algebraMap R A) W.a₄ = ↑(algebraMap R A) W'.a₄\nright✝ : ↑(algebraMap R A) W.a₆ = ↑(algebraMap R A) W'.a₆\n⊢ W.a₄ = W'.a₄\n[PROOFSTEP]\napply_fun _ using h\n[GOAL]\ncase intro.intro.intro.intro.a₆\nR : Type u\ninst✝⁶ : CommRing R\nW✝ : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nh : Function.Injective ↑(algebraMap R A)\nW W' : WeierstrassCurve R\nh1 : (fun W => baseChange W A) W = (fun W => baseChange W A) W'\nleft✝³ : ↑(algebraMap R A) W.a₁ = ↑(algebraMap R A) W'.a₁\nleft✝² : ↑(algebraMap R A) W.a₂ = ↑(algebraMap R A) W'.a₂\nleft✝¹ : ↑(algebraMap R A) W.a₃ = ↑(algebraMap R A) W'.a₃\nleft✝ : ↑(algebraMap R A) W.a₄ = ↑(algebraMap R A) W'.a₄\nright✝ : ↑(algebraMap R A) W.a₆ = ↑(algebraMap R A) W'.a₆\n⊢ W.a₆ = W'.a₆\n[PROOFSTEP]\napply_fun _ using h\n[GOAL]\ncase intro.intro.intro.intro.a₁\nR : Type u\ninst✝⁶ : CommRing R\nW✝ : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nh : Function.Injective ↑(algebraMap R A)\nW W' : WeierstrassCurve R\nh1 : (fun W => baseChange W A) W = (fun W => baseChange W A) W'\nleft✝³ : ↑(algebraMap R A) W.a₁ = ↑(algebraMap R A) W'.a₁\nleft✝² : ↑(algebraMap R A) W.a₂ = ↑(algebraMap R A) W'.a₂\nleft✝¹ : ↑(algebraMap R A) W.a₃ = ↑(algebraMap R A) W'.a₃\nleft✝ : ↑(algebraMap R A) W.a₄ = ↑(algebraMap R A) W'.a₄\nright✝ : ↑(algebraMap R A) W.a₆ = ↑(algebraMap R A) W'.a₆\n⊢ ↑(algebraMap R A) W.a₁ = ↑(algebraMap R A) W'.a₁\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.intro.intro.a₂\nR : Type u\ninst✝⁶ : CommRing R\nW✝ : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nh : Function.Injective ↑(algebraMap R A)\nW W' : WeierstrassCurve R\nh1 : (fun W => baseChange W A) W = (fun W => baseChange W A) W'\nleft✝³ : ↑(algebraMap R A) W.a₁ = ↑(algebraMap R A) W'.a₁\nleft✝² : ↑(algebraMap R A) W.a₂ = ↑(algebraMap R A) W'.a₂\nleft✝¹ : ↑(algebraMap R A) W.a₃ = ↑(algebraMap R A) W'.a₃\nleft✝ : ↑(algebraMap R A) W.a₄ = ↑(algebraMap R A) W'.a₄\nright✝ : ↑(algebraMap R A) W.a₆ = ↑(algebraMap R A) W'.a₆\n⊢ ↑(algebraMap R A) W.a₂ = ↑(algebraMap R A) W'.a₂\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.intro.intro.a₃\nR : Type u\ninst✝⁶ : CommRing R\nW✝ : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nh : Function.Injective ↑(algebraMap R A)\nW W' : WeierstrassCurve R\nh1 : (fun W => baseChange W A) W = (fun W => baseChange W A) W'\nleft✝³ : ↑(algebraMap R A) W.a₁ = ↑(algebraMap R A) W'.a₁\nleft✝² : ↑(algebraMap R A) W.a₂ = ↑(algebraMap R A) W'.a₂\nleft✝¹ : ↑(algebraMap R A) W.a₃ = ↑(algebraMap R A) W'.a₃\nleft✝ : ↑(algebraMap R A) W.a₄ = ↑(algebraMap R A) W'.a₄\nright✝ : ↑(algebraMap R A) W.a₆ = ↑(algebraMap R A) W'.a₆\n⊢ ↑(algebraMap R A) W.a₃ = ↑(algebraMap R A) W'.a₃\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.intro.intro.a₄\nR : Type u\ninst✝⁶ : CommRing R\nW✝ : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nh : Function.Injective ↑(algebraMap R A)\nW W' : WeierstrassCurve R\nh1 : (fun W => baseChange W A) W = (fun W => baseChange W A) W'\nleft✝³ : ↑(algebraMap R A) W.a₁ = ↑(algebraMap R A) W'.a₁\nleft✝² : ↑(algebraMap R A) W.a₂ = ↑(algebraMap R A) W'.a₂\nleft✝¹ : ↑(algebraMap R A) W.a₃ = ↑(algebraMap R A) W'.a₃\nleft✝ : ↑(algebraMap R A) W.a₄ = ↑(algebraMap R A) W'.a₄\nright✝ : ↑(algebraMap R A) W.a₆ = ↑(algebraMap R A) W'.a₆\n⊢ ↑(algebraMap R A) W.a₄ = ↑(algebraMap R A) W'.a₄\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.intro.intro.a₆\nR : Type u\ninst✝⁶ : CommRing R\nW✝ : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nh : Function.Injective ↑(algebraMap R A)\nW W' : WeierstrassCurve R\nh1 : (fun W => baseChange W A) W = (fun W => baseChange W A) W'\nleft✝³ : ↑(algebraMap R A) W.a₁ = ↑(algebraMap R A) W'.a₁\nleft✝² : ↑(algebraMap R A) W.a₂ = ↑(algebraMap R A) W'.a₂\nleft✝¹ : ↑(algebraMap R A) W.a₃ = ↑(algebraMap R A) W'.a₃\nleft✝ : ↑(algebraMap R A) W.a₄ = ↑(algebraMap R A) W'.a₄\nright✝ : ↑(algebraMap R A) W.a₆ = ↑(algebraMap R A) W'.a₆\n⊢ ↑(algebraMap R A) W.a₆ = ↑(algebraMap R A) W'.a₆\n[PROOFSTEP]\nassumption\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC : VariableChange R\n⊢ baseChange A id = id\n[PROOFSTEP]\nsimp only [id, baseChange]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC : VariableChange R\n⊢ { u := ↑(Units.map ↑(algebraMap R A)) 1, r := ↑(algebraMap R A) 0, s := ↑(algebraMap R A) 0,\n t := ↑(algebraMap R A) 0 } =\n { u := 1, r := 0, s := 0, t := 0 }\n[PROOFSTEP]\next\n[GOAL]\ncase u.a\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC : VariableChange R\n⊢ ↑{ u := ↑(Units.map ↑(algebraMap R A)) 1, r := ↑(algebraMap R A) 0, s := ↑(algebraMap R A) 0,\n t := ↑(algebraMap R A) 0 }.u =\n ↑{ u := 1, r := 0, s := 0, t := 0 }.u\n[PROOFSTEP]\nsimp only [map_one, Units.val_one, map_zero]\n[GOAL]\ncase r\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC : VariableChange R\n⊢ { u := ↑(Units.map ↑(algebraMap R A)) 1, r := ↑(algebraMap R A) 0, s := ↑(algebraMap R A) 0,\n t := ↑(algebraMap R A) 0 }.r =\n { u := 1, r := 0, s := 0, t := 0 }.r\n[PROOFSTEP]\nsimp only [map_one, Units.val_one, map_zero]\n[GOAL]\ncase s\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC : VariableChange R\n⊢ { u := ↑(Units.map ↑(algebraMap R A)) 1, r := ↑(algebraMap R A) 0, s := ↑(algebraMap R A) 0,\n t := ↑(algebraMap R A) 0 }.s =\n { u := 1, r := 0, s := 0, t := 0 }.s\n[PROOFSTEP]\nsimp only [map_one, Units.val_one, map_zero]\n[GOAL]\ncase t\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC : VariableChange R\n⊢ { u := ↑(Units.map ↑(algebraMap R A)) 1, r := ↑(algebraMap R A) 0, s := ↑(algebraMap R A) 0,\n t := ↑(algebraMap R A) 0 }.t =\n { u := 1, r := 0, s := 0, t := 0 }.t\n[PROOFSTEP]\nsimp only [map_one, Units.val_one, map_zero]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC C' : VariableChange R\n⊢ baseChange A (comp C C') = comp (baseChange A C) (baseChange A C')\n[PROOFSTEP]\nsimp only [comp, baseChange]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC C' : VariableChange R\n⊢ { u := ↑(Units.map ↑(algebraMap R A)) (C.u * C'.u), r := ↑(algebraMap R A) (C.r * ↑C'.u ^ 2 + C'.r),\n s := ↑(algebraMap R A) (↑C'.u * C.s + C'.s),\n t := ↑(algebraMap R A) (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) } =\n { u := ↑(Units.map ↑(algebraMap R A)) C.u * ↑(Units.map ↑(algebraMap R A)) C'.u,\n r := ↑(algebraMap R A) C.r * ↑(↑(Units.map ↑(algebraMap R A)) C'.u) ^ 2 + ↑(algebraMap R A) C'.r,\n s := ↑(↑(Units.map ↑(algebraMap R A)) C'.u) * ↑(algebraMap R A) C.s + ↑(algebraMap R A) C'.s,\n t :=\n ↑(algebraMap R A) C.t * ↑(↑(Units.map ↑(algebraMap R A)) C'.u) ^ 3 +\n ↑(algebraMap R A) C.r * ↑(algebraMap R A) C'.s * ↑(↑(Units.map ↑(algebraMap R A)) C'.u) ^ 2 +\n ↑(algebraMap R A) C'.t }\n[PROOFSTEP]\next\n[GOAL]\ncase u.a\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC C' : VariableChange R\n⊢ ↑{ u := ↑(Units.map ↑(algebraMap R A)) (C.u * C'.u), r := ↑(algebraMap R A) (C.r * ↑C'.u ^ 2 + C'.r),\n s := ↑(algebraMap R A) (↑C'.u * C.s + C'.s),\n t := ↑(algebraMap R A) (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) }.u =\n ↑{ u := ↑(Units.map ↑(algebraMap R A)) C.u * ↑(Units.map ↑(algebraMap R A)) C'.u,\n r := ↑(algebraMap R A) C.r * ↑(↑(Units.map ↑(algebraMap R A)) C'.u) ^ 2 + ↑(algebraMap R A) C'.r,\n s := ↑(↑(Units.map ↑(algebraMap R A)) C'.u) * ↑(algebraMap R A) C.s + ↑(algebraMap R A) C'.s,\n t :=\n ↑(algebraMap R A) C.t * ↑(↑(Units.map ↑(algebraMap R A)) C'.u) ^ 3 +\n ↑(algebraMap R A) C.r * ↑(algebraMap R A) C'.s * ↑(↑(Units.map ↑(algebraMap R A)) C'.u) ^ 2 +\n ↑(algebraMap R A) C'.t }.u\n[PROOFSTEP]\nsimp only [Units.coe_map, Units.coe_map_inv, MonoidHom.coe_coe, map_ofNat, map_neg, map_add, map_sub, map_mul, map_pow]\n[GOAL]\ncase r\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC C' : VariableChange R\n⊢ { u := ↑(Units.map ↑(algebraMap R A)) (C.u * C'.u), r := ↑(algebraMap R A) (C.r * ↑C'.u ^ 2 + C'.r),\n s := ↑(algebraMap R A) (↑C'.u * C.s + C'.s),\n t := ↑(algebraMap R A) (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) }.r =\n { u := ↑(Units.map ↑(algebraMap R A)) C.u * ↑(Units.map ↑(algebraMap R A)) C'.u,\n r := ↑(algebraMap R A) C.r * ↑(↑(Units.map ↑(algebraMap R A)) C'.u) ^ 2 + ↑(algebraMap R A) C'.r,\n s := ↑(↑(Units.map ↑(algebraMap R A)) C'.u) * ↑(algebraMap R A) C.s + ↑(algebraMap R A) C'.s,\n t :=\n ↑(algebraMap R A) C.t * ↑(↑(Units.map ↑(algebraMap R A)) C'.u) ^ 3 +\n ↑(algebraMap R A) C.r * ↑(algebraMap R A) C'.s * ↑(↑(Units.map ↑(algebraMap R A)) C'.u) ^ 2 +\n ↑(algebraMap R A) C'.t }.r\n[PROOFSTEP]\nsimp only [Units.coe_map, Units.coe_map_inv, MonoidHom.coe_coe, map_ofNat, map_neg, map_add, map_sub, map_mul, map_pow]\n[GOAL]\ncase s\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC C' : VariableChange R\n⊢ { u := ↑(Units.map ↑(algebraMap R A)) (C.u * C'.u), r := ↑(algebraMap R A) (C.r * ↑C'.u ^ 2 + C'.r),\n s := ↑(algebraMap R A) (↑C'.u * C.s + C'.s),\n t := ↑(algebraMap R A) (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) }.s =\n { u := ↑(Units.map ↑(algebraMap R A)) C.u * ↑(Units.map ↑(algebraMap R A)) C'.u,\n r := ↑(algebraMap R A) C.r * ↑(↑(Units.map ↑(algebraMap R A)) C'.u) ^ 2 + ↑(algebraMap R A) C'.r,\n s := ↑(↑(Units.map ↑(algebraMap R A)) C'.u) * ↑(algebraMap R A) C.s + ↑(algebraMap R A) C'.s,\n t :=\n ↑(algebraMap R A) C.t * ↑(↑(Units.map ↑(algebraMap R A)) C'.u) ^ 3 +\n ↑(algebraMap R A) C.r * ↑(algebraMap R A) C'.s * ↑(↑(Units.map ↑(algebraMap R A)) C'.u) ^ 2 +\n ↑(algebraMap R A) C'.t }.s\n[PROOFSTEP]\nsimp only [Units.coe_map, Units.coe_map_inv, MonoidHom.coe_coe, map_ofNat, map_neg, map_add, map_sub, map_mul, map_pow]\n[GOAL]\ncase t\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC C' : VariableChange R\n⊢ { u := ↑(Units.map ↑(algebraMap R A)) (C.u * C'.u), r := ↑(algebraMap R A) (C.r * ↑C'.u ^ 2 + C'.r),\n s := ↑(algebraMap R A) (↑C'.u * C.s + C'.s),\n t := ↑(algebraMap R A) (C.t * ↑C'.u ^ 3 + C.r * C'.s * ↑C'.u ^ 2 + C'.t) }.t =\n { u := ↑(Units.map ↑(algebraMap R A)) C.u * ↑(Units.map ↑(algebraMap R A)) C'.u,\n r := ↑(algebraMap R A) C.r * ↑(↑(Units.map ↑(algebraMap R A)) C'.u) ^ 2 + ↑(algebraMap R A) C'.r,\n s := ↑(↑(Units.map ↑(algebraMap R A)) C'.u) * ↑(algebraMap R A) C.s + ↑(algebraMap R A) C'.s,\n t :=\n ↑(algebraMap R A) C.t * ↑(↑(Units.map ↑(algebraMap R A)) C'.u) ^ 3 +\n ↑(algebraMap R A) C.r * ↑(algebraMap R A) C'.s * ↑(↑(Units.map ↑(algebraMap R A)) C'.u) ^ 2 +\n ↑(algebraMap R A) C'.t }.t\n[PROOFSTEP]\nsimp only [Units.coe_map, Units.coe_map_inv, MonoidHom.coe_coe, map_ofNat, map_neg, map_add, map_sub, map_mul, map_pow]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC : VariableChange R\n⊢ baseChange B (baseChange A C) = baseChange B C\n[PROOFSTEP]\next\n[GOAL]\ncase u.a\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC : VariableChange R\n⊢ ↑(baseChange B (baseChange A C)).u = ↑(baseChange B C).u\n[PROOFSTEP]\nexact (IsScalarTower.algebraMap_apply R A B _).symm\n[GOAL]\ncase r\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC : VariableChange R\n⊢ (baseChange B (baseChange A C)).r = (baseChange B C).r\n[PROOFSTEP]\nexact (IsScalarTower.algebraMap_apply R A B _).symm\n[GOAL]\ncase s\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC : VariableChange R\n⊢ (baseChange B (baseChange A C)).s = (baseChange B C).s\n[PROOFSTEP]\nexact (IsScalarTower.algebraMap_apply R A B _).symm\n[GOAL]\ncase t\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC : VariableChange R\n⊢ (baseChange B (baseChange A C)).t = (baseChange B C).t\n[PROOFSTEP]\nexact (IsScalarTower.algebraMap_apply R A B _).symm\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC✝ : VariableChange R\nh : Function.Injective ↑(algebraMap R A)\nC C' : VariableChange R\nh1 : baseChange A C = baseChange A C'\n⊢ C = C'\n[PROOFSTEP]\nrcases mk.inj h1 with ⟨h1, _, _, _⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC✝ : VariableChange R\nh : Function.Injective ↑(algebraMap R A)\nC C' : VariableChange R\nh1✝ : baseChange A C = baseChange A C'\nh1 : ↑(Units.map ↑(algebraMap R A)) C.u = ↑(Units.map ↑(algebraMap R A)) C'.u\nleft✝¹ : ↑(algebraMap R A) C.r = ↑(algebraMap R A) C'.r\nleft✝ : ↑(algebraMap R A) C.s = ↑(algebraMap R A) C'.s\nright✝ : ↑(algebraMap R A) C.t = ↑(algebraMap R A) C'.t\n⊢ C = C'\n[PROOFSTEP]\nreplace h1 := (Units.mk.inj h1).left\n[GOAL]\ncase intro.intro.intro\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC✝ : VariableChange R\nh : Function.Injective ↑(algebraMap R A)\nC C' : VariableChange R\nh1✝ : baseChange A C = baseChange A C'\nleft✝¹ : ↑(algebraMap R A) C.r = ↑(algebraMap R A) C'.r\nleft✝ : ↑(algebraMap R A) C.s = ↑(algebraMap R A) C'.s\nright✝ : ↑(algebraMap R A) C.t = ↑(algebraMap R A) C'.t\nh1 : ↑↑(algebraMap R A) ↑C.u = ↑↑(algebraMap R A) ↑C'.u\n⊢ C = C'\n[PROOFSTEP]\next\n[GOAL]\ncase intro.intro.intro.u.a\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC✝ : VariableChange R\nh : Function.Injective ↑(algebraMap R A)\nC C' : VariableChange R\nh1✝ : baseChange A C = baseChange A C'\nleft✝¹ : ↑(algebraMap R A) C.r = ↑(algebraMap R A) C'.r\nleft✝ : ↑(algebraMap R A) C.s = ↑(algebraMap R A) C'.s\nright✝ : ↑(algebraMap R A) C.t = ↑(algebraMap R A) C'.t\nh1 : ↑↑(algebraMap R A) ↑C.u = ↑↑(algebraMap R A) ↑C'.u\n⊢ ↑C.u = ↑C'.u\n[PROOFSTEP]\napply_fun _ using h\n[GOAL]\ncase intro.intro.intro.r\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC✝ : VariableChange R\nh : Function.Injective ↑(algebraMap R A)\nC C' : VariableChange R\nh1✝ : baseChange A C = baseChange A C'\nleft✝¹ : ↑(algebraMap R A) C.r = ↑(algebraMap R A) C'.r\nleft✝ : ↑(algebraMap R A) C.s = ↑(algebraMap R A) C'.s\nright✝ : ↑(algebraMap R A) C.t = ↑(algebraMap R A) C'.t\nh1 : ↑↑(algebraMap R A) ↑C.u = ↑↑(algebraMap R A) ↑C'.u\n⊢ C.r = C'.r\n[PROOFSTEP]\napply_fun _ using h\n[GOAL]\ncase intro.intro.intro.s\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC✝ : VariableChange R\nh : Function.Injective ↑(algebraMap R A)\nC C' : VariableChange R\nh1✝ : baseChange A C = baseChange A C'\nleft✝¹ : ↑(algebraMap R A) C.r = ↑(algebraMap R A) C'.r\nleft✝ : ↑(algebraMap R A) C.s = ↑(algebraMap R A) C'.s\nright✝ : ↑(algebraMap R A) C.t = ↑(algebraMap R A) C'.t\nh1 : ↑↑(algebraMap R A) ↑C.u = ↑↑(algebraMap R A) ↑C'.u\n⊢ C.s = C'.s\n[PROOFSTEP]\napply_fun _ using h\n[GOAL]\ncase intro.intro.intro.t\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC✝ : VariableChange R\nh : Function.Injective ↑(algebraMap R A)\nC C' : VariableChange R\nh1✝ : baseChange A C = baseChange A C'\nleft✝¹ : ↑(algebraMap R A) C.r = ↑(algebraMap R A) C'.r\nleft✝ : ↑(algebraMap R A) C.s = ↑(algebraMap R A) C'.s\nright✝ : ↑(algebraMap R A) C.t = ↑(algebraMap R A) C'.t\nh1 : ↑↑(algebraMap R A) ↑C.u = ↑↑(algebraMap R A) ↑C'.u\n⊢ C.t = C'.t\n[PROOFSTEP]\napply_fun _ using h\n[GOAL]\ncase intro.intro.intro.u.a\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC✝ : VariableChange R\nh : Function.Injective ↑(algebraMap R A)\nC C' : VariableChange R\nh1✝ : baseChange A C = baseChange A C'\nleft✝¹ : ↑(algebraMap R A) C.r = ↑(algebraMap R A) C'.r\nleft✝ : ↑(algebraMap R A) C.s = ↑(algebraMap R A) C'.s\nright✝ : ↑(algebraMap R A) C.t = ↑(algebraMap R A) C'.t\nh1 : ↑↑(algebraMap R A) ↑C.u = ↑↑(algebraMap R A) ↑C'.u\n⊢ ↑(algebraMap R A) ↑C.u = ↑(algebraMap R A) ↑C'.u\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.intro.r\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC✝ : VariableChange R\nh : Function.Injective ↑(algebraMap R A)\nC C' : VariableChange R\nh1✝ : baseChange A C = baseChange A C'\nleft✝¹ : ↑(algebraMap R A) C.r = ↑(algebraMap R A) C'.r\nleft✝ : ↑(algebraMap R A) C.s = ↑(algebraMap R A) C'.s\nright✝ : ↑(algebraMap R A) C.t = ↑(algebraMap R A) C'.t\nh1 : ↑↑(algebraMap R A) ↑C.u = ↑↑(algebraMap R A) ↑C'.u\n⊢ ↑(algebraMap R A) C.r = ↑(algebraMap R A) C'.r\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.intro.s\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC✝ : VariableChange R\nh : Function.Injective ↑(algebraMap R A)\nC C' : VariableChange R\nh1✝ : baseChange A C = baseChange A C'\nleft✝¹ : ↑(algebraMap R A) C.r = ↑(algebraMap R A) C'.r\nleft✝ : ↑(algebraMap R A) C.s = ↑(algebraMap R A) C'.s\nright✝ : ↑(algebraMap R A) C.t = ↑(algebraMap R A) C'.t\nh1 : ↑↑(algebraMap R A) ↑C.u = ↑↑(algebraMap R A) ↑C'.u\n⊢ ↑(algebraMap R A) C.s = ↑(algebraMap R A) C'.s\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.intro.t\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC✝ : VariableChange R\nh : Function.Injective ↑(algebraMap R A)\nC C' : VariableChange R\nh1✝ : baseChange A C = baseChange A C'\nleft✝¹ : ↑(algebraMap R A) C.r = ↑(algebraMap R A) C'.r\nleft✝ : ↑(algebraMap R A) C.s = ↑(algebraMap R A) C'.s\nright✝ : ↑(algebraMap R A) C.t = ↑(algebraMap R A) C'.t\nh1 : ↑↑(algebraMap R A) ↑C.u = ↑↑(algebraMap R A) ↑C'.u\n⊢ ↑(algebraMap R A) C.t = ↑(algebraMap R A) C'.t\n[PROOFSTEP]\nassumption\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC : VariableChange R\n⊢ variableChange (baseChange W A) (VariableChange.baseChange A C) = baseChange (variableChange W C) A\n[PROOFSTEP]\nsimp only [baseChange, variableChange, VariableChange.baseChange]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC : VariableChange R\n⊢ { a₁ := ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ * (↑(algebraMap R A) W.a₁ + 2 * ↑(algebraMap R A) C.s),\n a₂ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 2 *\n (↑(algebraMap R A) W.a₂ - ↑(algebraMap R A) C.s * ↑(algebraMap R A) W.a₁ + 3 * ↑(algebraMap R A) C.r -\n ↑(algebraMap R A) C.s ^ 2),\n a₃ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 3 *\n (↑(algebraMap R A) W.a₃ + ↑(algebraMap R A) C.r * ↑(algebraMap R A) W.a₁ + 2 * ↑(algebraMap R A) C.t),\n a₄ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 4 *\n (↑(algebraMap R A) W.a₄ - ↑(algebraMap R A) C.s * ↑(algebraMap R A) W.a₃ +\n 2 * ↑(algebraMap R A) C.r * ↑(algebraMap R A) W.a₂ -\n (↑(algebraMap R A) C.t + ↑(algebraMap R A) C.r * ↑(algebraMap R A) C.s) * ↑(algebraMap R A) W.a₁ +\n 3 * ↑(algebraMap R A) C.r ^ 2 -\n 2 * ↑(algebraMap R A) C.s * ↑(algebraMap R A) C.t),\n a₆ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 6 *\n (↑(algebraMap R A) W.a₆ + ↑(algebraMap R A) C.r * ↑(algebraMap R A) W.a₄ +\n ↑(algebraMap R A) C.r ^ 2 * ↑(algebraMap R A) W.a₂ +\n ↑(algebraMap R A) C.r ^ 3 -\n ↑(algebraMap R A) C.t * ↑(algebraMap R A) W.a₃ -\n ↑(algebraMap R A) C.t ^ 2 -\n ↑(algebraMap R A) C.r * ↑(algebraMap R A) C.t * ↑(algebraMap R A) W.a₁) } =\n { a₁ := ↑(algebraMap R A) (↑C.u⁻¹ * (W.a₁ + 2 * C.s)),\n a₂ := ↑(algebraMap R A) (↑C.u⁻¹ ^ 2 * (W.a₂ - C.s * W.a₁ + 3 * C.r - C.s ^ 2)),\n a₃ := ↑(algebraMap R A) (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)),\n a₄ :=\n ↑(algebraMap R A)\n (↑C.u⁻¹ ^ 4 * (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)),\n a₆ :=\n ↑(algebraMap R A)\n (↑C.u⁻¹ ^ 6 * (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁)) }\n[PROOFSTEP]\next\n[GOAL]\ncase a₁\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC : VariableChange R\n⊢ { a₁ := ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ * (↑(algebraMap R A) W.a₁ + 2 * ↑(algebraMap R A) C.s),\n a₂ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 2 *\n (↑(algebraMap R A) W.a₂ - ↑(algebraMap R A) C.s * ↑(algebraMap R A) W.a₁ + 3 * ↑(algebraMap R A) C.r -\n ↑(algebraMap R A) C.s ^ 2),\n a₃ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 3 *\n (↑(algebraMap R A) W.a₃ + ↑(algebraMap R A) C.r * ↑(algebraMap R A) W.a₁ + 2 * ↑(algebraMap R A) C.t),\n a₄ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 4 *\n (↑(algebraMap R A) W.a₄ - ↑(algebraMap R A) C.s * ↑(algebraMap R A) W.a₃ +\n 2 * ↑(algebraMap R A) C.r * ↑(algebraMap R A) W.a₂ -\n (↑(algebraMap R A) C.t + ↑(algebraMap R A) C.r * ↑(algebraMap R A) C.s) * ↑(algebraMap R A) W.a₁ +\n 3 * ↑(algebraMap R A) C.r ^ 2 -\n 2 * ↑(algebraMap R A) C.s * ↑(algebraMap R A) C.t),\n a₆ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 6 *\n (↑(algebraMap R A) W.a₆ + ↑(algebraMap R A) C.r * ↑(algebraMap R A) W.a₄ +\n ↑(algebraMap R A) C.r ^ 2 * ↑(algebraMap R A) W.a₂ +\n ↑(algebraMap R A) C.r ^ 3 -\n ↑(algebraMap R A) C.t * ↑(algebraMap R A) W.a₃ -\n ↑(algebraMap R A) C.t ^ 2 -\n ↑(algebraMap R A) C.r * ↑(algebraMap R A) C.t * ↑(algebraMap R A) W.a₁) }.a₁ =\n { a₁ := ↑(algebraMap R A) (↑C.u⁻¹ * (W.a₁ + 2 * C.s)),\n a₂ := ↑(algebraMap R A) (↑C.u⁻¹ ^ 2 * (W.a₂ - C.s * W.a₁ + 3 * C.r - C.s ^ 2)),\n a₃ := ↑(algebraMap R A) (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)),\n a₄ :=\n ↑(algebraMap R A)\n (↑C.u⁻¹ ^ 4 *\n (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)),\n a₆ :=\n ↑(algebraMap R A)\n (↑C.u⁻¹ ^ 6 * (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁)) }.a₁\n[PROOFSTEP]\nsimp only [Units.coe_map, Units.coe_map_inv, MonoidHom.coe_coe, map_ofNat, map_neg, map_add, map_sub, map_mul, map_pow]\n[GOAL]\ncase a₂\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC : VariableChange R\n⊢ { a₁ := ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ * (↑(algebraMap R A) W.a₁ + 2 * ↑(algebraMap R A) C.s),\n a₂ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 2 *\n (↑(algebraMap R A) W.a₂ - ↑(algebraMap R A) C.s * ↑(algebraMap R A) W.a₁ + 3 * ↑(algebraMap R A) C.r -\n ↑(algebraMap R A) C.s ^ 2),\n a₃ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 3 *\n (↑(algebraMap R A) W.a₃ + ↑(algebraMap R A) C.r * ↑(algebraMap R A) W.a₁ + 2 * ↑(algebraMap R A) C.t),\n a₄ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 4 *\n (↑(algebraMap R A) W.a₄ - ↑(algebraMap R A) C.s * ↑(algebraMap R A) W.a₃ +\n 2 * ↑(algebraMap R A) C.r * ↑(algebraMap R A) W.a₂ -\n (↑(algebraMap R A) C.t + ↑(algebraMap R A) C.r * ↑(algebraMap R A) C.s) * ↑(algebraMap R A) W.a₁ +\n 3 * ↑(algebraMap R A) C.r ^ 2 -\n 2 * ↑(algebraMap R A) C.s * ↑(algebraMap R A) C.t),\n a₆ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 6 *\n (↑(algebraMap R A) W.a₆ + ↑(algebraMap R A) C.r * ↑(algebraMap R A) W.a₄ +\n ↑(algebraMap R A) C.r ^ 2 * ↑(algebraMap R A) W.a₂ +\n ↑(algebraMap R A) C.r ^ 3 -\n ↑(algebraMap R A) C.t * ↑(algebraMap R A) W.a₃ -\n ↑(algebraMap R A) C.t ^ 2 -\n ↑(algebraMap R A) C.r * ↑(algebraMap R A) C.t * ↑(algebraMap R A) W.a₁) }.a₂ =\n { a₁ := ↑(algebraMap R A) (↑C.u⁻¹ * (W.a₁ + 2 * C.s)),\n a₂ := ↑(algebraMap R A) (↑C.u⁻¹ ^ 2 * (W.a₂ - C.s * W.a₁ + 3 * C.r - C.s ^ 2)),\n a₃ := ↑(algebraMap R A) (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)),\n a₄ :=\n ↑(algebraMap R A)\n (↑C.u⁻¹ ^ 4 *\n (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)),\n a₆ :=\n ↑(algebraMap R A)\n (↑C.u⁻¹ ^ 6 * (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁)) }.a₂\n[PROOFSTEP]\nsimp only [Units.coe_map, Units.coe_map_inv, MonoidHom.coe_coe, map_ofNat, map_neg, map_add, map_sub, map_mul, map_pow]\n[GOAL]\ncase a₃\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC : VariableChange R\n⊢ { a₁ := ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ * (↑(algebraMap R A) W.a₁ + 2 * ↑(algebraMap R A) C.s),\n a₂ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 2 *\n (↑(algebraMap R A) W.a₂ - ↑(algebraMap R A) C.s * ↑(algebraMap R A) W.a₁ + 3 * ↑(algebraMap R A) C.r -\n ↑(algebraMap R A) C.s ^ 2),\n a₃ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 3 *\n (↑(algebraMap R A) W.a₃ + ↑(algebraMap R A) C.r * ↑(algebraMap R A) W.a₁ + 2 * ↑(algebraMap R A) C.t),\n a₄ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 4 *\n (↑(algebraMap R A) W.a₄ - ↑(algebraMap R A) C.s * ↑(algebraMap R A) W.a₃ +\n 2 * ↑(algebraMap R A) C.r * ↑(algebraMap R A) W.a₂ -\n (↑(algebraMap R A) C.t + ↑(algebraMap R A) C.r * ↑(algebraMap R A) C.s) * ↑(algebraMap R A) W.a₁ +\n 3 * ↑(algebraMap R A) C.r ^ 2 -\n 2 * ↑(algebraMap R A) C.s * ↑(algebraMap R A) C.t),\n a₆ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 6 *\n (↑(algebraMap R A) W.a₆ + ↑(algebraMap R A) C.r * ↑(algebraMap R A) W.a₄ +\n ↑(algebraMap R A) C.r ^ 2 * ↑(algebraMap R A) W.a₂ +\n ↑(algebraMap R A) C.r ^ 3 -\n ↑(algebraMap R A) C.t * ↑(algebraMap R A) W.a₃ -\n ↑(algebraMap R A) C.t ^ 2 -\n ↑(algebraMap R A) C.r * ↑(algebraMap R A) C.t * ↑(algebraMap R A) W.a₁) }.a₃ =\n { a₁ := ↑(algebraMap R A) (↑C.u⁻¹ * (W.a₁ + 2 * C.s)),\n a₂ := ↑(algebraMap R A) (↑C.u⁻¹ ^ 2 * (W.a₂ - C.s * W.a₁ + 3 * C.r - C.s ^ 2)),\n a₃ := ↑(algebraMap R A) (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)),\n a₄ :=\n ↑(algebraMap R A)\n (↑C.u⁻¹ ^ 4 *\n (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)),\n a₆ :=\n ↑(algebraMap R A)\n (↑C.u⁻¹ ^ 6 * (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁)) }.a₃\n[PROOFSTEP]\nsimp only [Units.coe_map, Units.coe_map_inv, MonoidHom.coe_coe, map_ofNat, map_neg, map_add, map_sub, map_mul, map_pow]\n[GOAL]\ncase a₄\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC : VariableChange R\n⊢ { a₁ := ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ * (↑(algebraMap R A) W.a₁ + 2 * ↑(algebraMap R A) C.s),\n a₂ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 2 *\n (↑(algebraMap R A) W.a₂ - ↑(algebraMap R A) C.s * ↑(algebraMap R A) W.a₁ + 3 * ↑(algebraMap R A) C.r -\n ↑(algebraMap R A) C.s ^ 2),\n a₃ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 3 *\n (↑(algebraMap R A) W.a₃ + ↑(algebraMap R A) C.r * ↑(algebraMap R A) W.a₁ + 2 * ↑(algebraMap R A) C.t),\n a₄ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 4 *\n (↑(algebraMap R A) W.a₄ - ↑(algebraMap R A) C.s * ↑(algebraMap R A) W.a₃ +\n 2 * ↑(algebraMap R A) C.r * ↑(algebraMap R A) W.a₂ -\n (↑(algebraMap R A) C.t + ↑(algebraMap R A) C.r * ↑(algebraMap R A) C.s) * ↑(algebraMap R A) W.a₁ +\n 3 * ↑(algebraMap R A) C.r ^ 2 -\n 2 * ↑(algebraMap R A) C.s * ↑(algebraMap R A) C.t),\n a₆ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 6 *\n (↑(algebraMap R A) W.a₆ + ↑(algebraMap R A) C.r * ↑(algebraMap R A) W.a₄ +\n ↑(algebraMap R A) C.r ^ 2 * ↑(algebraMap R A) W.a₂ +\n ↑(algebraMap R A) C.r ^ 3 -\n ↑(algebraMap R A) C.t * ↑(algebraMap R A) W.a₃ -\n ↑(algebraMap R A) C.t ^ 2 -\n ↑(algebraMap R A) C.r * ↑(algebraMap R A) C.t * ↑(algebraMap R A) W.a₁) }.a₄ =\n { a₁ := ↑(algebraMap R A) (↑C.u⁻¹ * (W.a₁ + 2 * C.s)),\n a₂ := ↑(algebraMap R A) (↑C.u⁻¹ ^ 2 * (W.a₂ - C.s * W.a₁ + 3 * C.r - C.s ^ 2)),\n a₃ := ↑(algebraMap R A) (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)),\n a₄ :=\n ↑(algebraMap R A)\n (↑C.u⁻¹ ^ 4 *\n (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)),\n a₆ :=\n ↑(algebraMap R A)\n (↑C.u⁻¹ ^ 6 * (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁)) }.a₄\n[PROOFSTEP]\nsimp only [Units.coe_map, Units.coe_map_inv, MonoidHom.coe_coe, map_ofNat, map_neg, map_add, map_sub, map_mul, map_pow]\n[GOAL]\ncase a₆\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nC : VariableChange R\n⊢ { a₁ := ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ * (↑(algebraMap R A) W.a₁ + 2 * ↑(algebraMap R A) C.s),\n a₂ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 2 *\n (↑(algebraMap R A) W.a₂ - ↑(algebraMap R A) C.s * ↑(algebraMap R A) W.a₁ + 3 * ↑(algebraMap R A) C.r -\n ↑(algebraMap R A) C.s ^ 2),\n a₃ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 3 *\n (↑(algebraMap R A) W.a₃ + ↑(algebraMap R A) C.r * ↑(algebraMap R A) W.a₁ + 2 * ↑(algebraMap R A) C.t),\n a₄ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 4 *\n (↑(algebraMap R A) W.a₄ - ↑(algebraMap R A) C.s * ↑(algebraMap R A) W.a₃ +\n 2 * ↑(algebraMap R A) C.r * ↑(algebraMap R A) W.a₂ -\n (↑(algebraMap R A) C.t + ↑(algebraMap R A) C.r * ↑(algebraMap R A) C.s) * ↑(algebraMap R A) W.a₁ +\n 3 * ↑(algebraMap R A) C.r ^ 2 -\n 2 * ↑(algebraMap R A) C.s * ↑(algebraMap R A) C.t),\n a₆ :=\n ↑(↑(Units.map ↑(algebraMap R A)) C.u)⁻¹ ^ 6 *\n (↑(algebraMap R A) W.a₆ + ↑(algebraMap R A) C.r * ↑(algebraMap R A) W.a₄ +\n ↑(algebraMap R A) C.r ^ 2 * ↑(algebraMap R A) W.a₂ +\n ↑(algebraMap R A) C.r ^ 3 -\n ↑(algebraMap R A) C.t * ↑(algebraMap R A) W.a₃ -\n ↑(algebraMap R A) C.t ^ 2 -\n ↑(algebraMap R A) C.r * ↑(algebraMap R A) C.t * ↑(algebraMap R A) W.a₁) }.a₆ =\n { a₁ := ↑(algebraMap R A) (↑C.u⁻¹ * (W.a₁ + 2 * C.s)),\n a₂ := ↑(algebraMap R A) (↑C.u⁻¹ ^ 2 * (W.a₂ - C.s * W.a₁ + 3 * C.r - C.s ^ 2)),\n a₃ := ↑(algebraMap R A) (↑C.u⁻¹ ^ 3 * (W.a₃ + C.r * W.a₁ + 2 * C.t)),\n a₄ :=\n ↑(algebraMap R A)\n (↑C.u⁻¹ ^ 4 *\n (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)),\n a₆ :=\n ↑(algebraMap R A)\n (↑C.u⁻¹ ^ 6 * (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁)) }.a₆\n[PROOFSTEP]\nsimp only [Units.coe_map, Units.coe_map_inv, MonoidHom.coe_coe, map_ofNat, map_neg, map_add, map_sub, map_mul, map_pow]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ Cubic.disc (twoTorsionPolynomial W) = 16 * Δ W\n[PROOFSTEP]\nsimp only [b₂, b₄, b₆, b₈, Δ, twoTorsionPolynomial, Cubic.disc]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ (W.a₁ ^ 2 + 4 * W.a₂) ^ 2 * (2 * (2 * W.a₄ + W.a₁ * W.a₃)) ^ 2 - 4 * 4 * (2 * (2 * W.a₄ + W.a₁ * W.a₃)) ^ 3 -\n 4 * (W.a₁ ^ 2 + 4 * W.a₂) ^ 3 * (W.a₃ ^ 2 + 4 * W.a₆) -\n 27 * 4 ^ 2 * (W.a₃ ^ 2 + 4 * W.a₆) ^ 2 +\n 18 * 4 * (W.a₁ ^ 2 + 4 * W.a₂) * (2 * (2 * W.a₄ + W.a₁ * W.a₃)) * (W.a₃ ^ 2 + 4 * W.a₆) =\n 16 *\n (-(W.a₁ ^ 2 + 4 * W.a₂) ^ 2 *\n (W.a₁ ^ 2 * W.a₆ + 4 * W.a₂ * W.a₆ - W.a₁ * W.a₃ * W.a₄ + W.a₂ * W.a₃ ^ 2 - W.a₄ ^ 2) -\n 8 * (2 * W.a₄ + W.a₁ * W.a₃) ^ 3 -\n 27 * (W.a₃ ^ 2 + 4 * W.a₆) ^ 2 +\n 9 * (W.a₁ ^ 2 + 4 * W.a₂) * (2 * W.a₄ + W.a₁ * W.a₃) * (W.a₃ ^ 2 + 4 * W.a₆))\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : Invertible 2\n⊢ IsUnit (Cubic.disc (twoTorsionPolynomial W)) ↔ IsUnit (Δ W)\n[PROOFSTEP]\nrw [twoTorsionPolynomial_disc, IsUnit.mul_iff, show (16 : R) = 2 ^ 4 by norm_num1]\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : Invertible 2\n⊢ 16 = 2 ^ 4\n[PROOFSTEP]\nnorm_num1\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : Invertible 2\n⊢ IsUnit (2 ^ 4) ∧ IsUnit (Δ W) ↔ IsUnit (Δ W)\n[PROOFSTEP]\nexact and_iff_right <| isUnit_of_invertible <| 2 ^ 4\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ WeierstrassCurve.polynomial W =\n Cubic.toPoly\n { a := 0, b := 1, c := Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ },\n d := Cubic.toPoly { a := -1, b := -W.a₂, c := -W.a₄, d := -W.a₆ } }\n[PROOFSTEP]\nsimp only [WeierstrassCurve.polynomial, Cubic.toPoly]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ Y ^ 2 + ↑C (↑C W.a₁ * Y + ↑C W.a₃) * Y - ↑C (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆) =\n ↑C 0 * Y ^ 3 + ↑C 1 * Y ^ 2 + ↑C (↑C 0 * Y ^ 3 + ↑C 0 * Y ^ 2 + ↑C W.a₁ * Y + ↑C W.a₃) * Y +\n ↑C (↑C (-1) * Y ^ 3 + ↑C (-W.a₂) * Y ^ 2 + ↑C (-W.a₄) * Y + ↑C (-W.a₆))\n[PROOFSTEP]\nC_simp\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ Y ^ 2 + (↑C (↑C W.a₁) * ↑C Y + ↑C (↑C W.a₃)) * Y -\n (↑C Y ^ 3 + ↑C (↑C W.a₂) * ↑C Y ^ 2 + ↑C (↑C W.a₄) * ↑C Y + ↑C (↑C W.a₆)) =\n 0 * Y ^ 3 + 1 * Y ^ 2 + (0 * ↑C Y ^ 3 + 0 * ↑C Y ^ 2 + ↑C (↑C W.a₁) * ↑C Y + ↑C (↑C W.a₃)) * Y +\n (-1 * ↑C Y ^ 3 + -↑C (↑C W.a₂) * ↑C Y ^ 2 + -↑C (↑C W.a₄) * ↑C Y + -↑C (↑C W.a₆))\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : Nontrivial R\n⊢ WeierstrassCurve.polynomial W ≠ 0\n[PROOFSTEP]\nrw [polynomial_eq]\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : Nontrivial R\n⊢ Cubic.toPoly\n { a := 0, b := 1, c := Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ },\n d := Cubic.toPoly { a := -1, b := -W.a₂, c := -W.a₄, d := -W.a₆ } } ≠\n 0\n[PROOFSTEP]\nexact Cubic.ne_zero_of_b_ne_zero one_ne_zero\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : Nontrivial R\n⊢ degree (WeierstrassCurve.polynomial W) = 2\n[PROOFSTEP]\nrw [polynomial_eq]\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : Nontrivial R\n⊢ degree\n (Cubic.toPoly\n { a := 0, b := 1, c := Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ },\n d := Cubic.toPoly { a := -1, b := -W.a₂, c := -W.a₄, d := -W.a₆ } }) =\n 2\n[PROOFSTEP]\nexact Cubic.degree_of_b_ne_zero' one_ne_zero\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : Nontrivial R\n⊢ natDegree (WeierstrassCurve.polynomial W) = 2\n[PROOFSTEP]\nrw [polynomial_eq]\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : Nontrivial R\n⊢ natDegree\n (Cubic.toPoly\n { a := 0, b := 1, c := Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ },\n d := Cubic.toPoly { a := -1, b := -W.a₂, c := -W.a₄, d := -W.a₆ } }) =\n 2\n[PROOFSTEP]\nexact Cubic.natDegree_of_b_ne_zero' one_ne_zero\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ Monic (WeierstrassCurve.polynomial W)\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n✝ : Nontrivial R\n⊢ Monic (WeierstrassCurve.polynomial W)\n[PROOFSTEP]\nsimpa only [polynomial_eq] using Cubic.monic_of_b_eq_one'\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\n⊢ Irreducible (WeierstrassCurve.polynomial W)\n[PROOFSTEP]\nby_contra h\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh : ¬Irreducible (WeierstrassCurve.polynomial W)\n⊢ False\n[PROOFSTEP]\nrcases(W.monic_polynomial.not_irreducible_iff_exists_add_mul_eq_coeff W.natDegree_polynomial).mp h with ⟨f, g, h0, h1⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : coeff (WeierstrassCurve.polynomial W) 0 = f * g\nh1 : coeff (WeierstrassCurve.polynomial W) 1 = f + g\n⊢ False\n[PROOFSTEP]\nsimp only [polynomial_eq, Cubic.coeff_eq_c, Cubic.coeff_eq_d] at h0 h1 \n[GOAL]\ncase intro.intro.intro\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : Cubic.toPoly { a := -1, b := -W.a₂, c := -W.a₄, d := -W.a₆ } = f * g\nh1 : Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ } = f + g\n⊢ False\n[PROOFSTEP]\napply_fun degree at h0 h1 \n[GOAL]\ncase intro.intro.intro\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : degree (Cubic.toPoly { a := -1, b := -W.a₂, c := -W.a₄, d := -W.a₆ }) = degree (f * g)\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\n⊢ False\n[PROOFSTEP]\nrw [Cubic.degree_of_a_ne_zero' <| neg_ne_zero.mpr <| one_ne_zero' R, degree_mul] at h0 \n[GOAL]\ncase intro.intro.intro\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\n⊢ False\n[PROOFSTEP]\napply (h1.symm.le.trans Cubic.degree_of_b_eq_zero').not_lt\n[GOAL]\ncase intro.intro.intro\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\n⊢ 1 < degree (f + g)\n[PROOFSTEP]\nrcases Nat.WithBot.add_eq_three_iff.mp h0.symm with h | h | h | h\n[GOAL]\ncase intro.intro.intro.inl\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh✝ : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\nh : degree f = 0 ∧ degree g = 3\n⊢ 1 < degree (f + g)\ncase intro.intro.intro.inr.inl\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh✝ : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\nh : degree f = 1 ∧ degree g = 2\n⊢ 1 < degree (f + g)\ncase intro.intro.intro.inr.inr.inl\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh✝ : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\nh : degree f = 2 ∧ degree g = 1\n⊢ 1 < degree (f + g)\ncase intro.intro.intro.inr.inr.inr\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh✝ : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\nh : degree f = 3 ∧ degree g = 0\n⊢ 1 < degree (f + g)\n[PROOFSTEP]\niterate 2 rw [degree_add_eq_right_of_degree_lt] <;> simp only [h]\n[GOAL]\ncase intro.intro.intro.inl\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh✝ : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\nh : degree f = 0 ∧ degree g = 3\n⊢ 1 < degree (f + g)\n[PROOFSTEP]\nrw [degree_add_eq_right_of_degree_lt]\n[GOAL]\ncase intro.intro.intro.inl\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh✝ : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\nh : degree f = 0 ∧ degree g = 3\n⊢ 1 < degree g\n[PROOFSTEP]\nsimp only [h]\n[GOAL]\ncase intro.intro.intro.inl\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh✝ : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\nh : degree f = 0 ∧ degree g = 3\n⊢ degree f < degree g\n[PROOFSTEP]\nsimp only [h]\n[GOAL]\ncase intro.intro.intro.inr.inl\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh✝ : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\nh : degree f = 1 ∧ degree g = 2\n⊢ 1 < degree (f + g)\n[PROOFSTEP]\nrw [degree_add_eq_right_of_degree_lt]\n[GOAL]\ncase intro.intro.intro.inr.inl\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh✝ : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\nh : degree f = 1 ∧ degree g = 2\n⊢ 1 < degree g\n[PROOFSTEP]\nsimp only [h]\n[GOAL]\ncase intro.intro.intro.inr.inl\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh✝ : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\nh : degree f = 1 ∧ degree g = 2\n⊢ degree f < degree g\n[PROOFSTEP]\nsimp only [h]\n[GOAL]\ncase intro.intro.intro.inr.inr.inl\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh✝ : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\nh : degree f = 2 ∧ degree g = 1\n⊢ 1 < degree (f + g)\ncase intro.intro.intro.inr.inr.inr\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh✝ : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\nh : degree f = 3 ∧ degree g = 0\n⊢ 1 < degree (f + g)\n[PROOFSTEP]\niterate 2 rw [degree_add_eq_left_of_degree_lt] <;> simp only [h]\n[GOAL]\ncase intro.intro.intro.inr.inr.inl\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh✝ : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\nh : degree f = 2 ∧ degree g = 1\n⊢ 1 < degree (f + g)\n[PROOFSTEP]\nrw [degree_add_eq_left_of_degree_lt]\n[GOAL]\ncase intro.intro.intro.inr.inr.inl\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh✝ : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\nh : degree f = 2 ∧ degree g = 1\n⊢ 1 < degree f\n[PROOFSTEP]\nsimp only [h]\n[GOAL]\ncase intro.intro.intro.inr.inr.inl\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh✝ : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\nh : degree f = 2 ∧ degree g = 1\n⊢ degree g < degree f\n[PROOFSTEP]\nsimp only [h]\n[GOAL]\ncase intro.intro.intro.inr.inr.inr\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh✝ : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\nh : degree f = 3 ∧ degree g = 0\n⊢ 1 < degree (f + g)\n[PROOFSTEP]\nrw [degree_add_eq_left_of_degree_lt]\n[GOAL]\ncase intro.intro.intro.inr.inr.inr\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh✝ : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\nh : degree f = 3 ∧ degree g = 0\n⊢ 1 < degree f\n[PROOFSTEP]\nsimp only [h]\n[GOAL]\ncase intro.intro.intro.inr.inr.inr\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsDomain R\nh✝ : ¬Irreducible (WeierstrassCurve.polynomial W)\nf g : R[X]\nh0 : 3 = degree f + degree g\nh1 : degree (Cubic.toPoly { a := 0, b := 0, c := W.a₁, d := W.a₃ }) = degree (f + g)\nh : degree f = 3 ∧ degree g = 0\n⊢ degree g < degree f\n[PROOFSTEP]\nsimp only [h]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ eval x (eval (↑C y) (WeierstrassCurve.polynomial W)) =\n y ^ 2 + W.a₁ * x * y + W.a₃ * y - (x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆)\n[PROOFSTEP]\nsimp only [WeierstrassCurve.polynomial]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ eval x (eval (↑C y) (Y ^ 2 + ↑C (↑C W.a₁ * Y + ↑C W.a₃) * Y - ↑C (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆))) =\n y ^ 2 + W.a₁ * x * y + W.a₃ * y - (x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆)\n[PROOFSTEP]\neval_simp\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ y ^ 2 + (W.a₁ * x + W.a₃) * y - (x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆) =\n y ^ 2 + W.a₁ * x * y + W.a₃ * y - (x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆)\n[PROOFSTEP]\nrw [add_mul, ← add_assoc]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ eval 0 (eval 0 (WeierstrassCurve.polynomial W)) = -W.a₆\n[PROOFSTEP]\nsimp only [← C_0, eval_polynomial, zero_add, zero_sub, mul_zero, zero_pow <| Nat.zero_lt_succ _]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ WeierstrassCurve.equation W x y ↔ y ^ 2 + W.a₁ * x * y + W.a₃ * y - (x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆) = 0\n[PROOFSTEP]\nrw [WeierstrassCurve.equation, eval_polynomial]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ WeierstrassCurve.equation W x y ↔ y ^ 2 + W.a₁ * x * y + W.a₃ * y = x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆\n[PROOFSTEP]\nrw [equation_iff', sub_eq_zero]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ WeierstrassCurve.equation W 0 0 ↔ W.a₆ = 0\n[PROOFSTEP]\nrw [WeierstrassCurve.equation, C_0, eval_polynomial_zero, neg_eq_zero]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ WeierstrassCurve.equation W x y ↔ WeierstrassCurve.equation (variableChange W { u := 1, r := x, s := 0, t := y }) 0 0\n[PROOFSTEP]\nrw [equation_iff', ← neg_eq_zero, equation_zero, variableChange_a₆, inv_one, Units.val_one]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ -(y ^ 2 + W.a₁ * x * y + W.a₃ * y - (x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆)) = 0 ↔\n 1 ^ 6 *\n (W.a₆ + { u := 1, r := x, s := 0, t := y }.r * W.a₄ + { u := 1, r := x, s := 0, t := y }.r ^ 2 * W.a₂ +\n { u := 1, r := x, s := 0, t := y }.r ^ 3 -\n { u := 1, r := x, s := 0, t := y }.t * W.a₃ -\n { u := 1, r := x, s := 0, t := y }.t ^ 2 -\n { u := 1, r := x, s := 0, t := y }.r * { u := 1, r := x, s := 0, t := y }.t * W.a₁) =\n 0\n[PROOFSTEP]\ncongr! 1\n[GOAL]\ncase a.h.e'_2\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ -(y ^ 2 + W.a₁ * x * y + W.a₃ * y - (x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆)) =\n 1 ^ 6 *\n (W.a₆ + { u := 1, r := x, s := 0, t := y }.r * W.a₄ + { u := 1, r := x, s := 0, t := y }.r ^ 2 * W.a₂ +\n { u := 1, r := x, s := 0, t := y }.r ^ 3 -\n { u := 1, r := x, s := 0, t := y }.t * W.a₃ -\n { u := 1, r := x, s := 0, t := y }.t ^ 2 -\n { u := 1, r := x, s := 0, t := y }.r * { u := 1, r := x, s := 0, t := y }.t * W.a₁)\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\n⊢ WeierstrassCurve.equation W x y ↔\n WeierstrassCurve.equation (baseChange W A) (↑(algebraMap R A) x) (↑(algebraMap R A) y)\n[PROOFSTEP]\nsimp only [equation_iff]\n[GOAL]\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\n⊢ y ^ 2 + W.a₁ * x * y + W.a₃ * y = x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆ ↔\n ↑(algebraMap R A) y ^ 2 + (baseChange W A).a₁ * ↑(algebraMap R A) x * ↑(algebraMap R A) y +\n (baseChange W A).a₃ * ↑(algebraMap R A) y =\n ↑(algebraMap R A) x ^ 3 + (baseChange W A).a₂ * ↑(algebraMap R A) x ^ 2 +\n (baseChange W A).a₄ * ↑(algebraMap R A) x +\n (baseChange W A).a₆\n[PROOFSTEP]\nexact\n ⟨fun h => by convert congr_arg (algebraMap R A) h <;> map_simp <;> rfl, fun h => by\n apply NoZeroSMulDivisors.algebraMap_injective R A; map_simp; exact h⟩\n[GOAL]\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : y ^ 2 + W.a₁ * x * y + W.a₃ * y = x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆\n⊢ ↑(algebraMap R A) y ^ 2 + (baseChange W A).a₁ * ↑(algebraMap R A) x * ↑(algebraMap R A) y +\n (baseChange W A).a₃ * ↑(algebraMap R A) y =\n ↑(algebraMap R A) x ^ 3 + (baseChange W A).a₂ * ↑(algebraMap R A) x ^ 2 +\n (baseChange W A).a₄ * ↑(algebraMap R A) x +\n (baseChange W A).a₆\n[PROOFSTEP]\nconvert congr_arg (algebraMap R A) h\n[GOAL]\ncase h.e'_2\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : y ^ 2 + W.a₁ * x * y + W.a₃ * y = x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆\n⊢ ↑(algebraMap R A) y ^ 2 + (baseChange W A).a₁ * ↑(algebraMap R A) x * ↑(algebraMap R A) y +\n (baseChange W A).a₃ * ↑(algebraMap R A) y =\n ↑(algebraMap R A) (y ^ 2 + W.a₁ * x * y + W.a₃ * y)\n[PROOFSTEP]\nmap_simp\n[GOAL]\ncase h.e'_3\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : y ^ 2 + W.a₁ * x * y + W.a₃ * y = x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆\n⊢ ↑(algebraMap R A) x ^ 3 + (baseChange W A).a₂ * ↑(algebraMap R A) x ^ 2 + (baseChange W A).a₄ * ↑(algebraMap R A) x +\n (baseChange W A).a₆ =\n ↑(algebraMap R A) (x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆)\n[PROOFSTEP]\nmap_simp\n[GOAL]\ncase h.e'_2\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : y ^ 2 + W.a₁ * x * y + W.a₃ * y = x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆\n⊢ ↑(algebraMap R A) y ^ 2 + (baseChange W A).a₁ * ↑(algebraMap R A) x * ↑(algebraMap R A) y +\n (baseChange W A).a₃ * ↑(algebraMap R A) y =\n ↑(algebraMap R A) y ^ 2 + ↑(algebraMap R A) W.a₁ * ↑(algebraMap R A) x * ↑(algebraMap R A) y +\n ↑(algebraMap R A) W.a₃ * ↑(algebraMap R A) y\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_3\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : y ^ 2 + W.a₁ * x * y + W.a₃ * y = x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆\n⊢ ↑(algebraMap R A) x ^ 3 + (baseChange W A).a₂ * ↑(algebraMap R A) x ^ 2 + (baseChange W A).a₄ * ↑(algebraMap R A) x +\n (baseChange W A).a₆ =\n ↑(algebraMap R A) x ^ 3 + ↑(algebraMap R A) W.a₂ * ↑(algebraMap R A) x ^ 2 +\n ↑(algebraMap R A) W.a₄ * ↑(algebraMap R A) x +\n ↑(algebraMap R A) W.a₆\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh :\n ↑(algebraMap R A) y ^ 2 + (baseChange W A).a₁ * ↑(algebraMap R A) x * ↑(algebraMap R A) y +\n (baseChange W A).a₃ * ↑(algebraMap R A) y =\n ↑(algebraMap R A) x ^ 3 + (baseChange W A).a₂ * ↑(algebraMap R A) x ^ 2 +\n (baseChange W A).a₄ * ↑(algebraMap R A) x +\n (baseChange W A).a₆\n⊢ y ^ 2 + W.a₁ * x * y + W.a₃ * y = x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆\n[PROOFSTEP]\napply NoZeroSMulDivisors.algebraMap_injective R A\n[GOAL]\ncase a\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh :\n ↑(algebraMap R A) y ^ 2 + (baseChange W A).a₁ * ↑(algebraMap R A) x * ↑(algebraMap R A) y +\n (baseChange W A).a₃ * ↑(algebraMap R A) y =\n ↑(algebraMap R A) x ^ 3 + (baseChange W A).a₂ * ↑(algebraMap R A) x ^ 2 +\n (baseChange W A).a₄ * ↑(algebraMap R A) x +\n (baseChange W A).a₆\n⊢ ↑(algebraMap R A) (y ^ 2 + W.a₁ * x * y + W.a₃ * y) = ↑(algebraMap R A) (x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆)\n[PROOFSTEP]\nmap_simp\n[GOAL]\ncase a\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh :\n ↑(algebraMap R A) y ^ 2 + (baseChange W A).a₁ * ↑(algebraMap R A) x * ↑(algebraMap R A) y +\n (baseChange W A).a₃ * ↑(algebraMap R A) y =\n ↑(algebraMap R A) x ^ 3 + (baseChange W A).a₂ * ↑(algebraMap R A) x ^ 2 +\n (baseChange W A).a₄ * ↑(algebraMap R A) x +\n (baseChange W A).a₆\n⊢ ↑(algebraMap R A) y ^ 2 + ↑(algebraMap R A) W.a₁ * ↑(algebraMap R A) x * ↑(algebraMap R A) y +\n ↑(algebraMap R A) W.a₃ * ↑(algebraMap R A) y =\n ↑(algebraMap R A) x ^ 3 + ↑(algebraMap R A) W.a₂ * ↑(algebraMap R A) x ^ 2 +\n ↑(algebraMap R A) W.a₄ * ↑(algebraMap R A) x +\n ↑(algebraMap R A) W.a₆\n[PROOFSTEP]\nexact h\n[GOAL]\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial B\ninst✝ : NoZeroSMulDivisors A B\nx y : A\n⊢ WeierstrassCurve.equation (baseChange W A) x y ↔\n WeierstrassCurve.equation (baseChange W B) (↑(algebraMap A B) x) (↑(algebraMap A B) y)\n[PROOFSTEP]\nrw [equation_iff_baseChange (W.baseChange A) B, baseChange_baseChange]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ eval x (eval (↑C y) (WeierstrassCurve.polynomialX W)) = W.a₁ * y - (3 * x ^ 2 + 2 * W.a₂ * x + W.a₄)\n[PROOFSTEP]\nsimp only [WeierstrassCurve.polynomialX]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ eval x (eval (↑C y) (↑C (↑C W.a₁) * Y - ↑C (↑C 3 * Y ^ 2 + ↑C (2 * W.a₂) * Y + ↑C W.a₄))) =\n W.a₁ * y - (3 * x ^ 2 + 2 * W.a₂ * x + W.a₄)\n[PROOFSTEP]\neval_simp\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ eval 0 (eval 0 (WeierstrassCurve.polynomialX W)) = -W.a₄\n[PROOFSTEP]\nsimp only [← C_0, eval_polynomialX, zero_add, zero_sub, mul_zero, zero_pow zero_lt_two]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ eval x (eval (↑C y) (WeierstrassCurve.polynomialY W)) = 2 * y + W.a₁ * x + W.a₃\n[PROOFSTEP]\nsimp only [WeierstrassCurve.polynomialY]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ eval x (eval (↑C y) (↑C (↑C 2) * Y + ↑C (↑C W.a₁ * Y + ↑C W.a₃))) = 2 * y + W.a₁ * x + W.a₃\n[PROOFSTEP]\neval_simp\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ 2 * y + (W.a₁ * x + W.a₃) = 2 * y + W.a₁ * x + W.a₃\n[PROOFSTEP]\nrw [← add_assoc]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ eval 0 (eval 0 (WeierstrassCurve.polynomialY W)) = W.a₃\n[PROOFSTEP]\nsimp only [← C_0, eval_polynomialY, zero_add, mul_zero]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ WeierstrassCurve.nonsingular W x y ↔\n WeierstrassCurve.equation W x y ∧ (W.a₁ * y - (3 * x ^ 2 + 2 * W.a₂ * x + W.a₄) ≠ 0 ∨ 2 * y + W.a₁ * x + W.a₃ ≠ 0)\n[PROOFSTEP]\nrw [WeierstrassCurve.nonsingular, equation_iff', eval_polynomialX, eval_polynomialY]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ WeierstrassCurve.nonsingular W x y ↔\n WeierstrassCurve.equation W x y ∧ (W.a₁ * y ≠ 3 * x ^ 2 + 2 * W.a₂ * x + W.a₄ ∨ y ≠ -y - W.a₁ * x - W.a₃)\n[PROOFSTEP]\nrw [nonsingular_iff', sub_ne_zero, ← @sub_ne_zero _ _ y]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ WeierstrassCurve.equation W x y ∧ (W.a₁ * y ≠ 3 * x ^ 2 + 2 * W.a₂ * x + W.a₄ ∨ 2 * y + W.a₁ * x + W.a₃ ≠ 0) ↔\n WeierstrassCurve.equation W x y ∧ (W.a₁ * y ≠ 3 * x ^ 2 + 2 * W.a₂ * x + W.a₄ ∨ y - (-y - W.a₁ * x - W.a₃) ≠ 0)\n[PROOFSTEP]\ncongr! 3\n[GOAL]\ncase a.h.e'_2.h.e'_2.h.e'_2\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ 2 * y + W.a₁ * x + W.a₃ = y - (-y - W.a₁ * x - W.a₃)\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\n⊢ WeierstrassCurve.nonsingular W 0 0 ↔ W.a₆ = 0 ∧ (W.a₃ ≠ 0 ∨ W.a₄ ≠ 0)\n[PROOFSTEP]\nrw [WeierstrassCurve.nonsingular, equation_zero, C_0, eval_polynomialX_zero, neg_ne_zero, eval_polynomialY_zero,\n or_comm]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ WeierstrassCurve.nonsingular W x y ↔\n WeierstrassCurve.nonsingular (variableChange W { u := 1, r := x, s := 0, t := y }) 0 0\n[PROOFSTEP]\nrw [nonsingular_iff', equation_iff_variableChange, equation_zero, ← neg_ne_zero, or_comm, nonsingular_zero,\n variableChange_a₃, variableChange_a₄, inv_one, Units.val_one]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ (variableChange W { u := 1, r := x, s := 0, t := y }).a₆ = 0 ∧\n (2 * y + W.a₁ * x + W.a₃ ≠ 0 ∨ -(W.a₁ * y - (3 * x ^ 2 + 2 * W.a₂ * x + W.a₄)) ≠ 0) ↔\n (variableChange W { u := 1, r := x, s := 0, t := y }).a₆ = 0 ∧\n (1 ^ 3 * (W.a₃ + { u := 1, r := x, s := 0, t := y }.r * W.a₁ + 2 * { u := 1, r := x, s := 0, t := y }.t) ≠ 0 ∨\n 1 ^ 4 *\n (W.a₄ - { u := 1, r := x, s := 0, t := y }.s * W.a₃ + 2 * { u := 1, r := x, s := 0, t := y }.r * W.a₂ -\n ({ u := 1, r := x, s := 0, t := y }.t +\n { u := 1, r := x, s := 0, t := y }.r * { u := 1, r := x, s := 0, t := y }.s) *\n W.a₁ +\n 3 * { u := 1, r := x, s := 0, t := y }.r ^ 2 -\n 2 * { u := 1, r := x, s := 0, t := y }.s * { u := 1, r := x, s := 0, t := y }.t) ≠\n 0)\n[PROOFSTEP]\nsimp only [variableChange]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ ↑1⁻¹ ^ 6 * (W.a₆ + x * W.a₄ + x ^ 2 * W.a₂ + x ^ 3 - y * W.a₃ - y ^ 2 - x * y * W.a₁) = 0 ∧\n (2 * y + W.a₁ * x + W.a₃ ≠ 0 ∨ -(W.a₁ * y - (3 * x ^ 2 + 2 * W.a₂ * x + W.a₄)) ≠ 0) ↔\n ↑1⁻¹ ^ 6 * (W.a₆ + x * W.a₄ + x ^ 2 * W.a₂ + x ^ 3 - y * W.a₃ - y ^ 2 - x * y * W.a₁) = 0 ∧\n (1 ^ 3 * (W.a₃ + x * W.a₁ + 2 * y) ≠ 0 ∨\n 1 ^ 4 * (W.a₄ - 0 * W.a₃ + 2 * x * W.a₂ - (y + x * 0) * W.a₁ + 3 * x ^ 2 - 2 * 0 * y) ≠ 0)\n[PROOFSTEP]\ncongr! 3\n[GOAL]\ncase a.h.e'_2.h.e'_1.h.e'_2\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ 2 * y + W.a₁ * x + W.a₃ = 1 ^ 3 * (W.a₃ + x * W.a₁ + 2 * y)\n[PROOFSTEP]\nring1\n[GOAL]\ncase a.h.e'_2.h.e'_2.h.e'_2\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\n⊢ -(W.a₁ * y - (3 * x ^ 2 + 2 * W.a₂ * x + W.a₄)) =\n 1 ^ 4 * (W.a₄ - 0 * W.a₃ + 2 * x * W.a₂ - (y + x * 0) * W.a₁ + 3 * x ^ 2 - 2 * 0 * y)\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\n⊢ WeierstrassCurve.nonsingular W x y ↔\n WeierstrassCurve.nonsingular (baseChange W A) (↑(algebraMap R A) x) (↑(algebraMap R A) y)\n[PROOFSTEP]\nrw [nonsingular_iff, nonsingular_iff, and_congr <| W.equation_iff_baseChange A x y]\n[GOAL]\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\n⊢ W.a₁ * y ≠ 3 * x ^ 2 + 2 * W.a₂ * x + W.a₄ ∨ y ≠ -y - W.a₁ * x - W.a₃ ↔\n (baseChange W A).a₁ * ↑(algebraMap R A) y ≠\n 3 * ↑(algebraMap R A) x ^ 2 + 2 * (baseChange W A).a₂ * ↑(algebraMap R A) x + (baseChange W A).a₄ ∨\n ↑(algebraMap R A) y ≠ -↑(algebraMap R A) y - (baseChange W A).a₁ * ↑(algebraMap R A) x - (baseChange W A).a₃\n[PROOFSTEP]\nrefine\n ⟨Or.imp (not_imp_not.mpr fun h => ?_) (not_imp_not.mpr fun h => ?_),\n Or.imp (not_imp_not.mpr fun h => ?_) (not_imp_not.mpr fun h => ?_)⟩\n[GOAL]\ncase refine_1\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh :\n (baseChange W A).a₁ * ↑(algebraMap R A) y =\n 3 * ↑(algebraMap R A) x ^ 2 + 2 * (baseChange W A).a₂ * ↑(algebraMap R A) x + (baseChange W A).a₄\n⊢ W.a₁ * y = 3 * x ^ 2 + 2 * W.a₂ * x + W.a₄\ncase refine_2\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : ↑(algebraMap R A) y = -↑(algebraMap R A) y - (baseChange W A).a₁ * ↑(algebraMap R A) x - (baseChange W A).a₃\n⊢ y = -y - W.a₁ * x - W.a₃\ncase refine_3\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : W.a₁ * y = 3 * x ^ 2 + 2 * W.a₂ * x + W.a₄\n⊢ (baseChange W A).a₁ * ↑(algebraMap R A) y =\n 3 * ↑(algebraMap R A) x ^ 2 + 2 * (baseChange W A).a₂ * ↑(algebraMap R A) x + (baseChange W A).a₄\ncase refine_4\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : y = -y - W.a₁ * x - W.a₃\n⊢ ↑(algebraMap R A) y = -↑(algebraMap R A) y - (baseChange W A).a₁ * ↑(algebraMap R A) x - (baseChange W A).a₃\n[PROOFSTEP]\nany_goals apply NoZeroSMulDivisors.algebraMap_injective R A; map_simp; exact h\n[GOAL]\ncase refine_1\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh :\n (baseChange W A).a₁ * ↑(algebraMap R A) y =\n 3 * ↑(algebraMap R A) x ^ 2 + 2 * (baseChange W A).a₂ * ↑(algebraMap R A) x + (baseChange W A).a₄\n⊢ W.a₁ * y = 3 * x ^ 2 + 2 * W.a₂ * x + W.a₄\n[PROOFSTEP]\napply NoZeroSMulDivisors.algebraMap_injective R A\n[GOAL]\ncase refine_1.a\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh :\n (baseChange W A).a₁ * ↑(algebraMap R A) y =\n 3 * ↑(algebraMap R A) x ^ 2 + 2 * (baseChange W A).a₂ * ↑(algebraMap R A) x + (baseChange W A).a₄\n⊢ ↑(algebraMap R A) (W.a₁ * y) = ↑(algebraMap R A) (3 * x ^ 2 + 2 * W.a₂ * x + W.a₄)\n[PROOFSTEP]\nmap_simp\n[GOAL]\ncase refine_1.a\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh :\n (baseChange W A).a₁ * ↑(algebraMap R A) y =\n 3 * ↑(algebraMap R A) x ^ 2 + 2 * (baseChange W A).a₂ * ↑(algebraMap R A) x + (baseChange W A).a₄\n⊢ ↑(algebraMap R A) W.a₁ * ↑(algebraMap R A) y =\n 3 * ↑(algebraMap R A) x ^ 2 + 2 * ↑(algebraMap R A) W.a₂ * ↑(algebraMap R A) x + ↑(algebraMap R A) W.a₄\n[PROOFSTEP]\nexact h\n[GOAL]\ncase refine_2\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : ↑(algebraMap R A) y = -↑(algebraMap R A) y - (baseChange W A).a₁ * ↑(algebraMap R A) x - (baseChange W A).a₃\n⊢ y = -y - W.a₁ * x - W.a₃\n[PROOFSTEP]\napply NoZeroSMulDivisors.algebraMap_injective R A\n[GOAL]\ncase refine_2.a\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : ↑(algebraMap R A) y = -↑(algebraMap R A) y - (baseChange W A).a₁ * ↑(algebraMap R A) x - (baseChange W A).a₃\n⊢ ↑(algebraMap R A) y = ↑(algebraMap R A) (-y - W.a₁ * x - W.a₃)\n[PROOFSTEP]\nmap_simp\n[GOAL]\ncase refine_2.a\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : ↑(algebraMap R A) y = -↑(algebraMap R A) y - (baseChange W A).a₁ * ↑(algebraMap R A) x - (baseChange W A).a₃\n⊢ ↑(algebraMap R A) y = -↑(algebraMap R A) y - ↑(algebraMap R A) W.a₁ * ↑(algebraMap R A) x - ↑(algebraMap R A) W.a₃\n[PROOFSTEP]\nexact h\n[GOAL]\ncase refine_3\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : W.a₁ * y = 3 * x ^ 2 + 2 * W.a₂ * x + W.a₄\n⊢ (baseChange W A).a₁ * ↑(algebraMap R A) y =\n 3 * ↑(algebraMap R A) x ^ 2 + 2 * (baseChange W A).a₂ * ↑(algebraMap R A) x + (baseChange W A).a₄\n[PROOFSTEP]\napply NoZeroSMulDivisors.algebraMap_injective R A\n[GOAL]\ncase refine_4\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : y = -y - W.a₁ * x - W.a₃\n⊢ ↑(algebraMap R A) y = -↑(algebraMap R A) y - (baseChange W A).a₁ * ↑(algebraMap R A) x - (baseChange W A).a₃\n[PROOFSTEP]\napply NoZeroSMulDivisors.algebraMap_injective R A\n[GOAL]\ncase refine_3\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : W.a₁ * y = 3 * x ^ 2 + 2 * W.a₂ * x + W.a₄\n⊢ (baseChange W A).a₁ * ↑(algebraMap R A) y =\n 3 * ↑(algebraMap R A) x ^ 2 + 2 * (baseChange W A).a₂ * ↑(algebraMap R A) x + (baseChange W A).a₄\ncase refine_4\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : y = -y - W.a₁ * x - W.a₃\n⊢ ↑(algebraMap R A) y = -↑(algebraMap R A) y - (baseChange W A).a₁ * ↑(algebraMap R A) x - (baseChange W A).a₃\n[PROOFSTEP]\nany_goals convert congr_arg (algebraMap R A) h <;> map_simp <;> rfl\n[GOAL]\ncase refine_3\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : W.a₁ * y = 3 * x ^ 2 + 2 * W.a₂ * x + W.a₄\n⊢ (baseChange W A).a₁ * ↑(algebraMap R A) y =\n 3 * ↑(algebraMap R A) x ^ 2 + 2 * (baseChange W A).a₂ * ↑(algebraMap R A) x + (baseChange W A).a₄\n[PROOFSTEP]\nconvert congr_arg (algebraMap R A) h\n[GOAL]\ncase h.e'_2\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : W.a₁ * y = 3 * x ^ 2 + 2 * W.a₂ * x + W.a₄\n⊢ (baseChange W A).a₁ * ↑(algebraMap R A) y = ↑(algebraMap R A) (W.a₁ * y)\n[PROOFSTEP]\nmap_simp\n[GOAL]\ncase h.e'_3\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : W.a₁ * y = 3 * x ^ 2 + 2 * W.a₂ * x + W.a₄\n⊢ 3 * ↑(algebraMap R A) x ^ 2 + 2 * (baseChange W A).a₂ * ↑(algebraMap R A) x + (baseChange W A).a₄ =\n ↑(algebraMap R A) (3 * x ^ 2 + 2 * W.a₂ * x + W.a₄)\n[PROOFSTEP]\nmap_simp\n[GOAL]\ncase h.e'_2\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : W.a₁ * y = 3 * x ^ 2 + 2 * W.a₂ * x + W.a₄\n⊢ (baseChange W A).a₁ * ↑(algebraMap R A) y = ↑(algebraMap R A) W.a₁ * ↑(algebraMap R A) y\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_3\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : W.a₁ * y = 3 * x ^ 2 + 2 * W.a₂ * x + W.a₄\n⊢ 3 * ↑(algebraMap R A) x ^ 2 + 2 * (baseChange W A).a₂ * ↑(algebraMap R A) x + (baseChange W A).a₄ =\n 3 * ↑(algebraMap R A) x ^ 2 + 2 * ↑(algebraMap R A) W.a₂ * ↑(algebraMap R A) x + ↑(algebraMap R A) W.a₄\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine_4\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : y = -y - W.a₁ * x - W.a₃\n⊢ ↑(algebraMap R A) y = -↑(algebraMap R A) y - (baseChange W A).a₁ * ↑(algebraMap R A) x - (baseChange W A).a₃\n[PROOFSTEP]\nconvert congr_arg (algebraMap R A) h\n[GOAL]\ncase h.e'_3\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : y = -y - W.a₁ * x - W.a₃\n⊢ -↑(algebraMap R A) y - (baseChange W A).a₁ * ↑(algebraMap R A) x - (baseChange W A).a₃ =\n ↑(algebraMap R A) (-y - W.a₁ * x - W.a₃)\n[PROOFSTEP]\nmap_simp\n[GOAL]\ncase h.e'_3\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial A\ninst✝ : NoZeroSMulDivisors R A\nx y : R\nh : y = -y - W.a₁ * x - W.a₃\n⊢ -↑(algebraMap R A) y - (baseChange W A).a₁ * ↑(algebraMap R A) x - (baseChange W A).a₃ =\n -↑(algebraMap R A) y - ↑(algebraMap R A) W.a₁ * ↑(algebraMap R A) x - ↑(algebraMap R A) W.a₃\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : Nontrivial B\ninst✝ : NoZeroSMulDivisors A B\nx y : A\n⊢ WeierstrassCurve.nonsingular (baseChange W A) x y ↔\n WeierstrassCurve.nonsingular (baseChange W B) (↑(algebraMap A B) x) (↑(algebraMap A B) y)\n[PROOFSTEP]\nrw [nonsingular_iff_baseChange (W.baseChange A) B, baseChange_baseChange]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nh : WeierstrassCurve.equation W 0 0\nhΔ : Δ W ≠ 0\n⊢ WeierstrassCurve.nonsingular W 0 0\n[PROOFSTEP]\nsimp only [equation_zero, nonsingular_zero] at *\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhΔ : Δ W ≠ 0\nh : W.a₆ = 0\n⊢ W.a₆ = 0 ∧ (W.a₃ ≠ 0 ∨ W.a₄ ≠ 0)\n[PROOFSTEP]\ncontrapose! hΔ\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nh : W.a₆ = 0\nhΔ : W.a₆ = 0 → W.a₃ = 0 ∧ W.a₄ = 0\n⊢ Δ W = 0\n[PROOFSTEP]\nsimp only [b₂, b₄, b₆, b₈, Δ, h, hΔ]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nh : W.a₆ = 0\nhΔ : W.a₆ = 0 → W.a₃ = 0 ∧ W.a₄ = 0\n⊢ -(W.a₁ ^ 2 + 4 * W.a₂) ^ 2 * (W.a₁ ^ 2 * 0 + 4 * W.a₂ * 0 - W.a₁ * 0 * 0 + W.a₂ * 0 ^ 2 - 0 ^ 2) -\n 8 * (2 * 0 + W.a₁ * 0) ^ 3 -\n 27 * (0 ^ 2 + 4 * 0) ^ 2 +\n 9 * (W.a₁ ^ 2 + 4 * W.a₂) * (2 * 0 + W.a₁ * 0) * (0 ^ 2 + 4 * 0) =\n 0\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx y : R\nh : WeierstrassCurve.equation W x y\nhΔ : Δ W ≠ 0\n⊢ Δ (variableChange W { u := 1, r := x, s := 0, t := y }) ≠ 0\n[PROOFSTEP]\nrwa [variableChange_Δ, inv_one, Units.val_one, one_pow, one_mul]\n[GOAL]\nR : Type u\ninst✝⁸ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nB : Type w\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsScalarTower R A B\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\n⊢ IsPrime (span {WeierstrassCurve.polynomial W})\n[PROOFSTEP]\nsimpa only [span_singleton_prime W.polynomial_ne_zero, ← GCDMonoid.irreducible_iff_prime] using W.irreducible_polynomial\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW✝ : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nF : Type u\ninst✝ : Field F\nW : WeierstrassCurve F\n⊢ IsDomain (CoordinateRing W)\n[PROOFSTEP]\nclassical exact instIsDomainCoordinateRing W\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW✝ : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nF : Type u\ninst✝ : Field F\nW : WeierstrassCurve F\n⊢ IsDomain (CoordinateRing W)\n[PROOFSTEP]\nexact instIsDomainCoordinateRing W\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : Nontrivial R\n⊢ natDegree (↑C (Y - ↑C x)) < natDegree (WeierstrassCurve.polynomial W)\n[PROOFSTEP]\nrw [natDegree_polynomial, natDegree_C]\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : Nontrivial R\n⊢ 0 < 2\n[PROOFSTEP]\nnorm_num1\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : Nontrivial R\n⊢ natDegree (Y - ↑C y) < natDegree (WeierstrassCurve.polynomial W)\n[PROOFSTEP]\nrw [natDegree_polynomial, natDegree_X_sub_C]\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : Nontrivial R\n⊢ 1 < 2\n[PROOFSTEP]\nnorm_num1\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx✝ : R\ny✝ : R[X]\nx : R\ny : R[X]\nh : eval x (eval y (WeierstrassCurve.polynomial W)) = 0\n⊢ XYIdeal W x y = Ideal.map (Quotient.mkₐ R (span {WeierstrassCurve.polynomial W})) (span {↑C (Y - ↑C x), Y - ↑C y})\n[PROOFSTEP]\nsimp only [XYIdeal, XClass, YClass, ← Set.image_pair, ← map_span]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx✝ : R\ny✝ : R[X]\nx : R\ny : R[X]\nh : eval x (eval y (WeierstrassCurve.polynomial W)) = 0\n⊢ Ideal.map (mk W) (span {↑C (Y - ↑C x), Y - ↑C y}) =\n Ideal.map (Quotient.mkₐ R (span {WeierstrassCurve.polynomial W})) (span {↑C (Y - ↑C x), Y - ↑C y})\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny : R[X]\n⊢ Basis (Fin 2) R[X] (CoordinateRing W)\n[PROOFSTEP]\nclassical exact\n (subsingleton_or_nontrivial R).by_cases (fun _ => default) fun _ =>\n (AdjoinRoot.powerBasis' W.monic_polynomial).basis.reindex <| finCongr W.natDegree_polynomial\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny : R[X]\n⊢ Basis (Fin 2) R[X] (CoordinateRing W)\n[PROOFSTEP]\nexact\n (subsingleton_or_nontrivial R).by_cases (fun _ => default) fun _ =>\n (AdjoinRoot.powerBasis' W.monic_polynomial).basis.reindex <| finCongr W.natDegree_polynomial\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny : R[X]\nn : Fin 2\n⊢ ↑(CoordinateRing.basis W) n = (AdjoinRoot.powerBasis' (_ : Monic (WeierstrassCurve.polynomial W))).gen ^ ↑n\n[PROOFSTEP]\nclassical\nnontriviality R\nrw [CoordinateRing.basis, Or.by_cases, dif_neg <| not_subsingleton R, Basis.reindex_apply, PowerBasis.basis_eq_pow]\nrfl\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny : R[X]\nn : Fin 2\n⊢ ↑(CoordinateRing.basis W) n = (AdjoinRoot.powerBasis' (_ : Monic (WeierstrassCurve.polynomial W))).gen ^ ↑n\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny : R[X]\nn : Fin 2\n✝ : Nontrivial R\n⊢ ↑(CoordinateRing.basis W) n = (AdjoinRoot.powerBasis' (_ : Monic (WeierstrassCurve.polynomial W))).gen ^ ↑n\n[PROOFSTEP]\nrw [CoordinateRing.basis, Or.by_cases, dif_neg <| not_subsingleton R, Basis.reindex_apply, PowerBasis.basis_eq_pow]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny : R[X]\nn : Fin 2\n✝ : Nontrivial R\n⊢ (AdjoinRoot.powerBasis' (_ : Monic (WeierstrassCurve.polynomial W))).gen ^\n ↑(↑(finCongr (_ : natDegree (WeierstrassCurve.polynomial W) = 2)).symm n) =\n (AdjoinRoot.powerBasis' (_ : Monic (WeierstrassCurve.polynomial W))).gen ^ ↑n\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny : R[X]\n⊢ ↑(CoordinateRing.basis W) 0 = 1\n[PROOFSTEP]\nsimpa only [basis_apply] using pow_zero _\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny : R[X]\n⊢ ↑(CoordinateRing.basis W) 1 = ↑(mk W) Y\n[PROOFSTEP]\nsimpa only [basis_apply] using pow_one _\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny : R[X]\n⊢ ↑(CoordinateRing.basis W) = ![1, ↑(mk W) Y]\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny : R[X]\nn : Fin 2\n⊢ ↑(CoordinateRing.basis W) n = Matrix.vecCons 1 ![↑(mk W) Y] n\n[PROOFSTEP]\nfin_cases n\n[GOAL]\ncase h.head\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny : R[X]\n⊢ ↑(CoordinateRing.basis W) { val := 0, isLt := (_ : 0 < 2) } =\n Matrix.vecCons 1 ![↑(mk W) Y] { val := 0, isLt := (_ : 0 < 2) }\ncase h.tail.head\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny : R[X]\n⊢ ↑(CoordinateRing.basis W) { val := 1, isLt := (_ : (fun a => a < 2) 1) } =\n Matrix.vecCons 1 ![↑(mk W) Y] { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n[PROOFSTEP]\nexacts [basis_zero W, basis_one W]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny p q : R[X]\nhpq : p • 1 + q • ↑(mk W) Y = 0\n⊢ p = 0 ∧ q = 0\n[PROOFSTEP]\nhave h := Fintype.linearIndependent_iff.mp (CoordinateRing.basis W).linearIndependent ![p, q]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny p q : R[X]\nhpq : p • 1 + q • ↑(mk W) Y = 0\nh :\n (Finset.sum Finset.univ fun i => Matrix.vecCons p ![q] i • ↑(CoordinateRing.basis W) i) = 0 →\n ∀ (i : Fin 2), Matrix.vecCons p ![q] i = 0\n⊢ p = 0 ∧ q = 0\n[PROOFSTEP]\nerw [Fin.sum_univ_succ, basis_zero, Fin.sum_univ_one, basis_one] at h \n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny p q : R[X]\nhpq : p • 1 + q • ↑(mk W) Y = 0\nh :\n Matrix.vecCons p ![q] 0 • 1 + Matrix.vecCons p ![q] (Fin.succ 0) • ↑(mk W) Y = 0 →\n ∀ (i : Fin 2), Matrix.vecCons p ![q] i = 0\n⊢ p = 0 ∧ q = 0\n[PROOFSTEP]\nexact ⟨h hpq 0, h hpq 1⟩\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx✝ : R\ny : R[X]\nx : CoordinateRing W\n⊢ ∃ p q, p • 1 + q • ↑(mk W) Y = x\n[PROOFSTEP]\nhave h := (CoordinateRing.basis W).sum_equivFun x\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx✝ : R\ny : R[X]\nx : CoordinateRing W\nh : (Finset.sum Finset.univ fun i => ↑(Basis.equivFun (CoordinateRing.basis W)) x i • ↑(CoordinateRing.basis W) i) = x\n⊢ ∃ p q, p • 1 + q • ↑(mk W) Y = x\n[PROOFSTEP]\nerw [Fin.sum_univ_succ, Fin.sum_univ_one, basis_zero, basis_one] at h \n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx✝ : R\ny : R[X]\nx : CoordinateRing W\nh :\n ↑(Basis.equivFun (CoordinateRing.basis W)) x 0 • 1 +\n ↑(Basis.equivFun (CoordinateRing.basis W)) x (Fin.succ 0) • ↑(mk W) Y =\n x\n⊢ ∃ p q, p • 1 + q • ↑(mk W) Y = x\n[PROOFSTEP]\nexact ⟨_, _, h⟩\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny p q : R[X]\n⊢ (p • 1 + q • ↑(mk W) Y) * ↑(mk W) (↑C y) = (p * y) • 1 + (q * y) • ↑(mk W) Y\n[PROOFSTEP]\nsimp only [smul, _root_.map_mul]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny p q : R[X]\n⊢ (↑(mk W) (↑C p) * 1 + ↑(mk W) (↑C q) * ↑(mk W) Y) * ↑(mk W) (↑C y) =\n ↑(mk W) (↑C p) * ↑(mk W) (↑C y) * 1 + ↑(mk W) (↑C q) * ↑(mk W) (↑C y) * ↑(mk W) Y\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny p q : R[X]\n⊢ (p • 1 + q • ↑(mk W) Y) * ↑(mk W) Y =\n (q * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) • 1 + (p - q * (↑C W.a₁ * Y + ↑C W.a₃)) • ↑(mk W) Y\n[PROOFSTEP]\nhave Y_sq : mk W Y ^ 2 = mk W (C (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆) - C (C W.a₁ * X + C W.a₃) * Y) := by\n exact AdjoinRoot.mk_eq_mk.mpr ⟨1, by rw [WeierstrassCurve.polynomial]; ring1⟩\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny p q : R[X]\n⊢ ↑(mk W) Y ^ 2 = ↑(mk W) (↑C (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆) - ↑C (↑C W.a₁ * Y + ↑C W.a₃) * Y)\n[PROOFSTEP]\nexact AdjoinRoot.mk_eq_mk.mpr ⟨1, by rw [WeierstrassCurve.polynomial]; ring1⟩\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny p q : R[X]\n⊢ (fun x => x ^ 2) Y - (↑C (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆) - ↑C (↑C W.a₁ * Y + ↑C W.a₃) * Y) =\n WeierstrassCurve.polynomial W * 1\n[PROOFSTEP]\nrw [WeierstrassCurve.polynomial]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny p q : R[X]\n⊢ (fun x => x ^ 2) Y - (↑C (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆) - ↑C (↑C W.a₁ * Y + ↑C W.a₃) * Y) =\n (Y ^ 2 + ↑C (↑C W.a₁ * Y + ↑C W.a₃) * Y - ↑C (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) * 1\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny p q : R[X]\nY_sq : ↑(mk W) Y ^ 2 = ↑(mk W) (↑C (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆) - ↑C (↑C W.a₁ * Y + ↑C W.a₃) * Y)\n⊢ (p • 1 + q • ↑(mk W) Y) * ↑(mk W) Y =\n (q * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) • 1 + (p - q * (↑C W.a₁ * Y + ↑C W.a₃)) • ↑(mk W) Y\n[PROOFSTEP]\nsimp_rw [smul, add_mul, mul_assoc, ← sq, Y_sq, C_sub, map_sub, C_mul, _root_.map_mul]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny p q : R[X]\nY_sq : ↑(mk W) Y ^ 2 = ↑(mk W) (↑C (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆) - ↑C (↑C W.a₁ * Y + ↑C W.a₃) * Y)\n⊢ ↑(mk W) (↑C p) * (1 * ↑(mk W) Y) +\n ↑(mk W) (↑C q) *\n (↑(mk W) (↑C (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) -\n ↑(mk W) (↑C (↑C W.a₁ * Y + ↑C W.a₃)) * ↑(mk W) Y) =\n ↑(mk W) (↑C q) * ↑(mk W) (↑C (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) * 1 +\n (↑(mk W) (↑C p) - ↑(mk W) (↑C q) * ↑(mk W) (↑C (↑C W.a₁ * Y + ↑C W.a₃))) * ↑(mk W) Y\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny p q : R[X]\n⊢ ↑(Algebra.norm R[X]) (p • 1 + q • ↑(mk W) Y) =\n p ^ 2 - p * q * (↑C W.a₁ * Y + ↑C W.a₃) - q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)\n[PROOFSTEP]\nsimp_rw [Algebra.norm_eq_matrix_det <| CoordinateRing.basis W, Matrix.det_fin_two, Algebra.leftMulMatrix_eq_repr_mul,\n basis_zero, mul_one, basis_one, smul_basis_mul_Y, map_add, Finsupp.add_apply, map_smul, Finsupp.smul_apply, ←\n basis_zero, ← basis_one, Basis.repr_self_apply, if_pos, if_neg, smul_eq_mul]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny p q : R[X]\n⊢ (p * 1 + q * 0) *\n (q * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆) * 0 + (p - q * (↑C W.a₁ * Y + ↑C W.a₃)) * 1) -\n (q * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆) * 1 + (p - q * (↑C W.a₁ * Y + ↑C W.a₃)) * 0) *\n (p * 0 + q * 1) =\n p ^ 2 - p * q * (↑C W.a₁ * Y + ↑C W.a₃) - q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny p q : R[X]\n⊢ ↑C (↑(Algebra.norm R[X]) (p • 1 + q • ↑(mk W) Y)) -\n (↑C p + ↑C q * Y) * (↑C p + ↑C q * (-Y - ↑C (↑C W.a₁ * Y + ↑C W.a₃))) =\n WeierstrassCurve.polynomial W * ↑C q ^ 2\n[PROOFSTEP]\nsimp only [norm_smul_basis, WeierstrassCurve.polynomial]\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny p q : R[X]\n⊢ ↑C (p ^ 2 - p * q * (↑C W.a₁ * Y + ↑C W.a₃) - q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) -\n (↑C p + ↑C q * Y) * (↑C p + ↑C q * (-Y - ↑C (↑C W.a₁ * Y + ↑C W.a₃))) =\n (Y ^ 2 + ↑C (↑C W.a₁ * Y + ↑C W.a₃) * Y - ↑C (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) * ↑C q ^ 2\n[PROOFSTEP]\nC_simp\n[GOAL]\nR : Type u\ninst✝⁶ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\nB : Type w\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : R\ny p q : R[X]\n⊢ ↑C p ^ 2 - ↑C p * ↑C q * (↑C (↑C W.a₁) * ↑C Y + ↑C (↑C W.a₃)) -\n ↑C q ^ 2 * (↑C Y ^ 3 + ↑C (↑C W.a₂) * ↑C Y ^ 2 + ↑C (↑C W.a₄) * ↑C Y + ↑C (↑C W.a₆)) -\n (↑C p + ↑C q * Y) * (↑C p + ↑C q * (-Y - (↑C (↑C W.a₁) * ↑C Y + ↑C (↑C W.a₃)))) =\n (Y ^ 2 + (↑C (↑C W.a₁) * ↑C Y + ↑C (↑C W.a₃)) * Y -\n (↑C Y ^ 3 + ↑C (↑C W.a₂) * ↑C Y ^ 2 + ↑C (↑C W.a₄) * ↑C Y + ↑C (↑C W.a₆))) *\n ↑C q ^ 2\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\n⊢ degree (↑(Algebra.norm R[X]) (p • 1 + q • ↑(mk W) Y)) = max (2 • degree p) (2 • degree q + 3)\n[PROOFSTEP]\nhave hdp : (p ^ 2).degree = 2 • p.degree := degree_pow p 2\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhdp : degree (p ^ 2) = 2 • degree p\n⊢ degree (↑(Algebra.norm R[X]) (p • 1 + q • ↑(mk W) Y)) = max (2 • degree p) (2 • degree q + 3)\n[PROOFSTEP]\nhave hdpq : (p * q * (C W.a₁ * X + C W.a₃)).degree ≤ p.degree + q.degree + 1 := by\n simpa only [degree_mul] using add_le_add_left degree_linear_le (p.degree + q.degree)\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhdp : degree (p ^ 2) = 2 • degree p\n⊢ degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ degree p + degree q + 1\n[PROOFSTEP]\nsimpa only [degree_mul] using add_le_add_left degree_linear_le (p.degree + q.degree)\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhdp : degree (p ^ 2) = 2 • degree p\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ degree p + degree q + 1\n⊢ degree (↑(Algebra.norm R[X]) (p • 1 + q • ↑(mk W) Y)) = max (2 • degree p) (2 • degree q + 3)\n[PROOFSTEP]\nhave hdq : (q ^ 2 * (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆)).degree = 2 • q.degree + 3 := by\n rw [degree_mul, degree_pow, ← one_mul <| X ^ 3, ← C_1, degree_cubic <| one_ne_zero' R]\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhdp : degree (p ^ 2) = 2 • degree p\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ degree p + degree q + 1\n⊢ degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • degree q + 3\n[PROOFSTEP]\nrw [degree_mul, degree_pow, ← one_mul <| X ^ 3, ← C_1, degree_cubic <| one_ne_zero' R]\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhdp : degree (p ^ 2) = 2 • degree p\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ degree p + degree q + 1\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • degree q + 3\n⊢ degree (↑(Algebra.norm R[X]) (p • 1 + q • ↑(mk W) Y)) = max (2 • degree p) (2 • degree q + 3)\n[PROOFSTEP]\nrw [norm_smul_basis]\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhdp : degree (p ^ 2) = 2 • degree p\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ degree p + degree q + 1\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • degree q + 3\n⊢ degree (p ^ 2 - p * q * (↑C W.a₁ * Y + ↑C W.a₃) - q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) =\n max (2 • degree p) (2 • degree q + 3)\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhdp : degree (p ^ 2) = 2 • degree p\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ degree p + degree q + 1\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • degree q + 3\nhp : p = 0\n⊢ degree (p ^ 2 - p * q * (↑C W.a₁ * Y + ↑C W.a₃) - q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) =\n max (2 • degree p) (2 • degree q + 3)\n[PROOFSTEP]\nsimpa only [hp, hdq, neg_zero, zero_sub, zero_mul, zero_pow zero_lt_two, degree_neg] using (max_bot_left _).symm\n[GOAL]\ncase neg\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhdp : degree (p ^ 2) = 2 • degree p\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ degree p + degree q + 1\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • degree q + 3\nhp : ¬p = 0\n⊢ degree (p ^ 2 - p * q * (↑C W.a₁ * Y + ↑C W.a₃) - q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) =\n max (2 • degree p) (2 • degree q + 3)\n[PROOFSTEP]\nby_cases hq : q = 0\n[GOAL]\ncase pos\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhdp : degree (p ^ 2) = 2 • degree p\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ degree p + degree q + 1\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • degree q + 3\nhp : ¬p = 0\nhq : q = 0\n⊢ degree (p ^ 2 - p * q * (↑C W.a₁ * Y + ↑C W.a₃) - q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) =\n max (2 • degree p) (2 • degree q + 3)\n[PROOFSTEP]\nsimpa only [hq, hdp, sub_zero, zero_mul, mul_zero, zero_pow zero_lt_two] using (max_bot_right _).symm\n[GOAL]\ncase neg\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhdp : degree (p ^ 2) = 2 • degree p\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ degree p + degree q + 1\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • degree q + 3\nhp : ¬p = 0\nhq : ¬q = 0\n⊢ degree (p ^ 2 - p * q * (↑C W.a₁ * Y + ↑C W.a₃) - q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) =\n max (2 • degree p) (2 • degree q + 3)\n[PROOFSTEP]\nrw [← not_congr degree_eq_bot] at hp hq \n[GOAL]\ncase neg\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhdp : degree (p ^ 2) = 2 • degree p\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ degree p + degree q + 1\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • degree q + 3\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\n⊢ degree (p ^ 2 - p * q * (↑C W.a₁ * Y + ↑C W.a₃) - q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) =\n max (2 • degree p) (2 • degree q + 3)\n[PROOFSTEP]\nrcases hp' : p.degree with _ | dp\n[GOAL]\ncase neg.none\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhdp : degree (p ^ 2) = 2 • degree p\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ degree p + degree q + 1\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • degree q + 3\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\nhp' : degree p = none\n⊢ degree (p ^ 2 - p * q * (↑C W.a₁ * Y + ↑C W.a₃) - q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) =\n max (2 • none) (2 • degree q + 3)\n[PROOFSTEP]\nexact (hp hp').elim\n[GOAL]\ncase neg.some\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhdp : degree (p ^ 2) = 2 • degree p\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ degree p + degree q + 1\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • degree q + 3\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhp' : degree p = some dp\n⊢ degree (p ^ 2 - p * q * (↑C W.a₁ * Y + ↑C W.a₃) - q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) =\n max (2 • some dp) (2 • degree q + 3)\n[PROOFSTEP]\nrw [hp'] at hdp hdpq \n[GOAL]\ncase neg.some\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • degree q + 3\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + degree q + 1\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\n⊢ degree (p ^ 2 - p * q * (↑C W.a₁ * Y + ↑C W.a₃) - q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) =\n max (2 • some dp) (2 • degree q + 3)\n[PROOFSTEP]\nrcases hq' : q.degree with _ | dq\n[GOAL]\ncase neg.some.none\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • degree q + 3\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + degree q + 1\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\nhq' : degree q = none\n⊢ degree (p ^ 2 - p * q * (↑C W.a₁ * Y + ↑C W.a₃) - q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) =\n max (2 • some dp) (2 • none + 3)\n[PROOFSTEP]\nexact (hq hq').elim\n[GOAL]\ncase neg.some.some\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • degree q + 3\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + degree q + 1\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhq' : degree q = some dq\n⊢ degree (p ^ 2 - p * q * (↑C W.a₁ * Y + ↑C W.a₃) - q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) =\n max (2 • some dp) (2 • some dq + 3)\n[PROOFSTEP]\nrw [hq'] at hdpq hdq \n[GOAL]\ncase neg.some.some\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\n⊢ degree (p ^ 2 - p * q * (↑C W.a₁ * Y + ↑C W.a₃) - q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) =\n max (2 • some dp) (2 • some dq + 3)\n[PROOFSTEP]\nrcases le_or_lt dp (dq + 1) with hpq | hpq\n[GOAL]\ncase neg.some.some.inl\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dp ≤ dq + 1\n⊢ degree (p ^ 2 - p * q * (↑C W.a₁ * Y + ↑C W.a₃) - q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) =\n max (2 • some dp) (2 • some dq + 3)\n[PROOFSTEP]\nconvert\n (degree_sub_eq_right_of_degree_lt <|\n (degree_sub_le _ _).trans_lt <| max_lt_iff.mpr ⟨hdp.trans_lt _, hdpq.trans_lt _⟩).trans\n (max_eq_right_of_lt _).symm\n[GOAL]\ncase h.e'_3.h.e'_4\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dp ≤ dq + 1\n⊢ 2 • some dq + 3 = degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆))\n[PROOFSTEP]\nrw [hdq]\n[GOAL]\ncase neg.some.some.inl.convert_2\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dp ≤ dq + 1\n⊢ 2 • some dp < degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆))\n[PROOFSTEP]\nrw [hdq]\n[GOAL]\ncase neg.some.some.inl.convert_3\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dp ≤ dq + 1\n⊢ some dp + some dq + 1 < degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆))\n[PROOFSTEP]\nrw [hdq]\n[GOAL]\ncase neg.some.some.inl.convert_5\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dp ≤ dq + 1\n⊢ 2 • some dp < degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆))\n[PROOFSTEP]\nrw [hdq]\n[GOAL]\ncase neg.some.some.inl.convert_2\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dp ≤ dq + 1\n⊢ 2 • some dp < 2 • some dq + 3\n[PROOFSTEP]\nexact WithBot.coe_lt_coe.mpr <| by linarith only [hpq]\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dp ≤ dq + 1\n⊢ (fun x x_1 => x + x_1) dp ((fun x x_1 => x + x_1) dp 0) <\n (fun x x_1 => x + x_1) ((fun x x_1 => x + x_1) dq ((fun x x_1 => x + x_1) dq 0)) ↑3\n[PROOFSTEP]\nlinarith only [hpq]\n[GOAL]\ncase neg.some.some.inl.convert_3\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dp ≤ dq + 1\n⊢ some dp + some dq + 1 < 2 • some dq + 3\n[PROOFSTEP]\nexact WithBot.coe_lt_coe.mpr <| by linarith only [hpq]\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dp ≤ dq + 1\n⊢ (fun x x_1 => x + x_1) ((fun x x_1 => x + x_1) dp dq) 1 <\n (fun x x_1 => x + x_1) ((fun x x_1 => x + x_1) dq ((fun x x_1 => x + x_1) dq 0)) ↑3\n[PROOFSTEP]\nlinarith only [hpq]\n[GOAL]\ncase neg.some.some.inl.convert_5\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dp ≤ dq + 1\n⊢ 2 • some dp < 2 • some dq + 3\n[PROOFSTEP]\nexact WithBot.coe_lt_coe.mpr <| by linarith only [hpq]\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dp ≤ dq + 1\n⊢ (fun x x_1 => x + x_1) dp ((fun x x_1 => x + x_1) dp 0) <\n (fun x x_1 => x + x_1) ((fun x x_1 => x + x_1) dq ((fun x x_1 => x + x_1) dq 0)) ↑3\n[PROOFSTEP]\nlinarith only [hpq]\n[GOAL]\ncase neg.some.some.inr\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dq + 1 < dp\n⊢ degree (p ^ 2 - p * q * (↑C W.a₁ * Y + ↑C W.a₃) - q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) =\n max (2 • some dp) (2 • some dq + 3)\n[PROOFSTEP]\nrw [sub_sub]\n[GOAL]\ncase neg.some.some.inr\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dq + 1 < dp\n⊢ degree (p ^ 2 - (p * q * (↑C W.a₁ * Y + ↑C W.a₃) + q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆))) =\n max (2 • some dp) (2 • some dq + 3)\n[PROOFSTEP]\nconvert\n (degree_sub_eq_left_of_degree_lt <|\n (degree_add_le _ _).trans_lt <| max_lt_iff.mpr ⟨hdpq.trans_lt _, hdq.trans_lt _⟩).trans\n (max_eq_left_of_lt _).symm\n[GOAL]\ncase h.e'_3.h.e'_3\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dq + 1 < dp\n⊢ 2 • some dp = degree (p ^ 2)\n[PROOFSTEP]\nrw [hdp]\n[GOAL]\ncase neg.some.some.inr.convert_2\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dq + 1 < dp\n⊢ some dp + some dq + 1 < degree (p ^ 2)\n[PROOFSTEP]\nrw [hdp]\n[GOAL]\ncase neg.some.some.inr.convert_3\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dq + 1 < dp\n⊢ 2 • some dq + 3 < degree (p ^ 2)\n[PROOFSTEP]\nrw [hdp]\n[GOAL]\ncase neg.some.some.inr.convert_5\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dq + 1 < dp\n⊢ 2 • some dq + 3 < degree (p ^ 2)\n[PROOFSTEP]\nrw [hdp]\n[GOAL]\ncase neg.some.some.inr.convert_2\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dq + 1 < dp\n⊢ some dp + some dq + 1 < 2 • some dp\n[PROOFSTEP]\nexact WithBot.coe_lt_coe.mpr <| by linarith only [hpq]\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dq + 1 < dp\n⊢ (fun x x_1 => x + x_1) ((fun x x_1 => x + x_1) dp dq) 1 < (fun x x_1 => x + x_1) dp ((fun x x_1 => x + x_1) dp 0)\n[PROOFSTEP]\nlinarith only [hpq]\n[GOAL]\ncase neg.some.some.inr.convert_3\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dq + 1 < dp\n⊢ 2 • some dq + 3 < 2 • some dp\n[PROOFSTEP]\nexact WithBot.coe_lt_coe.mpr <| by linarith only [hpq]\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dq + 1 < dp\n⊢ (fun x x_1 => x + x_1) ((fun x x_1 => x + x_1) dq ((fun x x_1 => x + x_1) dq 0)) ↑3 <\n (fun x x_1 => x + x_1) dp ((fun x x_1 => x + x_1) dp 0)\n[PROOFSTEP]\nlinarith only [hpq]\n[GOAL]\ncase neg.some.some.inr.convert_5\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dq + 1 < dp\n⊢ 2 • some dq + 3 < 2 • some dp\n[PROOFSTEP]\nexact WithBot.coe_lt_coe.mpr <| by linarith only [hpq]\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nhp : ¬degree p = ⊥\nhq : ¬degree q = ⊥\ndp : ℕ\nhdp : degree (p ^ 2) = 2 • some dp\nhp' : degree p = some dp\ndq : ℕ\nhdq : degree (q ^ 2 * (Y ^ 3 + ↑C W.a₂ * Y ^ 2 + ↑C W.a₄ * Y + ↑C W.a₆)) = 2 • some dq + 3\nhdpq : degree (p * q * (↑C W.a₁ * Y + ↑C W.a₃)) ≤ some dp + some dq + 1\nhq' : degree q = some dq\nhpq : dq + 1 < dp\n⊢ (fun x x_1 => x + x_1) ((fun x x_1 => x + x_1) dq ((fun x x_1 => x + x_1) dq 0)) ↑3 <\n (fun x x_1 => x + x_1) dp ((fun x x_1 => x + x_1) dp 0)\n[PROOFSTEP]\nlinarith only [hpq]\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx✝ : R\ny : R[X]\ninst✝ : IsDomain R\nx : CoordinateRing W\n⊢ degree (↑(Algebra.norm R[X]) x) ≠ 1\n[PROOFSTEP]\nrcases exists_smul_basis_eq x with ⟨p, q, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\n⊢ degree (↑(Algebra.norm R[X]) (p • 1 + q • ↑(mk W) Y)) ≠ 1\n[PROOFSTEP]\nrw [degree_norm_smul_basis]\n[GOAL]\ncase intro.intro\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\n⊢ max (2 • degree p) (2 • degree q + 3) ≠ 1\n[PROOFSTEP]\nrcases p.degree with (_ | _ | _ | _)\n[GOAL]\ncase intro.intro.none\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\n⊢ max (2 • none) (2 • degree q + 3) ≠ 1\n[PROOFSTEP]\ncases q.degree\n[GOAL]\ncase intro.intro.some.zero\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\n⊢ max (2 • some Nat.zero) (2 • degree q + 3) ≠ 1\n[PROOFSTEP]\ncases q.degree\n[GOAL]\ncase intro.intro.some.succ.zero\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\n⊢ max (2 • some (Nat.succ Nat.zero)) (2 • degree q + 3) ≠ 1\n[PROOFSTEP]\ncases q.degree\n[GOAL]\ncase intro.intro.some.succ.succ\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nn✝ : ℕ\n⊢ max (2 • some (Nat.succ (Nat.succ n✝))) (2 • degree q + 3) ≠ 1\n[PROOFSTEP]\ncases q.degree\n[GOAL]\ncase intro.intro.none.none\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\n⊢ max (2 • none) (2 • none + 3) ≠ 1\ncase intro.intro.none.some\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nval✝ : ℕ\n⊢ max (2 • none) (2 • some val✝ + 3) ≠ 1\ncase intro.intro.some.zero.none\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\n⊢ max (2 • some Nat.zero) (2 • none + 3) ≠ 1\ncase intro.intro.some.zero.some\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nval✝ : ℕ\n⊢ max (2 • some Nat.zero) (2 • some val✝ + 3) ≠ 1\ncase intro.intro.some.succ.zero.none\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\n⊢ max (2 • some (Nat.succ Nat.zero)) (2 • none + 3) ≠ 1\ncase intro.intro.some.succ.zero.some\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nval✝ : ℕ\n⊢ max (2 • some (Nat.succ Nat.zero)) (2 • some val✝ + 3) ≠ 1\ncase intro.intro.some.succ.succ.none\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nn✝ : ℕ\n⊢ max (2 • some (Nat.succ (Nat.succ n✝))) (2 • none + 3) ≠ 1\ncase intro.intro.some.succ.succ.some\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nn✝ val✝ : ℕ\n⊢ max (2 • some (Nat.succ (Nat.succ n✝))) (2 • some val✝ + 3) ≠ 1\n[PROOFSTEP]\nany_goals\n rintro\n (_ | _)\n -- porting note: replaced `dec_trivial` with `(cmp_eq_lt_iff _ _).mp rfl` but cannot be inlined\n[GOAL]\ncase intro.intro.none.none\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\n⊢ max (2 • none) (2 • none + 3) ≠ 1\n[PROOFSTEP]\nrintro\n (_ | _)\n -- porting note: replaced `dec_trivial` with `(cmp_eq_lt_iff _ _).mp rfl` but cannot be inlined\n[GOAL]\ncase intro.intro.none.some\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nval✝ : ℕ\n⊢ max (2 • none) (2 • some val✝ + 3) ≠ 1\n[PROOFSTEP]\nrintro\n (_ | _)\n -- porting note: replaced `dec_trivial` with `(cmp_eq_lt_iff _ _).mp rfl` but cannot be inlined\n[GOAL]\ncase intro.intro.some.zero.none\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\n⊢ max (2 • some Nat.zero) (2 • none + 3) ≠ 1\n[PROOFSTEP]\nrintro\n (_ | _)\n -- porting note: replaced `dec_trivial` with `(cmp_eq_lt_iff _ _).mp rfl` but cannot be inlined\n[GOAL]\ncase intro.intro.some.zero.some\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nval✝ : ℕ\n⊢ max (2 • some Nat.zero) (2 • some val✝ + 3) ≠ 1\n[PROOFSTEP]\nrintro\n (_ | _)\n -- porting note: replaced `dec_trivial` with `(cmp_eq_lt_iff _ _).mp rfl` but cannot be inlined\n[GOAL]\ncase intro.intro.some.succ.zero.none\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\n⊢ max (2 • some (Nat.succ Nat.zero)) (2 • none + 3) ≠ 1\n[PROOFSTEP]\nrintro\n (_ | _)\n -- porting note: replaced `dec_trivial` with `(cmp_eq_lt_iff _ _).mp rfl` but cannot be inlined\n[GOAL]\ncase intro.intro.some.succ.zero.some\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nval✝ : ℕ\n⊢ max (2 • some (Nat.succ Nat.zero)) (2 • some val✝ + 3) ≠ 1\n[PROOFSTEP]\nrintro\n (_ | _)\n -- porting note: replaced `dec_trivial` with `(cmp_eq_lt_iff _ _).mp rfl` but cannot be inlined\n[GOAL]\ncase intro.intro.some.succ.succ.none\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nn✝ : ℕ\n⊢ max (2 • some (Nat.succ (Nat.succ n✝))) (2 • none + 3) ≠ 1\n[PROOFSTEP]\nrintro\n (_ | _)\n -- porting note: replaced `dec_trivial` with `(cmp_eq_lt_iff _ _).mp rfl` but cannot be inlined\n[GOAL]\ncase intro.intro.some.succ.succ.some\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nn✝ val✝ : ℕ\n⊢ max (2 • some (Nat.succ (Nat.succ n✝))) (2 • some val✝ + 3) ≠ 1\n[PROOFSTEP]\nrintro\n (_ | _)\n -- porting note: replaced `dec_trivial` with `(cmp_eq_lt_iff _ _).mp rfl` but cannot be inlined\n[GOAL]\ncase intro.intro.some.succ.succ.some\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nn✝ val✝ : ℕ\n⊢ max (2 • some (Nat.succ (Nat.succ n✝))) (2 • some val✝ + 3) ≠ 1\n[PROOFSTEP]\napply (lt_max_of_lt_right _).ne'\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\nW : WeierstrassCurve R\nA : Type v\ninst✝⁶ : CommRing A\ninst✝⁵ : Algebra R A\nB : Type w\ninst✝⁴ : CommRing B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R A B\nx : R\ny : R[X]\ninst✝ : IsDomain R\np q : R[X]\nn✝ val✝ : ℕ\n⊢ 1 < 2 • some val✝ + 3\n[PROOFSTEP]\nexact (cmp_eq_lt_iff _ _).mp rfl\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\nE : EllipticCurve R\ninst✝ : Invertible 3\nthis : Invertible (-3 ^ 3)\n⊢ ↑(unitOfInvertible (-3 ^ 3)) = WeierstrassCurve.Δ (WeierstrassCurve.ofJ0 R)\n[PROOFSTEP]\nrw [unitOfInvertible_val, WeierstrassCurve.ofJ0_Δ R]\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\nE : EllipticCurve R\ninst✝ : Invertible 3\nthis : Invertible (-3 ^ 3)\n⊢ -3 ^ 3 = -27\n[PROOFSTEP]\nnorm_num1\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\nE : EllipticCurve R\ninst✝ : Invertible 3\n⊢ j (ofJ0 R) = 0\n[PROOFSTEP]\nsimp only [j, ofJ0, WeierstrassCurve.ofJ0_c₄]\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\nE : EllipticCurve R\ninst✝ : Invertible 3\n⊢ ↑(unitOfInvertible (-3 ^ 3))⁻¹ * 0 ^ 3 = 0\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\nE : EllipticCurve R\ninst✝ : Invertible 2\nthis : Invertible (-2 ^ 6)\n⊢ ↑(unitOfInvertible (-2 ^ 6)) = WeierstrassCurve.Δ (WeierstrassCurve.ofJ1728 R)\n[PROOFSTEP]\nrw [unitOfInvertible_val, WeierstrassCurve.ofJ1728_Δ R]\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\nE : EllipticCurve R\ninst✝ : Invertible 2\nthis : Invertible (-2 ^ 6)\n⊢ -2 ^ 6 = -64\n[PROOFSTEP]\nnorm_num1\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\nE : EllipticCurve R\ninst✝ : Invertible 2\n⊢ j (ofJ1728 R) = 1728\n[PROOFSTEP]\nfield_simp [j, ofJ1728, @unitOfInvertible_val _ _ _ <| invertibleNeg _, WeierstrassCurve.ofJ1728_c₄]\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\nE : EllipticCurve R\ninst✝ : Invertible 2\n⊢ -(1728 * 2 ^ 6) = (-48) ^ 3\n[PROOFSTEP]\nnorm_num1\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nj : R\ninst✝¹ : Invertible j\ninst✝ : Invertible (j - 1728)\n⊢ EllipticCurve.j (ofJ' j) = j\n[PROOFSTEP]\nfield_simp [EllipticCurve.j, ofJ', @unitOfInvertible_val _ _ _ <| invertibleMul _ _, WeierstrassCurve.ofJ_c₄]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nj : R\ninst✝¹ : Invertible j\ninst✝ : Invertible (j - 1728)\n⊢ j * (j ^ 2 * (j - 1728) ^ 9) = (j * (j - 1728) ^ 3) ^ 3\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝ : Field F\nj : F\n⊢ Nat.coprime 2 3\n[PROOFSTEP]\nnorm_num1\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh0 : ¬j = 0\nh1728 : j = 1728\nh : 2 = 0\n⊢ j = 0\n[PROOFSTEP]\nrw [h1728, show (1728 : F) = 2 * 864 by norm_num1, h, zero_mul]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh0 : ¬j = 0\nh1728 : j = 1728\nh : 2 = 0\n⊢ 1728 = 2 * 864\n[PROOFSTEP]\nnorm_num1\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh3 : NeZero 3\n⊢ ofJ 0 = ofJ0 F\n[PROOFSTEP]\nrw [ofJ, dif_pos rfl, dif_neg h3.out]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh3 : 3 = 0\n⊢ ofJ 0 = ofJ1728 F\n[PROOFSTEP]\nrw [ofJ, dif_pos rfl, dif_pos h3]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh3 : 3 = 0\n⊢ ofJ 1728 = ofJ1728 F\n[PROOFSTEP]\nrw [ofJ, dif_pos <| by rw [show (1728 : F) = 3 * 576 by norm_num1, h3, zero_mul], dif_pos h3]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh3 : 3 = 0\n⊢ 1728 = 0\n[PROOFSTEP]\nrw [show (1728 : F) = 3 * 576 by norm_num1, h3, zero_mul]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh3 : 3 = 0\n⊢ 1728 = 3 * 576\n[PROOFSTEP]\nnorm_num1\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh2 : NeZero 2\n⊢ ofJ 1728 = ofJ1728 F\n[PROOFSTEP]\nby_cases h3 : (3 : F) = 0\n[GOAL]\ncase pos\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh2 : NeZero 2\nh3 : 3 = 0\n⊢ ofJ 1728 = ofJ1728 F\n[PROOFSTEP]\nexact ofJ_1728_of_three_eq_zero h3\n[GOAL]\ncase neg\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh2 : NeZero 2\nh3 : ¬3 = 0\n⊢ ofJ 1728 = ofJ1728 F\n[PROOFSTEP]\nhave h : (1728 : F) ≠ 0 := fun h =>\n or_iff_not_and_not.mp (mul_eq_zero.mp <| by rwa [show 2 ^ 6 * 3 ^ 3 = (1728 : F) by norm_num1])\n ⟨pow_ne_zero 6 h2.out, pow_ne_zero 3 h3⟩\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh2 : NeZero 2\nh3 : ¬3 = 0\nh : 1728 = 0\n⊢ 2 ^ 6 * 3 ^ 3 = 0\n[PROOFSTEP]\nrwa [show 2 ^ 6 * 3 ^ 3 = (1728 : F) by norm_num1]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh2 : NeZero 2\nh3 : ¬3 = 0\nh : 1728 = 0\n⊢ 2 ^ 6 * 3 ^ 3 = 1728\n[PROOFSTEP]\nnorm_num1\n[GOAL]\ncase neg\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh2 : NeZero 2\nh3 : ¬3 = 0\nh : 1728 ≠ 0\n⊢ ofJ 1728 = ofJ1728 F\n[PROOFSTEP]\nrw [ofJ, dif_neg h, dif_pos rfl]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh2 : 2 = 0\n⊢ ofJ 1728 = ofJ0 F\n[PROOFSTEP]\nrw [ofJ, dif_pos <| by rw [show (1728 : F) = 2 * 864 by norm_num1, h2, zero_mul], dif_neg]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh2 : 2 = 0\n⊢ 1728 = 0\n[PROOFSTEP]\nrw [show (1728 : F) = 2 * 864 by norm_num1, h2, zero_mul]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh2 : 2 = 0\n⊢ 1728 = 2 * 864\n[PROOFSTEP]\nnorm_num1\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh0 : j ≠ 0\nh1728 : j ≠ 1728\n⊢ ofJ j = ofJ' j\n[PROOFSTEP]\nrw [ofJ, dif_neg h0, dif_neg h1728]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\n⊢ EllipticCurve.j (ofJ j) = j\n[PROOFSTEP]\nby_cases h0 : j = 0\n[GOAL]\ncase pos\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh0 : j = 0\n⊢ EllipticCurve.j (ofJ j) = j\n[PROOFSTEP]\nby_cases h3 : (3 : F) = 0\n[GOAL]\ncase pos\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh0 : j = 0\nh3 : 3 = 0\n⊢ EllipticCurve.j (ofJ j) = j\n[PROOFSTEP]\nrw [h0, ofJ_0_of_three_eq_zero h3, @ofJ1728_j _ _ <| invertibleOfNonzero <| two_or_three_ne_zero.neg_resolve_right h3,\n show (1728 : F) = 3 * 576 by norm_num1, h3, zero_mul]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh0 : j = 0\nh3 : 3 = 0\n⊢ 1728 = 3 * 576\n[PROOFSTEP]\nnorm_num1\n[GOAL]\ncase neg\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh0 : j = 0\nh3 : ¬3 = 0\n⊢ EllipticCurve.j (ofJ j) = j\n[PROOFSTEP]\nrw [h0, ofJ_0_of_three_ne_zero (h3 := neZero_iff.2 h3), @ofJ0_j _ _ <| invertibleOfNonzero h3]\n[GOAL]\ncase neg\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh0 : ¬j = 0\n⊢ EllipticCurve.j (ofJ j) = j\n[PROOFSTEP]\nby_cases h1728 : j = 1728\n[GOAL]\ncase pos\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh0 : ¬j = 0\nh1728 : j = 1728\n⊢ EllipticCurve.j (ofJ j) = j\n[PROOFSTEP]\nhave h2 : (2 : F) ≠ 0 := fun h => h0 <| by rw [h1728, show (1728 : F) = 2 * 864 by norm_num1, h, zero_mul]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh0 : ¬j = 0\nh1728 : j = 1728\nh : 2 = 0\n⊢ j = 0\n[PROOFSTEP]\nrw [h1728, show (1728 : F) = 2 * 864 by norm_num1, h, zero_mul]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh0 : ¬j = 0\nh1728 : j = 1728\nh : 2 = 0\n⊢ 1728 = 2 * 864\n[PROOFSTEP]\nnorm_num1\n[GOAL]\ncase pos\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh0 : ¬j = 0\nh1728 : j = 1728\nh2 : 2 ≠ 0\n⊢ EllipticCurve.j (ofJ j) = j\n[PROOFSTEP]\nrw [h1728, ofJ_1728_of_two_ne_zero (h2 := neZero_iff.2 h2), @ofJ1728_j _ _ <| invertibleOfNonzero h2]\n[GOAL]\ncase neg\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nF : Type u\ninst✝¹ : Field F\nj : F\ninst✝ : DecidableEq F\nh0 : ¬j = 0\nh1728 : ¬j = 1728\n⊢ EllipticCurve.j (ofJ j) = j\n[PROOFSTEP]\nrw [ofJ_ne_0_ne_1728 j h0 h1728,\n @ofJ'_j _ _ _ (invertibleOfNonzero h0) (invertibleOfNonzero <| sub_ne_zero_of_ne h1728)]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nE : EllipticCurve R\nC : WeierstrassCurve.VariableChange R\n⊢ ↑(C.u⁻¹ ^ 12 * E.Δ') = WeierstrassCurve.Δ (WeierstrassCurve.variableChange E.toWeierstrassCurve C)\n[PROOFSTEP]\nrw [Units.val_mul, Units.val_pow_eq_pow_val, coe_Δ', E.variableChange_Δ]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nE : EllipticCurve R\nC : WeierstrassCurve.VariableChange R\n⊢ variableChange E WeierstrassCurve.VariableChange.id = E\n[PROOFSTEP]\nsimp only [variableChange, WeierstrassCurve.variableChange_id]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nE : EllipticCurve R\nC : WeierstrassCurve.VariableChange R\n⊢ { toWeierstrassCurve := E.toWeierstrassCurve, Δ' := WeierstrassCurve.VariableChange.id.u⁻¹ ^ 12 * E.Δ',\n coe_Δ' :=\n (_ : ↑(WeierstrassCurve.VariableChange.id.u⁻¹ ^ 12 * E.Δ') = WeierstrassCurve.Δ E.toWeierstrassCurve) } =\n E\n[PROOFSTEP]\nsimp only [WeierstrassCurve.VariableChange.id, inv_one, one_pow, one_mul]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nE✝ : EllipticCurve R\nC✝ C C' : WeierstrassCurve.VariableChange R\nE : EllipticCurve R\n⊢ variableChange E (WeierstrassCurve.VariableChange.comp C C') = variableChange (variableChange E C') C\n[PROOFSTEP]\nsimp only [variableChange, WeierstrassCurve.variableChange_comp]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nE✝ : EllipticCurve R\nC✝ C C' : WeierstrassCurve.VariableChange R\nE : EllipticCurve R\n⊢ { toWeierstrassCurve := WeierstrassCurve.variableChange (WeierstrassCurve.variableChange E.toWeierstrassCurve C') C,\n Δ' := (WeierstrassCurve.VariableChange.comp C C').u⁻¹ ^ 12 * E.Δ',\n coe_Δ' :=\n (_ :\n ↑((WeierstrassCurve.VariableChange.comp C C').u⁻¹ ^ 12 * E.Δ') =\n WeierstrassCurve.Δ\n (WeierstrassCurve.variableChange (WeierstrassCurve.variableChange E.toWeierstrassCurve C') C)) } =\n { toWeierstrassCurve := WeierstrassCurve.variableChange (WeierstrassCurve.variableChange E.toWeierstrassCurve C') C,\n Δ' := C.u⁻¹ ^ 12 * (C'.u⁻¹ ^ 12 * E.Δ'),\n coe_Δ' :=\n (_ :\n ↑(C.u⁻¹ ^ 12 * (C'.u⁻¹ ^ 12 * E.Δ')) =\n WeierstrassCurve.Δ\n (WeierstrassCurve.variableChange (WeierstrassCurve.variableChange E.toWeierstrassCurve C') C)) }\n[PROOFSTEP]\nsimp only [WeierstrassCurve.VariableChange.comp, mul_inv, mul_pow, ← mul_assoc]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nE : EllipticCurve R\nC : WeierstrassCurve.VariableChange R\n⊢ ↑(variableChange E C).Δ' = ↑C.u⁻¹ ^ 12 * ↑E.Δ'\n[PROOFSTEP]\nrw [variableChange_Δ', Units.val_mul, Units.val_pow_eq_pow_val]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nE : EllipticCurve R\nC : WeierstrassCurve.VariableChange R\n⊢ ↑(variableChange E C).Δ'⁻¹ = ↑C.u ^ 12 * ↑E.Δ'⁻¹\n[PROOFSTEP]\nrw [variableChange_Δ', mul_inv, inv_pow, inv_inv, Units.val_mul, Units.val_pow_eq_pow_val]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nE : EllipticCurve R\nC : WeierstrassCurve.VariableChange R\n⊢ j (variableChange E C) = j E\n[PROOFSTEP]\nrw [j, coe_inv_variableChange_Δ']\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nE : EllipticCurve R\nC : WeierstrassCurve.VariableChange R\n⊢ ↑C.u ^ 12 * ↑E.Δ'⁻¹ * WeierstrassCurve.c₄ (variableChange E C).toWeierstrassCurve ^ 3 = j E\n[PROOFSTEP]\nhave hu : (C.u * ↑C.u⁻¹ : R) ^ 12 = 1 := by rw [C.u.mul_inv, one_pow]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nE : EllipticCurve R\nC : WeierstrassCurve.VariableChange R\n⊢ (↑C.u * ↑C.u⁻¹) ^ 12 = 1\n[PROOFSTEP]\nrw [C.u.mul_inv, one_pow]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nE : EllipticCurve R\nC : WeierstrassCurve.VariableChange R\nhu : (↑C.u * ↑C.u⁻¹) ^ 12 = 1\n⊢ ↑C.u ^ 12 * ↑E.Δ'⁻¹ * WeierstrassCurve.c₄ (variableChange E C).toWeierstrassCurve ^ 3 = j E\n[PROOFSTEP]\nlinear_combination (norm := (rw [variableChange_toWeierstrassCurve, WeierstrassCurve.variableChange_c₄, j]; ring1))\n E.j * hu\n[GOAL]\ncase a\nR : Type u\ninst✝ : CommRing R\nE : EllipticCurve R\nC : WeierstrassCurve.VariableChange R\nhu : (↑C.u * ↑C.u⁻¹) ^ 12 = 1\n⊢ ↑C.u ^ 12 * ↑E.Δ'⁻¹ * WeierstrassCurve.c₄ (variableChange E C).toWeierstrassCurve ^ 3 - j E -\n (j E * (↑C.u * ↑C.u⁻¹) ^ 12 - j E * 1) =\n 0\n[PROOFSTEP]\nrw [variableChange_toWeierstrassCurve, WeierstrassCurve.variableChange_c₄, j]\n[GOAL]\ncase a\nR : Type u\ninst✝ : CommRing R\nE : EllipticCurve R\nC : WeierstrassCurve.VariableChange R\nhu : (↑C.u * ↑C.u⁻¹) ^ 12 = 1\n⊢ ↑C.u ^ 12 * ↑E.Δ'⁻¹ * (↑C.u⁻¹ ^ 4 * WeierstrassCurve.c₄ E.toWeierstrassCurve) ^ 3 -\n ↑E.Δ'⁻¹ * WeierstrassCurve.c₄ E.toWeierstrassCurve ^ 3 -\n (↑E.Δ'⁻¹ * WeierstrassCurve.c₄ E.toWeierstrassCurve ^ 3 * (↑C.u * ↑C.u⁻¹) ^ 12 -\n ↑E.Δ'⁻¹ * WeierstrassCurve.c₄ E.toWeierstrassCurve ^ 3 * 1) =\n 0\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\n⊢ ↑(↑(Units.map ↑(algebraMap R A)) E.Δ') = WeierstrassCurve.Δ (WeierstrassCurve.baseChange E.toWeierstrassCurve A)\n[PROOFSTEP]\nsimp only [Units.coe_map, coe_Δ', E.baseChange_Δ]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\n⊢ ↑↑(algebraMap R A) (WeierstrassCurve.Δ E.toWeierstrassCurve) =\n ↑(algebraMap R A) (WeierstrassCurve.Δ E.toWeierstrassCurve)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\n⊢ j (baseChange E A) = ↑(algebraMap R A) (j E)\n[PROOFSTEP]\nsimp only [j, baseChange, E.baseChange_c₄]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\n⊢ ↑(↑(Units.map ↑(algebraMap R A)) E.Δ')⁻¹ * ↑(algebraMap R A) (WeierstrassCurve.c₄ E.toWeierstrassCurve) ^ 3 =\n ↑(algebraMap R A) (↑E.Δ'⁻¹ * WeierstrassCurve.c₄ E.toWeierstrassCurve ^ 3)\n[PROOFSTEP]\nmap_simp\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\n⊢ ↑(↑(Units.map ↑(algebraMap R A)) E.Δ')⁻¹ * ↑(algebraMap R A) (WeierstrassCurve.c₄ E.toWeierstrassCurve) ^ 3 =\n ↑(algebraMap R A) ↑E.Δ'⁻¹ * ↑(algebraMap R A) (WeierstrassCurve.c₄ E.toWeierstrassCurve) ^ 3\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nE✝ : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\nE E' : EllipticCurve R\nh1 : (fun E => baseChange E A) E = (fun E => baseChange E A) E'\n⊢ E = E'\n[PROOFSTEP]\nrcases mk.inj h1 with ⟨h1, h2⟩\n[GOAL]\ncase intro\nR : Type u\ninst✝² : CommRing R\nE✝ : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\nE E' : EllipticCurve R\nh1✝ : (fun E => baseChange E A) E = (fun E => baseChange E A) E'\nh1 : WeierstrassCurve.baseChange E.toWeierstrassCurve A = WeierstrassCurve.baseChange E'.toWeierstrassCurve A\nh2 : ↑(Units.map ↑(algebraMap R A)) E.Δ' = ↑(Units.map ↑(algebraMap R A)) E'.Δ'\n⊢ E = E'\n[PROOFSTEP]\nreplace h2 := (Units.mk.inj h2).left\n[GOAL]\ncase intro\nR : Type u\ninst✝² : CommRing R\nE✝ : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\nE E' : EllipticCurve R\nh1✝ : (fun E => baseChange E A) E = (fun E => baseChange E A) E'\nh1 : WeierstrassCurve.baseChange E.toWeierstrassCurve A = WeierstrassCurve.baseChange E'.toWeierstrassCurve A\nh2 : ↑↑(algebraMap R A) ↑E.Δ' = ↑↑(algebraMap R A) ↑E'.Δ'\n⊢ E = E'\n[PROOFSTEP]\nrcases WeierstrassCurve.mk.inj h1 with ⟨_, _, _, _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nR : Type u\ninst✝² : CommRing R\nE✝ : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\nE E' : EllipticCurve R\nh1✝ : (fun E => baseChange E A) E = (fun E => baseChange E A) E'\nh1 : WeierstrassCurve.baseChange E.toWeierstrassCurve A = WeierstrassCurve.baseChange E'.toWeierstrassCurve A\nh2 : ↑↑(algebraMap R A) ↑E.Δ' = ↑↑(algebraMap R A) ↑E'.Δ'\nleft✝³ : ↑(algebraMap R A) E.a₁ = ↑(algebraMap R A) E'.a₁\nleft✝² : ↑(algebraMap R A) E.a₂ = ↑(algebraMap R A) E'.a₂\nleft✝¹ : ↑(algebraMap R A) E.a₃ = ↑(algebraMap R A) E'.a₃\nleft✝ : ↑(algebraMap R A) E.a₄ = ↑(algebraMap R A) E'.a₄\nright✝ : ↑(algebraMap R A) E.a₆ = ↑(algebraMap R A) E'.a₆\n⊢ E = E'\n[PROOFSTEP]\next\n[GOAL]\ncase intro.intro.intro.intro.intro.a₁\nR : Type u\ninst✝² : CommRing R\nE✝ : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\nE E' : EllipticCurve R\nh1✝ : (fun E => baseChange E A) E = (fun E => baseChange E A) E'\nh1 : WeierstrassCurve.baseChange E.toWeierstrassCurve A = WeierstrassCurve.baseChange E'.toWeierstrassCurve A\nh2 : ↑↑(algebraMap R A) ↑E.Δ' = ↑↑(algebraMap R A) ↑E'.Δ'\nleft✝³ : ↑(algebraMap R A) E.a₁ = ↑(algebraMap R A) E'.a₁\nleft✝² : ↑(algebraMap R A) E.a₂ = ↑(algebraMap R A) E'.a₂\nleft✝¹ : ↑(algebraMap R A) E.a₃ = ↑(algebraMap R A) E'.a₃\nleft✝ : ↑(algebraMap R A) E.a₄ = ↑(algebraMap R A) E'.a₄\nright✝ : ↑(algebraMap R A) E.a₆ = ↑(algebraMap R A) E'.a₆\n⊢ E.a₁ = E'.a₁\n[PROOFSTEP]\napply_fun _ using h\n[GOAL]\ncase intro.intro.intro.intro.intro.a₂\nR : Type u\ninst✝² : CommRing R\nE✝ : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\nE E' : EllipticCurve R\nh1✝ : (fun E => baseChange E A) E = (fun E => baseChange E A) E'\nh1 : WeierstrassCurve.baseChange E.toWeierstrassCurve A = WeierstrassCurve.baseChange E'.toWeierstrassCurve A\nh2 : ↑↑(algebraMap R A) ↑E.Δ' = ↑↑(algebraMap R A) ↑E'.Δ'\nleft✝³ : ↑(algebraMap R A) E.a₁ = ↑(algebraMap R A) E'.a₁\nleft✝² : ↑(algebraMap R A) E.a₂ = ↑(algebraMap R A) E'.a₂\nleft✝¹ : ↑(algebraMap R A) E.a₃ = ↑(algebraMap R A) E'.a₃\nleft✝ : ↑(algebraMap R A) E.a₄ = ↑(algebraMap R A) E'.a₄\nright✝ : ↑(algebraMap R A) E.a₆ = ↑(algebraMap R A) E'.a₆\n⊢ E.a₂ = E'.a₂\n[PROOFSTEP]\napply_fun _ using h\n[GOAL]\ncase intro.intro.intro.intro.intro.a₃\nR : Type u\ninst✝² : CommRing R\nE✝ : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\nE E' : EllipticCurve R\nh1✝ : (fun E => baseChange E A) E = (fun E => baseChange E A) E'\nh1 : WeierstrassCurve.baseChange E.toWeierstrassCurve A = WeierstrassCurve.baseChange E'.toWeierstrassCurve A\nh2 : ↑↑(algebraMap R A) ↑E.Δ' = ↑↑(algebraMap R A) ↑E'.Δ'\nleft✝³ : ↑(algebraMap R A) E.a₁ = ↑(algebraMap R A) E'.a₁\nleft✝² : ↑(algebraMap R A) E.a₂ = ↑(algebraMap R A) E'.a₂\nleft✝¹ : ↑(algebraMap R A) E.a₃ = ↑(algebraMap R A) E'.a₃\nleft✝ : ↑(algebraMap R A) E.a₄ = ↑(algebraMap R A) E'.a₄\nright✝ : ↑(algebraMap R A) E.a₆ = ↑(algebraMap R A) E'.a₆\n⊢ E.a₃ = E'.a₃\n[PROOFSTEP]\napply_fun _ using h\n[GOAL]\ncase intro.intro.intro.intro.intro.a₄\nR : Type u\ninst✝² : CommRing R\nE✝ : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\nE E' : EllipticCurve R\nh1✝ : (fun E => baseChange E A) E = (fun E => baseChange E A) E'\nh1 : WeierstrassCurve.baseChange E.toWeierstrassCurve A = WeierstrassCurve.baseChange E'.toWeierstrassCurve A\nh2 : ↑↑(algebraMap R A) ↑E.Δ' = ↑↑(algebraMap R A) ↑E'.Δ'\nleft✝³ : ↑(algebraMap R A) E.a₁ = ↑(algebraMap R A) E'.a₁\nleft✝² : ↑(algebraMap R A) E.a₂ = ↑(algebraMap R A) E'.a₂\nleft✝¹ : ↑(algebraMap R A) E.a₃ = ↑(algebraMap R A) E'.a₃\nleft✝ : ↑(algebraMap R A) E.a₄ = ↑(algebraMap R A) E'.a₄\nright✝ : ↑(algebraMap R A) E.a₆ = ↑(algebraMap R A) E'.a₆\n⊢ E.a₄ = E'.a₄\n[PROOFSTEP]\napply_fun _ using h\n[GOAL]\ncase intro.intro.intro.intro.intro.a₆\nR : Type u\ninst✝² : CommRing R\nE✝ : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\nE E' : EllipticCurve R\nh1✝ : (fun E => baseChange E A) E = (fun E => baseChange E A) E'\nh1 : WeierstrassCurve.baseChange E.toWeierstrassCurve A = WeierstrassCurve.baseChange E'.toWeierstrassCurve A\nh2 : ↑↑(algebraMap R A) ↑E.Δ' = ↑↑(algebraMap R A) ↑E'.Δ'\nleft✝³ : ↑(algebraMap R A) E.a₁ = ↑(algebraMap R A) E'.a₁\nleft✝² : ↑(algebraMap R A) E.a₂ = ↑(algebraMap R A) E'.a₂\nleft✝¹ : ↑(algebraMap R A) E.a₃ = ↑(algebraMap R A) E'.a₃\nleft✝ : ↑(algebraMap R A) E.a₄ = ↑(algebraMap R A) E'.a₄\nright✝ : ↑(algebraMap R A) E.a₆ = ↑(algebraMap R A) E'.a₆\n⊢ E.a₆ = E'.a₆\n[PROOFSTEP]\napply_fun _ using h\n[GOAL]\ncase intro.intro.intro.intro.intro.Δ'.a\nR : Type u\ninst✝² : CommRing R\nE✝ : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\nE E' : EllipticCurve R\nh1✝ : (fun E => baseChange E A) E = (fun E => baseChange E A) E'\nh1 : WeierstrassCurve.baseChange E.toWeierstrassCurve A = WeierstrassCurve.baseChange E'.toWeierstrassCurve A\nh2 : ↑↑(algebraMap R A) ↑E.Δ' = ↑↑(algebraMap R A) ↑E'.Δ'\nleft✝³ : ↑(algebraMap R A) E.a₁ = ↑(algebraMap R A) E'.a₁\nleft✝² : ↑(algebraMap R A) E.a₂ = ↑(algebraMap R A) E'.a₂\nleft✝¹ : ↑(algebraMap R A) E.a₃ = ↑(algebraMap R A) E'.a₃\nleft✝ : ↑(algebraMap R A) E.a₄ = ↑(algebraMap R A) E'.a₄\nright✝ : ↑(algebraMap R A) E.a₆ = ↑(algebraMap R A) E'.a₆\n⊢ ↑E.Δ' = ↑E'.Δ'\n[PROOFSTEP]\napply_fun _ using h\n[GOAL]\ncase intro.intro.intro.intro.intro.a₁\nR : Type u\ninst✝² : CommRing R\nE✝ : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\nE E' : EllipticCurve R\nh1✝ : (fun E => baseChange E A) E = (fun E => baseChange E A) E'\nh1 : WeierstrassCurve.baseChange E.toWeierstrassCurve A = WeierstrassCurve.baseChange E'.toWeierstrassCurve A\nh2 : ↑↑(algebraMap R A) ↑E.Δ' = ↑↑(algebraMap R A) ↑E'.Δ'\nleft✝³ : ↑(algebraMap R A) E.a₁ = ↑(algebraMap R A) E'.a₁\nleft✝² : ↑(algebraMap R A) E.a₂ = ↑(algebraMap R A) E'.a₂\nleft✝¹ : ↑(algebraMap R A) E.a₃ = ↑(algebraMap R A) E'.a₃\nleft✝ : ↑(algebraMap R A) E.a₄ = ↑(algebraMap R A) E'.a₄\nright✝ : ↑(algebraMap R A) E.a₆ = ↑(algebraMap R A) E'.a₆\n⊢ ↑(algebraMap R A) E.a₁ = ↑(algebraMap R A) E'.a₁\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.intro.intro.intro.a₂\nR : Type u\ninst✝² : CommRing R\nE✝ : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\nE E' : EllipticCurve R\nh1✝ : (fun E => baseChange E A) E = (fun E => baseChange E A) E'\nh1 : WeierstrassCurve.baseChange E.toWeierstrassCurve A = WeierstrassCurve.baseChange E'.toWeierstrassCurve A\nh2 : ↑↑(algebraMap R A) ↑E.Δ' = ↑↑(algebraMap R A) ↑E'.Δ'\nleft✝³ : ↑(algebraMap R A) E.a₁ = ↑(algebraMap R A) E'.a₁\nleft✝² : ↑(algebraMap R A) E.a₂ = ↑(algebraMap R A) E'.a₂\nleft✝¹ : ↑(algebraMap R A) E.a₃ = ↑(algebraMap R A) E'.a₃\nleft✝ : ↑(algebraMap R A) E.a₄ = ↑(algebraMap R A) E'.a₄\nright✝ : ↑(algebraMap R A) E.a₆ = ↑(algebraMap R A) E'.a₆\n⊢ ↑(algebraMap R A) E.a₂ = ↑(algebraMap R A) E'.a₂\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.intro.intro.intro.a₃\nR : Type u\ninst✝² : CommRing R\nE✝ : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\nE E' : EllipticCurve R\nh1✝ : (fun E => baseChange E A) E = (fun E => baseChange E A) E'\nh1 : WeierstrassCurve.baseChange E.toWeierstrassCurve A = WeierstrassCurve.baseChange E'.toWeierstrassCurve A\nh2 : ↑↑(algebraMap R A) ↑E.Δ' = ↑↑(algebraMap R A) ↑E'.Δ'\nleft✝³ : ↑(algebraMap R A) E.a₁ = ↑(algebraMap R A) E'.a₁\nleft✝² : ↑(algebraMap R A) E.a₂ = ↑(algebraMap R A) E'.a₂\nleft✝¹ : ↑(algebraMap R A) E.a₃ = ↑(algebraMap R A) E'.a₃\nleft✝ : ↑(algebraMap R A) E.a₄ = ↑(algebraMap R A) E'.a₄\nright✝ : ↑(algebraMap R A) E.a₆ = ↑(algebraMap R A) E'.a₆\n⊢ ↑(algebraMap R A) E.a₃ = ↑(algebraMap R A) E'.a₃\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.intro.intro.intro.a₄\nR : Type u\ninst✝² : CommRing R\nE✝ : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\nE E' : EllipticCurve R\nh1✝ : (fun E => baseChange E A) E = (fun E => baseChange E A) E'\nh1 : WeierstrassCurve.baseChange E.toWeierstrassCurve A = WeierstrassCurve.baseChange E'.toWeierstrassCurve A\nh2 : ↑↑(algebraMap R A) ↑E.Δ' = ↑↑(algebraMap R A) ↑E'.Δ'\nleft✝³ : ↑(algebraMap R A) E.a₁ = ↑(algebraMap R A) E'.a₁\nleft✝² : ↑(algebraMap R A) E.a₂ = ↑(algebraMap R A) E'.a₂\nleft✝¹ : ↑(algebraMap R A) E.a₃ = ↑(algebraMap R A) E'.a₃\nleft✝ : ↑(algebraMap R A) E.a₄ = ↑(algebraMap R A) E'.a₄\nright✝ : ↑(algebraMap R A) E.a₆ = ↑(algebraMap R A) E'.a₆\n⊢ ↑(algebraMap R A) E.a₄ = ↑(algebraMap R A) E'.a₄\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.intro.intro.intro.a₆\nR : Type u\ninst✝² : CommRing R\nE✝ : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\nE E' : EllipticCurve R\nh1✝ : (fun E => baseChange E A) E = (fun E => baseChange E A) E'\nh1 : WeierstrassCurve.baseChange E.toWeierstrassCurve A = WeierstrassCurve.baseChange E'.toWeierstrassCurve A\nh2 : ↑↑(algebraMap R A) ↑E.Δ' = ↑↑(algebraMap R A) ↑E'.Δ'\nleft✝³ : ↑(algebraMap R A) E.a₁ = ↑(algebraMap R A) E'.a₁\nleft✝² : ↑(algebraMap R A) E.a₂ = ↑(algebraMap R A) E'.a₂\nleft✝¹ : ↑(algebraMap R A) E.a₃ = ↑(algebraMap R A) E'.a₃\nleft✝ : ↑(algebraMap R A) E.a₄ = ↑(algebraMap R A) E'.a₄\nright✝ : ↑(algebraMap R A) E.a₆ = ↑(algebraMap R A) E'.a₆\n⊢ ↑(algebraMap R A) E.a₆ = ↑(algebraMap R A) E'.a₆\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.intro.intro.intro.Δ'.a\nR : Type u\ninst✝² : CommRing R\nE✝ : EllipticCurve R\nA : Type v\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nh : Function.Injective ↑(algebraMap R A)\nE E' : EllipticCurve R\nh1✝ : (fun E => baseChange E A) E = (fun E => baseChange E A) E'\nh1 : WeierstrassCurve.baseChange E.toWeierstrassCurve A = WeierstrassCurve.baseChange E'.toWeierstrassCurve A\nh2 : ↑↑(algebraMap R A) ↑E.Δ' = ↑↑(algebraMap R A) ↑E'.Δ'\nleft✝³ : ↑(algebraMap R A) E.a₁ = ↑(algebraMap R A) E'.a₁\nleft✝² : ↑(algebraMap R A) E.a₂ = ↑(algebraMap R A) E'.a₂\nleft✝¹ : ↑(algebraMap R A) E.a₃ = ↑(algebraMap R A) E'.a₃\nleft✝ : ↑(algebraMap R A) E.a₄ = ↑(algebraMap R A) E'.a₄\nright✝ : ↑(algebraMap R A) E.a₆ = ↑(algebraMap R A) E'.a₆\n⊢ ↑(algebraMap R A) ↑E.Δ' = ↑(algebraMap R A) ↑E'.Δ'\n[PROOFSTEP]\nassumption\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicGeometry.EllipticCurve.Weierstrass", "llama_tokens": 130835, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.865224072151174, "lm_q2_score": 0.6723316860482763, "lm_q1q2_score": 0.5817175592389543}} {"text": "[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁ N₂ : LieSubmodule R L M\na✝ b✝ : M\nhm₁ : a✝ ∈ {m | ∀ (x : L), ⁅x, m⁆ ∈ N}\nhm₂ : b✝ ∈ {m | ∀ (x : L), ⁅x, m⁆ ∈ N}\nx : L\n⊢ ⁅x, a✝ + b✝⁆ ∈ N\n[PROOFSTEP]\nrw [lie_add]\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁ N₂ : LieSubmodule R L M\na✝ b✝ : M\nhm₁ : a✝ ∈ {m | ∀ (x : L), ⁅x, m⁆ ∈ N}\nhm₂ : b✝ ∈ {m | ∀ (x : L), ⁅x, m⁆ ∈ N}\nx : L\n⊢ ⁅x, a✝⁆ + ⁅x, b✝⁆ ∈ N\n[PROOFSTEP]\nexact N.add_mem' (hm₁ x) (hm₂ x)\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁ N₂ : LieSubmodule R L M\nx : L\n⊢ ⁅x, 0⁆ ∈ N\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁ N₂ : LieSubmodule R L M\nt : R\nm : M\nhm :\n m ∈\n {\n toAddSubsemigroup :=\n { carrier := {m | ∀ (x : L), ⁅x, m⁆ ∈ N},\n add_mem' :=\n (_ :\n ∀ {a b : M},\n a ∈ {m | ∀ (x : L), ⁅x, m⁆ ∈ N} → b ∈ {m | ∀ (x : L), ⁅x, m⁆ ∈ N} → ∀ (x : L), ⁅x, a + b⁆ ∈ N) },\n zero_mem' := (_ : ∀ (x : L), ⁅x, 0⁆ ∈ N) }.toAddSubsemigroup.carrier\nx : L\n⊢ ⁅x, t • m⁆ ∈ N\n[PROOFSTEP]\nrw [lie_smul]\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁ N₂ : LieSubmodule R L M\nt : R\nm : M\nhm :\n m ∈\n {\n toAddSubsemigroup :=\n { carrier := {m | ∀ (x : L), ⁅x, m⁆ ∈ N},\n add_mem' :=\n (_ :\n ∀ {a b : M},\n a ∈ {m | ∀ (x : L), ⁅x, m⁆ ∈ N} → b ∈ {m | ∀ (x : L), ⁅x, m⁆ ∈ N} → ∀ (x : L), ⁅x, a + b⁆ ∈ N) },\n zero_mem' := (_ : ∀ (x : L), ⁅x, 0⁆ ∈ N) }.toAddSubsemigroup.carrier\nx : L\n⊢ t • ⁅x, m⁆ ∈ N\n[PROOFSTEP]\nexact N.smul_mem' t (hm x)\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁ N₂ : LieSubmodule R L M\nx : L\nm : M\nhm :\n m ∈\n {\n toAddSubmonoid :=\n {\n toAddSubsemigroup :=\n { carrier := {m | ∀ (x : L), ⁅x, m⁆ ∈ N},\n add_mem' :=\n (_ :\n ∀ {a b : M},\n a ∈ {m | ∀ (x : L), ⁅x, m⁆ ∈ N} →\n b ∈ {m | ∀ (x : L), ⁅x, m⁆ ∈ N} → ∀ (x : L), ⁅x, a + b⁆ ∈ N) },\n zero_mem' := (_ : ∀ (x : L), ⁅x, 0⁆ ∈ N) },\n smul_mem' :=\n (_ :\n ∀ (t : R) (m : M),\n m ∈\n {\n toAddSubsemigroup :=\n { carrier := {m | ∀ (x : L), ⁅x, m⁆ ∈ N},\n add_mem' :=\n (_ :\n ∀ {a b : M},\n a ∈ {m | ∀ (x : L), ⁅x, m⁆ ∈ N} →\n b ∈ {m | ∀ (x : L), ⁅x, m⁆ ∈ N} → ∀ (x : L), ⁅x, a + b⁆ ∈ N) },\n zero_mem' := (_ : ∀ (x : L), ⁅x, 0⁆ ∈ N) }.toAddSubsemigroup.carrier →\n ∀ (x : L), ⁅x, t • m⁆ ∈ N) }.toAddSubmonoid.toAddSubsemigroup.carrier\ny : L\n⊢ ⁅y, ⁅x, m⁆⁆ ∈ N\n[PROOFSTEP]\nrw [leibniz_lie]\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁ N₂ : LieSubmodule R L M\nx : L\nm : M\nhm :\n m ∈\n {\n toAddSubmonoid :=\n {\n toAddSubsemigroup :=\n { carrier := {m | ∀ (x : L), ⁅x, m⁆ ∈ N},\n add_mem' :=\n (_ :\n ∀ {a b : M},\n a ∈ {m | ∀ (x : L), ⁅x, m⁆ ∈ N} →\n b ∈ {m | ∀ (x : L), ⁅x, m⁆ ∈ N} → ∀ (x : L), ⁅x, a + b⁆ ∈ N) },\n zero_mem' := (_ : ∀ (x : L), ⁅x, 0⁆ ∈ N) },\n smul_mem' :=\n (_ :\n ∀ (t : R) (m : M),\n m ∈\n {\n toAddSubsemigroup :=\n { carrier := {m | ∀ (x : L), ⁅x, m⁆ ∈ N},\n add_mem' :=\n (_ :\n ∀ {a b : M},\n a ∈ {m | ∀ (x : L), ⁅x, m⁆ ∈ N} →\n b ∈ {m | ∀ (x : L), ⁅x, m⁆ ∈ N} → ∀ (x : L), ⁅x, a + b⁆ ∈ N) },\n zero_mem' := (_ : ∀ (x : L), ⁅x, 0⁆ ∈ N) }.toAddSubsemigroup.carrier →\n ∀ (x : L), ⁅x, t • m⁆ ∈ N) }.toAddSubmonoid.toAddSubsemigroup.carrier\ny : L\n⊢ ⁅⁅y, x⁆, m⁆ + ⁅x, ⁅y, m⁆⁆ ∈ N\n[PROOFSTEP]\nexact N.add_mem' (hm ⁅y, x⁆) (N.lie_mem (hm y))\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁ N₂ : LieSubmodule R L M\n⊢ N ≤ normalizer N\n[PROOFSTEP]\nintro m hm\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁ N₂ : LieSubmodule R L M\nm : M\nhm : m ∈ N\n⊢ m ∈ normalizer N\n[PROOFSTEP]\nrw [mem_normalizer]\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁ N₂ : LieSubmodule R L M\nm : M\nhm : m ∈ N\n⊢ ∀ (x : L), ⁅x, m⁆ ∈ N\n[PROOFSTEP]\nexact fun x => N.lie_mem hm\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁ N₂ : LieSubmodule R L M\n⊢ normalizer (N₁ ⊓ N₂) = normalizer N₁ ⊓ normalizer N₂\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁ N₂ : LieSubmodule R L M\nm✝ : M\n⊢ m✝ ∈ normalizer (N₁ ⊓ N₂) ↔ m✝ ∈ normalizer N₁ ⊓ normalizer N₂\n[PROOFSTEP]\nsimp [← forall_and]\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁ N₂ : LieSubmodule R L M\n⊢ Monotone normalizer\n[PROOFSTEP]\nintro N₁ N₂ h m hm\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁✝ N₂✝ N₁ N₂ : LieSubmodule R L M\nh : N₁ ≤ N₂\nm : M\nhm : m ∈ normalizer N₁\n⊢ m ∈ normalizer N₂\n[PROOFSTEP]\nrw [mem_normalizer] at hm ⊢\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁✝ N₂✝ N₁ N₂ : LieSubmodule R L M\nh : N₁ ≤ N₂\nm : M\nhm : ∀ (x : L), ⁅x, m⁆ ∈ N₁\n⊢ ∀ (x : L), ⁅x, m⁆ ∈ N₂\n[PROOFSTEP]\nexact fun x => h (hm x)\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁ N₂ : LieSubmodule R L M\nf : M' →ₗ⁅R,L⁆ M\n⊢ comap f (normalizer N) = normalizer (comap f N)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁ N₂ : LieSubmodule R L M\nf : M' →ₗ⁅R,L⁆ M\nm✝ : M'\n⊢ m✝ ∈ comap f (normalizer N) ↔ m✝ ∈ normalizer (comap f N)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁ N₂ N' : LieSubmodule R L M\n⊢ ⁅⊤, N⁆ ≤ N' ↔ N ≤ normalizer N'\n[PROOFSTEP]\nrw [lie_le_iff]\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nN N₁ N₂ N' : LieSubmodule R L M\n⊢ (∀ (x : L), x ∈ ⊤ → ∀ (m : M), m ∈ N → ⁅x, m⁆ ∈ N') ↔ N ≤ normalizer N'\n[PROOFSTEP]\ntauto\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nsrc✝ : LieSubmodule R { x // x ∈ H } L := LieSubmodule.normalizer (toLieSubmodule H)\ny z : L\nhy : y ∈ src✝.carrier\nhz : z ∈ src✝.carrier\nx : { x // x ∈ H }\n⊢ ⁅x, ⁅y, z⁆⁆ ∈ toLieSubmodule H\n[PROOFSTEP]\nrw [coe_bracket_of_module, mem_toLieSubmodule, leibniz_lie, ← lie_skew y, ← sub_eq_add_neg]\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nsrc✝ : LieSubmodule R { x // x ∈ H } L := LieSubmodule.normalizer (toLieSubmodule H)\ny z : L\nhy : y ∈ src✝.carrier\nhz : z ∈ src✝.carrier\nx : { x // x ∈ H }\n⊢ ⁅⁅↑x, y⁆, z⁆ - ⁅⁅↑x, z⁆, y⁆ ∈ H\n[PROOFSTEP]\nexact H.sub_mem (hz ⟨_, hy x⟩) (hy ⟨_, hz x⟩)\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nx : L\n⊢ x ∈ normalizer H ↔ ∀ (y : L), y ∈ H → ⁅y, x⁆ ∈ H\n[PROOFSTEP]\nrw [Subtype.forall']\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nx : L\n⊢ x ∈ normalizer H ↔ ∀ (x_1 : { a // a ∈ H }), ⁅↑x_1, x⁆ ∈ H\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nx : L\n⊢ x ∈ normalizer H ↔ ∀ (y : L), y ∈ H → ⁅x, y⁆ ∈ H\n[PROOFSTEP]\nrw [mem_normalizer_iff']\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nx : L\n⊢ (∀ (y : L), y ∈ H → ⁅y, x⁆ ∈ H) ↔ ∀ (y : L), y ∈ H → ⁅x, y⁆ ∈ H\n[PROOFSTEP]\nrefine' forall₂_congr fun y hy => _\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nx y : L\nhy : y ∈ H\n⊢ ⁅y, x⁆ ∈ H ↔ ⁅x, y⁆ ∈ H\n[PROOFSTEP]\nrw [← lie_skew, neg_mem_iff (G := L)]\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nx y z : L\nhx : x ∈ normalizer H\nhy : y ∈ Submodule.span R {x} ⊔ H.toSubmodule\nhz : z ∈ Submodule.span R {x} ⊔ H.toSubmodule\n⊢ ⁅y, z⁆ ∈ Submodule.span R {x} ⊔ H.toSubmodule\n[PROOFSTEP]\nrw [Submodule.mem_sup] at hy hz \n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nx y z : L\nhx : x ∈ normalizer H\nhy : ∃ y_1, y_1 ∈ Submodule.span R {x} ∧ ∃ z, z ∈ H.toSubmodule ∧ y_1 + z = y\nhz : ∃ y, y ∈ Submodule.span R {x} ∧ ∃ z_1, z_1 ∈ H.toSubmodule ∧ y + z_1 = z\n⊢ ⁅y, z⁆ ∈ Submodule.span R {x} ⊔ H.toSubmodule\n[PROOFSTEP]\nobtain ⟨u₁, hu₁, v, hv : v ∈ H, rfl⟩ := hy\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nx z : L\nhx : x ∈ normalizer H\nhz : ∃ y, y ∈ Submodule.span R {x} ∧ ∃ z_1, z_1 ∈ H.toSubmodule ∧ y + z_1 = z\nu₁ : L\nhu₁ : u₁ ∈ Submodule.span R {x}\nv : L\nhv : v ∈ H\n⊢ ⁅u₁ + v, z⁆ ∈ Submodule.span R {x} ⊔ H.toSubmodule\n[PROOFSTEP]\nobtain ⟨u₂, hu₂, w, hw : w ∈ H, rfl⟩ := hz\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nx : L\nhx : x ∈ normalizer H\nu₁ : L\nhu₁ : u₁ ∈ Submodule.span R {x}\nv : L\nhv : v ∈ H\nu₂ : L\nhu₂ : u₂ ∈ Submodule.span R {x}\nw : L\nhw : w ∈ H\n⊢ ⁅u₁ + v, u₂ + w⁆ ∈ Submodule.span R {x} ⊔ H.toSubmodule\n[PROOFSTEP]\nobtain ⟨t, rfl⟩ := Submodule.mem_span_singleton.mp hu₁\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nx : L\nhx : x ∈ normalizer H\nv : L\nhv : v ∈ H\nu₂ : L\nhu₂ : u₂ ∈ Submodule.span R {x}\nw : L\nhw : w ∈ H\nt : R\nhu₁ : t • x ∈ Submodule.span R {x}\n⊢ ⁅t • x + v, u₂ + w⁆ ∈ Submodule.span R {x} ⊔ H.toSubmodule\n[PROOFSTEP]\nobtain ⟨s, rfl⟩ := Submodule.mem_span_singleton.mp hu₂\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nx : L\nhx : x ∈ normalizer H\nv : L\nhv : v ∈ H\nw : L\nhw : w ∈ H\nt : R\nhu₁ : t • x ∈ Submodule.span R {x}\ns : R\nhu₂ : s • x ∈ Submodule.span R {x}\n⊢ ⁅t • x + v, s • x + w⁆ ∈ Submodule.span R {x} ⊔ H.toSubmodule\n[PROOFSTEP]\napply Submodule.mem_sup_right\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.a\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nx : L\nhx : x ∈ normalizer H\nv : L\nhv : v ∈ H\nw : L\nhw : w ∈ H\nt : R\nhu₁ : t • x ∈ Submodule.span R {x}\ns : R\nhu₂ : s • x ∈ Submodule.span R {x}\n⊢ ⁅t • x + v, s • x + w⁆ ∈ H.toSubmodule\n[PROOFSTEP]\nsimp only [LieSubalgebra.mem_coe_submodule, smul_lie, add_lie, zero_add, lie_add, smul_zero, lie_smul, lie_self]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.a\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nx : L\nhx : x ∈ normalizer H\nv : L\nhv : v ∈ H\nw : L\nhw : w ∈ H\nt : R\nhu₁ : t • x ∈ Submodule.span R {x}\ns : R\nhu₂ : s • x ∈ Submodule.span R {x}\n⊢ s • ⁅v, x⁆ + (t • ⁅x, w⁆ + ⁅v, w⁆) ∈ H\n[PROOFSTEP]\nrefine' H.add_mem (H.smul_mem s _) (H.add_mem (H.smul_mem t _) (H.lie_mem hv hw))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.a.refine'_1\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nx : L\nhx : x ∈ normalizer H\nv : L\nhv : v ∈ H\nw : L\nhw : w ∈ H\nt : R\nhu₁ : t • x ∈ Submodule.span R {x}\ns : R\nhu₂ : s • x ∈ Submodule.span R {x}\n⊢ ⁅v, x⁆ ∈ H\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.a.refine'_2\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nx : L\nhx : x ∈ normalizer H\nv : L\nhv : v ∈ H\nw : L\nhw : w ∈ H\nt : R\nhu₁ : t • x ∈ Submodule.span R {x}\ns : R\nhu₂ : s • x ∈ Submodule.span R {x}\n⊢ ⁅x, w⁆ ∈ H\n[PROOFSTEP]\nexacts [(H.mem_normalizer_iff' x).mp hx v hv, (H.mem_normalizer_iff x).mp hx w hw]\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nx y : L\nhx : x ∈ normalizer H\nhy : y ∈ H\n⊢ ⁅x, y⁆ ∈ H\n[PROOFSTEP]\nrw [← lie_skew, neg_mem_iff (G := L)]\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nx y : L\nhx : x ∈ normalizer H\nhy : y ∈ H\n⊢ ⁅y, x⁆ ∈ H\n[PROOFSTEP]\nexact hx ⟨y, hy⟩\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH K : LieSubalgebra R L\nh₁ : H ≤ K\nh₂ : K ≤ normalizer H\n⊢ ∃ I, ↑R { x // x ∈ K } I = ofLe h₁\n[PROOFSTEP]\nrw [exists_nested_lieIdeal_coe_eq_iff]\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH K : LieSubalgebra R L\nh₁ : H ≤ K\nh₂ : K ≤ normalizer H\n⊢ ∀ (x y : L), x ∈ K → y ∈ H → ⁅x, y⁆ ∈ H\n[PROOFSTEP]\nexact fun x y hx hy => ideal_in_normalizer (h₂ hx) hy\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\n⊢ normalizer H = H ↔ LieModule.maxTrivSubmodule R { x // x ∈ H } (L ⧸ toLieSubmodule H) = ⊥\n[PROOFSTEP]\nrw [LieSubmodule.eq_bot_iff]\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\n⊢ normalizer H = H ↔\n ∀ (m : L ⧸ toLieSubmodule H), m ∈ LieModule.maxTrivSubmodule R { x // x ∈ H } (L ⧸ toLieSubmodule H) → m = 0\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => le_antisymm _ H.le_normalizer⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nh : normalizer H = H\n⊢ ∀ (m : L ⧸ toLieSubmodule H), m ∈ LieModule.maxTrivSubmodule R { x // x ∈ H } (L ⧸ toLieSubmodule H) → m = 0\n[PROOFSTEP]\nrintro ⟨x⟩ hx\n[GOAL]\ncase refine'_1.mk\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nh : normalizer H = H\nm✝ : L ⧸ toLieSubmodule H\nx : L\nhx : Quot.mk Setoid.r x ∈ LieModule.maxTrivSubmodule R { x // x ∈ H } (L ⧸ toLieSubmodule H)\n⊢ Quot.mk Setoid.r x = 0\n[PROOFSTEP]\nsuffices x ∈ H by\n rwa [Submodule.Quotient.quot_mk_eq_mk, Submodule.Quotient.mk_eq_zero, coe_toLieSubmodule, mem_coe_submodule]\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nh : normalizer H = H\nm✝ : L ⧸ toLieSubmodule H\nx : L\nhx : Quot.mk Setoid.r x ∈ LieModule.maxTrivSubmodule R { x // x ∈ H } (L ⧸ toLieSubmodule H)\nthis : x ∈ H\n⊢ Quot.mk Setoid.r x = 0\n[PROOFSTEP]\nrwa [Submodule.Quotient.quot_mk_eq_mk, Submodule.Quotient.mk_eq_zero, coe_toLieSubmodule, mem_coe_submodule]\n[GOAL]\ncase refine'_1.mk\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nh : normalizer H = H\nm✝ : L ⧸ toLieSubmodule H\nx : L\nhx : Quot.mk Setoid.r x ∈ LieModule.maxTrivSubmodule R { x // x ∈ H } (L ⧸ toLieSubmodule H)\n⊢ x ∈ H\n[PROOFSTEP]\nrw [← h, H.mem_normalizer_iff']\n[GOAL]\ncase refine'_1.mk\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nh : normalizer H = H\nm✝ : L ⧸ toLieSubmodule H\nx : L\nhx : Quot.mk Setoid.r x ∈ LieModule.maxTrivSubmodule R { x // x ∈ H } (L ⧸ toLieSubmodule H)\n⊢ ∀ (y : L), y ∈ H → ⁅y, x⁆ ∈ H\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase refine'_1.mk\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nh : normalizer H = H\nm✝ : L ⧸ toLieSubmodule H\nx : L\nhx : Quot.mk Setoid.r x ∈ LieModule.maxTrivSubmodule R { x // x ∈ H } (L ⧸ toLieSubmodule H)\ny : L\nhy : y ∈ H\n⊢ ⁅y, x⁆ ∈ H\n[PROOFSTEP]\nreplace hx : ⁅_, LieSubmodule.Quotient.mk' _ x⁆ = 0 := hx ⟨y, hy⟩\n[GOAL]\ncase refine'_1.mk\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nh : normalizer H = H\nm✝ : L ⧸ toLieSubmodule H\nx y : L\nhy : y ∈ H\nhx : ⁅{ val := y, property := hy }, ↑(LieSubmodule.Quotient.mk' (toLieSubmodule H)) x⁆ = 0\n⊢ ⁅y, x⁆ ∈ H\n[PROOFSTEP]\nrwa [← LieModuleHom.map_lie, LieSubmodule.Quotient.mk_eq_zero] at hx \n[GOAL]\ncase refine'_2\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nh : ∀ (m : L ⧸ toLieSubmodule H), m ∈ LieModule.maxTrivSubmodule R { x // x ∈ H } (L ⧸ toLieSubmodule H) → m = 0\n⊢ normalizer H ≤ H\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine'_2\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nh : ∀ (m : L ⧸ toLieSubmodule H), m ∈ LieModule.maxTrivSubmodule R { x // x ∈ H } (L ⧸ toLieSubmodule H) → m = 0\nx : L\nhx : x ∈ normalizer H\n⊢ x ∈ H\n[PROOFSTEP]\nlet y := LieSubmodule.Quotient.mk' H.toLieSubmodule x\n[GOAL]\ncase refine'_2\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nh : ∀ (m : L ⧸ toLieSubmodule H), m ∈ LieModule.maxTrivSubmodule R { x // x ∈ H } (L ⧸ toLieSubmodule H) → m = 0\nx : L\nhx : x ∈ normalizer H\ny : (fun x => L ⧸ toLieSubmodule H) x := ↑(LieSubmodule.Quotient.mk' (toLieSubmodule H)) x\n⊢ x ∈ H\n[PROOFSTEP]\nhave hy : y ∈ LieModule.maxTrivSubmodule R H (L ⧸ H.toLieSubmodule) :=\n by\n rintro ⟨z, hz⟩\n rw [← LieModuleHom.map_lie, LieSubmodule.Quotient.mk_eq_zero, coe_bracket_of_module, Submodule.coe_mk,\n mem_toLieSubmodule]\n exact (H.mem_normalizer_iff' x).mp hx z hz\n[GOAL]\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nh : ∀ (m : L ⧸ toLieSubmodule H), m ∈ LieModule.maxTrivSubmodule R { x // x ∈ H } (L ⧸ toLieSubmodule H) → m = 0\nx : L\nhx : x ∈ normalizer H\ny : (fun x => L ⧸ toLieSubmodule H) x := ↑(LieSubmodule.Quotient.mk' (toLieSubmodule H)) x\n⊢ y ∈ LieModule.maxTrivSubmodule R { x // x ∈ H } (L ⧸ toLieSubmodule H)\n[PROOFSTEP]\nrintro ⟨z, hz⟩\n[GOAL]\ncase mk\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nh : ∀ (m : L ⧸ toLieSubmodule H), m ∈ LieModule.maxTrivSubmodule R { x // x ∈ H } (L ⧸ toLieSubmodule H) → m = 0\nx : L\nhx : x ∈ normalizer H\ny : (fun x => L ⧸ toLieSubmodule H) x := ↑(LieSubmodule.Quotient.mk' (toLieSubmodule H)) x\nz : L\nhz : z ∈ H\n⊢ ⁅{ val := z, property := hz }, y⁆ = 0\n[PROOFSTEP]\nrw [← LieModuleHom.map_lie, LieSubmodule.Quotient.mk_eq_zero, coe_bracket_of_module, Submodule.coe_mk,\n mem_toLieSubmodule]\n[GOAL]\ncase mk\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nh : ∀ (m : L ⧸ toLieSubmodule H), m ∈ LieModule.maxTrivSubmodule R { x // x ∈ H } (L ⧸ toLieSubmodule H) → m = 0\nx : L\nhx : x ∈ normalizer H\ny : (fun x => L ⧸ toLieSubmodule H) x := ↑(LieSubmodule.Quotient.mk' (toLieSubmodule H)) x\nz : L\nhz : z ∈ H\n⊢ ⁅z, x⁆ ∈ H\n[PROOFSTEP]\nexact (H.mem_normalizer_iff' x).mp hx z hz\n[GOAL]\ncase refine'_2\nR : Type u_1\nL : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\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'\nH : LieSubalgebra R L\nh : ∀ (m : L ⧸ toLieSubmodule H), m ∈ LieModule.maxTrivSubmodule R { x // x ∈ H } (L ⧸ toLieSubmodule H) → m = 0\nx : L\nhx : x ∈ normalizer H\ny : (fun x => L ⧸ toLieSubmodule H) x := ↑(LieSubmodule.Quotient.mk' (toLieSubmodule H)) x\nhy : y ∈ LieModule.maxTrivSubmodule R { x // x ∈ H } (L ⧸ toLieSubmodule H)\n⊢ x ∈ H\n[PROOFSTEP]\nsimpa using h y hy\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Lie.Normalizer", "llama_tokens": 16999, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8354835371034368, "lm_q2_score": 0.6959583313396339, "lm_q1q2_score": 0.581461728344243}} {"text": "[GOAL]\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nF : A → C ⥤ C\nzero : F 0 ≅ 𝟭 C\nadd : (n m : A) → F (n + m) ≅ F n ⋙ F m\nm₁ m₂ m₃ : A\nX : C\n⊢ (F (m₁ + m₂ + m₃)).obj X = (F (m₁ + (m₂ + m₃))).obj X\n[PROOFSTEP]\nrw [add_assoc]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nF : A → C ⥤ C\nzero : F 0 ≅ 𝟭 C\nadd : (n m : A) → F (n + m) ≅ F n ⋙ F m\nassoc_hom_app :\n autoParam\n (∀ (m₁ m₂ m₃ : A) (X : C),\n NatTrans.app (add (m₁ + m₂) m₃).hom X ≫ (F m₃).map (NatTrans.app (add m₁ m₂).hom X) =\n eqToHom (_ : (F (m₁ + m₂ + m₃)).obj X = (F (m₁ + (m₂ + m₃))).obj X) ≫\n NatTrans.app (add m₁ (m₂ + m₃)).hom X ≫ NatTrans.app (add m₂ m₃).hom ((F m₁).obj X))\n _auto✝\nn : A\nX : C\n⊢ (F (0 + n)).obj X = (F n).obj ((𝟭 C).obj X)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nF : A → C ⥤ C\nzero : F 0 ≅ 𝟭 C\nadd : (n m : A) → F (n + m) ≅ F n ⋙ F m\nassoc_hom_app :\n autoParam\n (∀ (m₁ m₂ m₃ : A) (X : C),\n NatTrans.app (add (m₁ + m₂) m₃).hom X ≫ (F m₃).map (NatTrans.app (add m₁ m₂).hom X) =\n eqToHom (_ : (F (m₁ + m₂ + m₃)).obj X = (F (m₁ + (m₂ + m₃))).obj X) ≫\n NatTrans.app (add m₁ (m₂ + m₃)).hom X ≫ NatTrans.app (add m₂ m₃).hom ((F m₁).obj X))\n _auto✝\nn : A\nX : C\n⊢ (F (0 + n)).obj X = (F n).obj X\n[PROOFSTEP]\nrw [zero_add]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nF : A → C ⥤ C\nzero : F 0 ≅ 𝟭 C\nadd : (n m : A) → F (n + m) ≅ F n ⋙ F m\nassoc_hom_app :\n autoParam\n (∀ (m₁ m₂ m₃ : A) (X : C),\n NatTrans.app (add (m₁ + m₂) m₃).hom X ≫ (F m₃).map (NatTrans.app (add m₁ m₂).hom X) =\n eqToHom (_ : (F (m₁ + m₂ + m₃)).obj X = (F (m₁ + (m₂ + m₃))).obj X) ≫\n NatTrans.app (add m₁ (m₂ + m₃)).hom X ≫ NatTrans.app (add m₂ m₃).hom ((F m₁).obj X))\n _auto✝\nzero_add_hom_app :\n autoParam\n (∀ (n : A) (X : C),\n NatTrans.app (add 0 n).hom X =\n eqToHom (_ : (F (0 + n)).obj X = (F n).obj ((𝟭 C).obj X)) ≫ (F n).map (NatTrans.app zero.inv X))\n _auto✝\nn : A\nX : C\n⊢ (F (n + 0)).obj X = (𝟭 C).obj ((F n).obj X)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nF : A → C ⥤ C\nzero : F 0 ≅ 𝟭 C\nadd : (n m : A) → F (n + m) ≅ F n ⋙ F m\nassoc_hom_app :\n autoParam\n (∀ (m₁ m₂ m₃ : A) (X : C),\n NatTrans.app (add (m₁ + m₂) m₃).hom X ≫ (F m₃).map (NatTrans.app (add m₁ m₂).hom X) =\n eqToHom (_ : (F (m₁ + m₂ + m₃)).obj X = (F (m₁ + (m₂ + m₃))).obj X) ≫\n NatTrans.app (add m₁ (m₂ + m₃)).hom X ≫ NatTrans.app (add m₂ m₃).hom ((F m₁).obj X))\n _auto✝\nzero_add_hom_app :\n autoParam\n (∀ (n : A) (X : C),\n NatTrans.app (add 0 n).hom X =\n eqToHom (_ : (F (0 + n)).obj X = (F n).obj ((𝟭 C).obj X)) ≫ (F n).map (NatTrans.app zero.inv X))\n _auto✝\nn : A\nX : C\n⊢ (F (n + 0)).obj X = (F n).obj X\n[PROOFSTEP]\nrw [add_zero]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nm₁ m₂ m₃ : A\nX : C\n⊢ (F h (m₁ + (m₂ + m₃))).obj X = (F h (m₁ + m₂ + m₃)).obj X\n[PROOFSTEP]\nrw [add_assoc]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nm₁ m₂ m₃ : A\nX : C\n⊢ (F h m₃).map (NatTrans.app (add h m₁ m₂).inv X) ≫ NatTrans.app (add h (m₁ + m₂) m₃).inv X =\n NatTrans.app (add h m₂ m₃).inv ((F h m₁).obj X) ≫\n NatTrans.app (add h m₁ (m₂ + m₃)).inv X ≫ eqToHom (_ : (F h (m₁ + (m₂ + m₃))).obj X = (F h (m₁ + m₂ + m₃)).obj X)\n[PROOFSTEP]\nrw [← cancel_mono ((h.add (m₁ + m₂) m₃).hom.app X ≫ (h.F m₃).map ((h.add m₁ m₂).hom.app X)), Category.assoc,\n Category.assoc, Category.assoc, Iso.inv_hom_id_app_assoc, ← Functor.map_comp, Iso.inv_hom_id_app, Functor.map_id,\n h.assoc_hom_app, eqToHom_trans_assoc, eqToHom_refl, Category.id_comp, Iso.inv_hom_id_app_assoc, Iso.inv_hom_id_app]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nm₁ m₂ m₃ : A\nX : C\n⊢ 𝟙 ((F h m₃).obj ((F h m₁ ⋙ F h m₂).obj X)) = 𝟙 ((F h m₂ ⋙ F h m₃).obj ((F h m₁).obj X))\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nn : A\nX : C\n⊢ (F h n).obj ((𝟭 C).obj X) = (F h (0 + n)).obj X\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nn : A\nX : C\n⊢ (F h n).obj X = (F h (0 + n)).obj X\n[PROOFSTEP]\nrw [zero_add]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nn : A\nX : C\n⊢ NatTrans.app (add h 0 n).inv X =\n (F h n).map (NatTrans.app h.zero.hom X) ≫ eqToHom (_ : (F h n).obj ((𝟭 C).obj X) = (F h (0 + n)).obj X)\n[PROOFSTEP]\nrw [← cancel_epi ((h.add 0 n).hom.app X), Iso.hom_inv_id_app, h.zero_add_hom_app, Category.assoc, ←\n Functor.map_comp_assoc, Iso.inv_hom_id_app, Functor.map_id, Category.id_comp, eqToHom_trans, eqToHom_refl]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nn : A\nX : C\n⊢ (𝟭 C).obj ((F h n).obj X) = (F h (n + 0)).obj X\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nn : A\nX : C\n⊢ (F h n).obj X = (F h (n + 0)).obj X\n[PROOFSTEP]\nrw [add_zero]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nn : A\nX : C\n⊢ NatTrans.app (add h n 0).inv X =\n NatTrans.app h.zero.hom ((F h n).obj X) ≫ eqToHom (_ : (𝟭 C).obj ((F h n).obj X) = (F h (n + 0)).obj X)\n[PROOFSTEP]\nrw [← cancel_epi ((h.add n 0).hom.app X), Iso.hom_inv_id_app, h.add_zero_hom_app, Category.assoc,\n Iso.inv_hom_id_app_assoc, eqToHom_trans, eqToHom_refl]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nsrc✝ : Discrete A ⥤ C ⥤ C := Discrete.functor h.F\n⊢ ∀ {X Y X' Y' : Discrete A} (f : X ⟶ Y) (g : X' ⟶ Y'),\n MonoidalCategory.tensorHom ((Functor.mk src✝.toPrefunctor).map f) ((Functor.mk src✝.toPrefunctor).map g) ≫\n (fun m n => (ShiftMkCore.add h m.as n.as).inv) Y Y' =\n (fun m n => (ShiftMkCore.add h m.as n.as).inv) X X' ≫\n (Functor.mk src✝.toPrefunctor).map (MonoidalCategory.tensorHom f g)\n[PROOFSTEP]\nrintro ⟨X⟩ ⟨Y⟩ ⟨X'⟩ ⟨Y'⟩ ⟨⟨⟨rfl⟩⟩⟩ ⟨⟨⟨rfl⟩⟩⟩\n[GOAL]\ncase mk.mk.mk.mk.up.up.refl.up.up.refl\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nsrc✝ : Discrete A ⥤ C ⥤ C := Discrete.functor h.F\nX X' : A\n⊢ MonoidalCategory.tensorHom\n ((Functor.mk src✝.toPrefunctor).map { down := { down := (_ : { as := X }.as = { as := X }.as) } })\n ((Functor.mk src✝.toPrefunctor).map { down := { down := (_ : { as := X' }.as = { as := X' }.as) } }) ≫\n (fun m n => (ShiftMkCore.add h m.as n.as).inv) { as := X } { as := X' } =\n (fun m n => (ShiftMkCore.add h m.as n.as).inv) { as := X } { as := X' } ≫\n (Functor.mk src✝.toPrefunctor).map\n (MonoidalCategory.tensorHom { down := { down := (_ : { as := X }.as = { as := X }.as) } }\n { down := { down := (_ : { as := X' }.as = { as := X' }.as) } })\n[PROOFSTEP]\next\n[GOAL]\ncase mk.mk.mk.mk.up.up.refl.up.up.refl.w.h\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nsrc✝ : Discrete A ⥤ C ⥤ C := Discrete.functor h.F\nX X' : A\nx✝ : C\n⊢ NatTrans.app\n (MonoidalCategory.tensorHom\n ((Functor.mk src✝.toPrefunctor).map { down := { down := (_ : { as := X }.as = { as := X }.as) } })\n ((Functor.mk src✝.toPrefunctor).map { down := { down := (_ : { as := X' }.as = { as := X' }.as) } }) ≫\n (fun m n => (ShiftMkCore.add h m.as n.as).inv) { as := X } { as := X' })\n x✝ =\n NatTrans.app\n ((fun m n => (ShiftMkCore.add h m.as n.as).inv) { as := X } { as := X' } ≫\n (Functor.mk src✝.toPrefunctor).map\n (MonoidalCategory.tensorHom { down := { down := (_ : { as := X }.as = { as := X }.as) } }\n { down := { down := (_ : { as := X' }.as = { as := X' }.as) } }))\n x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.mk.mk.mk.up.up.refl.up.up.refl.w.h\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nsrc✝ : Discrete A ⥤ C ⥤ C := Discrete.functor h.F\nX X' : A\nx✝ : C\n⊢ (NatTrans.app ((Discrete.functor h.F).map { down := { down := (_ : X' = X') } }) ((ShiftMkCore.F h X).obj x✝) ≫\n (ShiftMkCore.F h X').map (NatTrans.app ((Discrete.functor h.F).map { down := { down := (_ : X = X) } }) x✝)) ≫\n NatTrans.app (ShiftMkCore.add h X X').inv x✝ =\n NatTrans.app (ShiftMkCore.add h X X').inv x✝ ≫\n NatTrans.app\n ((Discrete.functor h.F).map\n (MonoidalCategory.tensorHom { down := { down := (_ : X = X) } } { down := { down := (_ : X' = X') } }))\n x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nsrc✝ : Discrete A ⥤ C ⥤ C := Discrete.functor h.F\n⊢ ∀ (X Y Z : Discrete A),\n MonoidalCategory.tensorHom ((fun m n => (ShiftMkCore.add h m.as n.as).inv) X Y)\n (𝟙 ((Functor.mk src✝.toPrefunctor).obj Z)) ≫\n (fun m n => (ShiftMkCore.add h m.as n.as).inv) (MonoidalCategory.tensorObj X Y) Z ≫\n (Functor.mk src✝.toPrefunctor).map (MonoidalCategory.associator X Y Z).hom =\n (MonoidalCategory.associator ((Functor.mk src✝.toPrefunctor).obj X) ((Functor.mk src✝.toPrefunctor).obj Y)\n ((Functor.mk src✝.toPrefunctor).obj Z)).hom ≫\n MonoidalCategory.tensorHom (𝟙 ((Functor.mk src✝.toPrefunctor).obj X))\n ((fun m n => (ShiftMkCore.add h m.as n.as).inv) Y Z) ≫\n (fun m n => (ShiftMkCore.add h m.as n.as).inv) X (MonoidalCategory.tensorObj Y Z)\n[PROOFSTEP]\nrintro ⟨m₁⟩ ⟨m₂⟩ ⟨m₃⟩\n[GOAL]\ncase mk.mk.mk\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nsrc✝ : Discrete A ⥤ C ⥤ C := Discrete.functor h.F\nm₁ m₂ m₃ : A\n⊢ MonoidalCategory.tensorHom ((fun m n => (ShiftMkCore.add h m.as n.as).inv) { as := m₁ } { as := m₂ })\n (𝟙 ((Functor.mk src✝.toPrefunctor).obj { as := m₃ })) ≫\n (fun m n => (ShiftMkCore.add h m.as n.as).inv) (MonoidalCategory.tensorObj { as := m₁ } { as := m₂ })\n { as := m₃ } ≫\n (Functor.mk src✝.toPrefunctor).map (MonoidalCategory.associator { as := m₁ } { as := m₂ } { as := m₃ }).hom =\n (MonoidalCategory.associator ((Functor.mk src✝.toPrefunctor).obj { as := m₁ })\n ((Functor.mk src✝.toPrefunctor).obj { as := m₂ }) ((Functor.mk src✝.toPrefunctor).obj { as := m₃ })).hom ≫\n MonoidalCategory.tensorHom (𝟙 ((Functor.mk src✝.toPrefunctor).obj { as := m₁ }))\n ((fun m n => (ShiftMkCore.add h m.as n.as).inv) { as := m₂ } { as := m₃ }) ≫\n (fun m n => (ShiftMkCore.add h m.as n.as).inv) { as := m₁ }\n (MonoidalCategory.tensorObj { as := m₂ } { as := m₃ })\n[PROOFSTEP]\next X\n[GOAL]\ncase mk.mk.mk.w.h\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nsrc✝ : Discrete A ⥤ C ⥤ C := Discrete.functor h.F\nm₁ m₂ m₃ : A\nX : C\n⊢ NatTrans.app\n (MonoidalCategory.tensorHom ((fun m n => (ShiftMkCore.add h m.as n.as).inv) { as := m₁ } { as := m₂ })\n (𝟙 ((Functor.mk src✝.toPrefunctor).obj { as := m₃ })) ≫\n (fun m n => (ShiftMkCore.add h m.as n.as).inv) (MonoidalCategory.tensorObj { as := m₁ } { as := m₂ })\n { as := m₃ } ≫\n (Functor.mk src✝.toPrefunctor).map (MonoidalCategory.associator { as := m₁ } { as := m₂ } { as := m₃ }).hom)\n X =\n NatTrans.app\n ((MonoidalCategory.associator ((Functor.mk src✝.toPrefunctor).obj { as := m₁ })\n ((Functor.mk src✝.toPrefunctor).obj { as := m₂ }) ((Functor.mk src✝.toPrefunctor).obj { as := m₃ })).hom ≫\n MonoidalCategory.tensorHom (𝟙 ((Functor.mk src✝.toPrefunctor).obj { as := m₁ }))\n ((fun m n => (ShiftMkCore.add h m.as n.as).inv) { as := m₂ } { as := m₃ }) ≫\n (fun m n => (ShiftMkCore.add h m.as n.as).inv) { as := m₁ }\n (MonoidalCategory.tensorObj { as := m₂ } { as := m₃ }))\n X\n[PROOFSTEP]\nsimp [endofunctorMonoidalCategory, h.assoc_inv_app_assoc]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nsrc✝ : Discrete A ⥤ C ⥤ C := Discrete.functor h.F\n⊢ ∀ (X : Discrete A),\n (MonoidalCategory.leftUnitor ((Functor.mk src✝.toPrefunctor).obj X)).hom =\n MonoidalCategory.tensorHom h.zero.inv (𝟙 ((Functor.mk src✝.toPrefunctor).obj X)) ≫\n (fun m n => (ShiftMkCore.add h m.as n.as).inv) (MonoidalCategory.tensorUnit (Discrete A)) X ≫\n (Functor.mk src✝.toPrefunctor).map (MonoidalCategory.leftUnitor X).hom\n[PROOFSTEP]\nrintro ⟨n⟩\n[GOAL]\ncase mk\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nsrc✝ : Discrete A ⥤ C ⥤ C := Discrete.functor h.F\nn : A\n⊢ (MonoidalCategory.leftUnitor ((Functor.mk src✝.toPrefunctor).obj { as := n })).hom =\n MonoidalCategory.tensorHom h.zero.inv (𝟙 ((Functor.mk src✝.toPrefunctor).obj { as := n })) ≫\n (fun m n => (ShiftMkCore.add h m.as n.as).inv) (MonoidalCategory.tensorUnit (Discrete A)) { as := n } ≫\n (Functor.mk src✝.toPrefunctor).map (MonoidalCategory.leftUnitor { as := n }).hom\n[PROOFSTEP]\next X\n[GOAL]\ncase mk.w.h\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nsrc✝ : Discrete A ⥤ C ⥤ C := Discrete.functor h.F\nn : A\nX : C\n⊢ NatTrans.app (MonoidalCategory.leftUnitor ((Functor.mk src✝.toPrefunctor).obj { as := n })).hom X =\n NatTrans.app\n (MonoidalCategory.tensorHom h.zero.inv (𝟙 ((Functor.mk src✝.toPrefunctor).obj { as := n })) ≫\n (fun m n => (ShiftMkCore.add h m.as n.as).inv) (MonoidalCategory.tensorUnit (Discrete A)) { as := n } ≫\n (Functor.mk src✝.toPrefunctor).map (MonoidalCategory.leftUnitor { as := n }).hom)\n X\n[PROOFSTEP]\nsimp [endofunctorMonoidalCategory, h.zero_add_inv_app, ← Functor.map_comp]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nsrc✝ : Discrete A ⥤ C ⥤ C := Discrete.functor h.F\n⊢ ∀ (X : Discrete A),\n (MonoidalCategory.rightUnitor ((Functor.mk src✝.toPrefunctor).obj X)).hom =\n MonoidalCategory.tensorHom (𝟙 ((Functor.mk src✝.toPrefunctor).obj X)) h.zero.inv ≫\n (fun m n => (ShiftMkCore.add h m.as n.as).inv) X (MonoidalCategory.tensorUnit (Discrete A)) ≫\n (Functor.mk src✝.toPrefunctor).map (MonoidalCategory.rightUnitor X).hom\n[PROOFSTEP]\nrintro ⟨n⟩\n[GOAL]\ncase mk\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nsrc✝ : Discrete A ⥤ C ⥤ C := Discrete.functor h.F\nn : A\n⊢ (MonoidalCategory.rightUnitor ((Functor.mk src✝.toPrefunctor).obj { as := n })).hom =\n MonoidalCategory.tensorHom (𝟙 ((Functor.mk src✝.toPrefunctor).obj { as := n })) h.zero.inv ≫\n (fun m n => (ShiftMkCore.add h m.as n.as).inv) { as := n } (MonoidalCategory.tensorUnit (Discrete A)) ≫\n (Functor.mk src✝.toPrefunctor).map (MonoidalCategory.rightUnitor { as := n }).hom\n[PROOFSTEP]\next X\n[GOAL]\ncase mk.w.h\nC : Type u\nA : Type u_1\ninst✝¹ : Category.{v, u} C\ninst✝ : AddMonoid A\nh : ShiftMkCore C A\nsrc✝ : Discrete A ⥤ C ⥤ C := Discrete.functor h.F\nn : A\nX : C\n⊢ NatTrans.app (MonoidalCategory.rightUnitor ((Functor.mk src✝.toPrefunctor).obj { as := n })).hom X =\n NatTrans.app\n (MonoidalCategory.tensorHom (𝟙 ((Functor.mk src✝.toPrefunctor).obj { as := n })) h.zero.inv ≫\n (fun m n => (ShiftMkCore.add h m.as n.as).inv) { as := n } (MonoidalCategory.tensorUnit (Discrete A)) ≫\n (Functor.mk src✝.toPrefunctor).map (MonoidalCategory.rightUnitor { as := n }).hom)\n X\n[PROOFSTEP]\nsimp [endofunctorMonoidalCategory, h.add_zero_inv_app]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\ni j k : A\nh : i + j = k\n⊢ shiftFunctor C k = shiftFunctor C (i + j)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\ni j : A\n⊢ shiftFunctorAdd' C i j (i + j) (_ : i + j = i + j) = shiftFunctorAdd C i j\n[PROOFSTEP]\next1\n[GOAL]\ncase w\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\ni j : A\n⊢ (shiftFunctorAdd' C i j (i + j) (_ : i + j = i + j)).hom = (shiftFunctorAdd C i j).hom\n[PROOFSTEP]\napply Category.id_comp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\nh : ShiftMkCore C A\na : A\n⊢ shiftFunctor C a = F h a\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\nh : ShiftMkCore C A\n⊢ shiftFunctorZero C A = h.zero\n[PROOFSTEP]\nletI := hasShiftMk C A h\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\nh : ShiftMkCore C A\nthis : HasShift C A := hasShiftMk C A h\n⊢ shiftFunctorZero C A = h.zero\n[PROOFSTEP]\ndsimp [shiftFunctorZero]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\nh : ShiftMkCore C A\nthis : HasShift C A := hasShiftMk C A h\n⊢ (MonoidalFunctor.εIso (shiftMonoidalFunctor C A)).symm = h.zero\n[PROOFSTEP]\nchange (shiftFunctorZero C A).symm.symm = h.zero.symm.symm\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\nh : ShiftMkCore C A\nthis : HasShift C A := hasShiftMk C A h\n⊢ (shiftFunctorZero C A).symm.symm = h.zero.symm.symm\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_I\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\nh : ShiftMkCore C A\nthis : HasShift C A := hasShiftMk C A h\n⊢ (shiftFunctorZero C A).symm = h.zero.symm\n[PROOFSTEP]\next\n[GOAL]\ncase e_I.w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\nh : ShiftMkCore C A\nthis : HasShift C A := hasShiftMk C A h\nx✝ : C\n⊢ NatTrans.app (shiftFunctorZero C A).symm.hom x✝ = NatTrans.app h.zero.symm.hom x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\nh : ShiftMkCore C A\na b : A\n⊢ shiftFunctorAdd C a b = add h a b\n[PROOFSTEP]\nletI := hasShiftMk C A h\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\nh : ShiftMkCore C A\na b : A\nthis : HasShift C A := hasShiftMk C A h\n⊢ shiftFunctorAdd C a b = add h a b\n[PROOFSTEP]\nchange (shiftFunctorAdd C a b).symm.symm = (h.add a b).symm.symm\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\nh : ShiftMkCore C A\na b : A\nthis : HasShift C A := hasShiftMk C A h\n⊢ (shiftFunctorAdd C a b).symm.symm = (add h a b).symm.symm\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_I\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\nh : ShiftMkCore C A\na b : A\nthis : HasShift C A := hasShiftMk C A h\n⊢ (shiftFunctorAdd C a b).symm = (add h a b).symm\n[PROOFSTEP]\next\n[GOAL]\ncase e_I.w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\nh : ShiftMkCore C A\na b : A\nthis : HasShift C A := hasShiftMk C A h\nx✝ : C\n⊢ NatTrans.app (shiftFunctorAdd C a b).symm.hom x✝ = NatTrans.app (add h a b).symm.hom x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\n⊢ shiftFunctorAdd' C 0 a a (_ : 0 + a = a) =\n (Functor.leftUnitor (shiftFunctor C a)).symm ≪≫ isoWhiskerRight (shiftFunctorZero C A).symm (shiftFunctor C a)\n[PROOFSTEP]\next X\n[GOAL]\ncase w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ NatTrans.app (shiftFunctorAdd' C 0 a a (_ : 0 + a = a)).hom X =\n NatTrans.app\n ((Functor.leftUnitor (shiftFunctor C a)).symm ≪≫\n isoWhiskerRight (shiftFunctorZero C A).symm (shiftFunctor C a)).hom\n X\n[PROOFSTEP]\ndsimp [shiftFunctorAdd', shiftFunctorZero, shiftFunctor]\n[GOAL]\ncase w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ NatTrans.app (eqToHom (_ : shiftFunctor C a = shiftFunctor C (0 + a))) X ≫\n NatTrans.app (shiftFunctorAdd C 0 a).hom X =\n 𝟙 (((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a }).obj X) ≫\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a }).map\n (NatTrans.app (shiftMonoidalFunctor C A).toLaxMonoidalFunctor.ε X)\n[PROOFSTEP]\nsimp only [eqToHom_app, obj_ε_app, Discrete.addMonoidal_leftUnitor, eqToIso.inv, eqToHom_map, Category.id_comp]\n[GOAL]\ncase w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ eqToHom\n (_ :\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a }).obj X =\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := 0 + a }).obj X) ≫\n NatTrans.app (shiftFunctorAdd C 0 a).hom X =\n eqToHom\n (_ :\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a }).obj X =\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj\n (MonoidalCategory.tensorObj MonoidalCategory.tensorUnit' { as := a })).obj\n X) ≫\n NatTrans.app\n (MonoidalFunctor.μIso (shiftMonoidalFunctor C A) (MonoidalCategory.tensorUnit (Discrete A)) { as := a }).inv X\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\n⊢ shiftFunctorAdd' C a 0 a (_ : a + 0 = a) =\n (Functor.rightUnitor (shiftFunctor C a)).symm ≪≫ isoWhiskerLeft (shiftFunctor C a) (shiftFunctorZero C A).symm\n[PROOFSTEP]\next\n[GOAL]\ncase w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nx✝ : C\n⊢ NatTrans.app (shiftFunctorAdd' C a 0 a (_ : a + 0 = a)).hom x✝ =\n NatTrans.app\n ((Functor.rightUnitor (shiftFunctor C a)).symm ≪≫\n isoWhiskerLeft (shiftFunctor C a) (shiftFunctorZero C A).symm).hom\n x✝\n[PROOFSTEP]\ndsimp [shiftFunctorAdd', shiftFunctorZero, shiftFunctor]\n[GOAL]\ncase w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nx✝ : C\n⊢ NatTrans.app (eqToHom (_ : shiftFunctor C a = shiftFunctor C (a + 0))) x✝ ≫\n NatTrans.app (shiftFunctorAdd C a 0).hom x✝ =\n 𝟙 (((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a }).obj x✝) ≫\n NatTrans.app (shiftMonoidalFunctor C A).toLaxMonoidalFunctor.ε\n (((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a }).obj x✝)\n[PROOFSTEP]\nsimp only [eqToHom_app, ε_app_obj, Discrete.addMonoidal_rightUnitor, eqToIso.inv, eqToHom_map, Category.id_comp]\n[GOAL]\ncase w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nx✝ : C\n⊢ eqToHom\n (_ :\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a }).obj x✝ =\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a + 0 }).obj x✝) ≫\n NatTrans.app (shiftFunctorAdd C a 0).hom x✝ =\n eqToHom\n (_ :\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a }).obj x✝ =\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj\n (MonoidalCategory.tensorObj { as := a } MonoidalCategory.tensorUnit')).obj\n x✝) ≫\n NatTrans.app\n (MonoidalFunctor.μIso (shiftMonoidalFunctor C A) { as := a } (MonoidalCategory.tensorUnit (Discrete A))).inv x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ a₁₂ a₂₃ a₁₂₃ : A\nh₁₂ : a₁ + a₂ = a₁₂\nh₂₃ : a₂ + a₃ = a₂₃\nh₁₂₃ : a₁ + a₂ + a₃ = a₁₂₃\n⊢ a₁₂ + a₃ = a₁₂₃\n[PROOFSTEP]\nrw [← h₁₂, h₁₂₃]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ a₁₂ a₂₃ a₁₂₃ : A\nh₁₂ : a₁ + a₂ = a₁₂\nh₂₃ : a₂ + a₃ = a₂₃\nh₁₂₃ : a₁ + a₂ + a₃ = a₁₂₃\n⊢ a₁ + a₂₃ = a₁₂₃\n[PROOFSTEP]\nrw [← h₂₃, ← add_assoc, h₁₂₃]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ a₁₂ a₂₃ a₁₂₃ : A\nh₁₂ : a₁ + a₂ = a₁₂\nh₂₃ : a₂ + a₃ = a₂₃\nh₁₂₃ : a₁ + a₂ + a₃ = a₁₂₃\n⊢ shiftFunctorAdd' C a₁₂ a₃ a₁₂₃ (_ : a₁₂ + a₃ = a₁₂₃) ≪≫\n isoWhiskerRight (shiftFunctorAdd' C a₁ a₂ a₁₂ h₁₂) (shiftFunctor C a₃) ≪≫\n Functor.associator (shiftFunctor C a₁) (shiftFunctor C a₂) (shiftFunctor C a₃) =\n shiftFunctorAdd' C a₁ a₂₃ a₁₂₃ (_ : a₁ + a₂₃ = a₁₂₃) ≪≫\n isoWhiskerLeft (shiftFunctor C a₁) (shiftFunctorAdd' C a₂ a₃ a₂₃ h₂₃)\n[PROOFSTEP]\nsubst h₁₂ h₂₃ h₁₂₃\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ : A\n⊢ shiftFunctorAdd' C (a₁ + a₂) a₃ (a₁ + a₂ + a₃) (_ : a₁ + a₂ + a₃ = a₁ + a₂ + a₃) ≪≫\n isoWhiskerRight (shiftFunctorAdd' C a₁ a₂ (a₁ + a₂) (_ : a₁ + a₂ = a₁ + a₂)) (shiftFunctor C a₃) ≪≫\n Functor.associator (shiftFunctor C a₁) (shiftFunctor C a₂) (shiftFunctor C a₃) =\n shiftFunctorAdd' C a₁ (a₂ + a₃) (a₁ + a₂ + a₃) (_ : a₁ + (a₂ + a₃) = a₁ + a₂ + a₃) ≪≫\n isoWhiskerLeft (shiftFunctor C a₁) (shiftFunctorAdd' C a₂ a₃ (a₂ + a₃) (_ : a₂ + a₃ = a₂ + a₃))\n[PROOFSTEP]\next X\n[GOAL]\ncase w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ : A\nX : C\n⊢ NatTrans.app\n (shiftFunctorAdd' C (a₁ + a₂) a₃ (a₁ + a₂ + a₃) (_ : a₁ + a₂ + a₃ = a₁ + a₂ + a₃) ≪≫\n isoWhiskerRight (shiftFunctorAdd' C a₁ a₂ (a₁ + a₂) (_ : a₁ + a₂ = a₁ + a₂)) (shiftFunctor C a₃) ≪≫\n Functor.associator (shiftFunctor C a₁) (shiftFunctor C a₂) (shiftFunctor C a₃)).hom\n X =\n NatTrans.app\n (shiftFunctorAdd' C a₁ (a₂ + a₃) (a₁ + a₂ + a₃) (_ : a₁ + (a₂ + a₃) = a₁ + a₂ + a₃) ≪≫\n isoWhiskerLeft (shiftFunctor C a₁) (shiftFunctorAdd' C a₂ a₃ (a₂ + a₃) (_ : a₂ + a₃ = a₂ + a₃))).hom\n X\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ : A\nX : C\n⊢ NatTrans.app (shiftFunctorAdd' C (a₁ + a₂) a₃ (a₁ + a₂ + a₃) (_ : a₁ + a₂ + a₃ = a₁ + a₂ + a₃)).hom X ≫\n (shiftFunctor C a₃).map (NatTrans.app (shiftFunctorAdd' C a₁ a₂ (a₁ + a₂) (_ : a₁ + a₂ = a₁ + a₂)).hom X) ≫\n 𝟙 ((shiftFunctor C a₃).obj ((shiftFunctor C a₂).obj ((shiftFunctor C a₁).obj X))) =\n NatTrans.app (shiftFunctorAdd' C a₁ (a₂ + a₃) (a₁ + a₂ + a₃) (_ : a₁ + (a₂ + a₃) = a₁ + a₂ + a₃)).hom X ≫\n NatTrans.app (shiftFunctorAdd' C a₂ a₃ (a₂ + a₃) (_ : a₂ + a₃ = a₂ + a₃)).hom ((shiftFunctor C a₁).obj X)\n[PROOFSTEP]\nsimp only [shiftFunctorAdd'_eq_shiftFunctorAdd, Category.comp_id]\n[GOAL]\ncase w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ : A\nX : C\n⊢ NatTrans.app (shiftFunctorAdd C (a₁ + a₂) a₃).hom X ≫\n (shiftFunctor C a₃).map (NatTrans.app (shiftFunctorAdd C a₁ a₂).hom X) =\n NatTrans.app (shiftFunctorAdd' C a₁ (a₂ + a₃) (a₁ + a₂ + a₃) (_ : a₁ + (a₂ + a₃) = a₁ + a₂ + a₃)).hom X ≫\n NatTrans.app (shiftFunctorAdd C a₂ a₃).hom ((shiftFunctor C a₁).obj X)\n[PROOFSTEP]\ndsimp [shiftFunctorAdd']\n[GOAL]\ncase w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ : A\nX : C\n⊢ NatTrans.app (shiftFunctorAdd C (a₁ + a₂) a₃).hom X ≫\n (shiftFunctor C a₃).map (NatTrans.app (shiftFunctorAdd C a₁ a₂).hom X) =\n (NatTrans.app (eqToHom (_ : shiftFunctor C (a₁ + a₂ + a₃) = shiftFunctor C (a₁ + (a₂ + a₃)))) X ≫\n NatTrans.app (shiftFunctorAdd C a₁ (a₂ + a₃)).hom X) ≫\n NatTrans.app (shiftFunctorAdd C a₂ a₃).hom ((shiftFunctor C a₁).obj X)\n[PROOFSTEP]\nsimp only [eqToHom_app]\n[GOAL]\ncase w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ : A\nX : C\n⊢ NatTrans.app (shiftFunctorAdd C (a₁ + a₂) a₃).hom X ≫\n (shiftFunctor C a₃).map (NatTrans.app (shiftFunctorAdd C a₁ a₂).hom X) =\n (eqToHom (_ : (shiftFunctor C (a₁ + a₂ + a₃)).obj X = (shiftFunctor C (a₁ + (a₂ + a₃))).obj X) ≫\n NatTrans.app (shiftFunctorAdd C a₁ (a₂ + a₃)).hom X) ≫\n NatTrans.app (shiftFunctorAdd C a₂ a₃).hom ((shiftFunctor C a₁).obj X)\n[PROOFSTEP]\ndsimp [shiftFunctorAdd, shiftFunctor]\n[GOAL]\ncase w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ : A\nX : C\n⊢ NatTrans.app (MonoidalFunctor.μIso (shiftMonoidalFunctor C A) { as := a₁ + a₂ } { as := a₃ }).inv X ≫\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a₃ }).map\n (NatTrans.app (MonoidalFunctor.μIso (shiftMonoidalFunctor C A) { as := a₁ } { as := a₂ }).inv X) =\n (eqToHom\n (_ :\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a₁ + a₂ + a₃ }).obj X =\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a₁ + (a₂ + a₃) }).obj X) ≫\n NatTrans.app (MonoidalFunctor.μIso (shiftMonoidalFunctor C A) { as := a₁ } { as := a₂ + a₃ }).inv X) ≫\n NatTrans.app (MonoidalFunctor.μIso (shiftMonoidalFunctor C A) { as := a₂ } { as := a₃ }).inv\n (((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a₁ }).obj X)\n[PROOFSTEP]\nsimp only [obj_μ_inv_app, Discrete.addMonoidal_associator, eqToIso.hom, eqToHom_map, eqToHom_app]\n[GOAL]\ncase w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ : A\nX : C\n⊢ NatTrans.app (MonoidalFunctor.μIso (shiftMonoidalFunctor C A) { as := a₁ + a₂ } { as := a₃ }).inv X ≫\n NatTrans.app\n (LaxMonoidalFunctor.μ (shiftMonoidalFunctor C A).toLaxMonoidalFunctor\n (MonoidalCategory.tensorObj { as := a₁ } { as := a₂ }) { as := a₃ })\n X ≫\n eqToHom\n (_ :\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj\n (MonoidalCategory.tensorObj (MonoidalCategory.tensorObj { as := a₁ } { as := a₂ })\n { as := a₃ })).obj\n X =\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj\n (MonoidalCategory.tensorObj { as := a₁ }\n (MonoidalCategory.tensorObj { as := a₂ } { as := a₃ }))).obj\n X) ≫\n NatTrans.app\n (MonoidalFunctor.μIso (shiftMonoidalFunctor C A) { as := a₁ }\n (MonoidalCategory.tensorObj { as := a₂ } { as := a₃ })).inv\n X ≫\n NatTrans.app (MonoidalFunctor.μIso (shiftMonoidalFunctor C A) { as := a₂ } { as := a₃ }).inv\n (((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a₁ }).obj X) =\n (eqToHom\n (_ :\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a₁ + a₂ + a₃ }).obj X =\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a₁ + (a₂ + a₃) }).obj X) ≫\n NatTrans.app (MonoidalFunctor.μIso (shiftMonoidalFunctor C A) { as := a₁ } { as := a₂ + a₃ }).inv X) ≫\n NatTrans.app (MonoidalFunctor.μIso (shiftMonoidalFunctor C A) { as := a₂ } { as := a₃ }).inv\n (((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a₁ }).obj X)\n[PROOFSTEP]\nerw [Iso.inv_hom_id_app_assoc, Category.assoc]\n[GOAL]\ncase w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ : A\nX : C\n⊢ eqToHom\n (_ :\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj\n (MonoidalCategory.tensorObj (MonoidalCategory.tensorObj { as := a₁ } { as := a₂ }) { as := a₃ })).obj\n X =\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj\n (MonoidalCategory.tensorObj { as := a₁ } (MonoidalCategory.tensorObj { as := a₂ } { as := a₃ }))).obj\n X) ≫\n NatTrans.app\n (MonoidalFunctor.μIso (shiftMonoidalFunctor C A) { as := a₁ }\n (MonoidalCategory.tensorObj { as := a₂ } { as := a₃ })).inv\n X ≫\n NatTrans.app (MonoidalFunctor.μIso (shiftMonoidalFunctor C A) { as := a₂ } { as := a₃ }).inv\n (((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a₁ }).obj X) =\n eqToHom\n (_ :\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a₁ + a₂ + a₃ }).obj X =\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a₁ + (a₂ + a₃) }).obj X) ≫\n NatTrans.app (MonoidalFunctor.μIso (shiftMonoidalFunctor C A) { as := a₁ } { as := a₂ + a₃ }).inv X ≫\n NatTrans.app (MonoidalFunctor.μIso (shiftMonoidalFunctor C A) { as := a₂ } { as := a₃ }).inv\n (((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj { as := a₁ }).obj X)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ : A\n⊢ shiftFunctorAdd C (a₁ + a₂) a₃ ≪≫\n isoWhiskerRight (shiftFunctorAdd C a₁ a₂) (shiftFunctor C a₃) ≪≫\n Functor.associator (shiftFunctor C a₁) (shiftFunctor C a₂) (shiftFunctor C a₃) =\n shiftFunctorAdd' C a₁ (a₂ + a₃) (a₁ + a₂ + a₃) (_ : a₁ + (a₂ + a₃) = a₁ + a₂ + a₃) ≪≫\n isoWhiskerLeft (shiftFunctor C a₁) (shiftFunctorAdd C a₂ a₃)\n[PROOFSTEP]\next X\n[GOAL]\ncase w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ : A\nX : C\n⊢ NatTrans.app\n (shiftFunctorAdd C (a₁ + a₂) a₃ ≪≫\n isoWhiskerRight (shiftFunctorAdd C a₁ a₂) (shiftFunctor C a₃) ≪≫\n Functor.associator (shiftFunctor C a₁) (shiftFunctor C a₂) (shiftFunctor C a₃)).hom\n X =\n NatTrans.app\n (shiftFunctorAdd' C a₁ (a₂ + a₃) (a₁ + a₂ + a₃) (_ : a₁ + (a₂ + a₃) = a₁ + a₂ + a₃) ≪≫\n isoWhiskerLeft (shiftFunctor C a₁) (shiftFunctorAdd C a₂ a₃)).hom\n X\n[PROOFSTEP]\nsimpa [shiftFunctorAdd'_eq_shiftFunctorAdd] using\n NatTrans.congr_app (congr_arg Iso.hom (shiftFunctorAdd'_assoc C a₁ a₂ a₃ _ _ _ rfl rfl rfl)) X\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ NatTrans.app (shiftFunctorAdd' C 0 a a (_ : 0 + a = a)).hom X =\n (shiftFunctor C a).map (NatTrans.app (shiftFunctorZero C A).inv X)\n[PROOFSTEP]\nsimpa using NatTrans.congr_app (congr_arg Iso.hom (shiftFunctorAdd'_zero_add C a)) X\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ (shiftFunctor C (0 + a)).obj X = (shiftFunctor C a).obj ((𝟭 C).obj X)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ (shiftFunctor C (0 + a)).obj X = (shiftFunctor C a).obj X\n[PROOFSTEP]\nrw [zero_add]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ NatTrans.app (shiftFunctorAdd C 0 a).hom X =\n eqToHom (_ : (shiftFunctor C (0 + a)).obj X = (shiftFunctor C a).obj ((𝟭 C).obj X)) ≫\n (shiftFunctor C a).map (NatTrans.app (shiftFunctorZero C A).inv X)\n[PROOFSTEP]\nsimp [← shiftFunctorAdd'_zero_add_hom_app, shiftFunctorAdd']\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ NatTrans.app (shiftFunctorAdd' C 0 a a (_ : 0 + a = a)).inv X =\n (shiftFunctor C a).map (NatTrans.app (shiftFunctorZero C A).hom X)\n[PROOFSTEP]\nsimpa using NatTrans.congr_app (congr_arg Iso.inv (shiftFunctorAdd'_zero_add C a)) X\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ (shiftFunctor C a).obj ((𝟭 C).obj X) = (shiftFunctor C (0 + a)).obj X\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ (shiftFunctor C a).obj X = (shiftFunctor C (0 + a)).obj X\n[PROOFSTEP]\nrw [zero_add]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ NatTrans.app (shiftFunctorAdd C 0 a).inv X =\n (shiftFunctor C a).map (NatTrans.app (shiftFunctorZero C A).hom X) ≫\n eqToHom (_ : (shiftFunctor C a).obj ((𝟭 C).obj X) = (shiftFunctor C (0 + a)).obj X)\n[PROOFSTEP]\nsimp [← shiftFunctorAdd'_zero_add_inv_app, shiftFunctorAdd']\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ NatTrans.app (shiftFunctorAdd' C a 0 a (_ : a + 0 = a)).hom X =\n NatTrans.app (shiftFunctorZero C A).inv ((shiftFunctor C a).obj X)\n[PROOFSTEP]\nsimpa using NatTrans.congr_app (congr_arg Iso.hom (shiftFunctorAdd'_add_zero C a)) X\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ (shiftFunctor C (a + 0)).obj X = (𝟭 C).obj ((shiftFunctor C a).obj X)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ (shiftFunctor C (a + 0)).obj X = (shiftFunctor C a).obj X\n[PROOFSTEP]\nrw [add_zero]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ NatTrans.app (shiftFunctorAdd C a 0).hom X =\n eqToHom (_ : (shiftFunctor C (a + 0)).obj X = (𝟭 C).obj ((shiftFunctor C a).obj X)) ≫\n NatTrans.app (shiftFunctorZero C A).inv ((shiftFunctor C a).obj X)\n[PROOFSTEP]\nsimp [← shiftFunctorAdd'_add_zero_hom_app, shiftFunctorAdd']\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ NatTrans.app (shiftFunctorAdd' C a 0 a (_ : a + 0 = a)).inv X =\n NatTrans.app (shiftFunctorZero C A).hom ((shiftFunctor C a).obj X)\n[PROOFSTEP]\nsimpa using NatTrans.congr_app (congr_arg Iso.inv (shiftFunctorAdd'_add_zero C a)) X\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ (𝟭 C).obj ((shiftFunctor C a).obj X) = (shiftFunctor C (a + 0)).obj X\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ (shiftFunctor C a).obj X = (shiftFunctor C (a + 0)).obj X\n[PROOFSTEP]\nrw [add_zero]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na : A\nX : C\n⊢ NatTrans.app (shiftFunctorAdd C a 0).inv X =\n NatTrans.app (shiftFunctorZero C A).hom ((shiftFunctor C a).obj X) ≫\n eqToHom (_ : (𝟭 C).obj ((shiftFunctor C a).obj X) = (shiftFunctor C (a + 0)).obj X)\n[PROOFSTEP]\nsimp [← shiftFunctorAdd'_add_zero_inv_app, shiftFunctorAdd']\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ a₁₂ a₂₃ a₁₂₃ : A\nh₁₂ : a₁ + a₂ = a₁₂\nh₂₃ : a₂ + a₃ = a₂₃\nh₁₂₃ : a₁ + a₂ + a₃ = a₁₂₃\nX : C\n⊢ a₁₂ + a₃ = a₁₂₃\n[PROOFSTEP]\nrw [← h₁₂, h₁₂₃]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ a₁₂ a₂₃ a₁₂₃ : A\nh₁₂ : a₁ + a₂ = a₁₂\nh₂₃ : a₂ + a₃ = a₂₃\nh₁₂₃ : a₁ + a₂ + a₃ = a₁₂₃\nX : C\n⊢ a₁ + a₂₃ = a₁₂₃\n[PROOFSTEP]\nrw [← h₂₃, ← add_assoc, h₁₂₃]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ a₁₂ a₂₃ a₁₂₃ : A\nh₁₂ : a₁ + a₂ = a₁₂\nh₂₃ : a₂ + a₃ = a₂₃\nh₁₂₃ : a₁ + a₂ + a₃ = a₁₂₃\nX : C\n⊢ NatTrans.app (shiftFunctorAdd' C a₁₂ a₃ a₁₂₃ (_ : a₁₂ + a₃ = a₁₂₃)).hom X ≫\n (shiftFunctor C a₃).map (NatTrans.app (shiftFunctorAdd' C a₁ a₂ a₁₂ h₁₂).hom X) =\n NatTrans.app (shiftFunctorAdd' C a₁ a₂₃ a₁₂₃ (_ : a₁ + a₂₃ = a₁₂₃)).hom X ≫\n NatTrans.app (shiftFunctorAdd' C a₂ a₃ a₂₃ h₂₃).hom ((shiftFunctor C a₁).obj X)\n[PROOFSTEP]\nsimpa using NatTrans.congr_app (congr_arg Iso.hom (shiftFunctorAdd'_assoc C _ _ _ _ _ _ h₁₂ h₂₃ h₁₂₃)) X\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ a₁₂ a₂₃ a₁₂₃ : A\nh₁₂ : a₁ + a₂ = a₁₂\nh₂₃ : a₂ + a₃ = a₂₃\nh₁₂₃ : a₁ + a₂ + a₃ = a₁₂₃\nX : C\n⊢ a₁₂ + a₃ = a₁₂₃\n[PROOFSTEP]\nrw [← h₁₂, h₁₂₃]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ a₁₂ a₂₃ a₁₂₃ : A\nh₁₂ : a₁ + a₂ = a₁₂\nh₂₃ : a₂ + a₃ = a₂₃\nh₁₂₃ : a₁ + a₂ + a₃ = a₁₂₃\nX : C\n⊢ a₁ + a₂₃ = a₁₂₃\n[PROOFSTEP]\nrw [← h₂₃, ← add_assoc, h₁₂₃]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ a₁₂ a₂₃ a₁₂₃ : A\nh₁₂ : a₁ + a₂ = a₁₂\nh₂₃ : a₂ + a₃ = a₂₃\nh₁₂₃ : a₁ + a₂ + a₃ = a₁₂₃\nX : C\n⊢ (shiftFunctor C a₃).map (NatTrans.app (shiftFunctorAdd' C a₁ a₂ a₁₂ h₁₂).inv X) ≫\n NatTrans.app (shiftFunctorAdd' C a₁₂ a₃ a₁₂₃ (_ : a₁₂ + a₃ = a₁₂₃)).inv X =\n NatTrans.app (shiftFunctorAdd' C a₂ a₃ a₂₃ h₂₃).inv ((shiftFunctor C a₁).obj X) ≫\n NatTrans.app (shiftFunctorAdd' C a₁ a₂₃ a₁₂₃ (_ : a₁ + a₂₃ = a₁₂₃)).inv X\n[PROOFSTEP]\nsimpa using NatTrans.congr_app (congr_arg Iso.inv (shiftFunctorAdd'_assoc C _ _ _ _ _ _ h₁₂ h₂₃ h₁₂₃)) X\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ : A\nX : C\n⊢ NatTrans.app (shiftFunctorAdd C (a₁ + a₂) a₃).hom X ≫\n (shiftFunctor C a₃).map (NatTrans.app (shiftFunctorAdd C a₁ a₂).hom X) =\n NatTrans.app (shiftFunctorAdd' C a₁ (a₂ + a₃) (a₁ + a₂ + a₃) (_ : a₁ + (a₂ + a₃) = a₁ + a₂ + a₃)).hom X ≫\n NatTrans.app (shiftFunctorAdd C a₂ a₃).hom ((shiftFunctor C a₁).obj X)\n[PROOFSTEP]\nsimpa using NatTrans.congr_app (congr_arg Iso.hom (shiftFunctorAdd_assoc C a₁ a₂ a₃)) X\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\na₁ a₂ a₃ : A\nX : C\n⊢ (shiftFunctor C a₃).map (NatTrans.app (shiftFunctorAdd C a₁ a₂).inv X) ≫\n NatTrans.app (shiftFunctorAdd C (a₁ + a₂) a₃).inv X =\n NatTrans.app (shiftFunctorAdd C a₂ a₃).inv ((shiftFunctor C a₁).obj X) ≫\n NatTrans.app (shiftFunctorAdd' C a₁ (a₂ + a₃) (a₁ + a₂ + a₃) (_ : a₁ + (a₂ + a₃) = a₁ + a₂ + a₃)).inv X\n[PROOFSTEP]\nsimpa using NatTrans.congr_app (congr_arg Iso.inv (shiftFunctorAdd_assoc C a₁ a₂ a₃)) X\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\nX Y : C\nf : X ⟶ Y\ni j : A\n⊢ (shiftFunctor C j).map ((shiftFunctor C i).map f) =\n (shiftAdd X i j).inv ≫ (shiftFunctor C (i + j)).map f ≫ (shiftAdd Y i j).hom\n[PROOFSTEP]\nsymm\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\nX Y : C\nf : X ⟶ Y\ni j : A\n⊢ (shiftAdd X i j).inv ≫ (shiftFunctor C (i + j)).map f ≫ (shiftAdd Y i j).hom =\n (shiftFunctor C j).map ((shiftFunctor C i).map f)\n[PROOFSTEP]\napply NatIso.naturality_1\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\nX Y : C\nf : X ⟶ Y\n⊢ (shiftFunctor C 0).map f = (shiftZero A X).hom ≫ f ≫ (shiftZero A Y).inv\n[PROOFSTEP]\nsymm\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddMonoid A\ninst✝ : HasShift C A\nX Y : C\nf : X ⟶ Y\n⊢ (shiftZero A X).hom ≫ f ≫ (shiftZero A Y).inv = (shiftFunctor C 0).map f\n[PROOFSTEP]\napply NatIso.naturality_2\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\ni j : A\nh : i + j = 0\n⊢ j + i = 0\n[PROOFSTEP]\nrw [← add_left_inj j, add_assoc, h, zero_add, add_zero]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\ni j : A\nh : i + j = 0\nX : C\n⊢ (shiftFunctor C i).map (NatTrans.app (shiftFunctorCompIsoId C i j h).symm.hom X) ≫\n NatTrans.app (shiftFunctorCompIsoId C j i (_ : j + i = 0)).hom ((shiftFunctor C i).obj X) =\n 𝟙 ((shiftFunctor C i).obj X)\n[PROOFSTEP]\nconvert\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) ⟨i⟩ ⟨j⟩ (Discrete.eqToIso h)\n (Discrete.eqToIso (by dsimp; rw [← add_left_inj j, add_assoc, h, zero_add, add_zero]))\n (Subsingleton.elim _ _)).functor_unitIso_comp\n X\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\ni j : A\nh : i + j = 0\nX : C\n⊢ (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\ni j : A\nh : i + j = 0\nX : C\n⊢ j + i = 0\n[PROOFSTEP]\nrw [← add_left_inj j, add_assoc, h, zero_add, add_zero]\n[GOAL]\ncase h.e'_2.h.h.e'_6.h.h.e'_8.h.h.e'_7.h.h.e'_5.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\ni j : A\nh : i + j = 0\nX : C\ne_1✝ :\n ((shiftFunctor C i).obj ((𝟭 C).obj X) ⟶ (𝟭 C).obj ((shiftFunctor C i).obj X)) =\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n ((𝟭 C).obj X) ⟶\n (𝟭 C).obj\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n X))\ne_3✝ :\n (shiftFunctor C i).obj ((𝟭 C).obj X) =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n ((𝟭 C).obj X)\ne_4✝¹ :\n (shiftFunctor C i).obj ((shiftFunctor C i ⋙ shiftFunctor C j).obj X) =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n (((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse).obj\n X)\ne_7✝ :\n (shiftFunctor C i ⋙ shiftFunctor C j).obj X =\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse).obj\n X\ne_6✝ :\n shiftFunctor C i ⋙ shiftFunctor C j =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse\ne_4✝ :\n shiftFunctor C i ⋙ shiftFunctor C j =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse\n⊢ (shiftFunctorCompIsoId C i j h).symm =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ : (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).unitIso\ncase h.e'_2.h.h.e'_7.h.h.e'_7.h.h.e'_5.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\ni j : A\nh : i + j = 0\nX : C\ne_1✝ :\n ((shiftFunctor C i).obj ((𝟭 C).obj X) ⟶ (𝟭 C).obj ((shiftFunctor C i).obj X)) =\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n ((𝟭 C).obj X) ⟶\n (𝟭 C).obj\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n X))\ne_4✝ :\n (shiftFunctor C i).obj ((shiftFunctor C i ⋙ shiftFunctor C j).obj X) =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n (((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse).obj\n X)\ne_5✝¹ :\n (𝟭 C).obj ((shiftFunctor C i).obj X) =\n (𝟭 C).obj\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n X)\ne_5✝ :\n shiftFunctor C j ⋙ shiftFunctor C i =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor\ne_3✝ :\n shiftFunctor C j ⋙ shiftFunctor C i =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor\n⊢ shiftFunctorCompIsoId C j i (_ : j + i = 0) =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ : (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).counitIso\n[PROOFSTEP]\nall_goals\n ext X\n dsimp [shiftFunctorCompIsoId, unitOfTensorIsoUnit, shiftFunctorAdd']\n simp only [Category.assoc, eqToHom_map]\n rfl\n[GOAL]\ncase h.e'_2.h.h.e'_6.h.h.e'_8.h.h.e'_7.h.h.e'_5.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\ni j : A\nh : i + j = 0\nX : C\ne_1✝ :\n ((shiftFunctor C i).obj ((𝟭 C).obj X) ⟶ (𝟭 C).obj ((shiftFunctor C i).obj X)) =\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n ((𝟭 C).obj X) ⟶\n (𝟭 C).obj\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n X))\ne_3✝ :\n (shiftFunctor C i).obj ((𝟭 C).obj X) =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n ((𝟭 C).obj X)\ne_4✝¹ :\n (shiftFunctor C i).obj ((shiftFunctor C i ⋙ shiftFunctor C j).obj X) =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n (((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse).obj\n X)\ne_7✝ :\n (shiftFunctor C i ⋙ shiftFunctor C j).obj X =\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse).obj\n X\ne_6✝ :\n shiftFunctor C i ⋙ shiftFunctor C j =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse\ne_4✝ :\n shiftFunctor C i ⋙ shiftFunctor C j =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse\n⊢ (shiftFunctorCompIsoId C i j h).symm =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ : (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).unitIso\n[PROOFSTEP]\next X\n[GOAL]\ncase h.e'_2.h.h.e'_6.h.h.e'_8.h.h.e'_7.h.h.e'_5.h.w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\ni j : A\nh : i + j = 0\nX✝ : C\ne_1✝ :\n ((shiftFunctor C i).obj ((𝟭 C).obj X✝) ⟶ (𝟭 C).obj ((shiftFunctor C i).obj X✝)) =\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n ((𝟭 C).obj X✝) ⟶\n (𝟭 C).obj\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n X✝))\ne_3✝ :\n (shiftFunctor C i).obj ((𝟭 C).obj X✝) =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n ((𝟭 C).obj X✝)\ne_4✝¹ :\n (shiftFunctor C i).obj ((shiftFunctor C i ⋙ shiftFunctor C j).obj X✝) =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n (((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse).obj\n X✝)\ne_7✝ :\n (shiftFunctor C i ⋙ shiftFunctor C j).obj X✝ =\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse).obj\n X✝\ne_6✝ :\n shiftFunctor C i ⋙ shiftFunctor C j =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse\ne_4✝ :\n shiftFunctor C i ⋙ shiftFunctor C j =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse\nX : C\n⊢ NatTrans.app (shiftFunctorCompIsoId C i j h).symm.hom X =\n NatTrans.app\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).unitIso.hom\n X\n[PROOFSTEP]\ndsimp [shiftFunctorCompIsoId, unitOfTensorIsoUnit, shiftFunctorAdd']\n[GOAL]\ncase h.e'_2.h.h.e'_6.h.h.e'_8.h.h.e'_7.h.h.e'_5.h.w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\ni j : A\nh : i + j = 0\nX✝ : C\ne_1✝ :\n ((shiftFunctor C i).obj ((𝟭 C).obj X✝) ⟶ (𝟭 C).obj ((shiftFunctor C i).obj X✝)) =\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n ((𝟭 C).obj X✝) ⟶\n (𝟭 C).obj\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n X✝))\ne_3✝ :\n (shiftFunctor C i).obj ((𝟭 C).obj X✝) =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n ((𝟭 C).obj X✝)\ne_4✝¹ :\n (shiftFunctor C i).obj ((shiftFunctor C i ⋙ shiftFunctor C j).obj X✝) =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n (((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse).obj\n X✝)\ne_7✝ :\n (shiftFunctor C i ⋙ shiftFunctor C j).obj X✝ =\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse).obj\n X✝\ne_6✝ :\n shiftFunctor C i ⋙ shiftFunctor C j =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse\ne_4✝ :\n shiftFunctor C i ⋙ shiftFunctor C j =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse\nX : C\n⊢ NatTrans.app (shiftFunctorZero C A).inv X ≫\n NatTrans.app (eqToHom (_ : shiftFunctor C 0 = shiftFunctor C (i + j))) X ≫\n NatTrans.app (shiftFunctorAdd C i j).hom X =\n (NatTrans.app (shiftMonoidalFunctor C A).toLaxMonoidalFunctor.ε X ≫\n NatTrans.app\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.map\n (eqToHom\n (_ : MonoidalCategory.tensorUnit (Discrete A) = MonoidalCategory.tensorObj { as := i } { as := j })))\n X) ≫\n NatTrans.app (MonoidalFunctor.μIso (shiftMonoidalFunctor C A) { as := i } { as := j }).inv X\n[PROOFSTEP]\nsimp only [Category.assoc, eqToHom_map]\n[GOAL]\ncase h.e'_2.h.h.e'_6.h.h.e'_8.h.h.e'_7.h.h.e'_5.h.w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\ni j : A\nh : i + j = 0\nX✝ : C\ne_1✝ :\n ((shiftFunctor C i).obj ((𝟭 C).obj X✝) ⟶ (𝟭 C).obj ((shiftFunctor C i).obj X✝)) =\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n ((𝟭 C).obj X✝) ⟶\n (𝟭 C).obj\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n X✝))\ne_3✝ :\n (shiftFunctor C i).obj ((𝟭 C).obj X✝) =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n ((𝟭 C).obj X✝)\ne_4✝¹ :\n (shiftFunctor C i).obj ((shiftFunctor C i ⋙ shiftFunctor C j).obj X✝) =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n (((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse).obj\n X✝)\ne_7✝ :\n (shiftFunctor C i ⋙ shiftFunctor C j).obj X✝ =\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse).obj\n X✝\ne_6✝ :\n shiftFunctor C i ⋙ shiftFunctor C j =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse\ne_4✝ :\n shiftFunctor C i ⋙ shiftFunctor C j =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse\nX : C\n⊢ NatTrans.app (shiftFunctorZero C A).inv X ≫\n NatTrans.app (eqToHom (_ : shiftFunctor C 0 = shiftFunctor C (i + j))) X ≫\n NatTrans.app (shiftFunctorAdd C i j).hom X =\n NatTrans.app (shiftMonoidalFunctor C A).toLaxMonoidalFunctor.ε X ≫\n NatTrans.app\n (eqToHom\n (_ :\n (shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj (MonoidalCategory.tensorUnit (Discrete A)) =\n (shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj\n (MonoidalCategory.tensorObj { as := i } { as := j })))\n X ≫\n NatTrans.app (MonoidalFunctor.μIso (shiftMonoidalFunctor C A) { as := i } { as := j }).inv X\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_2.h.h.e'_7.h.h.e'_7.h.h.e'_5.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\ni j : A\nh : i + j = 0\nX : C\ne_1✝ :\n ((shiftFunctor C i).obj ((𝟭 C).obj X) ⟶ (𝟭 C).obj ((shiftFunctor C i).obj X)) =\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n ((𝟭 C).obj X) ⟶\n (𝟭 C).obj\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n X))\ne_4✝ :\n (shiftFunctor C i).obj ((shiftFunctor C i ⋙ shiftFunctor C j).obj X) =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n (((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse).obj\n X)\ne_5✝¹ :\n (𝟭 C).obj ((shiftFunctor C i).obj X) =\n (𝟭 C).obj\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n X)\ne_5✝ :\n shiftFunctor C j ⋙ shiftFunctor C i =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor\ne_3✝ :\n shiftFunctor C j ⋙ shiftFunctor C i =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor\n⊢ shiftFunctorCompIsoId C j i (_ : j + i = 0) =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ : (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).counitIso\n[PROOFSTEP]\next X\n[GOAL]\ncase h.e'_2.h.h.e'_7.h.h.e'_7.h.h.e'_5.h.w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\ni j : A\nh : i + j = 0\nX✝ : C\ne_1✝ :\n ((shiftFunctor C i).obj ((𝟭 C).obj X✝) ⟶ (𝟭 C).obj ((shiftFunctor C i).obj X✝)) =\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n ((𝟭 C).obj X✝) ⟶\n (𝟭 C).obj\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n X✝))\ne_4✝ :\n (shiftFunctor C i).obj ((shiftFunctor C i ⋙ shiftFunctor C j).obj X✝) =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n (((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse).obj\n X✝)\ne_5✝¹ :\n (𝟭 C).obj ((shiftFunctor C i).obj X✝) =\n (𝟭 C).obj\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n X✝)\ne_5✝ :\n shiftFunctor C j ⋙ shiftFunctor C i =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor\ne_3✝ :\n shiftFunctor C j ⋙ shiftFunctor C i =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor\nX : C\n⊢ NatTrans.app (shiftFunctorCompIsoId C j i (_ : j + i = 0)).hom X =\n NatTrans.app\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).counitIso.hom\n X\n[PROOFSTEP]\ndsimp [shiftFunctorCompIsoId, unitOfTensorIsoUnit, shiftFunctorAdd']\n[GOAL]\ncase h.e'_2.h.h.e'_7.h.h.e'_7.h.h.e'_5.h.w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\ni j : A\nh : i + j = 0\nX✝ : C\ne_1✝ :\n ((shiftFunctor C i).obj ((𝟭 C).obj X✝) ⟶ (𝟭 C).obj ((shiftFunctor C i).obj X✝)) =\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n ((𝟭 C).obj X✝) ⟶\n (𝟭 C).obj\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n X✝))\ne_4✝ :\n (shiftFunctor C i).obj ((shiftFunctor C i ⋙ shiftFunctor C j).obj X✝) =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n (((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse).obj\n X✝)\ne_5✝¹ :\n (𝟭 C).obj ((shiftFunctor C i).obj X✝) =\n (𝟭 C).obj\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n X✝)\ne_5✝ :\n shiftFunctor C j ⋙ shiftFunctor C i =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor\ne_3✝ :\n shiftFunctor C j ⋙ shiftFunctor C i =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor\nX : C\n⊢ (NatTrans.app (shiftFunctorAdd C j i).inv X ≫\n NatTrans.app (eqToHom (_ : shiftFunctor C (j + i) = shiftFunctor C 0)) X) ≫\n NatTrans.app (shiftFunctorZero C A).hom X =\n NatTrans.app (LaxMonoidalFunctor.μ (shiftMonoidalFunctor C A).toLaxMonoidalFunctor { as := j } { as := i }) X ≫\n NatTrans.app\n ((shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.map\n (eqToHom\n (_ : MonoidalCategory.tensorObj { as := j } { as := i } = MonoidalCategory.tensorUnit (Discrete A))))\n X ≫\n NatTrans.app (MonoidalFunctor.εIso (shiftMonoidalFunctor C A)).inv X\n[PROOFSTEP]\nsimp only [Category.assoc, eqToHom_map]\n[GOAL]\ncase h.e'_2.h.h.e'_7.h.h.e'_7.h.h.e'_5.h.w.w.h\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\ni j : A\nh : i + j = 0\nX✝ : C\ne_1✝ :\n ((shiftFunctor C i).obj ((𝟭 C).obj X✝) ⟶ (𝟭 C).obj ((shiftFunctor C i).obj X✝)) =\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n ((𝟭 C).obj X✝) ⟶\n (𝟭 C).obj\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n X✝))\ne_4✝ :\n (shiftFunctor C i).obj ((shiftFunctor C i ⋙ shiftFunctor C j).obj X✝) =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n (((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse).obj\n X✝)\ne_5✝¹ :\n (𝟭 C).obj ((shiftFunctor C i).obj X✝) =\n (𝟭 C).obj\n ((equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor.obj\n X✝)\ne_5✝ :\n shiftFunctor C j ⋙ shiftFunctor C i =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor\ne_3✝ :\n shiftFunctor C j ⋙ shiftFunctor C i =\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).inverse ⋙\n (equivOfTensorIsoUnit (shiftMonoidalFunctor C A) { as := i } { as := j } (Discrete.eqToIso h)\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as = (MonoidalCategory.tensorUnit (Discrete A)).as))\n (_ :\n MonoidalCategory.tensorHom (Discrete.eqToIso h).hom (𝟙 { as := i }) ≫\n (MonoidalCategory.leftUnitor { as := i }).hom =\n (MonoidalCategory.associator { as := i } { as := j } { as := i }).hom ≫\n MonoidalCategory.tensorHom (𝟙 { as := i })\n (Discrete.eqToIso\n (_ :\n (MonoidalCategory.tensorObj { as := j } { as := i }).as =\n (MonoidalCategory.tensorUnit (Discrete A)).as)).hom ≫\n (MonoidalCategory.rightUnitor { as := i }).hom)).functor\nX : C\n⊢ NatTrans.app (shiftFunctorAdd C j i).inv X ≫\n NatTrans.app (eqToHom (_ : shiftFunctor C (j + i) = shiftFunctor C 0)) X ≫\n NatTrans.app (shiftFunctorZero C A).hom X =\n NatTrans.app (LaxMonoidalFunctor.μ (shiftMonoidalFunctor C A).toLaxMonoidalFunctor { as := j } { as := i }) X ≫\n NatTrans.app\n (eqToHom\n (_ :\n (shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj\n (MonoidalCategory.tensorObj { as := j } { as := i }) =\n (shiftMonoidalFunctor C A).toLaxMonoidalFunctor.toFunctor.obj\n (MonoidalCategory.tensorUnit (Discrete A))))\n X ≫\n NatTrans.app (MonoidalFunctor.εIso (shiftMonoidalFunctor C A)).inv X\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\nX Y : C\nf : X ⟶ Y\ni : A\n⊢ IsEquivalence (shiftFunctor C i)\n[PROOFSTEP]\nchange IsEquivalence (shiftEquiv C i).functor\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\nX Y : C\nf : X ⟶ Y\ni : A\n⊢ IsEquivalence (shiftEquiv C i).functor\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nn m : A\nh : n + m = 0\nX : C\n⊢ m + n = 0\n[PROOFSTEP]\nrw [← neg_eq_of_add_eq_zero_left h, add_right_neg]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nn m : A\nh : n + m = 0\nX : C\n⊢ (shiftFunctor C n).map (NatTrans.app (shiftFunctorCompIsoId C n m h).hom X) =\n NatTrans.app (shiftFunctorCompIsoId C m n (_ : m + n = 0)).hom ((shiftFunctor C n).obj X)\n[PROOFSTEP]\ndsimp [shiftFunctorCompIsoId]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nn m : A\nh : n + m = 0\nX : C\n⊢ (shiftFunctor C n).map (NatTrans.app (shiftFunctorAdd' C n m 0 h).inv X ≫ NatTrans.app (shiftFunctorZero C A).hom X) =\n NatTrans.app (shiftFunctorAdd' C m n 0 (_ : m + n = 0)).inv ((shiftFunctor C n).obj X) ≫\n NatTrans.app (shiftFunctorZero C A).hom ((shiftFunctor C n).obj X)\n[PROOFSTEP]\nsimpa only [Functor.map_comp, ← shiftFunctorAdd'_zero_add_inv_app n X, ← shiftFunctorAdd'_add_zero_inv_app n X] using\n shiftFunctorAdd'_assoc_inv_app n m n 0 0 n h (by rw [← neg_eq_of_add_eq_zero_left h, add_right_neg])\n (by rw [h, zero_add]) X\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nn m : A\nh : n + m = 0\nX : C\n⊢ m + n = 0\n[PROOFSTEP]\nrw [← neg_eq_of_add_eq_zero_left h, add_right_neg]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nn m : A\nh : n + m = 0\nX : C\n⊢ n + m + n = n\n[PROOFSTEP]\nrw [h, zero_add]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nn m : A\nh : n + m = 0\nX : C\n⊢ m + n = 0\n[PROOFSTEP]\nrw [← neg_eq_of_add_eq_zero_left h, add_right_neg]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nn m : A\nh : n + m = 0\nX : C\n⊢ (shiftFunctor C n).map (NatTrans.app (shiftFunctorCompIsoId C n m h).inv X) =\n NatTrans.app (shiftFunctorCompIsoId C m n (_ : m + n = 0)).inv ((shiftFunctor C n).obj X)\n[PROOFSTEP]\nrw [← cancel_mono (((shiftFunctorCompIsoId C n m h).hom.app X)⟦n⟧'), ← Functor.map_comp, Iso.inv_hom_id_app,\n Functor.map_id, shift_shiftFunctorCompIsoId_hom_app, Iso.inv_hom_id_app]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nn m : A\nh : n + m = 0\nX : C\n⊢ 𝟙 ((shiftFunctor C n).obj ((𝟭 C).obj X)) = 𝟙 ((𝟭 C).obj ((shiftFunctor C n).obj X))\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nn : A\nX : C\n⊢ (shiftFunctor C n).map (NatTrans.app (shiftFunctorCompIsoId C n (-n) (_ : n + -n = 0)).hom X) =\n NatTrans.app (shiftFunctorCompIsoId C (-n) n (_ : -n + n = 0)).hom ((shiftFunctor C n).obj X)\n[PROOFSTEP]\napply shift_shiftFunctorCompIsoId_hom_app\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nn : A\nX : C\n⊢ (shiftFunctor C n).map (NatTrans.app (shiftFunctorCompIsoId C n (-n) (_ : n + -n = 0)).inv X) =\n NatTrans.app (shiftFunctorCompIsoId C (-n) n (_ : -n + n = 0)).inv ((shiftFunctor C n).obj X)\n[PROOFSTEP]\napply shift_shiftFunctorCompIsoId_inv_app\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nn : A\nX : C\n⊢ (shiftFunctor C (-n)).map (NatTrans.app (shiftFunctorCompIsoId C (-n) n (_ : -n + n = 0)).hom X) =\n NatTrans.app (shiftFunctorCompIsoId C n (-n) (_ : n + -n = 0)).hom ((shiftFunctor C (-n)).obj X)\n[PROOFSTEP]\napply shift_shiftFunctorCompIsoId_hom_app\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddGroup A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nn : A\nX : C\n⊢ (shiftFunctor C (-n)).map (NatTrans.app (shiftFunctorCompIsoId C (-n) n (_ : -n + n = 0)).inv X) =\n NatTrans.app (shiftFunctorCompIsoId C n (-n) (_ : n + -n = 0)).inv ((shiftFunctor C (-n)).obj X)\n[PROOFSTEP]\napply shift_shiftFunctorCompIsoId_inv_app\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\ni j k : A\nh : i + j = k\n⊢ j + i = k\n[PROOFSTEP]\nrw [add_comm j i, h]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\ni j k : A\nh : i + j = k\n⊢ shiftFunctorComm C i j = (shiftFunctorAdd' C i j k h).symm ≪≫ shiftFunctorAdd' C j i k (_ : j + i = k)\n[PROOFSTEP]\nsubst h\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\ni j : A\n⊢ shiftFunctorComm C i j =\n (shiftFunctorAdd' C i j (i + j) (_ : i + j = i + j)).symm ≪≫ shiftFunctorAdd' C j i (i + j) (_ : j + i = i + j)\n[PROOFSTEP]\nrw [shiftFunctorAdd'_eq_shiftFunctorAdd]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\ni j : A\n⊢ shiftFunctorComm C i j = (shiftFunctorAdd C i j).symm ≪≫ shiftFunctorAdd' C j i (i + j) (_ : j + i = i + j)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\ni j : A\n⊢ (shiftFunctorComm C i j).symm = shiftFunctorComm C j i\n[PROOFSTEP]\next1\n[GOAL]\ncase w\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\ni j : A\n⊢ (shiftFunctorComm C i j).symm.hom = (shiftFunctorComm C j i).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\ni j : A\n⊢ (shiftFunctorComm C i j).inv = (shiftFunctorComm C j i).hom\n[PROOFSTEP]\nrw [shiftFunctorComm_eq C i j (i + j) rfl, shiftFunctorComm_eq C j i (i + j) (add_comm j i)]\n[GOAL]\ncase w\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\ni j : A\n⊢ ((shiftFunctorAdd' C i j (i + j) (_ : i + j = i + j)).symm ≪≫\n shiftFunctorAdd' C j i (i + j) (_ : j + i = i + j)).inv =\n ((shiftFunctorAdd' C j i (i + j) (_ : j + i = i + j)).symm ≪≫\n shiftFunctorAdd' C i j (i + j) (_ : i + j = i + j)).hom\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX Y : C\nf : X ⟶ Y\ni j : A\n⊢ (shiftComm X i j).symm = shiftComm X j i\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX Y : C\nf : X ⟶ Y\ni j : A\n⊢ (shiftComm X i j).symm.hom = (shiftComm X j i).hom\n[PROOFSTEP]\nexact NatTrans.congr_app (congr_arg Iso.hom (shiftFunctorComm_symm C i j)) X\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX Y : C\nf : X ⟶ Y\ni j : A\n⊢ (shiftFunctor C j).map ((shiftFunctor C i).map f) =\n (shiftComm X i j).hom ≫ (shiftFunctor C i).map ((shiftFunctor C j).map f) ≫ (shiftComm Y j i).hom\n[PROOFSTEP]\nerw [← shiftComm_symm Y i j, ← ((shiftFunctorComm C i j).hom.naturality_assoc f)]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX Y : C\nf : X ⟶ Y\ni j : A\n⊢ (shiftFunctor C j).map ((shiftFunctor C i).map f) =\n (shiftFunctor C i ⋙ shiftFunctor C j).map f ≫\n NatTrans.app (shiftFunctorComm C i j).hom Y ≫ (shiftComm Y i j).symm.hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX Y : C\nf : X ⟶ Y\ni j : A\n⊢ (shiftFunctor C j).map ((shiftFunctor C i).map f) =\n (shiftFunctor C j).map ((shiftFunctor C i).map f) ≫\n NatTrans.app (shiftFunctorComm C i j).hom Y ≫ NatTrans.app (shiftFunctorComm C i j).inv Y\n[PROOFSTEP]\nsimp only [Iso.hom_inv_id_app, Functor.comp_obj, Category.comp_id]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX Y : C\nf : X ⟶ Y\ni j : A\n⊢ (shiftComm X i j).hom ≫ (shiftFunctor C i).map ((shiftFunctor C j).map f) =\n (shiftFunctor C j).map ((shiftFunctor C i).map f) ≫ (shiftComm Y i j).hom\n[PROOFSTEP]\nrw [shiftComm', ← shiftComm_symm, Iso.symm_hom, Iso.inv_hom_id_assoc]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX Y : C\nf : X ⟶ Y\nn : A\n⊢ NatTrans.app (shiftFunctorZero C A).hom ((shiftFunctor C n).obj X) =\n NatTrans.app (shiftFunctorComm C n 0).hom X ≫ (shiftFunctor C n).map (NatTrans.app (shiftFunctorZero C A).hom X)\n[PROOFSTEP]\nrw [← shiftFunctorAdd'_zero_add_inv_app n X, shiftFunctorComm_eq C n 0 n (add_zero n)]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX Y : C\nf : X ⟶ Y\nn : A\n⊢ NatTrans.app (shiftFunctorZero C A).hom ((shiftFunctor C n).obj X) =\n NatTrans.app ((shiftFunctorAdd' C n 0 n (_ : n + 0 = n)).symm ≪≫ shiftFunctorAdd' C 0 n n (_ : 0 + n = n)).hom X ≫\n NatTrans.app (shiftFunctorAdd' C 0 n n (_ : 0 + n = n)).inv X\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX Y : C\nf : X ⟶ Y\nn : A\n⊢ NatTrans.app (shiftFunctorZero C A).hom ((shiftFunctor C n).obj X) =\n (NatTrans.app (shiftFunctorAdd' C n 0 n (_ : n + 0 = n)).inv X ≫\n NatTrans.app (shiftFunctorAdd' C 0 n n (_ : 0 + n = n)).hom X) ≫\n NatTrans.app (shiftFunctorAdd' C 0 n n (_ : 0 + n = n)).inv X\n[PROOFSTEP]\nrw [Category.assoc, Iso.hom_inv_id_app, Category.comp_id, shiftFunctorAdd'_add_zero_inv_app]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX Y : C\nf : X ⟶ Y\nn : A\n⊢ NatTrans.app (shiftFunctorZero C A).inv ((shiftFunctor C n).obj X) =\n (shiftFunctor C n).map (NatTrans.app (shiftFunctorZero C A).inv X) ≫ NatTrans.app (shiftFunctorComm C n 0).inv X\n[PROOFSTEP]\nrw [← cancel_mono ((shiftFunctorZero C A).hom.app (X⟦n⟧)), Category.assoc, Iso.inv_hom_id_app,\n shiftFunctorZero_hom_app_shift, Iso.inv_hom_id_app_assoc, ← Functor.map_comp, Iso.inv_hom_id_app]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX Y : C\nf : X ⟶ Y\nn : A\n⊢ 𝟙 ((𝟭 C).obj ((shiftFunctor C n).obj X)) = (shiftFunctor C n).map (𝟙 ((𝟭 C).obj X))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX Y : C\nf : X ⟶ Y\nn : A\n⊢ 𝟙 ((shiftFunctor C n).obj X) = (shiftFunctor C n).map (𝟙 X)\n[PROOFSTEP]\nrw [Functor.map_id]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nm₁ m₂ m₃ : A\nX : C\n⊢ NatTrans.app (shiftFunctorComm C m₁ (m₂ + m₃)).hom X ≫\n (shiftFunctor C m₁).map (NatTrans.app (shiftFunctorAdd C m₂ m₃).hom X) =\n NatTrans.app (shiftFunctorAdd C m₂ m₃).hom ((shiftFunctor C m₁).obj X) ≫\n (shiftFunctor C m₃).map (NatTrans.app (shiftFunctorComm C m₁ m₂).hom X) ≫\n NatTrans.app (shiftFunctorComm C m₁ m₃).hom ((shiftFunctor C m₂).obj X)\n[PROOFSTEP]\nrw [← cancel_mono ((shiftFunctorComm C m₁ m₃).inv.app (X⟦m₂⟧)), ←\n cancel_mono (((shiftFunctorComm C m₁ m₂).inv.app X)⟦m₃⟧')]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nm₁ m₂ m₃ : A\nX : C\n⊢ ((NatTrans.app (shiftFunctorComm C m₁ (m₂ + m₃)).hom X ≫\n (shiftFunctor C m₁).map (NatTrans.app (shiftFunctorAdd C m₂ m₃).hom X)) ≫\n NatTrans.app (shiftFunctorComm C m₁ m₃).inv ((shiftFunctor C m₂).obj X)) ≫\n (shiftFunctor C m₃).map (NatTrans.app (shiftFunctorComm C m₁ m₂).inv X) =\n ((NatTrans.app (shiftFunctorAdd C m₂ m₃).hom ((shiftFunctor C m₁).obj X) ≫\n (shiftFunctor C m₃).map (NatTrans.app (shiftFunctorComm C m₁ m₂).hom X) ≫\n NatTrans.app (shiftFunctorComm C m₁ m₃).hom ((shiftFunctor C m₂).obj X)) ≫\n NatTrans.app (shiftFunctorComm C m₁ m₃).inv ((shiftFunctor C m₂).obj X)) ≫\n (shiftFunctor C m₃).map (NatTrans.app (shiftFunctorComm C m₁ m₂).inv X)\n[PROOFSTEP]\nsimp only [Category.assoc, Iso.hom_inv_id_app]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nm₁ m₂ m₃ : A\nX : C\n⊢ NatTrans.app (shiftFunctorComm C m₁ (m₂ + m₃)).hom X ≫\n (shiftFunctor C m₁).map (NatTrans.app (shiftFunctorAdd C m₂ m₃).hom X) ≫\n NatTrans.app (shiftFunctorComm C m₁ m₃).inv ((shiftFunctor C m₂).obj X) ≫\n (shiftFunctor C m₃).map (NatTrans.app (shiftFunctorComm C m₁ m₂).inv X) =\n NatTrans.app (shiftFunctorAdd C m₂ m₃).hom ((shiftFunctor C m₁).obj X) ≫\n (shiftFunctor C m₃).map (NatTrans.app (shiftFunctorComm C m₁ m₂).hom X) ≫\n 𝟙 ((shiftFunctor C m₁ ⋙ shiftFunctor C m₃).obj ((shiftFunctor C m₂).obj X)) ≫\n (shiftFunctor C m₃).map (NatTrans.app (shiftFunctorComm C m₁ m₂).inv X)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nm₁ m₂ m₃ : A\nX : C\n⊢ NatTrans.app (shiftFunctorComm C m₁ (m₂ + m₃)).hom X ≫\n (shiftFunctor C m₁).map (NatTrans.app (shiftFunctorAdd C m₂ m₃).hom X) ≫\n NatTrans.app (shiftFunctorComm C m₁ m₃).inv ((shiftFunctor C m₂).obj X) ≫\n (shiftFunctor C m₃).map (NatTrans.app (shiftFunctorComm C m₁ m₂).inv X) =\n NatTrans.app (shiftFunctorAdd C m₂ m₃).hom ((shiftFunctor C m₁).obj X) ≫\n (shiftFunctor C m₃).map (NatTrans.app (shiftFunctorComm C m₁ m₂).hom X) ≫\n 𝟙 ((shiftFunctor C m₃).obj ((shiftFunctor C m₁).obj ((shiftFunctor C m₂).obj X))) ≫\n (shiftFunctor C m₃).map (NatTrans.app (shiftFunctorComm C m₁ m₂).inv X)\n[PROOFSTEP]\nsimp only [Category.id_comp, ← Functor.map_comp, Iso.hom_inv_id_app]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nm₁ m₂ m₃ : A\nX : C\n⊢ NatTrans.app (shiftFunctorComm C m₁ (m₂ + m₃)).hom X ≫\n (shiftFunctor C m₁).map (NatTrans.app (shiftFunctorAdd C m₂ m₃).hom X) ≫\n NatTrans.app (shiftFunctorComm C m₁ m₃).inv ((shiftFunctor C m₂).obj X) ≫\n (shiftFunctor C m₃).map (NatTrans.app (shiftFunctorComm C m₁ m₂).inv X) =\n NatTrans.app (shiftFunctorAdd C m₂ m₃).hom ((shiftFunctor C m₁).obj X) ≫\n (shiftFunctor C m₃).map (𝟙 ((shiftFunctor C m₁ ⋙ shiftFunctor C m₂).obj X))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nm₁ m₂ m₃ : A\nX : C\n⊢ NatTrans.app (shiftFunctorComm C m₁ (m₂ + m₃)).hom X ≫\n (shiftFunctor C m₁).map (NatTrans.app (shiftFunctorAdd C m₂ m₃).hom X) ≫\n NatTrans.app (shiftFunctorComm C m₁ m₃).inv ((shiftFunctor C m₂).obj X) ≫\n (shiftFunctor C m₃).map (NatTrans.app (shiftFunctorComm C m₁ m₂).inv X) =\n NatTrans.app (shiftFunctorAdd C m₂ m₃).hom ((shiftFunctor C m₁).obj X) ≫\n (shiftFunctor C m₃).map (𝟙 ((shiftFunctor C m₂).obj ((shiftFunctor C m₁).obj X)))\n[PROOFSTEP]\nsimp only [Functor.map_id, Category.comp_id, shiftFunctorComm_eq C _ _ _ rfl, ← shiftFunctorAdd'_eq_shiftFunctorAdd]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nm₁ m₂ m₃ : A\nX : C\n⊢ NatTrans.app\n ((shiftFunctorAdd' C m₁ (m₂ + m₃) (m₁ + (m₂ + m₃)) (_ : m₁ + (m₂ + m₃) = m₁ + (m₂ + m₃))).symm ≪≫\n shiftFunctorAdd' C (m₂ + m₃) m₁ (m₁ + (m₂ + m₃)) (_ : m₂ + m₃ + m₁ = m₁ + (m₂ + m₃))).hom\n X ≫\n (shiftFunctor C m₁).map (NatTrans.app (shiftFunctorAdd' C m₂ m₃ (m₂ + m₃) (_ : m₂ + m₃ = m₂ + m₃)).hom X) ≫\n NatTrans.app\n ((shiftFunctorAdd' C m₁ m₃ (m₁ + m₃) (_ : m₁ + m₃ = m₁ + m₃)).symm ≪≫\n shiftFunctorAdd' C m₃ m₁ (m₁ + m₃) (_ : m₃ + m₁ = m₁ + m₃)).inv\n ((shiftFunctor C m₂).obj X) ≫\n (shiftFunctor C m₃).map\n (NatTrans.app\n ((shiftFunctorAdd' C m₁ m₂ (m₁ + m₂) (_ : m₁ + m₂ = m₁ + m₂)).symm ≪≫\n shiftFunctorAdd' C m₂ m₁ (m₁ + m₂) (_ : m₂ + m₁ = m₁ + m₂)).inv\n X) =\n NatTrans.app (shiftFunctorAdd' C m₂ m₃ (m₂ + m₃) (_ : m₂ + m₃ = m₂ + m₃)).hom ((shiftFunctor C m₁).obj X)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nm₁ m₂ m₃ : A\nX : C\n⊢ (NatTrans.app (shiftFunctorAdd' C m₁ (m₂ + m₃) (m₁ + (m₂ + m₃)) (_ : m₁ + (m₂ + m₃) = m₁ + (m₂ + m₃))).inv X ≫\n NatTrans.app (shiftFunctorAdd' C (m₂ + m₃) m₁ (m₁ + (m₂ + m₃)) (_ : m₂ + m₃ + m₁ = m₁ + (m₂ + m₃))).hom X) ≫\n (shiftFunctor C m₁).map (NatTrans.app (shiftFunctorAdd' C m₂ m₃ (m₂ + m₃) (_ : m₂ + m₃ = m₂ + m₃)).hom X) ≫\n (NatTrans.app (shiftFunctorAdd' C m₃ m₁ (m₁ + m₃) (_ : m₃ + m₁ = m₁ + m₃)).inv ((shiftFunctor C m₂).obj X) ≫\n NatTrans.app (shiftFunctorAdd' C m₁ m₃ (m₁ + m₃) (_ : m₁ + m₃ = m₁ + m₃)).hom ((shiftFunctor C m₂).obj X)) ≫\n (shiftFunctor C m₃).map\n (NatTrans.app (shiftFunctorAdd' C m₂ m₁ (m₁ + m₂) (_ : m₂ + m₁ = m₁ + m₂)).inv X ≫\n NatTrans.app (shiftFunctorAdd' C m₁ m₂ (m₁ + m₂) (_ : m₁ + m₂ = m₁ + m₂)).hom X) =\n NatTrans.app (shiftFunctorAdd' C m₂ m₃ (m₂ + m₃) (_ : m₂ + m₃ = m₂ + m₃)).hom ((shiftFunctor C m₁).obj X)\n[PROOFSTEP]\nsimp only [Category.assoc, Iso.hom_inv_id_app_assoc, Iso.inv_hom_id_app_assoc, ← Functor.map_comp,\n shiftFunctorAdd'_assoc_hom_app_assoc m₂ m₃ m₁ (m₂ + m₃) (m₁ + m₃) (m₁ + (m₂ + m₃)) rfl (add_comm m₃ m₁)\n (add_comm _ m₁) X,\n ←\n shiftFunctorAdd'_assoc_hom_app_assoc m₂ m₁ m₃ (m₁ + m₂) (m₁ + m₃) (m₁ + (m₂ + m₃)) (add_comm _ _) rfl\n (by rw [add_comm m₂ m₁, add_assoc]) X,\n shiftFunctorAdd'_assoc_hom_app m₁ m₂ m₃ (m₁ + m₂) (m₂ + m₃) (m₁ + (m₂ + m₃)) rfl rfl (add_assoc _ _ _) X]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝² : Category.{v, u} C\ninst✝¹ : AddCommMonoid A\ninst✝ : HasShift C A\nX✝ Y : C\nf : X✝ ⟶ Y\nm₁ m₂ m₃ : A\nX : C\n⊢ m₂ + m₁ + m₃ = m₁ + (m₂ + m₃)\n[PROOFSTEP]\nrw [add_comm m₂ m₁, add_assoc]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{u_3, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\nX : C\n⊢ F.map (NatTrans.app (hasShiftOfFullyFaithful_zero F s i).hom X) =\n NatTrans.app (i 0).hom X ≫ NatTrans.app (shiftFunctorZero D A).hom (F.obj X)\n[PROOFSTEP]\nsimp [hasShiftOfFullyFaithful_zero]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{u_3, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\nX : C\n⊢ F.map (NatTrans.app (hasShiftOfFullyFaithful_zero F s i).inv X) =\n NatTrans.app (shiftFunctorZero D A).inv (F.obj X) ≫ NatTrans.app (i 0).inv X\n[PROOFSTEP]\nsimp [hasShiftOfFullyFaithful_zero]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{u_3, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\na b : A\nX : C\n⊢ F.map (NatTrans.app (hasShiftOfFullyFaithful_add F s i a b).hom X) =\n NatTrans.app (i (a + b)).hom X ≫\n NatTrans.app (shiftFunctorAdd D a b).hom (F.obj X) ≫\n (shiftFunctor D b).map (NatTrans.app (i a).inv X) ≫ NatTrans.app (i b).inv ((s a).obj X)\n[PROOFSTEP]\ndsimp [hasShiftOfFullyFaithful_add]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{u_3, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\na b : A\nX : C\n⊢ F.map\n (F.preimage\n (NatTrans.app (i (a + b)).hom X ≫\n NatTrans.app (shiftFunctorAdd D a b).hom (F.obj X) ≫\n 𝟙 ((shiftFunctor D b).obj ((shiftFunctor D a).obj (F.obj X))) ≫\n (shiftFunctor D b).map (NatTrans.app (i a).inv X) ≫\n 𝟙 ((shiftFunctor D b).obj (F.obj ((s a).obj X))) ≫\n NatTrans.app (i b).inv ((s a).obj X) ≫ 𝟙 (F.obj ((s b).obj ((s a).obj X))))) =\n NatTrans.app (i (a + b)).hom X ≫\n NatTrans.app (shiftFunctorAdd D a b).hom (F.obj X) ≫\n (shiftFunctor D b).map (NatTrans.app (i a).inv X) ≫ NatTrans.app (i b).inv ((s a).obj X)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{u_3, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\na b : A\nX : C\n⊢ F.map (NatTrans.app (hasShiftOfFullyFaithful_add F s i a b).inv X) =\n NatTrans.app (i b).hom ((s a).obj X) ≫\n (shiftFunctor D b).map (NatTrans.app (i a).hom X) ≫\n NatTrans.app (shiftFunctorAdd D a b).inv (F.obj X) ≫ NatTrans.app (i (a + b)).inv X\n[PROOFSTEP]\ndsimp [hasShiftOfFullyFaithful_add]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{u_3, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\na b : A\nX : C\n⊢ F.map\n (F.preimage\n ((((((𝟙 (F.obj ((s b).obj ((s a).obj X))) ≫ NatTrans.app (i b).hom ((s a).obj X)) ≫\n 𝟙 ((shiftFunctor D b).obj (F.obj ((s a).obj X)))) ≫\n (shiftFunctor D b).map (NatTrans.app (i a).hom X)) ≫\n 𝟙 ((shiftFunctor D b).obj ((shiftFunctor D a).obj (F.obj X)))) ≫\n NatTrans.app (shiftFunctorAdd D a b).inv (F.obj X)) ≫\n NatTrans.app (i (a + b)).inv X)) =\n NatTrans.app (i b).hom ((s a).obj X) ≫\n (shiftFunctor D b).map (NatTrans.app (i a).hom X) ≫\n NatTrans.app (shiftFunctorAdd D a b).inv (F.obj X) ≫ NatTrans.app (i (a + b)).inv X\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{?u.291249, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\nm₁ m₂ m₃ : A\nX : C\n⊢ F.map\n (NatTrans.app (hasShiftOfFullyFaithful_add F s i (m₁ + m₂) m₃).hom X ≫\n (s m₃).map (NatTrans.app (hasShiftOfFullyFaithful_add F s i m₁ m₂).hom X)) =\n F.map\n (eqToHom (_ : (s (m₁ + m₂ + m₃)).obj X = (s (m₁ + (m₂ + m₃))).obj X) ≫\n NatTrans.app (hasShiftOfFullyFaithful_add F s i m₁ (m₂ + m₃)).hom X ≫\n NatTrans.app (hasShiftOfFullyFaithful_add F s i m₂ m₃).hom ((s m₁).obj X))\n[PROOFSTEP]\nhave h := shiftFunctorAdd'_assoc_hom_app m₁ m₂ m₃ _ _ (m₁ + m₂ + m₃) rfl rfl rfl (F.obj X)\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{?u.291249, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\nm₁ m₂ m₃ : A\nX : C\nh :\n NatTrans.app (shiftFunctorAdd' D (m₁ + m₂) m₃ (m₁ + m₂ + m₃) (_ : m₁ + m₂ + m₃ = m₁ + m₂ + m₃)).hom (F.obj X) ≫\n (shiftFunctor D m₃).map\n (NatTrans.app (shiftFunctorAdd' D m₁ m₂ (m₁ + m₂) (_ : m₁ + m₂ = m₁ + m₂)).hom (F.obj X)) =\n NatTrans.app (shiftFunctorAdd' D m₁ (m₂ + m₃) (m₁ + m₂ + m₃) (_ : m₁ + (m₂ + m₃) = m₁ + m₂ + m₃)).hom (F.obj X) ≫\n NatTrans.app (shiftFunctorAdd' D m₂ m₃ (m₂ + m₃) (_ : m₂ + m₃ = m₂ + m₃)).hom ((shiftFunctor D m₁).obj (F.obj X))\n⊢ F.map\n (NatTrans.app (hasShiftOfFullyFaithful_add F s i (m₁ + m₂) m₃).hom X ≫\n (s m₃).map (NatTrans.app (hasShiftOfFullyFaithful_add F s i m₁ m₂).hom X)) =\n F.map\n (eqToHom (_ : (s (m₁ + m₂ + m₃)).obj X = (s (m₁ + (m₂ + m₃))).obj X) ≫\n NatTrans.app (hasShiftOfFullyFaithful_add F s i m₁ (m₂ + m₃)).hom X ≫\n NatTrans.app (hasShiftOfFullyFaithful_add F s i m₂ m₃).hom ((s m₁).obj X))\n[PROOFSTEP]\nsimp only [shiftFunctorAdd'_eq_shiftFunctorAdd] at h \n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{?u.291249, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\nm₁ m₂ m₃ : A\nX : C\nh :\n NatTrans.app (shiftFunctorAdd D (m₁ + m₂) m₃).hom (F.obj X) ≫\n (shiftFunctor D m₃).map (NatTrans.app (shiftFunctorAdd D m₁ m₂).hom (F.obj X)) =\n NatTrans.app (shiftFunctorAdd' D m₁ (m₂ + m₃) (m₁ + m₂ + m₃) (_ : m₁ + (m₂ + m₃) = m₁ + m₂ + m₃)).hom (F.obj X) ≫\n NatTrans.app (shiftFunctorAdd D m₂ m₃).hom ((shiftFunctor D m₁).obj (F.obj X))\n⊢ F.map\n (NatTrans.app (hasShiftOfFullyFaithful_add F s i (m₁ + m₂) m₃).hom X ≫\n (s m₃).map (NatTrans.app (hasShiftOfFullyFaithful_add F s i m₁ m₂).hom X)) =\n F.map\n (eqToHom (_ : (s (m₁ + m₂ + m₃)).obj X = (s (m₁ + (m₂ + m₃))).obj X) ≫\n NatTrans.app (hasShiftOfFullyFaithful_add F s i m₁ (m₂ + m₃)).hom X ≫\n NatTrans.app (hasShiftOfFullyFaithful_add F s i m₂ m₃).hom ((s m₁).obj X))\n[PROOFSTEP]\nrw [← cancel_mono ((i m₃).hom.app ((s m₂).obj ((s m₁).obj X)))]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{?u.291249, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\nm₁ m₂ m₃ : A\nX : C\nh :\n NatTrans.app (shiftFunctorAdd D (m₁ + m₂) m₃).hom (F.obj X) ≫\n (shiftFunctor D m₃).map (NatTrans.app (shiftFunctorAdd D m₁ m₂).hom (F.obj X)) =\n NatTrans.app (shiftFunctorAdd' D m₁ (m₂ + m₃) (m₁ + m₂ + m₃) (_ : m₁ + (m₂ + m₃) = m₁ + m₂ + m₃)).hom (F.obj X) ≫\n NatTrans.app (shiftFunctorAdd D m₂ m₃).hom ((shiftFunctor D m₁).obj (F.obj X))\n⊢ F.map\n (NatTrans.app (hasShiftOfFullyFaithful_add F s i (m₁ + m₂) m₃).hom X ≫\n (s m₃).map (NatTrans.app (hasShiftOfFullyFaithful_add F s i m₁ m₂).hom X)) ≫\n NatTrans.app (i m₃).hom ((s m₂).obj ((s m₁).obj X)) =\n F.map\n (eqToHom (_ : (s (m₁ + m₂ + m₃)).obj X = (s (m₁ + (m₂ + m₃))).obj X) ≫\n NatTrans.app (hasShiftOfFullyFaithful_add F s i m₁ (m₂ + m₃)).hom X ≫\n NatTrans.app (hasShiftOfFullyFaithful_add F s i m₂ m₃).hom ((s m₁).obj X)) ≫\n NatTrans.app (i m₃).hom ((s m₂).obj ((s m₁).obj X))\n[PROOFSTEP]\nsimp only [Functor.comp_obj, Functor.map_comp, map_hasShiftOfFullyFaithful_add_hom_app, Category.assoc,\n Iso.inv_hom_id_app_assoc, NatTrans.naturality_assoc, Functor.comp_map, Iso.inv_hom_id_app, Category.comp_id]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{?u.291249, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\nm₁ m₂ m₃ : A\nX : C\nh :\n NatTrans.app (shiftFunctorAdd D (m₁ + m₂) m₃).hom (F.obj X) ≫\n (shiftFunctor D m₃).map (NatTrans.app (shiftFunctorAdd D m₁ m₂).hom (F.obj X)) =\n NatTrans.app (shiftFunctorAdd' D m₁ (m₂ + m₃) (m₁ + m₂ + m₃) (_ : m₁ + (m₂ + m₃) = m₁ + m₂ + m₃)).hom (F.obj X) ≫\n NatTrans.app (shiftFunctorAdd D m₂ m₃).hom ((shiftFunctor D m₁).obj (F.obj X))\n⊢ NatTrans.app (i (m₁ + m₂ + m₃)).hom X ≫\n NatTrans.app (shiftFunctorAdd D (m₁ + m₂) m₃).hom (F.obj X) ≫\n (shiftFunctor D m₃).map (NatTrans.app (i (m₁ + m₂)).inv X) ≫\n NatTrans.app (i m₃).inv ((s (m₁ + m₂)).obj X) ≫\n F.map ((s m₃).map (NatTrans.app (hasShiftOfFullyFaithful_add F s i m₁ m₂).hom X)) ≫\n NatTrans.app (i m₃).hom ((s m₂).obj ((s m₁).obj X)) =\n F.map (eqToHom (_ : (s (m₁ + m₂ + m₃)).obj X = (s (m₁ + (m₂ + m₃))).obj X)) ≫\n NatTrans.app (i (m₁ + (m₂ + m₃))).hom X ≫\n NatTrans.app (shiftFunctorAdd D m₁ (m₂ + m₃)).hom (F.obj X) ≫\n NatTrans.app (shiftFunctorAdd D m₂ m₃).hom ((shiftFunctor D m₁).obj (F.obj X)) ≫\n (shiftFunctor D m₃).map ((shiftFunctor D m₂).map (NatTrans.app (i m₁).inv X)) ≫\n (shiftFunctor D m₃).map (NatTrans.app (i m₂).inv ((s m₁).obj X))\n[PROOFSTEP]\nerw [(i m₃).hom.naturality]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{?u.291249, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\nm₁ m₂ m₃ : A\nX : C\nh :\n NatTrans.app (shiftFunctorAdd D (m₁ + m₂) m₃).hom (F.obj X) ≫\n (shiftFunctor D m₃).map (NatTrans.app (shiftFunctorAdd D m₁ m₂).hom (F.obj X)) =\n NatTrans.app (shiftFunctorAdd' D m₁ (m₂ + m₃) (m₁ + m₂ + m₃) (_ : m₁ + (m₂ + m₃) = m₁ + m₂ + m₃)).hom (F.obj X) ≫\n NatTrans.app (shiftFunctorAdd D m₂ m₃).hom ((shiftFunctor D m₁).obj (F.obj X))\n⊢ NatTrans.app (i (m₁ + m₂ + m₃)).hom X ≫\n NatTrans.app (shiftFunctorAdd D (m₁ + m₂) m₃).hom (F.obj X) ≫\n (shiftFunctor D m₃).map (NatTrans.app (i (m₁ + m₂)).inv X) ≫\n NatTrans.app (i m₃).inv ((s (m₁ + m₂)).obj X) ≫\n NatTrans.app (i m₃).hom ((s (m₁ + m₂)).obj X) ≫\n (F ⋙ shiftFunctor D m₃).map (NatTrans.app (hasShiftOfFullyFaithful_add F s i m₁ m₂).hom X) =\n F.map (eqToHom (_ : (s (m₁ + m₂ + m₃)).obj X = (s (m₁ + (m₂ + m₃))).obj X)) ≫\n NatTrans.app (i (m₁ + (m₂ + m₃))).hom X ≫\n NatTrans.app (shiftFunctorAdd D m₁ (m₂ + m₃)).hom (F.obj X) ≫\n NatTrans.app (shiftFunctorAdd D m₂ m₃).hom ((shiftFunctor D m₁).obj (F.obj X)) ≫\n (shiftFunctor D m₃).map ((shiftFunctor D m₂).map (NatTrans.app (i m₁).inv X)) ≫\n (shiftFunctor D m₃).map (NatTrans.app (i m₂).inv ((s m₁).obj X))\n[PROOFSTEP]\nrw [Functor.comp_map, map_hasShiftOfFullyFaithful_add_hom_app, Functor.map_comp, Functor.map_comp,\n Iso.inv_hom_id_app_assoc, ← Functor.map_comp_assoc _ ((i (m₁ + m₂)).inv.app X), Iso.inv_hom_id_app, Functor.map_id,\n Category.id_comp, reassoc_of% h, dcongr_arg (fun a => (i a).hom.app X) (add_assoc m₁ m₂ m₃)]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{?u.291249, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\nm₁ m₂ m₃ : A\nX : C\nh :\n NatTrans.app (shiftFunctorAdd D (m₁ + m₂) m₃).hom (F.obj X) ≫\n (shiftFunctor D m₃).map (NatTrans.app (shiftFunctorAdd D m₁ m₂).hom (F.obj X)) =\n NatTrans.app (shiftFunctorAdd' D m₁ (m₂ + m₃) (m₁ + m₂ + m₃) (_ : m₁ + (m₂ + m₃) = m₁ + m₂ + m₃)).hom (F.obj X) ≫\n NatTrans.app (shiftFunctorAdd D m₂ m₃).hom ((shiftFunctor D m₁).obj (F.obj X))\n⊢ (eqToHom (_ : (s (m₁ + m₂ + m₃) ⋙ F).obj X = (s (m₁ + (m₂ + m₃)) ⋙ F).obj X) ≫\n NatTrans.app (i (m₁ + (m₂ + m₃))).hom X ≫\n eqToHom (_ : (F ⋙ shiftFunctor D (m₁ + (m₂ + m₃))).obj X = (F ⋙ shiftFunctor D (m₁ + m₂ + m₃)).obj X)) ≫\n NatTrans.app (shiftFunctorAdd' D m₁ (m₂ + m₃) (m₁ + m₂ + m₃) (_ : m₁ + (m₂ + m₃) = m₁ + m₂ + m₃)).hom (F.obj X) ≫\n NatTrans.app (shiftFunctorAdd D m₂ m₃).hom ((shiftFunctor D m₁).obj (F.obj X)) ≫\n (shiftFunctor D m₃).map\n ((shiftFunctor D m₂).map (NatTrans.app (i m₁).inv X) ≫ NatTrans.app (i m₂).inv ((s m₁).obj X)) =\n F.map (eqToHom (_ : (s (m₁ + m₂ + m₃)).obj X = (s (m₁ + (m₂ + m₃))).obj X)) ≫\n NatTrans.app (i (m₁ + (m₂ + m₃))).hom X ≫\n NatTrans.app (shiftFunctorAdd D m₁ (m₂ + m₃)).hom (F.obj X) ≫\n NatTrans.app (shiftFunctorAdd D m₂ m₃).hom ((shiftFunctor D m₁).obj (F.obj X)) ≫\n (shiftFunctor D m₃).map ((shiftFunctor D m₂).map (NatTrans.app (i m₁).inv X)) ≫\n (shiftFunctor D m₃).map (NatTrans.app (i m₂).inv ((s m₁).obj X))\n[PROOFSTEP]\nsimp [shiftFunctorAdd', eqToHom_map]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{?u.291249, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\nn : A\nX : C\n⊢ F.map (NatTrans.app (hasShiftOfFullyFaithful_add F s i 0 n).hom X) =\n F.map\n (eqToHom (_ : (s (0 + n)).obj X = (s n).obj ((𝟭 C).obj X)) ≫\n (s n).map (NatTrans.app (hasShiftOfFullyFaithful_zero F s i).inv X))\n[PROOFSTEP]\nhave this := dcongr_arg (fun a => (i a).hom.app X) (zero_add n)\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{?u.291249, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\nn : A\nX : C\nthis :\n NatTrans.app (i (0 + n)).hom X =\n eqToHom (_ : (s (0 + n) ⋙ F).obj X = (s n ⋙ F).obj X) ≫\n NatTrans.app (i n).hom X ≫ eqToHom (_ : (F ⋙ shiftFunctor D n).obj X = (F ⋙ shiftFunctor D (0 + n)).obj X)\n⊢ F.map (NatTrans.app (hasShiftOfFullyFaithful_add F s i 0 n).hom X) =\n F.map\n (eqToHom (_ : (s (0 + n)).obj X = (s n).obj ((𝟭 C).obj X)) ≫\n (s n).map (NatTrans.app (hasShiftOfFullyFaithful_zero F s i).inv X))\n[PROOFSTEP]\nrw [← cancel_mono ((i n).hom.app ((s 0).obj X))]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{?u.291249, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\nn : A\nX : C\nthis :\n NatTrans.app (i (0 + n)).hom X =\n eqToHom (_ : (s (0 + n) ⋙ F).obj X = (s n ⋙ F).obj X) ≫\n NatTrans.app (i n).hom X ≫ eqToHom (_ : (F ⋙ shiftFunctor D n).obj X = (F ⋙ shiftFunctor D (0 + n)).obj X)\n⊢ F.map (NatTrans.app (hasShiftOfFullyFaithful_add F s i 0 n).hom X) ≫ NatTrans.app (i n).hom ((s 0).obj X) =\n F.map\n (eqToHom (_ : (s (0 + n)).obj X = (s n).obj ((𝟭 C).obj X)) ≫\n (s n).map (NatTrans.app (hasShiftOfFullyFaithful_zero F s i).inv X)) ≫\n NatTrans.app (i n).hom ((s 0).obj X)\n[PROOFSTEP]\nsimp [this, map_hasShiftOfFullyFaithful_add_hom_app, shiftFunctorAdd_zero_add_hom_app, eqToHom_map]\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{?u.291249, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\nn : A\nX : C\nthis :\n NatTrans.app (i (0 + n)).hom X =\n eqToHom (_ : (s (0 + n) ⋙ F).obj X = (s n ⋙ F).obj X) ≫\n NatTrans.app (i n).hom X ≫ eqToHom (_ : (F ⋙ shiftFunctor D n).obj X = (F ⋙ shiftFunctor D (0 + n)).obj X)\n⊢ eqToHom (_ : (s (0 + n) ⋙ F).obj X = (s n ⋙ F).obj X) ≫\n NatTrans.app (i n).hom X ≫\n (shiftFunctor D n).map (NatTrans.app (shiftFunctorZero D A).inv (F.obj X)) ≫\n (shiftFunctor D n).map (NatTrans.app (i 0).inv X) =\n eqToHom (_ : F.obj ((s (0 + n)).obj X) = F.obj ((s n).obj X)) ≫\n F.map ((s n).map (NatTrans.app (hasShiftOfFullyFaithful_zero F s i).inv X)) ≫ NatTrans.app (i n).hom ((s 0).obj X)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{?u.291249, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\nn : A\nX : C\nthis :\n NatTrans.app (i (0 + n)).hom X =\n eqToHom (_ : (s (0 + n) ⋙ F).obj X = (s n ⋙ F).obj X) ≫\n NatTrans.app (i n).hom X ≫ eqToHom (_ : (F ⋙ shiftFunctor D n).obj X = (F ⋙ shiftFunctor D (0 + n)).obj X)\n⊢ NatTrans.app (i n).hom X ≫\n (shiftFunctor D n).map (NatTrans.app (shiftFunctorZero D A).inv (F.obj X)) ≫\n (shiftFunctor D n).map (NatTrans.app (i 0).inv X) =\n F.map ((s n).map (NatTrans.app (hasShiftOfFullyFaithful_zero F s i).inv X)) ≫ NatTrans.app (i n).hom ((s 0).obj X)\n[PROOFSTEP]\nerw [(i n).hom.naturality]\n[GOAL]\ncase e_a\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{?u.291249, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\nn : A\nX : C\nthis :\n NatTrans.app (i (0 + n)).hom X =\n eqToHom (_ : (s (0 + n) ⋙ F).obj X = (s n ⋙ F).obj X) ≫\n NatTrans.app (i n).hom X ≫ eqToHom (_ : (F ⋙ shiftFunctor D n).obj X = (F ⋙ shiftFunctor D (0 + n)).obj X)\n⊢ NatTrans.app (i n).hom X ≫\n (shiftFunctor D n).map (NatTrans.app (shiftFunctorZero D A).inv (F.obj X)) ≫\n (shiftFunctor D n).map (NatTrans.app (i 0).inv X) =\n NatTrans.app (i n).hom X ≫ (F ⋙ shiftFunctor D n).map (NatTrans.app (hasShiftOfFullyFaithful_zero F s i).inv X)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase e_a\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{?u.291249, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\nn : A\nX : C\nthis :\n NatTrans.app (i (0 + n)).hom X =\n eqToHom (_ : (s (0 + n) ⋙ F).obj X = (s n ⋙ F).obj X) ≫\n NatTrans.app (i n).hom X ≫ eqToHom (_ : (F ⋙ shiftFunctor D n).obj X = (F ⋙ shiftFunctor D (0 + n)).obj X)\n⊢ NatTrans.app (i n).hom X ≫\n (shiftFunctor D n).map (NatTrans.app (shiftFunctorZero D A).inv (F.obj X)) ≫\n (shiftFunctor D n).map (NatTrans.app (i 0).inv X) =\n NatTrans.app (i n).hom X ≫ (shiftFunctor D n).map (F.map (NatTrans.app (hasShiftOfFullyFaithful_zero F s i).inv X))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{?u.291249, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\nn : A\nX : C\n⊢ F.map (NatTrans.app (hasShiftOfFullyFaithful_add F s i n 0).hom X) =\n F.map\n (eqToHom (_ : (s (n + 0)).obj X = (𝟭 C).obj ((s n).obj X)) ≫\n NatTrans.app (hasShiftOfFullyFaithful_zero F s i).inv ((s n).obj X))\n[PROOFSTEP]\nhave := dcongr_arg (fun a => (i a).hom.app X) (add_zero n)\n[GOAL]\nC : Type u\nA : Type u_1\ninst✝⁵ : Category.{v, u} C\nD : Type u_2\ninst✝⁴ : Category.{?u.291249, u_2} D\ninst✝³ : AddMonoid A\ninst✝² : HasShift D A\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\ns : A → C ⥤ C\ni : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i\nn : A\nX : C\nthis :\n NatTrans.app (i (n + 0)).hom X =\n eqToHom (_ : (s (n + 0) ⋙ F).obj X = (s n ⋙ F).obj X) ≫\n NatTrans.app (i n).hom X ≫ eqToHom (_ : (F ⋙ shiftFunctor D n).obj X = (F ⋙ shiftFunctor D (n + 0)).obj X)\n⊢ F.map (NatTrans.app (hasShiftOfFullyFaithful_add F s i n 0).hom X) =\n F.map\n (eqToHom (_ : (s (n + 0)).obj X = (𝟭 C).obj ((s n).obj X)) ≫\n NatTrans.app (hasShiftOfFullyFaithful_zero F s i).inv ((s n).obj X))\n[PROOFSTEP]\nsimp [this, ← NatTrans.naturality_assoc, eqToHom_map, shiftFunctorAdd_add_zero_hom_app]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Shift.Basic", "llama_tokens": 77349, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8558511396138365, "lm_q2_score": 0.6791786991753929, "lm_q1q2_score": 0.581275863690703}} {"text": "[GOAL]\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : Nontrivial α\nC : PositiveCone α\nsrc✝¹ : Ring α := inst✝¹\nsrc✝ : OrderedAddCommGroup α := OrderedAddCommGroup.mkOfPositiveCone C.toPositiveCone\nh : 0 = 1\n⊢ False\n[PROOFSTEP]\nsimpa [← h, C.pos_iff] using C.one_pos\n[GOAL]\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : Nontrivial α\nC : PositiveCone α\nsrc✝¹ : Ring α := inst✝¹\nsrc✝ : OrderedAddCommGroup α := OrderedAddCommGroup.mkOfPositiveCone C.toPositiveCone\n⊢ 0 ≤ 1\n[PROOFSTEP]\nchange C.nonneg (1 - 0)\n[GOAL]\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : Nontrivial α\nC : PositiveCone α\nsrc✝¹ : Ring α := inst✝¹\nsrc✝ : OrderedAddCommGroup α := OrderedAddCommGroup.mkOfPositiveCone C.toPositiveCone\n⊢ AddCommGroup.PositiveCone.nonneg C.toPositiveCone (1 - 0)\n[PROOFSTEP]\nconvert C.one_nonneg\n[GOAL]\ncase h.e'_4\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : Nontrivial α\nC : PositiveCone α\nsrc✝¹ : Ring α := inst✝¹\nsrc✝ : OrderedAddCommGroup α := OrderedAddCommGroup.mkOfPositiveCone C.toPositiveCone\n⊢ 1 - 0 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : Nontrivial α\nC : PositiveCone α\nsrc✝¹ : Ring α := inst✝¹\nsrc✝ : OrderedAddCommGroup α := OrderedAddCommGroup.mkOfPositiveCone C.toPositiveCone\nx y : α\nxp : 0 < x\nyp : 0 < y\n⊢ 0 < x * y\n[PROOFSTEP]\nchange\n C.pos\n (x * y - 0)\n -- porting note: used to be convert, but it relied on unfolding definitions\n[GOAL]\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : Nontrivial α\nC : PositiveCone α\nsrc✝¹ : Ring α := inst✝¹\nsrc✝ : OrderedAddCommGroup α := OrderedAddCommGroup.mkOfPositiveCone C.toPositiveCone\nx y : α\nxp : 0 < x\nyp : 0 < y\n⊢ AddCommGroup.PositiveCone.pos C.toPositiveCone (x * y - 0)\n[PROOFSTEP]\nrw [sub_zero]\n[GOAL]\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : Nontrivial α\nC : PositiveCone α\nsrc✝¹ : Ring α := inst✝¹\nsrc✝ : OrderedAddCommGroup α := OrderedAddCommGroup.mkOfPositiveCone C.toPositiveCone\nx y : α\nxp : 0 < x\nyp : 0 < y\n⊢ AddCommGroup.PositiveCone.pos C.toPositiveCone (x * y)\n[PROOFSTEP]\nexact C.mul_pos x y (by rwa [← sub_zero x]) (by rwa [← sub_zero y])\n[GOAL]\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : Nontrivial α\nC : PositiveCone α\nsrc✝¹ : Ring α := inst✝¹\nsrc✝ : OrderedAddCommGroup α := OrderedAddCommGroup.mkOfPositiveCone C.toPositiveCone\nx y : α\nxp : 0 < x\nyp : 0 < y\n⊢ AddCommGroup.PositiveCone.pos C.toPositiveCone x\n[PROOFSTEP]\nrwa [← sub_zero x]\n[GOAL]\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : Nontrivial α\nC : PositiveCone α\nsrc✝¹ : Ring α := inst✝¹\nsrc✝ : OrderedAddCommGroup α := OrderedAddCommGroup.mkOfPositiveCone C.toPositiveCone\nx y : α\nxp : 0 < x\nyp : 0 < y\n⊢ AddCommGroup.PositiveCone.pos C.toPositiveCone y\n[PROOFSTEP]\nrwa [← sub_zero y]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Ring.Cone", "llama_tokens": 1233, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7853085808877581, "lm_q2_score": 0.7401743735019595, "lm_q1q2_score": 0.5812652868643092}} {"text": "[GOAL]\ne : ℤˣ\n⊢ ‖↑e‖₊ = 1\n[PROOFSTEP]\nobtain rfl | rfl := units_eq_one_or e\n[GOAL]\ncase inl\n⊢ ‖↑1‖₊ = 1\n[PROOFSTEP]\nsimp only [Units.coe_neg_one, Units.val_one, nnnorm_neg, nnnorm_one]\n[GOAL]\ncase inr\n⊢ ‖↑(-1)‖₊ = 1\n[PROOFSTEP]\nsimp only [Units.coe_neg_one, Units.val_one, nnnorm_neg, nnnorm_one]\n[GOAL]\ne : ℤˣ\n⊢ ‖↑e‖ = 1\n[PROOFSTEP]\nrw [← coe_nnnorm, nnnorm_coe_units, NNReal.coe_one]\n[GOAL]\nn : ℤ\n⊢ ↑(toNat n) + ↑(toNat (-n)) = ‖n‖₊\n[PROOFSTEP]\nrw [← Nat.cast_add, toNat_add_toNat_neg_eq_natAbs, NNReal.coe_natAbs]\n[GOAL]\nn : ℤ\n⊢ ↑(toNat n) + ↑(toNat (-n)) = ‖n‖\n[PROOFSTEP]\nsimpa only [NNReal.coe_nat_cast, NNReal.coe_add] using congrArg NNReal.toReal (toNat_add_toNat_neg_eq_nnnorm n)\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.Int", "llama_tokens": 410, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.7981867777396211, "lm_q2_score": 0.7279754430043072, "lm_q1q2_score": 0.5810603731251811}} {"text": "[GOAL]\nsrc✝¹ : CommRing ℤ := inferInstanceAs (CommRing ℤ)\nsrc✝ : Nontrivial ℤ := inferInstanceAs (Nontrivial ℤ)\na b : ℤ\nb0 : b ≠ 0\n⊢ ↑(natAbs ((fun x x_1 => x % x_1) a b)) < ↑(natAbs b)\n[PROOFSTEP]\nrw [Int.natAbs_of_nonneg (Int.emod_nonneg _ b0), ← Int.abs_eq_natAbs]\n[GOAL]\nsrc✝¹ : CommRing ℤ := inferInstanceAs (CommRing ℤ)\nsrc✝ : Nontrivial ℤ := inferInstanceAs (Nontrivial ℤ)\na b : ℤ\nb0 : b ≠ 0\n⊢ a % b < |b|\n[PROOFSTEP]\nexact Int.emod_lt _ b0\n[GOAL]\nsrc✝¹ : CommRing ℤ := inferInstanceAs (CommRing ℤ)\nsrc✝ : Nontrivial ℤ := inferInstanceAs (Nontrivial ℤ)\na b : ℤ\nb0 : b ≠ 0\n⊢ natAbs (a * b) ≥ natAbs a\n[PROOFSTEP]\nrw [← mul_one a.natAbs, Int.natAbs_mul]\n[GOAL]\nsrc✝¹ : CommRing ℤ := inferInstanceAs (CommRing ℤ)\nsrc✝ : Nontrivial ℤ := inferInstanceAs (Nontrivial ℤ)\na b : ℤ\nb0 : b ≠ 0\n⊢ natAbs a * natAbs b ≥ natAbs a * 1\n[PROOFSTEP]\nrw [← Int.natAbs_pos] at b0 \n[GOAL]\nsrc✝¹ : CommRing ℤ := inferInstanceAs (CommRing ℤ)\nsrc✝ : Nontrivial ℤ := inferInstanceAs (Nontrivial ℤ)\na b : ℤ\nb0 : 0 < natAbs b\n⊢ natAbs a * natAbs b ≥ natAbs a * 1\n[PROOFSTEP]\nexact Nat.mul_le_mul_of_nonneg_left b0\n[GOAL]\nK : Type u_1\ninst✝ : Field K\na b : K\n⊢ b * (fun x x_1 => x / x_1) a b + (fun a b => a - a * b / b) a b = a\n[PROOFSTEP]\nby_cases h : b = 0\n[GOAL]\ncase pos\nK : Type u_1\ninst✝ : Field K\na b : K\nh : b = 0\n⊢ b * (fun x x_1 => x / x_1) a b + (fun a b => a - a * b / b) a b = a\n[PROOFSTEP]\nsimp [h, mul_div_cancel']\n[GOAL]\ncase neg\nK : Type u_1\ninst✝ : Field K\na b : K\nh : ¬b = 0\n⊢ b * (fun x x_1 => x / x_1) a b + (fun a b => a - a * b / b) a b = a\n[PROOFSTEP]\nsimp [h, mul_div_cancel']\n[GOAL]\nK : Type u_1\ninst✝ : Field K\na b : K\nhnb : b ≠ 0\n⊢ (fun a b => a = 0 ∧ b ≠ 0) ((fun a b => a - a * b / b) a b) b\n[PROOFSTEP]\nsimp [hnb]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.EuclideanDomain.Instances", "llama_tokens": 912, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7606506635289836, "lm_q2_score": 0.7634837581726991, "lm_q1q2_score": 0.5807444272476656}} {"text": "[GOAL]\nn : ℕ\nh : n ≠ 0\n⊢ filter (fun x => x ∣ n) (range (succ n)) = divisors n\n[PROOFSTEP]\next\n[GOAL]\ncase a\nn : ℕ\nh : n ≠ 0\na✝ : ℕ\n⊢ a✝ ∈ filter (fun x => x ∣ n) (range (succ n)) ↔ a✝ ∈ divisors n\n[PROOFSTEP]\nsimp only [divisors, mem_filter, mem_range, mem_Ico, and_congr_left_iff, iff_and_self]\n[GOAL]\ncase a\nn : ℕ\nh : n ≠ 0\na✝ : ℕ\n⊢ a✝ ∣ n → a✝ < succ n → 1 ≤ a✝\n[PROOFSTEP]\nexact fun ha _ => succ_le_iff.mpr (pos_of_dvd_of_pos ha h.bot_lt)\n[GOAL]\nn : ℕ\nh : n ≠ 0\n⊢ filter (fun x => x ∣ n) (range n) = properDivisors n\n[PROOFSTEP]\next\n[GOAL]\ncase a\nn : ℕ\nh : n ≠ 0\na✝ : ℕ\n⊢ a✝ ∈ filter (fun x => x ∣ n) (range n) ↔ a✝ ∈ properDivisors n\n[PROOFSTEP]\nsimp only [properDivisors, mem_filter, mem_range, mem_Ico, and_congr_left_iff, iff_and_self]\n[GOAL]\ncase a\nn : ℕ\nh : n ≠ 0\na✝ : ℕ\n⊢ a✝ ∣ n → a✝ < n → 1 ≤ a✝\n[PROOFSTEP]\nexact fun ha _ => succ_le_iff.mpr (pos_of_dvd_of_pos ha h.bot_lt)\n[GOAL]\nn : ℕ\n⊢ ¬n ∈ properDivisors n\n[PROOFSTEP]\nsimp [properDivisors]\n[GOAL]\nn m : ℕ\n⊢ n ∈ properDivisors m ↔ n ∣ m ∧ n < m\n[PROOFSTEP]\nrcases eq_or_ne m 0 with (rfl | hm)\n[GOAL]\ncase inl\nn : ℕ\n⊢ n ∈ properDivisors 0 ↔ n ∣ 0 ∧ n < 0\n[PROOFSTEP]\nsimp [properDivisors]\n[GOAL]\ncase inr\nn m : ℕ\nhm : m ≠ 0\n⊢ n ∈ properDivisors m ↔ n ∣ m ∧ n < m\n[PROOFSTEP]\nsimp only [and_comm, ← filter_dvd_eq_properDivisors hm, mem_filter, mem_range]\n[GOAL]\nn : ℕ\nh : n ≠ 0\n⊢ insert n (properDivisors n) = divisors n\n[PROOFSTEP]\nrw [divisors, properDivisors, Ico_succ_right_eq_insert_Ico (one_le_iff_ne_zero.2 h), Finset.filter_insert,\n if_pos (dvd_refl n)]\n[GOAL]\nn : ℕ\nh : n ≠ 0\n⊢ cons n (properDivisors n) (_ : ¬n ∈ properDivisors n) = divisors n\n[PROOFSTEP]\nrw [cons_eq_insert, insert_self_properDivisors h]\n[GOAL]\nn m : ℕ\n⊢ n ∈ divisors m ↔ n ∣ m ∧ m ≠ 0\n[PROOFSTEP]\nrcases eq_or_ne m 0 with (rfl | hm)\n[GOAL]\ncase inl\nn : ℕ\n⊢ n ∈ divisors 0 ↔ n ∣ 0 ∧ 0 ≠ 0\n[PROOFSTEP]\nsimp [divisors]\n[GOAL]\ncase inr\nn m : ℕ\nhm : m ≠ 0\n⊢ n ∈ divisors m ↔ n ∣ m ∧ m ≠ 0\n[PROOFSTEP]\nsimp only [hm, Ne.def, not_false_iff, and_true_iff, ← filter_dvd_eq_divisors hm, mem_filter, mem_range,\n and_iff_right_iff_imp, lt_succ_iff]\n[GOAL]\ncase inr\nn m : ℕ\nhm : m ≠ 0\n⊢ n ∣ m → n ≤ m\n[PROOFSTEP]\nexact le_of_dvd hm.bot_lt\n[GOAL]\nn : ℕ\n⊢ 1 ∈ divisors n ↔ n ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nn m : ℕ\nh : n ∈ divisors m\n⊢ n ∣ m\n[PROOFSTEP]\ncases m\n[GOAL]\ncase zero\nn : ℕ\nh : n ∈ divisors zero\n⊢ n ∣ zero\n[PROOFSTEP]\napply dvd_zero\n[GOAL]\ncase succ\nn n✝ : ℕ\nh : n ∈ divisors (succ n✝)\n⊢ n ∣ succ n✝\n[PROOFSTEP]\nsimp [mem_divisors.1 h]\n[GOAL]\nn : ℕ\nx : ℕ × ℕ\n⊢ x ∈ divisorsAntidiagonal n ↔ x.fst * x.snd = n ∧ n ≠ 0\n[PROOFSTEP]\nsimp only [divisorsAntidiagonal, Finset.mem_Ico, Ne.def, Finset.mem_filter, Finset.mem_product]\n[GOAL]\nn : ℕ\nx : ℕ × ℕ\n⊢ ((1 ≤ x.fst ∧ x.fst < n + 1) ∧ 1 ≤ x.snd ∧ x.snd < n + 1) ∧ x.fst * x.snd = n ↔ x.fst * x.snd = n ∧ ¬n = 0\n[PROOFSTEP]\nrw [and_comm]\n[GOAL]\nn : ℕ\nx : ℕ × ℕ\n⊢ x.fst * x.snd = n ∧ (1 ≤ x.fst ∧ x.fst < n + 1) ∧ 1 ≤ x.snd ∧ x.snd < n + 1 ↔ x.fst * x.snd = n ∧ ¬n = 0\n[PROOFSTEP]\napply and_congr_right\n[GOAL]\ncase h\nn : ℕ\nx : ℕ × ℕ\n⊢ x.fst * x.snd = n → ((1 ≤ x.fst ∧ x.fst < n + 1) ∧ 1 ≤ x.snd ∧ x.snd < n + 1 ↔ ¬n = 0)\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase h\nx : ℕ × ℕ\n⊢ (1 ≤ x.fst ∧ x.fst < x.fst * x.snd + 1) ∧ 1 ≤ x.snd ∧ x.snd < x.fst * x.snd + 1 ↔ ¬x.fst * x.snd = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nx : ℕ × ℕ\n⊢ (1 ≤ x.fst ∧ x.fst < x.fst * x.snd + 1) ∧ 1 ≤ x.snd ∧ x.snd < x.fst * x.snd + 1 → ¬x.fst * x.snd = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mpr\nx : ℕ × ℕ\n⊢ ¬x.fst * x.snd = 0 → (1 ≤ x.fst ∧ x.fst < x.fst * x.snd + 1) ∧ 1 ≤ x.snd ∧ x.snd < x.fst * x.snd + 1\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mp\nx : ℕ × ℕ\nh : (1 ≤ x.fst ∧ x.fst < x.fst * x.snd + 1) ∧ 1 ≤ x.snd ∧ x.snd < x.fst * x.snd + 1\n⊢ ¬x.fst * x.snd = 0\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\ncase h.mp\nx : ℕ × ℕ\nh : x.fst * x.snd = 0\n⊢ 1 ≤ x.fst ∧ x.fst < x.fst * x.snd + 1 → 1 ≤ x.snd → x.fst * x.snd + 1 ≤ x.snd\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase h.mpr\nx : ℕ × ℕ\nh : ¬x.fst * x.snd = 0\n⊢ (1 ≤ x.fst ∧ x.fst < x.fst * x.snd + 1) ∧ 1 ≤ x.snd ∧ x.snd < x.fst * x.snd + 1\n[PROOFSTEP]\nrw [Nat.lt_add_one_iff, Nat.lt_add_one_iff]\n[GOAL]\ncase h.mpr\nx : ℕ × ℕ\nh : ¬x.fst * x.snd = 0\n⊢ (1 ≤ x.fst ∧ x.fst ≤ x.fst * x.snd) ∧ 1 ≤ x.snd ∧ x.snd ≤ x.fst * x.snd\n[PROOFSTEP]\nrw [mul_eq_zero, not_or] at h \n[GOAL]\ncase h.mpr\nx : ℕ × ℕ\nh : ¬x.fst = 0 ∧ ¬x.snd = 0\n⊢ (1 ≤ x.fst ∧ x.fst ≤ x.fst * x.snd) ∧ 1 ≤ x.snd ∧ x.snd ≤ x.fst * x.snd\n[PROOFSTEP]\nsimp only [succ_le_of_lt (Nat.pos_of_ne_zero h.1), succ_le_of_lt (Nat.pos_of_ne_zero h.2), true_and_iff]\n[GOAL]\ncase h.mpr\nx : ℕ × ℕ\nh : ¬x.fst = 0 ∧ ¬x.snd = 0\n⊢ x.fst ≤ x.fst * x.snd ∧ x.snd ≤ x.fst * x.snd\n[PROOFSTEP]\nexact ⟨le_mul_of_pos_right (Nat.pos_of_ne_zero h.2), le_mul_of_pos_left (Nat.pos_of_ne_zero h.1)⟩\n[GOAL]\nn m : ℕ\n⊢ n ∈ divisors m → n ≤ m\n[PROOFSTEP]\ncases' m with m\n[GOAL]\ncase zero\nn : ℕ\n⊢ n ∈ divisors zero → n ≤ zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nn m : ℕ\n⊢ n ∈ divisors (succ m) → n ≤ succ m\n[PROOFSTEP]\nsimp only [mem_divisors, Nat.succ_ne_zero m, and_true_iff, Ne.def, not_false_iff]\n[GOAL]\ncase succ\nn m : ℕ\n⊢ n ∣ succ m → n ≤ succ m\n[PROOFSTEP]\nexact Nat.le_of_dvd (Nat.succ_pos m)\n[GOAL]\nn m : ℕ\nhzero : n ≠ 0\nh : m ∣ n\nhdiff : m ≠ n\n⊢ divisors m ⊆ properDivisors n\n[PROOFSTEP]\napply Finset.subset_iff.2\n[GOAL]\nn m : ℕ\nhzero : n ≠ 0\nh : m ∣ n\nhdiff : m ≠ n\n⊢ ∀ ⦃x : ℕ⦄, x ∈ divisors m → x ∈ properDivisors n\n[PROOFSTEP]\nintro x hx\n[GOAL]\nn m : ℕ\nhzero : n ≠ 0\nh : m ∣ n\nhdiff : m ≠ n\nx : ℕ\nhx : x ∈ divisors m\n⊢ x ∈ properDivisors n\n[PROOFSTEP]\nexact\n Nat.mem_properDivisors.2\n ⟨(Nat.mem_divisors.1 hx).1.trans h,\n lt_of_le_of_lt (divisor_le hx) (lt_of_le_of_ne (divisor_le (Nat.mem_divisors.2 ⟨h, hzero⟩)) hdiff)⟩\n[GOAL]\nn : ℕ\n⊢ divisors 0 = ∅\n[PROOFSTEP]\next\n[GOAL]\ncase a\nn a✝ : ℕ\n⊢ a✝ ∈ divisors 0 ↔ a✝ ∈ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ properDivisors 0 = ∅\n[PROOFSTEP]\next\n[GOAL]\ncase a\nn a✝ : ℕ\n⊢ a✝ ∈ properDivisors 0 ↔ a✝ ∈ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ divisors 1 = {1}\n[PROOFSTEP]\next\n[GOAL]\ncase a\nn a✝ : ℕ\n⊢ a✝ ∈ divisors 1 ↔ a✝ ∈ {1}\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ properDivisors 1 = ∅\n[PROOFSTEP]\nrw [properDivisors, Ico_self, filter_empty]\n[GOAL]\nn m : ℕ\nh : m ∈ divisors n\n⊢ 0 < m\n[PROOFSTEP]\ncases m\n[GOAL]\ncase zero\nn : ℕ\nh : zero ∈ divisors n\n⊢ 0 < zero\n[PROOFSTEP]\nrw [mem_divisors, zero_eq, zero_dvd_iff (a := n)] at h \n[GOAL]\ncase zero\nn : ℕ\nh : n = 0 ∧ n ≠ 0\n⊢ 0 < zero\n[PROOFSTEP]\ncases h.2 h.1\n[GOAL]\ncase succ\nn n✝ : ℕ\nh : succ n✝ ∈ divisors n\n⊢ 0 < succ n✝\n[PROOFSTEP]\napply Nat.succ_pos\n[GOAL]\nn : ℕ\n⊢ 1 ∈ properDivisors n ↔ 1 < n\n[PROOFSTEP]\nrw [mem_properDivisors, and_iff_right (one_dvd _)]\n[GOAL]\nn : ℕ\n⊢ divisorsAntidiagonal 0 = ∅\n[PROOFSTEP]\next\n[GOAL]\ncase a\nn : ℕ\na✝ : ℕ × ℕ\n⊢ a✝ ∈ divisorsAntidiagonal 0 ↔ a✝ ∈ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ divisorsAntidiagonal 1 = {(1, 1)}\n[PROOFSTEP]\next\n[GOAL]\ncase a\nn : ℕ\na✝ : ℕ × ℕ\n⊢ a✝ ∈ divisorsAntidiagonal 1 ↔ a✝ ∈ {(1, 1)}\n[PROOFSTEP]\nsimp [mul_eq_one, Prod.ext_iff]\n[GOAL]\nn : ℕ\nx : ℕ × ℕ\n⊢ Prod.swap x ∈ divisorsAntidiagonal n ↔ x ∈ divisorsAntidiagonal n\n[PROOFSTEP]\nrw [mem_divisorsAntidiagonal, mem_divisorsAntidiagonal, mul_comm, Prod.swap]\n[GOAL]\nn : ℕ\nx : ℕ × ℕ\n⊢ x.snd * x.fst = n ∧ ¬n = 0 ↔ x ∈ divisorsAntidiagonal n\n[PROOFSTEP]\nrw [mem_divisorsAntidiagonal, mul_comm]\n[GOAL]\nn : ℕ\nx : ℕ × ℕ\nh : x ∈ divisorsAntidiagonal n\n⊢ x.fst ∈ divisors n\n[PROOFSTEP]\nrw [mem_divisorsAntidiagonal] at h \n[GOAL]\nn : ℕ\nx : ℕ × ℕ\nh : x.fst * x.snd = n ∧ n ≠ 0\n⊢ x.fst ∈ divisors n\n[PROOFSTEP]\nsimp [Dvd.intro _ h.1, h.2]\n[GOAL]\nn : ℕ\nx : ℕ × ℕ\nh : x ∈ divisorsAntidiagonal n\n⊢ x.snd ∈ divisors n\n[PROOFSTEP]\nrw [mem_divisorsAntidiagonal] at h \n[GOAL]\nn : ℕ\nx : ℕ × ℕ\nh : x.fst * x.snd = n ∧ n ≠ 0\n⊢ x.snd ∈ divisors n\n[PROOFSTEP]\nsimp [Dvd.intro_left _ h.1, h.2]\n[GOAL]\nn : ℕ\n⊢ map (Equiv.toEmbedding (Equiv.prodComm ℕ ℕ)) (divisorsAntidiagonal n) = divisorsAntidiagonal n\n[PROOFSTEP]\nrw [← coe_inj, coe_map, Equiv.coe_toEmbedding, Equiv.coe_prodComm, Set.image_swap_eq_preimage_swap]\n[GOAL]\nn : ℕ\n⊢ Prod.swap ⁻¹' ↑(divisorsAntidiagonal n) = ↑(divisorsAntidiagonal n)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nn : ℕ\nx✝ : ℕ × ℕ\n⊢ x✝ ∈ Prod.swap ⁻¹' ↑(divisorsAntidiagonal n) ↔ x✝ ∈ ↑(divisorsAntidiagonal n)\n[PROOFSTEP]\nexact swap_mem_divisorsAntidiagonal\n[GOAL]\nn : ℕ\n⊢ image Prod.fst (divisorsAntidiagonal n) = divisors n\n[PROOFSTEP]\next\n[GOAL]\ncase a\nn a✝ : ℕ\n⊢ a✝ ∈ image Prod.fst (divisorsAntidiagonal n) ↔ a✝ ∈ divisors n\n[PROOFSTEP]\nsimp [Dvd.dvd, @eq_comm _ n (_ * _)]\n[GOAL]\nn : ℕ\n⊢ image Prod.snd (divisorsAntidiagonal n) = divisors n\n[PROOFSTEP]\nrw [← map_swap_divisorsAntidiagonal, map_eq_image, image_image]\n[GOAL]\nn : ℕ\n⊢ image (Prod.snd ∘ ↑(Equiv.toEmbedding (Equiv.prodComm ℕ ℕ))) (divisorsAntidiagonal n) = divisors n\n[PROOFSTEP]\nexact image_fst_divisorsAntidiagonal\n[GOAL]\nn : ℕ\n⊢ map\n { toFun := fun d => (d, n / d),\n inj' :=\n (_ :\n ∀ (p₁ p₂ : ℕ),\n (fun d => (d, n / d)) p₁ = (fun d => (d, n / d)) p₂ →\n ((fun d => (d, n / d)) p₁).fst = ((fun d => (d, n / d)) p₂).fst) }\n (divisors n) =\n divisorsAntidiagonal n\n[PROOFSTEP]\next ⟨d, nd⟩\n[GOAL]\ncase a.mk\nn d nd : ℕ\n⊢ (d, nd) ∈\n map\n { toFun := fun d => (d, n / d),\n inj' :=\n (_ :\n ∀ (p₁ p₂ : ℕ),\n (fun d => (d, n / d)) p₁ = (fun d => (d, n / d)) p₂ →\n ((fun d => (d, n / d)) p₁).fst = ((fun d => (d, n / d)) p₂).fst) }\n (divisors n) ↔\n (d, nd) ∈ divisorsAntidiagonal n\n[PROOFSTEP]\nsimp only [mem_map, mem_divisorsAntidiagonal, Function.Embedding.coeFn_mk, mem_divisors, Prod.ext_iff, exists_prop,\n and_left_comm, exists_eq_left]\n[GOAL]\ncase a.mk\nn d nd : ℕ\n⊢ (d ∣ n ∧ n ≠ 0) ∧ n / d = nd ↔ d * nd = n ∧ n ≠ 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mk.mp\nn d nd : ℕ\n⊢ (d ∣ n ∧ n ≠ 0) ∧ n / d = nd → d * nd = n ∧ n ≠ 0\n[PROOFSTEP]\nrintro ⟨⟨⟨k, rfl⟩, hn⟩, rfl⟩\n[GOAL]\ncase a.mk.mp.intro.intro.intro\nd k : ℕ\nhn : d * k ≠ 0\n⊢ d * (d * k / d) = d * k ∧ d * k ≠ 0\n[PROOFSTEP]\nrw [Nat.mul_div_cancel_left _ (left_ne_zero_of_mul hn).bot_lt]\n[GOAL]\ncase a.mk.mp.intro.intro.intro\nd k : ℕ\nhn : d * k ≠ 0\n⊢ d * k = d * k ∧ d * k ≠ 0\n[PROOFSTEP]\nexact ⟨rfl, hn⟩\n[GOAL]\ncase a.mk.mpr\nn d nd : ℕ\n⊢ d * nd = n ∧ n ≠ 0 → (d ∣ n ∧ n ≠ 0) ∧ n / d = nd\n[PROOFSTEP]\nrintro ⟨rfl, hn⟩\n[GOAL]\ncase a.mk.mpr.intro\nd nd : ℕ\nhn : d * nd ≠ 0\n⊢ (d ∣ d * nd ∧ d * nd ≠ 0) ∧ d * nd / d = nd\n[PROOFSTEP]\nexact ⟨⟨dvd_mul_right _ _, hn⟩, Nat.mul_div_cancel_left _ (left_ne_zero_of_mul hn).bot_lt⟩\n[GOAL]\nn : ℕ\n⊢ map\n { toFun := fun d => (n / d, d),\n inj' :=\n (_ :\n ∀ (p₁ p₂ : ℕ),\n (fun d => (n / d, d)) p₁ = (fun d => (n / d, d)) p₂ →\n ((fun d => (n / d, d)) p₁).snd = ((fun d => (n / d, d)) p₂).snd) }\n (divisors n) =\n divisorsAntidiagonal n\n[PROOFSTEP]\napply Finset.map_injective (Equiv.prodComm _ _).toEmbedding\n[GOAL]\ncase a\nn : ℕ\n⊢ map (Equiv.toEmbedding (Equiv.prodComm ℕ ℕ))\n (map\n { toFun := fun d => (n / d, d),\n inj' :=\n (_ :\n ∀ (p₁ p₂ : ℕ),\n (fun d => (n / d, d)) p₁ = (fun d => (n / d, d)) p₂ →\n ((fun d => (n / d, d)) p₁).snd = ((fun d => (n / d, d)) p₂).snd) }\n (divisors n)) =\n map (Equiv.toEmbedding (Equiv.prodComm ℕ ℕ)) (divisorsAntidiagonal n)\n[PROOFSTEP]\nrw [map_swap_divisorsAntidiagonal, ← map_div_right_divisors, Finset.map_map]\n[GOAL]\ncase a\nn : ℕ\n⊢ map\n (Function.Embedding.trans\n { toFun := fun d => (n / d, d),\n inj' :=\n (_ :\n ∀ (p₁ p₂ : ℕ),\n (fun d => (n / d, d)) p₁ = (fun d => (n / d, d)) p₂ →\n ((fun d => (n / d, d)) p₁).snd = ((fun d => (n / d, d)) p₂).snd) }\n (Equiv.toEmbedding (Equiv.prodComm ℕ ℕ)))\n (divisors n) =\n map\n { toFun := fun d => (d, n / d),\n inj' :=\n (_ :\n ∀ (p₁ p₂ : ℕ),\n (fun d => (d, n / d)) p₁ = (fun d => (d, n / d)) p₂ →\n ((fun d => (d, n / d)) p₁).fst = ((fun d => (d, n / d)) p₂).fst) }\n (divisors n)\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\n⊢ ∑ i in divisors n, i = ∑ i in properDivisors n, i + n\n[PROOFSTEP]\nrcases Decidable.eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase inl\n⊢ ∑ i in divisors 0, i = ∑ i in properDivisors 0, i + 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nn : ℕ\nhn : n ≠ 0\n⊢ ∑ i in divisors n, i = ∑ i in properDivisors n, i + n\n[PROOFSTEP]\nrw [← cons_self_properDivisors hn, Finset.sum_cons, add_comm]\n[GOAL]\nn : ℕ\nh : 0 < n\n⊢ Perfect n ↔ ∑ i in divisors n, i = 2 * n\n[PROOFSTEP]\nrw [perfect_iff_sum_properDivisors h, sum_divisors_eq_sum_properDivisors_add_self, two_mul]\n[GOAL]\nn : ℕ\nh : 0 < n\n⊢ ∑ i in properDivisors n, i = n ↔ ∑ i in properDivisors n, i + n = n + n\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn : ℕ\nh : 0 < n\n⊢ ∑ i in properDivisors n, i = n → ∑ i in properDivisors n, i + n = n + n\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nn : ℕ\nh : 0 < n\n⊢ ∑ i in properDivisors n, i + n = n + n → ∑ i in properDivisors n, i = n\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nn : ℕ\nh✝ : 0 < n\nh : ∑ i in properDivisors n, i = n\n⊢ ∑ i in properDivisors n, i + n = n + n\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase mpr\nn : ℕ\nh✝ : 0 < n\nh : ∑ i in properDivisors n, i + n = n + n\n⊢ ∑ i in properDivisors n, i = n\n[PROOFSTEP]\napply add_right_cancel h\n[GOAL]\nn p : ℕ\npp : Prime p\nk x : ℕ\n⊢ x ∈ divisors (p ^ k) ↔ ∃ j x_1, x = p ^ j\n[PROOFSTEP]\nrw [mem_divisors, Nat.dvd_prime_pow pp, and_iff_left (ne_of_gt (pow_pos pp.pos k))]\n[GOAL]\nn p : ℕ\npp : Prime p\nk x : ℕ\n⊢ (∃ k_1, k_1 ≤ k ∧ x = p ^ k_1) ↔ ∃ j x_1, x = p ^ j\n[PROOFSTEP]\nsimp\n[GOAL]\nn p : ℕ\npp : Prime p\n⊢ Nat.divisors p = {1, p}\n[PROOFSTEP]\next\n[GOAL]\ncase a\nn p : ℕ\npp : Prime p\na✝ : ℕ\n⊢ a✝ ∈ Nat.divisors p ↔ a✝ ∈ {1, p}\n[PROOFSTEP]\nrw [mem_divisors, dvd_prime pp, and_iff_left pp.ne_zero, Finset.mem_insert, Finset.mem_singleton]\n[GOAL]\nn p : ℕ\npp : Prime p\n⊢ Nat.properDivisors p = {1}\n[PROOFSTEP]\nrw [← erase_insert properDivisors.not_self_mem, insert_self_properDivisors pp.ne_zero, pp.divisors, pair_comm,\n erase_insert fun con => pp.ne_one (mem_singleton.1 con)]\n[GOAL]\nn p : ℕ\npp : Prime p\nk : ℕ\n⊢ divisors (p ^ k) = map { toFun := Nat.pow p, inj' := (_ : Function.Injective fun n => p ^ n) } (range (k + 1))\n[PROOFSTEP]\next a\n[GOAL]\ncase a\nn p : ℕ\npp : Prime p\nk a : ℕ\n⊢ a ∈ divisors (p ^ k) ↔ a ∈ map { toFun := Nat.pow p, inj' := (_ : Function.Injective fun n => p ^ n) } (range (k + 1))\n[PROOFSTEP]\nsimp only [mem_divisors, mem_map, mem_range, lt_succ_iff, Function.Embedding.coeFn_mk, Nat.pow_eq,\n mem_divisors_prime_pow pp k]\n[GOAL]\ncase a\nn p : ℕ\npp : Prime p\nk a : ℕ\n⊢ a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ a_1, a_1 ≤ k ∧ p ^ a_1 = a\n[PROOFSTEP]\nhave := mem_divisors_prime_pow pp k (x := a)\n[GOAL]\ncase a\nn p : ℕ\npp : Prime p\nk a : ℕ\nthis : a ∈ divisors (p ^ k) ↔ ∃ j x, a = p ^ j\n⊢ a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ a_1, a_1 ≤ k ∧ p ^ a_1 = a\n[PROOFSTEP]\nrw [mem_divisors] at this \n[GOAL]\ncase a\nn p : ℕ\npp : Prime p\nk a : ℕ\nthis : a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ j x, a = p ^ j\n⊢ a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ a_1, a_1 ≤ k ∧ p ^ a_1 = a\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase a\nn p : ℕ\npp : Prime p\nk a : ℕ\nthis : a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ j x, a = p ^ j\n⊢ (∃ j x, a = p ^ j) ↔ ∃ a_1, a_1 ≤ k ∧ p ^ a_1 = a\n[PROOFSTEP]\nrefine ⟨?_, ?_⟩\n[GOAL]\ncase a.refine_1\nn p : ℕ\npp : Prime p\nk a : ℕ\nthis : a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ j x, a = p ^ j\n⊢ (∃ j x, a = p ^ j) → ∃ a_2, a_2 ≤ k ∧ p ^ a_2 = a\n[PROOFSTEP]\nintro h\n[GOAL]\ncase a.refine_1\nn p : ℕ\npp : Prime p\nk a : ℕ\nthis : a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ j x, a = p ^ j\nh : ∃ j x, a = p ^ j\n⊢ ∃ a_1, a_1 ≤ k ∧ p ^ a_1 = a\n[PROOFSTEP]\nrcases h with ⟨x, hx, hap⟩\n[GOAL]\ncase a.refine_1.intro.intro\nn p : ℕ\npp : Prime p\nk a : ℕ\nthis : a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ j x, a = p ^ j\nx : ℕ\nhx : x ≤ k\nhap : a = p ^ x\n⊢ ∃ a_1, a_1 ≤ k ∧ p ^ a_1 = a\n[PROOFSTEP]\nuse x\n[GOAL]\ncase h\nn p : ℕ\npp : Prime p\nk a : ℕ\nthis : a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ j x, a = p ^ j\nx : ℕ\nhx : x ≤ k\nhap : a = p ^ x\n⊢ x ≤ k ∧ p ^ x = a\n[PROOFSTEP]\ntauto\n[GOAL]\ncase a.refine_2\nn p : ℕ\npp : Prime p\nk a : ℕ\nthis : a ∣ p ^ k ∧ p ^ k ≠ 0 ↔ ∃ j x, a = p ^ j\n⊢ (∃ a_1, a_1 ≤ k ∧ p ^ a_1 = a) → ∃ j x, a = p ^ j\n[PROOFSTEP]\ntauto\n[GOAL]\nn : ℕ\ns : Finset ℕ\nhsub : s ⊆ properDivisors n\n⊢ ∑ x in s, x = ∑ x in properDivisors n, x → s = properDivisors n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\ns : Finset ℕ\nhsub : s ⊆ properDivisors zero\n⊢ ∑ x in s, x = ∑ x in properDivisors zero, x → s = properDivisors zero\n[PROOFSTEP]\nrw [properDivisors_zero, subset_empty] at hsub \n[GOAL]\ncase zero\ns : Finset ℕ\nhsub : s = ∅\n⊢ ∑ x in s, x = ∑ x in properDivisors zero, x → s = properDivisors zero\n[PROOFSTEP]\nsimp [hsub]\n[GOAL]\ncase succ\ns : Finset ℕ\nn✝ : ℕ\nhsub : s ⊆ properDivisors (succ n✝)\n⊢ ∑ x in s, x = ∑ x in properDivisors (succ n✝), x → s = properDivisors (succ n✝)\n[PROOFSTEP]\nclassical\nrw [← sum_sdiff hsub]\nintro h\napply Subset.antisymm hsub\nrw [← sdiff_eq_empty_iff_subset]\ncontrapose h\nrw [← Ne.def, ← nonempty_iff_ne_empty] at h \napply ne_of_lt\nrw [← zero_add (∑ x in s, x), ← add_assoc, add_zero]\napply add_lt_add_right\nhave hlt := sum_lt_sum_of_nonempty h fun x hx => pos_of_mem_properDivisors (sdiff_subset _ _ hx)\nsimp only [sum_const_zero] at hlt \napply hlt\n[GOAL]\ncase succ\ns : Finset ℕ\nn✝ : ℕ\nhsub : s ⊆ properDivisors (succ n✝)\n⊢ ∑ x in s, x = ∑ x in properDivisors (succ n✝), x → s = properDivisors (succ n✝)\n[PROOFSTEP]\nrw [← sum_sdiff hsub]\n[GOAL]\ncase succ\ns : Finset ℕ\nn✝ : ℕ\nhsub : s ⊆ properDivisors (succ n✝)\n⊢ ∑ x in s, x = ∑ x in properDivisors (succ n✝) \\ s, x + ∑ x in s, x → s = properDivisors (succ n✝)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase succ\ns : Finset ℕ\nn✝ : ℕ\nhsub : s ⊆ properDivisors (succ n✝)\nh : ∑ x in s, x = ∑ x in properDivisors (succ n✝) \\ s, x + ∑ x in s, x\n⊢ s = properDivisors (succ n✝)\n[PROOFSTEP]\napply Subset.antisymm hsub\n[GOAL]\ncase succ\ns : Finset ℕ\nn✝ : ℕ\nhsub : s ⊆ properDivisors (succ n✝)\nh : ∑ x in s, x = ∑ x in properDivisors (succ n✝) \\ s, x + ∑ x in s, x\n⊢ properDivisors (succ n✝) ⊆ s\n[PROOFSTEP]\nrw [← sdiff_eq_empty_iff_subset]\n[GOAL]\ncase succ\ns : Finset ℕ\nn✝ : ℕ\nhsub : s ⊆ properDivisors (succ n✝)\nh : ∑ x in s, x = ∑ x in properDivisors (succ n✝) \\ s, x + ∑ x in s, x\n⊢ properDivisors (succ n✝) \\ s = ∅\n[PROOFSTEP]\ncontrapose h\n[GOAL]\ncase succ\ns : Finset ℕ\nn✝ : ℕ\nhsub : s ⊆ properDivisors (succ n✝)\nh : ¬properDivisors (succ n✝) \\ s = ∅\n⊢ ¬∑ x in s, x = ∑ x in properDivisors (succ n✝) \\ s, x + ∑ x in s, x\n[PROOFSTEP]\nrw [← Ne.def, ← nonempty_iff_ne_empty] at h \n[GOAL]\ncase succ\ns : Finset ℕ\nn✝ : ℕ\nhsub : s ⊆ properDivisors (succ n✝)\nh : Finset.Nonempty (properDivisors (succ n✝) \\ s)\n⊢ ¬∑ x in s, x = ∑ x in properDivisors (succ n✝) \\ s, x + ∑ x in s, x\n[PROOFSTEP]\napply ne_of_lt\n[GOAL]\ncase succ.h\ns : Finset ℕ\nn✝ : ℕ\nhsub : s ⊆ properDivisors (succ n✝)\nh : Finset.Nonempty (properDivisors (succ n✝) \\ s)\n⊢ ∑ x in s, x < ∑ x in properDivisors (succ n✝) \\ s, x + ∑ x in s, x\n[PROOFSTEP]\nrw [← zero_add (∑ x in s, x), ← add_assoc, add_zero]\n[GOAL]\ncase succ.h\ns : Finset ℕ\nn✝ : ℕ\nhsub : s ⊆ properDivisors (succ n✝)\nh : Finset.Nonempty (properDivisors (succ n✝) \\ s)\n⊢ 0 + ∑ x in s, x < ∑ x in properDivisors (succ n✝) \\ s, x + ∑ x in s, x\n[PROOFSTEP]\napply add_lt_add_right\n[GOAL]\ncase succ.h.bc\ns : Finset ℕ\nn✝ : ℕ\nhsub : s ⊆ properDivisors (succ n✝)\nh : Finset.Nonempty (properDivisors (succ n✝) \\ s)\n⊢ 0 < ∑ x in properDivisors (succ n✝) \\ s, x\n[PROOFSTEP]\nhave hlt := sum_lt_sum_of_nonempty h fun x hx => pos_of_mem_properDivisors (sdiff_subset _ _ hx)\n[GOAL]\ncase succ.h.bc\ns : Finset ℕ\nn✝ : ℕ\nhsub : s ⊆ properDivisors (succ n✝)\nh : Finset.Nonempty (properDivisors (succ n✝) \\ s)\nhlt : ∑ i in properDivisors (succ n✝) \\ s, 0 < ∑ i in properDivisors (succ n✝) \\ s, i\n⊢ 0 < ∑ x in properDivisors (succ n✝) \\ s, x\n[PROOFSTEP]\nsimp only [sum_const_zero] at hlt \n[GOAL]\ncase succ.h.bc\ns : Finset ℕ\nn✝ : ℕ\nhsub : s ⊆ properDivisors (succ n✝)\nh : Finset.Nonempty (properDivisors (succ n✝) \\ s)\nhlt : 0 < ∑ i in properDivisors (succ n✝) \\ s, i\n⊢ 0 < ∑ x in properDivisors (succ n✝) \\ s, x\n[PROOFSTEP]\napply hlt\n[GOAL]\nn : ℕ\nh : ∑ x in properDivisors n, x ∣ n\n⊢ ∑ x in properDivisors n, x = 1 ∨ ∑ x in properDivisors n, x = n\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nh : ∑ x in properDivisors zero, x ∣ zero\n⊢ ∑ x in properDivisors zero, x = 1 ∨ ∑ x in properDivisors zero, x = zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nn : ℕ\nh : ∑ x in properDivisors (succ n), x ∣ succ n\n⊢ ∑ x in properDivisors (succ n), x = 1 ∨ ∑ x in properDivisors (succ n), x = succ n\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase succ.zero\nh : ∑ x in properDivisors (succ zero), x ∣ succ zero\n⊢ ∑ x in properDivisors (succ zero), x = 1 ∨ ∑ x in properDivisors (succ zero), x = succ zero\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\ncase succ.zero\nh : ∑ x in properDivisors (succ zero), x ≠ 1 ∧ ∑ x in properDivisors (succ zero), x ≠ succ zero\n⊢ ¬∑ x in properDivisors (succ zero), x ∣ succ zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.succ\nn : ℕ\nh : ∑ x in properDivisors (succ (succ n)), x ∣ succ (succ n)\n⊢ ∑ x in properDivisors (succ (succ n)), x = 1 ∨ ∑ x in properDivisors (succ (succ n)), x = succ (succ n)\n[PROOFSTEP]\nrw [or_iff_not_imp_right]\n[GOAL]\ncase succ.succ\nn : ℕ\nh : ∑ x in properDivisors (succ (succ n)), x ∣ succ (succ n)\n⊢ ¬∑ x in properDivisors (succ (succ n)), x = succ (succ n) → ∑ x in properDivisors (succ (succ n)), x = 1\n[PROOFSTEP]\nintro ne_n\n[GOAL]\ncase succ.succ\nn : ℕ\nh : ∑ x in properDivisors (succ (succ n)), x ∣ succ (succ n)\nne_n : ¬∑ x in properDivisors (succ (succ n)), x = succ (succ n)\n⊢ ∑ x in properDivisors (succ (succ n)), x = 1\n[PROOFSTEP]\nhave hlt : ∑ x in n.succ.succ.properDivisors, x < n.succ.succ := lt_of_le_of_ne (Nat.le_of_dvd (Nat.succ_pos _) h) ne_n\n[GOAL]\ncase succ.succ\nn : ℕ\nh : ∑ x in properDivisors (succ (succ n)), x ∣ succ (succ n)\nne_n : ¬∑ x in properDivisors (succ (succ n)), x = succ (succ n)\nhlt : ∑ x in properDivisors (succ (succ n)), x < succ (succ n)\n⊢ ∑ x in properDivisors (succ (succ n)), x = 1\n[PROOFSTEP]\nsymm\n[GOAL]\ncase succ.succ\nn : ℕ\nh : ∑ x in properDivisors (succ (succ n)), x ∣ succ (succ n)\nne_n : ¬∑ x in properDivisors (succ (succ n)), x = succ (succ n)\nhlt : ∑ x in properDivisors (succ (succ n)), x < succ (succ n)\n⊢ 1 = ∑ x in properDivisors (succ (succ n)), x\n[PROOFSTEP]\nrw [← mem_singleton,\n eq_properDivisors_of_subset_of_sum_eq_sum (singleton_subset_iff.2 (mem_properDivisors.2 ⟨h, hlt⟩)) sum_singleton,\n mem_properDivisors]\n[GOAL]\ncase succ.succ\nn : ℕ\nh : ∑ x in properDivisors (succ (succ n)), x ∣ succ (succ n)\nne_n : ¬∑ x in properDivisors (succ (succ n)), x = succ (succ n)\nhlt : ∑ x in properDivisors (succ (succ n)), x < succ (succ n)\n⊢ 1 ∣ succ (succ n) ∧ 1 < succ (succ n)\n[PROOFSTEP]\nrefine' ⟨one_dvd _, Nat.succ_lt_succ (Nat.succ_pos _)⟩\n[GOAL]\nn : ℕ\nα : Type u_1\ninst✝ : CommMonoid α\np : ℕ\nf : ℕ → α\nh : Prime p\n⊢ ∏ x in Nat.properDivisors p, f x = f 1\n[PROOFSTEP]\nsimp [h.properDivisors]\n[GOAL]\nn : ℕ\nα : Type u_1\ninst✝ : CommMonoid α\np : ℕ\nf : ℕ → α\nh : Prime p\n⊢ ∏ x in Nat.divisors p, f x = f p * f 1\n[PROOFSTEP]\nrw [← cons_self_properDivisors h.ne_zero, prod_cons, h.prod_properDivisors]\n[GOAL]\nn : ℕ\n⊢ properDivisors n = {1} ↔ Prime n\n[PROOFSTEP]\nrefine ⟨?_, ?_⟩\n[GOAL]\ncase refine_1\nn : ℕ\n⊢ properDivisors n = {1} → Prime n\n[PROOFSTEP]\nintro h\n[GOAL]\ncase refine_1\nn : ℕ\nh : properDivisors n = {1}\n⊢ Prime n\n[PROOFSTEP]\nrefine' Nat.prime_def_lt''.mpr ⟨_, fun m hdvd => _⟩\n[GOAL]\ncase refine_1.refine'_1\nn : ℕ\nh : properDivisors n = {1}\n⊢ 2 ≤ n\n[PROOFSTEP]\nmatch n with\n| 0 => contradiction\n| 1 => contradiction\n| Nat.succ (Nat.succ n) => simp [succ_le_succ]\n[GOAL]\nn : ℕ\nh : properDivisors 0 = {1}\n⊢ 2 ≤ 0\n[PROOFSTEP]\ncontradiction\n[GOAL]\nn : ℕ\nh : properDivisors 1 = {1}\n⊢ 2 ≤ 1\n[PROOFSTEP]\ncontradiction\n[GOAL]\nn✝ n : ℕ\nh : properDivisors (succ (succ n)) = {1}\n⊢ 2 ≤ succ (succ n)\n[PROOFSTEP]\nsimp [succ_le_succ]\n[GOAL]\ncase refine_1.refine'_2\nn : ℕ\nh : properDivisors n = {1}\nm : ℕ\nhdvd : m ∣ n\n⊢ m = 1 ∨ m = n\n[PROOFSTEP]\nrw [← mem_singleton, ← h, mem_properDivisors]\n[GOAL]\ncase refine_1.refine'_2\nn : ℕ\nh : properDivisors n = {1}\nm : ℕ\nhdvd : m ∣ n\n⊢ m ∣ n ∧ m < n ∨ m = n\n[PROOFSTEP]\nhave := Nat.le_of_dvd ?_ hdvd\n[GOAL]\ncase refine_1.refine'_2.refine_2\nn : ℕ\nh : properDivisors n = {1}\nm : ℕ\nhdvd : m ∣ n\nthis : m ≤ n\n⊢ m ∣ n ∧ m < n ∨ m = n\n[PROOFSTEP]\nsimp [hdvd, this]\n[GOAL]\ncase refine_1.refine'_2.refine_2\nn : ℕ\nh : properDivisors n = {1}\nm : ℕ\nhdvd : m ∣ n\nthis : m ≤ n\n⊢ m < n ∨ m = n\n[PROOFSTEP]\nexact (le_iff_eq_or_lt.mp this).symm\n[GOAL]\ncase refine_1.refine'_2.refine_1\nn : ℕ\nh : properDivisors n = {1}\nm : ℕ\nhdvd : m ∣ n\n⊢ 0 < n\n[PROOFSTEP]\nby_contra'\n[GOAL]\ncase refine_1.refine'_2.refine_1\nn : ℕ\nh : properDivisors n = {1}\nm : ℕ\nhdvd : m ∣ n\nthis : n ≤ 0\n⊢ False\n[PROOFSTEP]\nsimp [nonpos_iff_eq_zero.mp this, this] at h \n[GOAL]\ncase refine_2\nn : ℕ\n⊢ Prime n → properDivisors n = {1}\n[PROOFSTEP]\nexact fun h => Prime.properDivisors h\n[GOAL]\nn : ℕ\n⊢ ∑ x in properDivisors n, x = 1 ↔ Prime n\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\n⊢ ∑ x in properDivisors zero, x = 1 ↔ Prime zero\n[PROOFSTEP]\nsimp [Nat.not_prime_zero]\n[GOAL]\ncase succ\nn : ℕ\n⊢ ∑ x in properDivisors (succ n), x = 1 ↔ Prime (succ n)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase succ.zero\n⊢ ∑ x in properDivisors (succ zero), x = 1 ↔ Prime (succ zero)\n[PROOFSTEP]\nsimp [Nat.not_prime_one]\n[GOAL]\ncase succ.succ\nn✝ : ℕ\n⊢ ∑ x in properDivisors (succ (succ n✝)), x = 1 ↔ Prime (succ (succ n✝))\n[PROOFSTEP]\nrw [← properDivisors_eq_singleton_one_iff_prime]\n[GOAL]\ncase succ.succ\nn✝ : ℕ\n⊢ ∑ x in properDivisors (succ (succ n✝)), x = 1 ↔ properDivisors (succ (succ n✝)) = {1}\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => h.symm ▸ sum_singleton⟩\n[GOAL]\ncase succ.succ\nn✝ : ℕ\nh : ∑ x in properDivisors (succ (succ n✝)), x = 1\n⊢ properDivisors (succ (succ n✝)) = {1}\n[PROOFSTEP]\nrw [@eq_comm (Finset ℕ) _ _]\n[GOAL]\ncase succ.succ\nn✝ : ℕ\nh : ∑ x in properDivisors (succ (succ n✝)), x = 1\n⊢ {1} = properDivisors (succ (succ n✝))\n[PROOFSTEP]\napply\n eq_properDivisors_of_subset_of_sum_eq_sum\n (singleton_subset_iff.2 (one_mem_properDivisors_iff_one_lt.2 (succ_lt_succ (Nat.succ_pos _))))\n (Eq.trans sum_singleton h.symm)\n[GOAL]\nn p : ℕ\npp : Prime p\nk x : ℕ\n⊢ x ∈ properDivisors (p ^ k) ↔ ∃ j x_1, x = p ^ j\n[PROOFSTEP]\nrw [mem_properDivisors, Nat.dvd_prime_pow pp, ← exists_and_right]\n[GOAL]\nn p : ℕ\npp : Prime p\nk x : ℕ\n⊢ (∃ x_1, (x_1 ≤ k ∧ x = p ^ x_1) ∧ x < p ^ k) ↔ ∃ j x_1, x = p ^ j\n[PROOFSTEP]\nsimp only [exists_prop, and_assoc]\n[GOAL]\nn p : ℕ\npp : Prime p\nk x : ℕ\n⊢ (∃ x_1, x_1 ≤ k ∧ x = p ^ x_1 ∧ x < p ^ k) ↔ ∃ j, j < k ∧ x = p ^ j\n[PROOFSTEP]\napply exists_congr\n[GOAL]\ncase h\nn p : ℕ\npp : Prime p\nk x : ℕ\n⊢ ∀ (a : ℕ), a ≤ k ∧ x = p ^ a ∧ x < p ^ k ↔ a < k ∧ x = p ^ a\n[PROOFSTEP]\nintro a\n[GOAL]\ncase h\nn p : ℕ\npp : Prime p\nk x a : ℕ\n⊢ a ≤ k ∧ x = p ^ a ∧ x < p ^ k ↔ a < k ∧ x = p ^ a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nn p : ℕ\npp : Prime p\nk x a : ℕ\n⊢ a ≤ k ∧ x = p ^ a ∧ x < p ^ k → a < k ∧ x = p ^ a\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mpr\nn p : ℕ\npp : Prime p\nk x a : ℕ\n⊢ a < k ∧ x = p ^ a → a ≤ k ∧ x = p ^ a ∧ x < p ^ k\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mp\nn p : ℕ\npp : Prime p\nk x a : ℕ\nh : a ≤ k ∧ x = p ^ a ∧ x < p ^ k\n⊢ a < k ∧ x = p ^ a\n[PROOFSTEP]\nrcases h with ⟨_h_left, rfl, h_right⟩\n[GOAL]\ncase h.mp.intro.intro\nn p : ℕ\npp : Prime p\nk a : ℕ\n_h_left : a ≤ k\nh_right : p ^ a < p ^ k\n⊢ a < k ∧ p ^ a = p ^ a\n[PROOFSTEP]\nrw [pow_lt_pow_iff pp.one_lt] at h_right \n[GOAL]\ncase h.mp.intro.intro\nn p : ℕ\npp : Prime p\nk a : ℕ\n_h_left : a ≤ k\nh_right : a < k\n⊢ a < k ∧ p ^ a = p ^ a\n[PROOFSTEP]\nexact ⟨h_right, by rfl⟩\n[GOAL]\nn p : ℕ\npp : Prime p\nk a : ℕ\n_h_left : a ≤ k\nh_right : a < k\n⊢ p ^ a = p ^ a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.mpr\nn p : ℕ\npp : Prime p\nk x a : ℕ\nh : a < k ∧ x = p ^ a\n⊢ a ≤ k ∧ x = p ^ a ∧ x < p ^ k\n[PROOFSTEP]\nrcases h with ⟨h_left, rfl⟩\n[GOAL]\ncase h.mpr.intro\nn p : ℕ\npp : Prime p\nk a : ℕ\nh_left : a < k\n⊢ a ≤ k ∧ p ^ a = p ^ a ∧ p ^ a < p ^ k\n[PROOFSTEP]\nrw [pow_lt_pow_iff pp.one_lt]\n[GOAL]\ncase h.mpr.intro\nn p : ℕ\npp : Prime p\nk a : ℕ\nh_left : a < k\n⊢ a ≤ k ∧ p ^ a = p ^ a ∧ a < k\n[PROOFSTEP]\nsimp [h_left, le_of_lt]\n[GOAL]\nn p : ℕ\npp : Prime p\nk : ℕ\n⊢ properDivisors (p ^ k) = map { toFun := Nat.pow p, inj' := (_ : Function.Injective fun n => p ^ n) } (range k)\n[PROOFSTEP]\next a\n[GOAL]\ncase a\nn p : ℕ\npp : Prime p\nk a : ℕ\n⊢ a ∈ properDivisors (p ^ k) ↔ a ∈ map { toFun := Nat.pow p, inj' := (_ : Function.Injective fun n => p ^ n) } (range k)\n[PROOFSTEP]\nsimp only [mem_properDivisors, Nat.isUnit_iff, mem_map, mem_range, Function.Embedding.coeFn_mk, pow_eq]\n[GOAL]\ncase a\nn p : ℕ\npp : Prime p\nk a : ℕ\n⊢ a ∣ p ^ k ∧ a < p ^ k ↔ ∃ a_1, a_1 < k ∧ p ^ a_1 = a\n[PROOFSTEP]\nhave := mem_properDivisors_prime_pow pp k (x := a)\n[GOAL]\ncase a\nn p : ℕ\npp : Prime p\nk a : ℕ\nthis : a ∈ properDivisors (p ^ k) ↔ ∃ j x, a = p ^ j\n⊢ a ∣ p ^ k ∧ a < p ^ k ↔ ∃ a_1, a_1 < k ∧ p ^ a_1 = a\n[PROOFSTEP]\nrw [mem_properDivisors] at this \n[GOAL]\ncase a\nn p : ℕ\npp : Prime p\nk a : ℕ\nthis : a ∣ p ^ k ∧ a < p ^ k ↔ ∃ j x, a = p ^ j\n⊢ a ∣ p ^ k ∧ a < p ^ k ↔ ∃ a_1, a_1 < k ∧ p ^ a_1 = a\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase a\nn p : ℕ\npp : Prime p\nk a : ℕ\nthis : a ∣ p ^ k ∧ a < p ^ k ↔ ∃ j x, a = p ^ j\n⊢ (∃ j x, a = p ^ j) ↔ ∃ a_1, a_1 < k ∧ p ^ a_1 = a\n[PROOFSTEP]\nrefine ⟨?_, ?_⟩\n[GOAL]\ncase a.refine_1\nn p : ℕ\npp : Prime p\nk a : ℕ\nthis : a ∣ p ^ k ∧ a < p ^ k ↔ ∃ j x, a = p ^ j\n⊢ (∃ j x, a = p ^ j) → ∃ a_2, a_2 < k ∧ p ^ a_2 = a\n[PROOFSTEP]\nintro h\n[GOAL]\ncase a.refine_1\nn p : ℕ\npp : Prime p\nk a : ℕ\nthis : a ∣ p ^ k ∧ a < p ^ k ↔ ∃ j x, a = p ^ j\nh : ∃ j x, a = p ^ j\n⊢ ∃ a_1, a_1 < k ∧ p ^ a_1 = a\n[PROOFSTEP]\nrcases h with ⟨j, hj, hap⟩\n[GOAL]\ncase a.refine_1.intro.intro\nn p : ℕ\npp : Prime p\nk a : ℕ\nthis : a ∣ p ^ k ∧ a < p ^ k ↔ ∃ j x, a = p ^ j\nj : ℕ\nhj : j < k\nhap : a = p ^ j\n⊢ ∃ a_1, a_1 < k ∧ p ^ a_1 = a\n[PROOFSTEP]\nuse j\n[GOAL]\ncase h\nn p : ℕ\npp : Prime p\nk a : ℕ\nthis : a ∣ p ^ k ∧ a < p ^ k ↔ ∃ j x, a = p ^ j\nj : ℕ\nhj : j < k\nhap : a = p ^ j\n⊢ j < k ∧ p ^ j = a\n[PROOFSTEP]\ntauto\n[GOAL]\ncase a.refine_2\nn p : ℕ\npp : Prime p\nk a : ℕ\nthis : a ∣ p ^ k ∧ a < p ^ k ↔ ∃ j x, a = p ^ j\n⊢ (∃ a_1, a_1 < k ∧ p ^ a_1 = a) → ∃ j x, a = p ^ j\n[PROOFSTEP]\ntauto\n[GOAL]\nn : ℕ\nα : Type u_1\ninst✝ : CommMonoid α\nk p : ℕ\nf : ℕ → α\nh : Prime p\n⊢ ∏ x in properDivisors (p ^ k), f x = ∏ x in range k, f (p ^ x)\n[PROOFSTEP]\nsimp [h, properDivisors_prime_pow]\n[GOAL]\nn : ℕ\nα : Type u_1\ninst✝ : CommMonoid α\nk p : ℕ\nf : ℕ → α\nh : Prime p\n⊢ ∏ x in divisors (p ^ k), f x = ∏ x in range (k + 1), f (p ^ x)\n[PROOFSTEP]\nsimp [h, divisors_prime_pow]\n[GOAL]\nn✝ : ℕ\nM : Type u_1\ninst✝ : CommMonoid M\nf : ℕ → ℕ → M\nn : ℕ\n⊢ ∏ i in divisorsAntidiagonal n, f i.fst i.snd = ∏ i in divisors n, f i (n / i)\n[PROOFSTEP]\nrw [← map_div_right_divisors, Finset.prod_map]\n[GOAL]\nn✝ : ℕ\nM : Type u_1\ninst✝ : CommMonoid M\nf : ℕ → ℕ → M\nn : ℕ\n⊢ ∏ x in divisors n,\n f\n (↑{ toFun := fun d => (d, n / d),\n inj' :=\n (_ :\n ∀ (p₁ p₂ : ℕ),\n (fun d => (d, n / d)) p₁ = (fun d => (d, n / d)) p₂ →\n ((fun d => (d, n / d)) p₁).fst = ((fun d => (d, n / d)) p₂).fst) }\n x).fst\n (↑{ toFun := fun d => (d, n / d),\n inj' :=\n (_ :\n ∀ (p₁ p₂ : ℕ),\n (fun d => (d, n / d)) p₁ = (fun d => (d, n / d)) p₂ →\n ((fun d => (d, n / d)) p₁).fst = ((fun d => (d, n / d)) p₂).fst) }\n x).snd =\n ∏ i in divisors n, f i (n / i)\n[PROOFSTEP]\nrfl\n[GOAL]\nn✝ : ℕ\nM : Type u_1\ninst✝ : CommMonoid M\nf : ℕ → ℕ → M\nn : ℕ\n⊢ ∏ i in divisorsAntidiagonal n, f i.fst i.snd = ∏ i in divisors n, f (n / i) i\n[PROOFSTEP]\nrw [← map_swap_divisorsAntidiagonal, Finset.prod_map]\n[GOAL]\nn✝ : ℕ\nM : Type u_1\ninst✝ : CommMonoid M\nf : ℕ → ℕ → M\nn : ℕ\n⊢ ∏ x in divisorsAntidiagonal n,\n f (↑(Equiv.toEmbedding (Equiv.prodComm ℕ ℕ)) x).fst (↑(Equiv.toEmbedding (Equiv.prodComm ℕ ℕ)) x).snd =\n ∏ i in divisors n, f (n / i) i\n[PROOFSTEP]\nexact prod_divisorsAntidiagonal fun i j => f j i\n[GOAL]\nn✝ n : ℕ\n⊢ List.toFinset (factors n) = filter Prime (divisors n)\n[PROOFSTEP]\nrcases n.eq_zero_or_pos with (rfl | hn)\n[GOAL]\ncase inl\nn : ℕ\n⊢ List.toFinset (factors 0) = filter Prime (divisors 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nn✝ n : ℕ\nhn : n > 0\n⊢ List.toFinset (factors n) = filter Prime (divisors n)\n[PROOFSTEP]\next q\n[GOAL]\ncase inr.a\nn✝ n : ℕ\nhn : n > 0\nq : ℕ\n⊢ q ∈ List.toFinset (factors n) ↔ q ∈ filter Prime (divisors n)\n[PROOFSTEP]\nsimpa [hn, hn.ne', mem_factors] using and_comm\n[GOAL]\nn✝ n : ℕ\n⊢ image (fun x => n / x) (divisors n) = divisors n\n[PROOFSTEP]\nby_cases hn : n = 0\n[GOAL]\ncase pos\nn✝ n : ℕ\nhn : n = 0\n⊢ image (fun x => n / x) (divisors n) = divisors n\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\ncase neg\nn✝ n : ℕ\nhn : ¬n = 0\n⊢ image (fun x => n / x) (divisors n) = divisors n\n[PROOFSTEP]\next a\n[GOAL]\ncase neg.a\nn✝ n : ℕ\nhn : ¬n = 0\na : ℕ\n⊢ a ∈ image (fun x => n / x) (divisors n) ↔ a ∈ divisors n\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase neg.a.mp\nn✝ n : ℕ\nhn : ¬n = 0\na : ℕ\n⊢ a ∈ image (fun x => n / x) (divisors n) → a ∈ divisors n\n[PROOFSTEP]\nrw [mem_image]\n[GOAL]\ncase neg.a.mp\nn✝ n : ℕ\nhn : ¬n = 0\na : ℕ\n⊢ (∃ a_1, a_1 ∈ divisors n ∧ n / a_1 = a) → a ∈ divisors n\n[PROOFSTEP]\nrintro ⟨x, hx1, hx2⟩\n[GOAL]\ncase neg.a.mp.intro.intro\nn✝ n : ℕ\nhn : ¬n = 0\na x : ℕ\nhx1 : x ∈ divisors n\nhx2 : n / x = a\n⊢ a ∈ divisors n\n[PROOFSTEP]\nrw [mem_divisors] at *\n[GOAL]\ncase neg.a.mp.intro.intro\nn✝ n : ℕ\nhn : ¬n = 0\na x : ℕ\nhx1 : x ∣ n ∧ n ≠ 0\nhx2 : n / x = a\n⊢ a ∣ n ∧ n ≠ 0\n[PROOFSTEP]\nrefine' ⟨_, hn⟩\n[GOAL]\ncase neg.a.mp.intro.intro\nn✝ n : ℕ\nhn : ¬n = 0\na x : ℕ\nhx1 : x ∣ n ∧ n ≠ 0\nhx2 : n / x = a\n⊢ a ∣ n\n[PROOFSTEP]\nrw [← hx2]\n[GOAL]\ncase neg.a.mp.intro.intro\nn✝ n : ℕ\nhn : ¬n = 0\na x : ℕ\nhx1 : x ∣ n ∧ n ≠ 0\nhx2 : n / x = a\n⊢ n / x ∣ n\n[PROOFSTEP]\nexact div_dvd_of_dvd hx1.1\n[GOAL]\ncase neg.a.mpr\nn✝ n : ℕ\nhn : ¬n = 0\na : ℕ\n⊢ a ∈ divisors n → a ∈ image (fun x => n / x) (divisors n)\n[PROOFSTEP]\nrw [mem_divisors, mem_image]\n[GOAL]\ncase neg.a.mpr\nn✝ n : ℕ\nhn : ¬n = 0\na : ℕ\n⊢ a ∣ n ∧ n ≠ 0 → ∃ a_2, a_2 ∈ divisors n ∧ n / a_2 = a\n[PROOFSTEP]\nrintro ⟨h1, -⟩\n[GOAL]\ncase neg.a.mpr.intro\nn✝ n : ℕ\nhn : ¬n = 0\na : ℕ\nh1 : a ∣ n\n⊢ ∃ a_1, a_1 ∈ divisors n ∧ n / a_1 = a\n[PROOFSTEP]\nexact ⟨n / a, mem_divisors.mpr ⟨div_dvd_of_dvd h1, hn⟩, Nat.div_div_self h1 hn⟩\n[GOAL]\nn✝ : ℕ\nα : Type u_1\ninst✝ : CommMonoid α\nn : ℕ\nf : ℕ → α\n⊢ ∏ d in divisors n, f (n / d) = Finset.prod (divisors n) f\n[PROOFSTEP]\nby_cases hn : n = 0\n[GOAL]\ncase pos\nn✝ : ℕ\nα : Type u_1\ninst✝ : CommMonoid α\nn : ℕ\nf : ℕ → α\nhn : n = 0\n⊢ ∏ d in divisors n, f (n / d) = Finset.prod (divisors n) f\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\ncase neg\nn✝ : ℕ\nα : Type u_1\ninst✝ : CommMonoid α\nn : ℕ\nf : ℕ → α\nhn : ¬n = 0\n⊢ ∏ d in divisors n, f (n / d) = Finset.prod (divisors n) f\n[PROOFSTEP]\nrw [← prod_image]\n[GOAL]\ncase neg\nn✝ : ℕ\nα : Type u_1\ninst✝ : CommMonoid α\nn : ℕ\nf : ℕ → α\nhn : ¬n = 0\n⊢ ∏ x in image (fun d => n / d) (divisors n), f x = Finset.prod (divisors n) f\n[PROOFSTEP]\nexact prod_congr (image_div_divisors_eq_divisors n) (by simp)\n[GOAL]\nn✝ : ℕ\nα : Type u_1\ninst✝ : CommMonoid α\nn : ℕ\nf : ℕ → α\nhn : ¬n = 0\n⊢ ∀ (x : ℕ), x ∈ divisors n → f x = f x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nn✝ : ℕ\nα : Type u_1\ninst✝ : CommMonoid α\nn : ℕ\nf : ℕ → α\nhn : ¬n = 0\n⊢ ∀ (x : ℕ), x ∈ divisors n → ∀ (y : ℕ), y ∈ divisors n → n / x = n / y → x = y\n[PROOFSTEP]\nintro x hx y hy h\n[GOAL]\ncase neg\nn✝ : ℕ\nα : Type u_1\ninst✝ : CommMonoid α\nn : ℕ\nf : ℕ → α\nhn : ¬n = 0\nx : ℕ\nhx : x ∈ divisors n\ny : ℕ\nhy : y ∈ divisors n\nh : n / x = n / y\n⊢ x = y\n[PROOFSTEP]\nrw [mem_divisors] at hx hy \n[GOAL]\ncase neg\nn✝ : ℕ\nα : Type u_1\ninst✝ : CommMonoid α\nn : ℕ\nf : ℕ → α\nhn : ¬n = 0\nx : ℕ\nhx : x ∣ n ∧ n ≠ 0\ny : ℕ\nhy : y ∣ n ∧ n ≠ 0\nh : n / x = n / y\n⊢ x = y\n[PROOFSTEP]\nexact (div_eq_iff_eq_of_dvd_dvd hn hx.1 hy.1).mp h\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.Divisors", "llama_tokens": 19185, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8459424217727027, "lm_q2_score": 0.6859494421679929, "lm_q1q2_score": 0.5802737323212265}} {"text": "[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : NonUnitalNonAssocSemiring R\na : R\nl : List R\nh : ∀ (b : R), b ∈ l → Commute a b\n⊢ Commute a (sum l)\n[PROOFSTEP]\ninduction' l with x xs ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : NonUnitalNonAssocSemiring R\na : R\nl : List R\nh✝ : ∀ (b : R), b ∈ l → Commute a b\nh : ∀ (b : R), b ∈ [] → Commute a b\n⊢ Commute a (sum [])\n[PROOFSTEP]\nexact Commute.zero_right _\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : NonUnitalNonAssocSemiring R\na : R\nl : List R\nh✝ : ∀ (b : R), b ∈ l → Commute a b\nx : R\nxs : List R\nih : (∀ (b : R), b ∈ xs → Commute a b) → Commute a (sum xs)\nh : ∀ (b : R), b ∈ x :: xs → Commute a b\n⊢ Commute a (sum (x :: xs))\n[PROOFSTEP]\nrw [List.sum_cons]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : NonUnitalNonAssocSemiring R\na : R\nl : List R\nh✝ : ∀ (b : R), b ∈ l → Commute a b\nx : R\nxs : List R\nih : (∀ (b : R), b ∈ xs → Commute a b) → Commute a (sum xs)\nh : ∀ (b : R), b ∈ x :: xs → Commute a b\n⊢ Commute a (x + sum xs)\n[PROOFSTEP]\nexact (h _ <| mem_cons_self _ _).add_right (ih fun j hj => h _ <| mem_cons_of_mem _ hj)\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedMonoid M\nl : List M\nh : ∀ (x : M), x ∈ l → x = 1\n⊢ prod l = 1\n[PROOFSTEP]\nrw [List.eq_replicate.2 ⟨_, h⟩, prod_replicate, one_pow]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedMonoid M\nl : List M\nh : ∀ (x : M), x ∈ l → x = 1\n⊢ ℕ\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedMonoid M\nl : List M\nh : ∀ (x : M), x ∈ l → x = 1\n⊢ length l = ?m.7726\n[PROOFSTEP]\nexact (length l)\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedMonoid M\nl : List M\nh : ∀ (x : M), x ∈ l → x = 1\n⊢ length l = length l\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nl : List ℤ\nh : prod l = -1\n⊢ -1 ∈ l\n[PROOFSTEP]\nobtain ⟨x, h₁, h₂⟩ := exists_mem_ne_one_of_prod_ne_one (ne_of_eq_of_ne h (by decide))\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nl : List ℤ\nh : prod l = -1\n⊢ -1 ≠ 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nl : List ℤ\nh : prod l = -1\nx : ℤ\nh₁ : x ∈ l\nh₂ : x ≠ 1\n⊢ -1 ∈ l\n[PROOFSTEP]\nexact\n Or.resolve_left (Int.isUnit_iff.mp (prod_isUnit_iff.mp (h.symm ▸ IsUnit.neg isUnit_one : IsUnit l.prod) x h₁)) h₂ ▸ h₁\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nL : List ℕ\nh : ∀ (i : ℕ), i ∈ L → 1 ≤ i\n⊢ length L ≤ sum L\n[PROOFSTEP]\ninduction' L with j L IH h\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nL : List ℕ\nh✝ : ∀ (i : ℕ), i ∈ L → 1 ≤ i\nh : ∀ (i : ℕ), i ∈ [] → 1 ≤ i\n⊢ length [] ≤ sum []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nL✝ : List ℕ\nh✝ : ∀ (i : ℕ), i ∈ L✝ → 1 ≤ i\nj : ℕ\nL : List ℕ\nIH : (∀ (i : ℕ), i ∈ L → 1 ≤ i) → length L ≤ sum L\nh : ∀ (i : ℕ), i ∈ j :: L → 1 ≤ i\n⊢ length (j :: L) ≤ sum (j :: L)\n[PROOFSTEP]\nrw [sum_cons, length, add_comm]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nL✝ : List ℕ\nh✝ : ∀ (i : ℕ), i ∈ L✝ → 1 ≤ i\nj : ℕ\nL : List ℕ\nIH : (∀ (i : ℕ), i ∈ L → 1 ≤ i) → length L ≤ sum L\nh : ∀ (i : ℕ), i ∈ j :: L → 1 ≤ i\n⊢ 1 + length L ≤ j + sum L\n[PROOFSTEP]\nexact add_le_add (h _ (mem_cons_self _ _)) (IH fun i hi => h i (mem_cons.2 (Or.inr hi)))\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CommMonoid M\na : M\nl : List M\nha : a ∈ l\n⊢ a ∣ prod l\n[PROOFSTEP]\nlet ⟨s, t, h⟩ := mem_split ha\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CommMonoid M\na : M\nl : List M\nha : a ∈ l\ns t : List M\nh : l = s ++ a :: t\n⊢ a ∣ prod l\n[PROOFSTEP]\nrw [h, prod_append, prod_cons, mul_left_comm]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CommMonoid M\na : M\nl : List M\nha : a ∈ l\ns t : List M\nh : l = s ++ a :: t\n⊢ a ∣ a * (prod s * prod t)\n[PROOFSTEP]\nexact dvd_mul_right _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Semiring R\na : R\nl : List R\nh : ∀ (x : R), x ∈ l → a ∣ x\n⊢ a ∣ sum l\n[PROOFSTEP]\ninduction' l with x l ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Semiring R\na : R\nl : List R\nh✝ : ∀ (x : R), x ∈ l → a ∣ x\nh : ∀ (x : R), x ∈ [] → a ∣ x\n⊢ a ∣ sum []\n[PROOFSTEP]\nexact dvd_zero _\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Semiring R\na : R\nl✝ : List R\nh✝ : ∀ (x : R), x ∈ l✝ → a ∣ x\nx : R\nl : List R\nih : (∀ (x : R), x ∈ l → a ∣ x) → a ∣ sum l\nh : ∀ (x_1 : R), x_1 ∈ x :: l → a ∣ x_1\n⊢ a ∣ sum (x :: l)\n[PROOFSTEP]\nrw [List.sum_cons]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Semiring R\na : R\nl✝ : List R\nh✝ : ∀ (x : R), x ∈ l✝ → a ∣ x\nx : R\nl : List R\nih : (∀ (x : R), x ∈ l → a ∣ x) → a ∣ sum l\nh : ∀ (x_1 : R), x_1 ∈ x :: l → a ∣ x_1\n⊢ a ∣ x + sum l\n[PROOFSTEP]\nexact dvd_add (h _ (mem_cons_self _ _)) (ih fun x hx => h x (mem_cons_of_mem _ hx))\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CommGroup α\nl₂ : List α\n⊢ alternatingProd ([] ++ l₂) = alternatingProd [] * alternatingProd l₂ ^ (-1) ^ length []\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CommGroup α\na : α\nl₁ l₂ : List α\n⊢ alternatingProd (a :: l₁ ++ l₂) = alternatingProd (a :: l₁) * alternatingProd l₂ ^ (-1) ^ length (a :: l₁)\n[PROOFSTEP]\nsimp_rw [cons_append, alternatingProd_cons, alternatingProd_append, length_cons, pow_succ, neg_mul, one_mul, zpow_neg, ←\n div_eq_mul_inv, div_div]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CommGroup α\n⊢ alternatingProd (reverse []) = alternatingProd [] ^ (-1) ^ (length [] + 1)\n[PROOFSTEP]\nsimp only [alternatingProd_nil, one_zpow, reverse_nil]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CommGroup α\na : α\nl : List α\n⊢ alternatingProd (reverse (a :: l)) = alternatingProd (a :: l) ^ (-1) ^ (length (a :: l) + 1)\n[PROOFSTEP]\nsimp_rw [reverse_cons, alternatingProd_append, alternatingProd_reverse, alternatingProd_singleton, alternatingProd_cons,\n length_reverse, length, pow_succ, neg_mul, one_mul, zpow_neg, inv_inv]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CommGroup α\na : α\nl : List α\n⊢ (alternatingProd l ^ (-1) ^ length l)⁻¹ * a ^ (-1) ^ length l = (a / alternatingProd l) ^ (-1) ^ length l\n[PROOFSTEP]\nrw [mul_comm, ← div_eq_mul_inv, div_zpow]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Monoid M\n⊢ ∀ (l : List M), op (prod l) = prod (reverse (map op l))\n[PROOFSTEP]\nintro l\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Monoid M\nl : List M\n⊢ op (prod l) = prod (reverse (map op l))\n[PROOFSTEP]\ninduction l with\n| nil => rfl\n| cons x xs ih => rw [List.prod_cons, List.map_cons, List.reverse_cons', List.prod_concat, op_mul, ih]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Monoid M\nl : List M\n⊢ op (prod l) = prod (reverse (map op l))\n[PROOFSTEP]\ninduction l with\n| nil => rfl\n| cons x xs ih => rw [List.prod_cons, List.map_cons, List.reverse_cons', List.prod_concat, op_mul, ih]\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Monoid M\n⊢ op (prod []) = prod (reverse (map op []))\n[PROOFSTEP]\n\n| nil => rfl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Monoid M\n⊢ op (prod []) = prod (reverse (map op []))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Monoid M\nx : M\nxs : List M\nih : op (prod xs) = prod (reverse (map op xs))\n⊢ op (prod (x :: xs)) = prod (reverse (map op (x :: xs)))\n[PROOFSTEP]\n\n| cons x xs ih => rw [List.prod_cons, List.map_cons, List.reverse_cons', List.prod_concat, op_mul, ih]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Monoid M\nx : M\nxs : List M\nih : op (prod xs) = prod (reverse (map op xs))\n⊢ op (prod (x :: xs)) = prod (reverse (map op (x :: xs)))\n[PROOFSTEP]\nrw [List.prod_cons, List.map_cons, List.reverse_cons', List.prod_concat, op_mul, ih]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Monoid M\nl : List Mᵐᵒᵖ\n⊢ unop (prod l) = prod (reverse (map unop l))\n[PROOFSTEP]\nrw [← op_inj, op_unop, MulOpposite.op_list_prod, map_reverse, map_map, reverse_reverse, op_comp_unop, map_id]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\nF : Type u_9\ninst✝ : MonoidHomClass F M Nᵐᵒᵖ\nf : F\nl : List M\n⊢ unop (↑f (prod l)) = prod (reverse (map (unop ∘ ↑f) l))\n[PROOFSTEP]\nrw [map_list_prod f l, MulOpposite.unop_list_prod, List.map_map]\n", "meta": {"mathlib_filename": "Mathlib.Data.List.BigOperators.Lemmas", "llama_tokens": 5440, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7745833841649233, "lm_q2_score": 0.7490872131147275, "lm_q1q2_score": 0.5802305085690768}} {"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nl✝ l : List α\np : Palindrome l\n⊢ reverse l = l\n[PROOFSTEP]\ninduction p\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nl✝ l : List α\n⊢ reverse [] = []\n[PROOFSTEP]\ntry (exact rfl)\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nl✝ l : List α\n⊢ reverse [] = []\n[PROOFSTEP]\nexact rfl\n[GOAL]\ncase singleton\nα : Type u_1\nβ : Type u_2\nl✝ l : List α\nx✝ : α\n⊢ reverse [x✝] = [x✝]\n[PROOFSTEP]\ntry (exact rfl)\n[GOAL]\ncase singleton\nα : Type u_1\nβ : Type u_2\nl✝ l : List α\nx✝ : α\n⊢ reverse [x✝] = [x✝]\n[PROOFSTEP]\nexact rfl\n[GOAL]\ncase cons_concat\nα : Type u_1\nβ : Type u_2\nl✝¹ l : List α\nx✝ : α\nl✝ : List α\na✝ : Palindrome l✝\na_ih✝ : reverse l✝ = l✝\n⊢ reverse (x✝ :: (l✝ ++ [x✝])) = x✝ :: (l✝ ++ [x✝])\n[PROOFSTEP]\ntry (exact rfl)\n[GOAL]\ncase cons_concat\nα : Type u_1\nβ : Type u_2\nl✝¹ l : List α\nx✝ : α\nl✝ : List α\na✝ : Palindrome l✝\na_ih✝ : reverse l✝ = l✝\n⊢ reverse (x✝ :: (l✝ ++ [x✝])) = x✝ :: (l✝ ++ [x✝])\n[PROOFSTEP]\nexact rfl\n[GOAL]\ncase cons_concat\nα : Type u_1\nβ : Type u_2\nl✝¹ l : List α\nx✝ : α\nl✝ : List α\na✝ : Palindrome l✝\na_ih✝ : reverse l✝ = l✝\n⊢ reverse (x✝ :: (l✝ ++ [x✝])) = x✝ :: (l✝ ++ [x✝])\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons_concat\nα : Type u_1\nβ : Type u_2\nl✝¹ l : List α\nx✝ : α\nl✝ : List α\na✝ : Palindrome l✝\na_ih✝ : reverse l✝ = l✝\n⊢ reverse l✝ = l✝\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl✝ l : List α\n⊢ reverse l = l → Palindrome l\n[PROOFSTEP]\nrefine' bidirectionalRecOn l (fun _ => Palindrome.nil) (fun a _ => Palindrome.singleton a) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl✝ l : List α\n⊢ ∀ (a : α) (l : List α) (b : α),\n (reverse l = l → Palindrome l) → reverse (a :: (l ++ [b])) = a :: (l ++ [b]) → Palindrome (a :: (l ++ [b]))\n[PROOFSTEP]\nintro x l y hp hr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl✝¹ l✝ : List α\nx : α\nl : List α\ny : α\nhp : reverse l = l → Palindrome l\nhr : reverse (x :: (l ++ [y])) = x :: (l ++ [y])\n⊢ Palindrome (x :: (l ++ [y]))\n[PROOFSTEP]\nrw [reverse_cons, reverse_append] at hr \n[GOAL]\nα : Type u_1\nβ : Type u_2\nl✝¹ l✝ : List α\nx : α\nl : List α\ny : α\nhp : reverse l = l → Palindrome l\nhr : reverse [y] ++ reverse l ++ [x] = x :: (l ++ [y])\n⊢ Palindrome (x :: (l ++ [y]))\n[PROOFSTEP]\nrw [head_eq_of_cons_eq hr]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl✝¹ l✝ : List α\nx : α\nl : List α\ny : α\nhp : reverse l = l → Palindrome l\nhr : reverse [y] ++ reverse l ++ [x] = x :: (l ++ [y])\n⊢ Palindrome (x :: (l ++ [x]))\n[PROOFSTEP]\nhave : Palindrome l := hp (append_inj_left' (tail_eq_of_cons_eq hr) rfl)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl✝¹ l✝ : List α\nx : α\nl : List α\ny : α\nhp : reverse l = l → Palindrome l\nhr : reverse [y] ++ reverse l ++ [x] = x :: (l ++ [y])\nthis : Palindrome l\n⊢ Palindrome (x :: (l ++ [x]))\n[PROOFSTEP]\nexact Palindrome.cons_concat x this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl✝ l : List α\n⊢ Palindrome (l ++ reverse l)\n[PROOFSTEP]\napply of_reverse_eq\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nl✝ l : List α\n⊢ reverse (l ++ reverse l) = l ++ reverse l\n[PROOFSTEP]\nrw [reverse_append, reverse_reverse]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl : List α\nf : α → β\np : Palindrome l\n⊢ reverse (map f l) = map f l\n[PROOFSTEP]\nrw [← map_reverse, p.reverse_eq]\n", "meta": {"mathlib_filename": "Mathlib.Data.List.Palindrome", "llama_tokens": 1642, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7772998508568416, "lm_q2_score": 0.7461389930307512, "lm_q1q2_score": 0.5799737280012769}} {"text": "[GOAL]\nα : Type u\nβ : Type v\nπ : α → Type w\ninst✝¹ : Countable α\ninst✝ : Countable β\n⊢ Countable (α ⊕ β)\n[PROOFSTEP]\nrcases exists_injective_nat α with ⟨f, hf⟩\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nπ : α → Type w\ninst✝¹ : Countable α\ninst✝ : Countable β\nf : α → ℕ\nhf : Injective f\n⊢ Countable (α ⊕ β)\n[PROOFSTEP]\nrcases exists_injective_nat β with ⟨g, hg⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nπ : α → Type w\ninst✝¹ : Countable α\ninst✝ : Countable β\nf : α → ℕ\nhf : Injective f\ng : β → ℕ\nhg : Injective g\n⊢ Countable (α ⊕ β)\n[PROOFSTEP]\nexact (Equiv.natSumNatEquivNat.injective.comp <| hf.sum_map hg).countable\n[GOAL]\nα : Type u\nβ : Type v\nπ : α → Type w\ninst✝¹ : Countable α\ninst✝ : Countable β\n⊢ Countable (α × β)\n[PROOFSTEP]\nrcases exists_injective_nat α with ⟨f, hf⟩\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nπ : α → Type w\ninst✝¹ : Countable α\ninst✝ : Countable β\nf : α → ℕ\nhf : Injective f\n⊢ Countable (α × β)\n[PROOFSTEP]\nrcases exists_injective_nat β with ⟨g, hg⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nπ : α → Type w\ninst✝¹ : Countable α\ninst✝ : Countable β\nf : α → ℕ\nhf : Injective f\ng : β → ℕ\nhg : Injective g\n⊢ Countable (α × β)\n[PROOFSTEP]\nexact (Nat.pairEquiv.injective.comp <| hf.Prod_map hg).countable\n[GOAL]\nα : Type u\nβ : Type v\nπ : α → Type w\ninst✝¹ : Countable α\ninst✝ : ∀ (a : α), Countable (π a)\n⊢ Countable (Sigma π)\n[PROOFSTEP]\nrcases exists_injective_nat α with ⟨f, hf⟩\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nπ : α → Type w\ninst✝¹ : Countable α\ninst✝ : ∀ (a : α), Countable (π a)\nf : α → ℕ\nhf : Injective f\n⊢ Countable (Sigma π)\n[PROOFSTEP]\nchoose g hg using fun a => exists_injective_nat (π a)\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nπ : α → Type w\ninst✝¹ : Countable α\ninst✝ : ∀ (a : α), Countable (π a)\nf : α → ℕ\nhf : Injective f\ng : (a : α) → π a → ℕ\nhg : ∀ (a : α), Injective (g a)\n⊢ Countable (Sigma π)\n[PROOFSTEP]\nexact ((Equiv.sigmaEquivProd ℕ ℕ).injective.comp <| hf.sigma_map hg).countable\n[GOAL]\nα : Sort u\nβ : Sort v\nπ : α → Sort w\ninst✝¹ : Finite α\ninst✝ : ∀ (a : α), Countable (π a)\n⊢ Countable ((a : α) → π a)\n[PROOFSTEP]\nhave : ∀ n, Countable (Fin n → ℕ) := by\n intro n\n induction' n with n ihn\n · change Countable (Fin 0 → ℕ); infer_instance\n · haveI := ihn\n exact Countable.of_equiv (ℕ × (Fin n → ℕ)) (Equiv.piFinSucc _ _).symm\n[GOAL]\nα : Sort u\nβ : Sort v\nπ : α → Sort w\ninst✝¹ : Finite α\ninst✝ : ∀ (a : α), Countable (π a)\n⊢ ∀ (n : ℕ), Countable (Fin n → ℕ)\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Sort u\nβ : Sort v\nπ : α → Sort w\ninst✝¹ : Finite α\ninst✝ : ∀ (a : α), Countable (π a)\nn : ℕ\n⊢ Countable (Fin n → ℕ)\n[PROOFSTEP]\ninduction' n with n ihn\n[GOAL]\ncase zero\nα : Sort u\nβ : Sort v\nπ : α → Sort w\ninst✝¹ : Finite α\ninst✝ : ∀ (a : α), Countable (π a)\n⊢ Countable (Fin Nat.zero → ℕ)\n[PROOFSTEP]\nchange Countable (Fin 0 → ℕ)\n[GOAL]\ncase zero\nα : Sort u\nβ : Sort v\nπ : α → Sort w\ninst✝¹ : Finite α\ninst✝ : ∀ (a : α), Countable (π a)\n⊢ Countable (Fin 0 → ℕ)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase succ\nα : Sort u\nβ : Sort v\nπ : α → Sort w\ninst✝¹ : Finite α\ninst✝ : ∀ (a : α), Countable (π a)\nn : ℕ\nihn : Countable (Fin n → ℕ)\n⊢ Countable (Fin (Nat.succ n) → ℕ)\n[PROOFSTEP]\nhaveI := ihn\n[GOAL]\ncase succ\nα : Sort u\nβ : Sort v\nπ : α → Sort w\ninst✝¹ : Finite α\ninst✝ : ∀ (a : α), Countable (π a)\nn : ℕ\nihn this : Countable (Fin n → ℕ)\n⊢ Countable (Fin (Nat.succ n) → ℕ)\n[PROOFSTEP]\nexact Countable.of_equiv (ℕ × (Fin n → ℕ)) (Equiv.piFinSucc _ _).symm\n[GOAL]\nα : Sort u\nβ : Sort v\nπ : α → Sort w\ninst✝¹ : Finite α\ninst✝ : ∀ (a : α), Countable (π a)\nthis : ∀ (n : ℕ), Countable (Fin n → ℕ)\n⊢ Countable ((a : α) → π a)\n[PROOFSTEP]\nrcases Finite.exists_equiv_fin α with ⟨n, ⟨e⟩⟩\n[GOAL]\ncase intro.intro\nα : Sort u\nβ : Sort v\nπ : α → Sort w\ninst✝¹ : Finite α\ninst✝ : ∀ (a : α), Countable (π a)\nthis : ∀ (n : ℕ), Countable (Fin n → ℕ)\nn : ℕ\ne : α ≃ Fin n\n⊢ Countable ((a : α) → π a)\n[PROOFSTEP]\nhave f := fun a => (nonempty_embedding_nat (π a)).some\n[GOAL]\ncase intro.intro\nα : Sort u\nβ : Sort v\nπ : α → Sort w\ninst✝¹ : Finite α\ninst✝ : ∀ (a : α), Countable (π a)\nthis : ∀ (n : ℕ), Countable (Fin n → ℕ)\nn : ℕ\ne : α ≃ Fin n\nf : (a : α) → π a ↪ ℕ\n⊢ Countable ((a : α) → π a)\n[PROOFSTEP]\nexact ((Embedding.piCongrRight f).trans (Equiv.piCongrLeft' _ e).toEmbedding).countable\n", "meta": {"mathlib_filename": "Mathlib.Data.Countable.Basic", "llama_tokens": 2057, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8577680977182186, "lm_q2_score": 0.6757645944891559, "lm_q1q2_score": 0.5796493107202867}} {"text": "[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Pow M ℕ\nP : Prop\ninst✝ : Decidable P\na : M\nb c : ℕ\n⊢ (a ^ if P then b else c) = if P then a ^ b else a ^ c\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Pow M ℕ\nP : Prop\ninst✝ : Decidable P\na : M\nb c : ℕ\nh✝ : P\n⊢ a ^ b = a ^ b\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Pow M ℕ\nP : Prop\ninst✝ : Decidable P\na : M\nb c : ℕ\nh✝ : ¬P\n⊢ a ^ c = a ^ c\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Pow M ℕ\nP : Prop\ninst✝ : Decidable P\na b : M\nc : ℕ\n⊢ (if P then a else b) ^ c = if P then a ^ c else b ^ c\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Pow M ℕ\nP : Prop\ninst✝ : Decidable P\na b : M\nc : ℕ\nh✝ : P\n⊢ a ^ c = a ^ c\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Pow M ℕ\nP : Prop\ninst✝ : Decidable P\na b : M\nc : ℕ\nh✝ : ¬P\n⊢ b ^ c = b ^ c\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\nn : ℕ\n⊢ n • 0 = 0\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\n⊢ Nat.zero • 0 = 0\n[PROOFSTEP]\nexact zero_nsmul _\n[GOAL]\ncase succ\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\nn : ℕ\nih : n • 0 = 0\n⊢ Nat.succ n • 0 = 0\n[PROOFSTEP]\nrw [succ_nsmul, ih, add_zero]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : A\n⊢ 1 • a = a\n[PROOFSTEP]\nrw [succ_nsmul, zero_nsmul, add_zero]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : A\nm n : ℕ\n⊢ (m + n) • a = m • a + n • a\n[PROOFSTEP]\ninduction m with\n| zero => rw [Nat.zero_add, zero_nsmul, zero_add]\n| succ m ih => rw [Nat.succ_add, Nat.succ_eq_add_one, succ_nsmul, ih, succ_nsmul, add_assoc]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : A\nm n : ℕ\n⊢ (m + n) • a = m • a + n • a\n[PROOFSTEP]\ninduction m with\n| zero => rw [Nat.zero_add, zero_nsmul, zero_add]\n| succ m ih => rw [Nat.succ_add, Nat.succ_eq_add_one, succ_nsmul, ih, succ_nsmul, add_assoc]\n[GOAL]\ncase zero\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : A\nn : ℕ\n⊢ (Nat.zero + n) • a = Nat.zero • a + n • a\n[PROOFSTEP]\n\n| zero => rw [Nat.zero_add, zero_nsmul, zero_add]\n[GOAL]\ncase zero\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : A\nn : ℕ\n⊢ (Nat.zero + n) • a = Nat.zero • a + n • a\n[PROOFSTEP]\nrw [Nat.zero_add, zero_nsmul, zero_add]\n[GOAL]\ncase succ\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : A\nn m : ℕ\nih : (m + n) • a = m • a + n • a\n⊢ (Nat.succ m + n) • a = Nat.succ m • a + n • a\n[PROOFSTEP]\n\n| succ m ih => rw [Nat.succ_add, Nat.succ_eq_add_one, succ_nsmul, ih, succ_nsmul, add_assoc]\n[GOAL]\ncase succ\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : A\nn m : ℕ\nih : (m + n) • a = m • a + n • a\n⊢ (Nat.succ m + n) • a = Nat.succ m • a + n • a\n[PROOFSTEP]\nrw [Nat.succ_add, Nat.succ_eq_add_one, succ_nsmul, ih, succ_nsmul, add_assoc]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\nn : ℕ\n⊢ 1 ^ n = 1\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\n⊢ 1 ^ Nat.zero = 1\n[PROOFSTEP]\nexact pow_zero _\n[GOAL]\ncase succ\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\nn : ℕ\nih : 1 ^ n = 1\n⊢ 1 ^ Nat.succ n = 1\n[PROOFSTEP]\nrw [pow_succ, ih, one_mul]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : M\n⊢ a ^ 1 = a\n[PROOFSTEP]\nrw [pow_succ, pow_zero, mul_one]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : M\n⊢ a ^ 2 = a * a\n[PROOFSTEP]\nrw [pow_succ, pow_one]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : M\n⊢ a ^ 3 = a * a * a\n[PROOFSTEP]\nrw [pow_succ', pow_two]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : M\n⊢ a ^ 3 = a * (a * a)\n[PROOFSTEP]\nrw [pow_succ, pow_two]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : M\nm n : ℕ\n⊢ a ^ (m + n) = a ^ m * a ^ n\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : M\nm : ℕ\n⊢ a ^ (m + Nat.zero) = a ^ m * a ^ Nat.zero\n[PROOFSTEP]\nrw [Nat.add_zero, pow_zero, mul_one]\n[GOAL]\ncase succ\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : M\nm n : ℕ\nih : a ^ (m + n) = a ^ m * a ^ n\n⊢ a ^ (m + Nat.succ n) = a ^ m * a ^ Nat.succ n\n[PROOFSTEP]\nrw [pow_succ', ← mul_assoc, ← ih, ← pow_succ', Nat.add_assoc]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : M\nm n : ℕ\n⊢ a ^ (m * n) = (a ^ m) ^ n\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : M\nm : ℕ\n⊢ a ^ (m * Nat.zero) = (a ^ m) ^ Nat.zero\n[PROOFSTEP]\nrw [Nat.mul_zero, pow_zero, pow_zero]\n[GOAL]\ncase succ\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : M\nm n : ℕ\nih : a ^ (m * n) = (a ^ m) ^ n\n⊢ a ^ (m * Nat.succ n) = (a ^ m) ^ Nat.succ n\n[PROOFSTEP]\nrw [Nat.mul_succ, pow_add, pow_succ', ih]\n -- Porting note: we are taking the opportunity to swap the names `mul_nsmul` and `mul_nsmul'`\n -- using #align, so that in mathlib4 they will match the multiplicative ones.\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : M\nm n : ℕ\n⊢ a ^ (m * n) = (a ^ n) ^ m\n[PROOFSTEP]\nrw [Nat.mul_comm, pow_mul]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na b : M\nh : Commute a b\nn : ℕ\n⊢ (a * b) ^ n = a ^ n * b ^ n\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na b : M\nh : Commute a b\n⊢ (a * b) ^ Nat.zero = a ^ Nat.zero * b ^ Nat.zero\n[PROOFSTEP]\nrw [pow_zero, pow_zero, pow_zero, one_mul]\n[GOAL]\ncase succ\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na b : M\nh : Commute a b\nn : ℕ\nih : (a * b) ^ n = a ^ n * b ^ n\n⊢ (a * b) ^ Nat.succ n = a ^ Nat.succ n * b ^ Nat.succ n\n[PROOFSTEP]\nsimp only [pow_succ, ih, ← mul_assoc, (h.pow_left n).right_comm]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\nP : Prop\ninst✝ : Decidable P\na : M\n⊢ (a ^ if P then 1 else 0) = if P then a else 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : M\nm n : ℕ\n⊢ (a ^ m) ^ n = (a ^ n) ^ m\n[PROOFSTEP]\nrw [← pow_mul, Nat.mul_comm, pow_mul]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : M\nm n : ℕ\nh : m ≤ n\n⊢ a ^ m * a ^ (n - m) = a ^ n\n[PROOFSTEP]\nrw [← pow_add, Nat.add_comm, Nat.sub_add_cancel h]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : M\nm n : ℕ\nh : m ≤ n\n⊢ a ^ (n - m) * a ^ m = a ^ n\n[PROOFSTEP]\nrw [← pow_add, Nat.sub_add_cancel h]\n[GOAL]\nα : Type u_1\nM✝ : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝² : Monoid M✝\ninst✝¹ : AddMonoid A\nM : Type u_2\ninst✝ : Monoid M\nx : M\nm n : ℕ\nh : x ^ n = 1\n⊢ x ^ m = x ^ (m % n)\n[PROOFSTEP]\nhave t : x ^ m = x ^ (n * (m / n) + m % n) :=\n congr_arg (fun a => x ^ a) ((Nat.add_comm _ _).trans (Nat.mod_add_div _ _)).symm\n[GOAL]\nα : Type u_1\nM✝ : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝² : Monoid M✝\ninst✝¹ : AddMonoid A\nM : Type u_2\ninst✝ : Monoid M\nx : M\nm n : ℕ\nh : x ^ n = 1\nt : x ^ m = x ^ (n * (m / n) + m % n)\n⊢ x ^ m = x ^ (m % n)\n[PROOFSTEP]\nrw [t, pow_add, pow_mul, h, one_pow, one_mul]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : M\nn : ℕ\n⊢ a ^ bit1 n = a ^ n * a ^ n * a\n[PROOFSTEP]\nrw [bit1, pow_succ', pow_bit0]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : M\nn : ℕ\n⊢ a ^ bit0 n = (a * a) ^ n\n[PROOFSTEP]\nrw [pow_bit0, (Commute.refl a).mul_pow]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na : M\nn : ℕ\n⊢ a ^ bit1 n = (a * a) ^ n * a\n[PROOFSTEP]\nrw [bit1, pow_succ', pow_bit0']\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na b : M\nn : ℕ\nh : a * b = 1\n⊢ a ^ n * b ^ n = 1\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na b : M\nh : a * b = 1\n⊢ a ^ Nat.zero * b ^ Nat.zero = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na b : M\nh : a * b = 1\nn : ℕ\nhn : a ^ n * b ^ n = 1\n⊢ a ^ Nat.succ n * b ^ Nat.succ n = 1\n[PROOFSTEP]\ncalc\n a ^ n.succ * b ^ n.succ = a ^ n * a * (b * b ^ n) := by rw [pow_succ', pow_succ]\n _ = a ^ n * (a * b) * b ^ n := by simp only [mul_assoc]\n _ = 1 := by simp [h, hn]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na b : M\nh : a * b = 1\nn : ℕ\nhn : a ^ n * b ^ n = 1\n⊢ a ^ Nat.succ n * b ^ Nat.succ n = a ^ n * a * (b * b ^ n)\n[PROOFSTEP]\nrw [pow_succ', pow_succ]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na b : M\nh : a * b = 1\nn : ℕ\nhn : a ^ n * b ^ n = 1\n⊢ a ^ n * a * (b * b ^ n) = a ^ n * (a * b) * b ^ n\n[PROOFSTEP]\nsimp only [mul_assoc]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\na b : M\nh : a * b = 1\nn : ℕ\nhn : a ^ n * b ^ n = 1\n⊢ a ^ n * (a * b) * b ^ n = 1\n[PROOFSTEP]\nsimp [h, hn]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\nx y : M\nhxy : x ∣ y\nn : ℕ\nx✝ : n + 1 ≠ 0\n⊢ x ∣ y ^ (n + 1)\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\nx y : M\nhxy : x ∣ y\nn : ℕ\nx✝ : n + 1 ≠ 0\n⊢ x ∣ y * y ^ n\n[PROOFSTEP]\nexact hxy.mul_right _\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivInvMonoid G\na : G\n⊢ a ^ 1 = a\n[PROOFSTEP]\nconvert pow_one a using 1\n[GOAL]\ncase h.e'_2\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivInvMonoid G\na : G\n⊢ a ^ 1 = a ^ 1\n[PROOFSTEP]\nexact zpow_ofNat a 1\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivInvMonoid G\na : G\n⊢ a ^ 2 = a * a\n[PROOFSTEP]\nconvert pow_two a using 1\n[GOAL]\ncase h.e'_2\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivInvMonoid G\na : G\n⊢ a ^ 2 = a ^ 2\n[PROOFSTEP]\nexact zpow_ofNat a 2\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivisionMonoid α\na✝ b a : α\n⊢ a⁻¹ ^ 0 = (a ^ 0)⁻¹\n[PROOFSTEP]\nrw [pow_zero, pow_zero, inv_one]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivisionMonoid α\na✝ b a : α\nn : ℕ\n⊢ a⁻¹ ^ (n + 1) = (a ^ (n + 1))⁻¹\n[PROOFSTEP]\nrw [pow_succ', pow_succ, inv_pow _ n, mul_inv_rev]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivisionMonoid α\na b : α\nn : ℕ\n⊢ 1 ^ ↑n = 1\n[PROOFSTEP]\nrw [zpow_ofNat, one_pow]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivisionMonoid α\na b : α\nn : ℕ\n⊢ 1 ^ Int.negSucc n = 1\n[PROOFSTEP]\nrw [zpow_negSucc, one_pow, inv_one]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivisionMonoid α\na✝ b a : α\n⊢ a ^ (-0) = (a ^ 0)⁻¹\n[PROOFSTEP]\nchange a ^ (0 : ℤ) = (a ^ (0 : ℤ))⁻¹\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivisionMonoid α\na✝ b a : α\n⊢ a ^ 0 = (a ^ 0)⁻¹\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivisionMonoid α\na✝ b a : α\nn : ℕ\n⊢ a ^ (-Int.negSucc n) = (a ^ Int.negSucc n)⁻¹\n[PROOFSTEP]\nrw [zpow_negSucc, inv_inv, ← zpow_ofNat]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivisionMonoid α\na✝ b a : α\nn : ℕ\n⊢ a ^ (-Int.negSucc n) = a ^ ↑(n + 1)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivisionMonoid α\na✝ b✝ a b : α\n⊢ (a * b) ^ (-1) = b ^ (-1) * a ^ (-1)\n[PROOFSTEP]\nsimp only [zpow_neg, zpow_one, mul_inv_rev]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivisionMonoid α\na✝ b a : α\nn : ℕ\n⊢ a⁻¹ ^ ↑n = (a ^ ↑n)⁻¹\n[PROOFSTEP]\nrw [zpow_ofNat, zpow_ofNat, inv_pow]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivisionMonoid α\na✝ b a : α\nn : ℕ\n⊢ a⁻¹ ^ Int.negSucc n = (a ^ Int.negSucc n)⁻¹\n[PROOFSTEP]\nrw [zpow_negSucc, zpow_negSucc, inv_pow]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivisionMonoid α\na✝ b a : α\nn : ℤ\n⊢ a⁻¹ ^ n = a ^ (-n)\n[PROOFSTEP]\nrw [inv_zpow, zpow_neg]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivisionMonoid α\na✝ b a : α\nn : ℕ\n⊢ (1 / a) ^ n = 1 / a ^ n\n[PROOFSTEP]\nsimp only [one_div, inv_pow]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivisionMonoid α\na✝ b a : α\nn : ℤ\n⊢ (1 / a) ^ n = 1 / a ^ n\n[PROOFSTEP]\nsimp only [one_div, inv_zpow]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivisionMonoid α\na b : α\nh : Commute a b\nn : ℕ\n⊢ (a * b) ^ ↑n = a ^ ↑n * b ^ ↑n\n[PROOFSTEP]\nsimp [zpow_ofNat, h.mul_pow n]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivisionMonoid α\na b : α\nh : Commute a b\nn : ℕ\n⊢ (a * b) ^ Int.negSucc n = a ^ Int.negSucc n * b ^ Int.negSucc n\n[PROOFSTEP]\nsimp [h.mul_pow, (h.pow_pow _ _).eq, mul_inv_rev]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivisionCommMonoid α\na b : α\nn : ℕ\n⊢ (a / b) ^ n = a ^ n / b ^ n\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, mul_pow, inv_pow]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : DivisionCommMonoid α\na b : α\nn : ℤ\n⊢ (a / b) ^ n = a ^ n / b ^ n\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, mul_zpow, inv_zpow]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝³ : Group G\ninst✝² : Group H\ninst✝¹ : AddGroup A\ninst✝ : AddGroup B\na : G\nm n : ℕ\nh : n ≤ m\n⊢ a ^ (m - n) * a ^ n = a ^ m\n[PROOFSTEP]\nrw [← pow_add, Nat.sub_add_cancel h]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝³ : Group G\ninst✝² : Group H\ninst✝¹ : AddGroup A\ninst✝ : AddGroup B\na : G\nm n : ℕ\nh : n ≤ m\n⊢ a⁻¹ ^ (m - n) = (a ^ m)⁻¹ * a ^ n\n[PROOFSTEP]\nrw [pow_sub a⁻¹ h, inv_pow, inv_pow, inv_inv]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : Monoid R\na : R\nm n : ℕ\nh : m ≤ n\n⊢ a ^ n = a ^ m * a ^ (n - m)\n[PROOFSTEP]\nrw [← pow_add, Nat.add_comm, Nat.sub_add_cancel h]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : Group G\na x y : G\nh : SemiconjBy a x y\nn : ℕ\n⊢ SemiconjBy a (x ^ ↑n) (y ^ ↑n)\n[PROOFSTEP]\nsimp [zpow_ofNat, h.pow_right n]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : Group G\na x y : G\nh : SemiconjBy a x y\nn : ℕ\n⊢ SemiconjBy a (x ^ Int.negSucc n) (y ^ Int.negSucc n)\n[PROOFSTEP]\nsimp only [zpow_negSucc, inv_right_iff]\n[GOAL]\nα : Type u_1\nM : Type u\nN : Type v\nG : Type w\nH : Type x\nA : Type y\nB : Type z\nR : Type u₁\nS : Type u₂\ninst✝ : Group G\na x y : G\nh : SemiconjBy a x y\nn : ℕ\n⊢ SemiconjBy a (x ^ (n + 1)) (y ^ (n + 1))\n[PROOFSTEP]\napply pow_right h\n", "meta": {"mathlib_filename": "Mathlib.Algebra.GroupPower.Basic", "llama_tokens": 10248, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8056321796478255, "lm_q2_score": 0.7185943985973773, "lm_q1q2_score": 0.5789227716247234}} {"text": "[GOAL]\nm n✝ a✝ b✝ c d : ℤ\na b n : ℕ\n⊢ ↑a ≡ ↑b [ZMOD ↑n] ↔ a ≡ b [MOD n]\n[PROOFSTEP]\nunfold ModEq Nat.ModEq\n[GOAL]\nm n✝ a✝ b✝ c d : ℤ\na b n : ℕ\n⊢ ↑a % ↑n = ↑b % ↑n ↔ a % n = b % n\n[PROOFSTEP]\nrw [← Int.ofNat_inj]\n[GOAL]\nm n✝ a✝ b✝ c d : ℤ\na b n : ℕ\n⊢ ↑a % ↑n = ↑b % ↑n ↔ ↑(a % n) = ↑(b % n)\n[PROOFSTEP]\nsimp [coe_nat_mod]\n[GOAL]\nm n a b c d : ℤ\n⊢ a ≡ 0 [ZMOD n] ↔ n ∣ a\n[PROOFSTEP]\nrw [ModEq, zero_emod, dvd_iff_emod_eq_zero]\n[GOAL]\nm n a b c d : ℤ\n⊢ a ≡ b [ZMOD n] ↔ n ∣ b - a\n[PROOFSTEP]\nrw [ModEq, eq_comm]\n[GOAL]\nm n a b c d : ℤ\n⊢ b % n = a % n ↔ n ∣ b - a\n[PROOFSTEP]\nsimp [emod_eq_emod_iff_emod_sub_eq_zero, dvd_iff_emod_eq_zero]\n[GOAL]\nm n✝ a✝ b✝ c d a b n : ℤ\n⊢ a ≡ b [ZMOD n] ↔ ∃ t, b = a + n * t\n[PROOFSTEP]\nrw [modEq_iff_dvd]\n[GOAL]\nm n✝ a✝ b✝ c d a b n : ℤ\n⊢ n ∣ b - a ↔ ∃ t, b = a + n * t\n[PROOFSTEP]\nexact exists_congr fun t => sub_eq_iff_eq_add'\n[GOAL]\nm n a b c d : ℤ\n⊢ -a ≡ -b [ZMOD n] ↔ a ≡ b [ZMOD n]\n[PROOFSTEP]\nsimp [-sub_neg_eq_add, neg_sub_neg, modEq_iff_dvd, dvd_sub_comm]\n[GOAL]\nm n a b c d : ℤ\n⊢ a ≡ b [ZMOD -n] ↔ a ≡ b [ZMOD n]\n[PROOFSTEP]\nsimp [modEq_iff_dvd]\n[GOAL]\nm n a b c d : ℤ\nh : a ≡ b [ZMOD n]\n⊢ c * a ≡ c * b [ZMOD c * n]\n[PROOFSTEP]\nobtain hc | rfl | hc := lt_trichotomy c 0\n[GOAL]\ncase inl\nm n a b c d : ℤ\nh : a ≡ b [ZMOD n]\nhc : c < 0\n⊢ c * a ≡ c * b [ZMOD c * n]\n[PROOFSTEP]\nrw [← neg_modEq_neg, ← modEq_neg, ← neg_mul, ← neg_mul, ← neg_mul]\n[GOAL]\ncase inl\nm n a b c d : ℤ\nh : a ≡ b [ZMOD n]\nhc : c < 0\n⊢ -c * a ≡ -c * b [ZMOD -c * n]\n[PROOFSTEP]\nsimp only [ModEq, mul_emod_mul_of_pos _ _ (neg_pos.2 hc), h.eq]\n[GOAL]\ncase inr.inl\nm n a b d : ℤ\nh : a ≡ b [ZMOD n]\n⊢ 0 * a ≡ 0 * b [ZMOD 0 * n]\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr\nm n a b c d : ℤ\nh : a ≡ b [ZMOD n]\nhc : 0 < c\n⊢ c * a ≡ c * b [ZMOD c * n]\n[PROOFSTEP]\nsimp only [ModEq, mul_emod_mul_of_pos _ _ hc, h.eq]\n[GOAL]\nm n a b c d : ℤ\nh : a ≡ b [ZMOD n]\n⊢ a * c ≡ b * c [ZMOD n * c]\n[PROOFSTEP]\nrw [mul_comm a, mul_comm b, mul_comm n]\n[GOAL]\nm n a b c d : ℤ\nh : a ≡ b [ZMOD n]\n⊢ c * a ≡ c * b [ZMOD c * n]\n[PROOFSTEP]\nexact h.mul_left'\n[GOAL]\nm n a b c d : ℤ\nh₁ : a ≡ b [ZMOD n]\nh₂ : c ≡ d [ZMOD n]\n⊢ n ∣ b + d - (a + c)\n[PROOFSTEP]\nconvert dvd_add h₁.dvd h₂.dvd using 1\n[GOAL]\ncase h.e'_4\nm n a b c d : ℤ\nh₁ : a ≡ b [ZMOD n]\nh₂ : c ≡ d [ZMOD n]\n⊢ b + d - (a + c) = b - a + (d - c)\n[PROOFSTEP]\nring\n[GOAL]\nm n a b c d : ℤ\nh₁ : a ≡ b [ZMOD n]\nh₂ : a + c ≡ b + d [ZMOD n]\n⊢ d - c = b + d - (a + c) - (b - a)\n[PROOFSTEP]\nring\n[GOAL]\nm n a b c d : ℤ\nh₁ : a ≡ b [ZMOD n]\nh₂ : a + c ≡ b + d [ZMOD n]\nthis : d - c = b + d - (a + c) - (b - a)\n⊢ n ∣ d - c\n[PROOFSTEP]\nrw [this]\n[GOAL]\nm n a b c d : ℤ\nh₁ : a ≡ b [ZMOD n]\nh₂ : a + c ≡ b + d [ZMOD n]\nthis : d - c = b + d - (a + c) - (b - a)\n⊢ n ∣ b + d - (a + c) - (b - a)\n[PROOFSTEP]\nexact dvd_sub h₂.dvd h₁.dvd\n[GOAL]\nm n a b c d : ℤ\nh₁ : c ≡ d [ZMOD n]\nh₂ : a + c ≡ b + d [ZMOD n]\n⊢ a ≡ b [ZMOD n]\n[PROOFSTEP]\nrw [add_comm a, add_comm b] at h₂ \n[GOAL]\nm n a b c d : ℤ\nh₁ : c ≡ d [ZMOD n]\nh₂ : c + a ≡ d + b [ZMOD n]\n⊢ a ≡ b [ZMOD n]\n[PROOFSTEP]\nexact h₁.add_left_cancel h₂\n[GOAL]\nm n a b c d : ℤ\nh : a ≡ b [ZMOD n]\n⊢ a + -a ≡ b + -b [ZMOD n]\n[PROOFSTEP]\nsimp_rw [← sub_eq_add_neg, sub_self]\n[GOAL]\nm n a b c d : ℤ\nh : a ≡ b [ZMOD n]\n⊢ 0 ≡ 0 [ZMOD n]\n[PROOFSTEP]\nrfl\n[GOAL]\nm n a b c d : ℤ\nh₁ : a ≡ b [ZMOD n]\nh₂ : c ≡ d [ZMOD n]\n⊢ a - c ≡ b - d [ZMOD n]\n[PROOFSTEP]\nrw [sub_eq_add_neg, sub_eq_add_neg]\n[GOAL]\nm n a b c d : ℤ\nh₁ : a ≡ b [ZMOD n]\nh₂ : c ≡ d [ZMOD n]\n⊢ a + -c ≡ b + -d [ZMOD n]\n[PROOFSTEP]\nexact h₁.add h₂.neg\n[GOAL]\nm✝ n a b c d : ℤ\nm : ℕ\nh : a ≡ b [ZMOD n]\n⊢ a ^ m ≡ b ^ m [ZMOD n]\n[PROOFSTEP]\ninduction' m with d hd\n[GOAL]\ncase zero\nm n a b c d : ℤ\nh : a ≡ b [ZMOD n]\n⊢ a ^ Nat.zero ≡ b ^ Nat.zero [ZMOD n]\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nm n a b c d✝ : ℤ\nh : a ≡ b [ZMOD n]\nd : ℕ\nhd : a ^ d ≡ b ^ d [ZMOD n]\n⊢ a ^ Nat.succ d ≡ b ^ Nat.succ d [ZMOD n]\n[PROOFSTEP]\nrw [pow_succ, pow_succ]\n[GOAL]\ncase succ\nm n a b c d✝ : ℤ\nh : a ≡ b [ZMOD n]\nd : ℕ\nhd : a ^ d ≡ b ^ d [ZMOD n]\n⊢ a * a ^ d ≡ b * b ^ d [ZMOD n]\n[PROOFSTEP]\nexact h.mul hd\n[GOAL]\nm✝ n a b c d m : ℤ\nh : a ≡ b [ZMOD m * n]\n⊢ a ≡ b [ZMOD n]\n[PROOFSTEP]\nrw [modEq_iff_dvd] at *\n[GOAL]\nm✝ n a b c d m : ℤ\nh : m * n ∣ b - a\n⊢ n ∣ b - a\n[PROOFSTEP]\nexact (dvd_mul_left n m).trans h\n[GOAL]\nm n a b c d : ℤ\nhm : 0 < m\nh : a * c ≡ b * c [ZMOD m]\n⊢ a ≡ b [ZMOD m / ↑(gcd m c)]\n[PROOFSTEP]\nletI d := gcd m c\n[GOAL]\nm n a b c d✝ : ℤ\nhm : 0 < m\nh : a * c ≡ b * c [ZMOD m]\nd : ℕ := gcd m c\n⊢ a ≡ b [ZMOD m / ↑(gcd m c)]\n[PROOFSTEP]\nhave hmd := gcd_dvd_left m c\n[GOAL]\nm n a b c d✝ : ℤ\nhm : 0 < m\nh : a * c ≡ b * c [ZMOD m]\nd : ℕ := gcd m c\nhmd : ↑(gcd m c) ∣ m\n⊢ a ≡ b [ZMOD m / ↑(gcd m c)]\n[PROOFSTEP]\nhave hcd := gcd_dvd_right m c\n[GOAL]\nm n a b c d✝ : ℤ\nhm : 0 < m\nh : a * c ≡ b * c [ZMOD m]\nd : ℕ := gcd m c\nhmd : ↑(gcd m c) ∣ m\nhcd : ↑(gcd m c) ∣ c\n⊢ a ≡ b [ZMOD m / ↑(gcd m c)]\n[PROOFSTEP]\nrw [modEq_iff_dvd] at h ⊢\n -- porting note: removed `show` due to leanprover-community/mathlib4#3305\n[GOAL]\nm n a b c d✝ : ℤ\nhm : 0 < m\nh : m ∣ b * c - a * c\nd : ℕ := gcd m c\nhmd : ↑(gcd m c) ∣ m\nhcd : ↑(gcd m c) ∣ c\n⊢ m / ↑(gcd m c) ∣ b - a\n[PROOFSTEP]\nrefine Int.dvd_of_dvd_mul_right_of_gcd_one (?_ : m / d ∣ c / d * (b - a)) ?_\n[GOAL]\ncase refine_1\nm n a b c d✝ : ℤ\nhm : 0 < m\nh : m ∣ b * c - a * c\nd : ℕ := gcd m c\nhmd : ↑(gcd m c) ∣ m\nhcd : ↑(gcd m c) ∣ c\n⊢ m / ↑d ∣ c / ↑d * (b - a)\n[PROOFSTEP]\nrw [mul_comm, ← Int.mul_ediv_assoc (b - a) hcd, sub_mul]\n[GOAL]\ncase refine_1\nm n a b c d✝ : ℤ\nhm : 0 < m\nh : m ∣ b * c - a * c\nd : ℕ := gcd m c\nhmd : ↑(gcd m c) ∣ m\nhcd : ↑(gcd m c) ∣ c\n⊢ m / ↑d ∣ (b * c - a * c) / ↑(gcd m c)\n[PROOFSTEP]\nexact Int.ediv_dvd_ediv hmd h\n[GOAL]\ncase refine_2\nm n a b c d✝ : ℤ\nhm : 0 < m\nh : m ∣ b * c - a * c\nd : ℕ := gcd m c\nhmd : ↑(gcd m c) ∣ m\nhcd : ↑(gcd m c) ∣ c\n⊢ gcd (m / ↑(gcd m c)) (c / ↑d) = 1\n[PROOFSTEP]\nrw [gcd_div hmd hcd, natAbs_ofNat, Nat.div_self (gcd_pos_of_ne_zero_left c hm.ne')]\n[GOAL]\nm n a b c d : ℤ\nhm : 0 < m\nh : c * a ≡ c * b [ZMOD m]\n⊢ a * c ≡ b * c [ZMOD m]\n[PROOFSTEP]\nsimpa [mul_comm] using h\n[GOAL]\nm n a b c d : ℤ\nh : a / c ≡ b / c [ZMOD m / c]\nha✝¹ : c ∣ a\nha✝ : c ∣ b\nha : c ∣ m\n⊢ a ≡ b [ZMOD m]\n[PROOFSTEP]\nconvert h.mul_left'\n[GOAL]\ncase h.e'_1\nm n a b c d : ℤ\nh : a / c ≡ b / c [ZMOD m / c]\nha✝¹ : c ∣ a\nha✝ : c ∣ b\nha : c ∣ m\n⊢ m = ?m.21777 * (m / c)\n[PROOFSTEP]\nrwa [Int.mul_ediv_cancel']\n[GOAL]\ncase h.e'_2\nm n a b c d : ℤ\nh : a / c ≡ b / c [ZMOD m / c]\nha✝¹ : c ∣ a\nha✝ : c ∣ b\nha : c ∣ m\n⊢ a = c * (a / c)\n[PROOFSTEP]\nrwa [Int.mul_ediv_cancel']\n[GOAL]\ncase h.e'_3\nm n a b c d : ℤ\nh : a / c ≡ b / c [ZMOD m / c]\nha✝¹ : c ∣ a\nha✝ : c ∣ b\nha : c ∣ m\n⊢ b = c * (b / c)\n[PROOFSTEP]\nrwa [Int.mul_ediv_cancel']\n[GOAL]\nm n a b c d : ℤ\n⊢ a ≡ b [ZMOD 0] ↔ a = b\n[PROOFSTEP]\nrw [ModEq, emod_zero, emod_zero]\n[GOAL]\nm n a b c d : ℤ\n⊢ n ∣ n + a - a\n[PROOFSTEP]\nsimp\n[GOAL]\nm n a b c d : ℤ\n⊢ n ∣ a + n - a\n[PROOFSTEP]\nsimp\n[GOAL]\nm✝ n✝ a✝ b✝ c d a b m n : ℤ\nhmn : Nat.coprime (natAbs m) (natAbs n)\nh : a ≡ b [ZMOD m] ∧ a ≡ b [ZMOD n]\n⊢ a ≡ b [ZMOD m * n]\n[PROOFSTEP]\nrw [modEq_iff_dvd, modEq_iff_dvd] at h \n[GOAL]\nm✝ n✝ a✝ b✝ c d a b m n : ℤ\nhmn : Nat.coprime (natAbs m) (natAbs n)\nh : m ∣ b - a ∧ n ∣ b - a\n⊢ a ≡ b [ZMOD m * n]\n[PROOFSTEP]\nrw [modEq_iff_dvd, ← natAbs_dvd, ← dvd_natAbs, coe_nat_dvd, natAbs_mul]\n[GOAL]\nm✝ n✝ a✝ b✝ c d a b m n : ℤ\nhmn : Nat.coprime (natAbs m) (natAbs n)\nh : m ∣ b - a ∧ n ∣ b - a\n⊢ natAbs m * natAbs n ∣ natAbs (b - a)\n[PROOFSTEP]\nrefine' hmn.mul_dvd_of_dvd_of_dvd _ _\n[GOAL]\ncase refine'_1\nm✝ n✝ a✝ b✝ c d a b m n : ℤ\nhmn : Nat.coprime (natAbs m) (natAbs n)\nh : m ∣ b - a ∧ n ∣ b - a\n⊢ natAbs m ∣ natAbs (b - a)\n[PROOFSTEP]\nrw [← coe_nat_dvd, natAbs_dvd, dvd_natAbs]\n[GOAL]\ncase refine'_2\nm✝ n✝ a✝ b✝ c d a b m n : ℤ\nhmn : Nat.coprime (natAbs m) (natAbs n)\nh : m ∣ b - a ∧ n ∣ b - a\n⊢ natAbs n ∣ natAbs (b - a)\n[PROOFSTEP]\nrw [← coe_nat_dvd, natAbs_dvd, dvd_natAbs]\n[GOAL]\ncase refine'_1\nm✝ n✝ a✝ b✝ c d a b m n : ℤ\nhmn : Nat.coprime (natAbs m) (natAbs n)\nh : m ∣ b - a ∧ n ∣ b - a\n⊢ m ∣ b - a\n[PROOFSTEP]\ntauto\n[GOAL]\ncase refine'_2\nm✝ n✝ a✝ b✝ c d a b m n : ℤ\nhmn : Nat.coprime (natAbs m) (natAbs n)\nh : m ∣ b - a ∧ n ∣ b - a\n⊢ n ∣ b - a\n[PROOFSTEP]\ntauto\n[GOAL]\nm n a✝ b✝ c d : ℤ\na b : ℕ\n⊢ ↑a * Nat.gcdA a b ≡ ↑(Nat.gcd a b) [ZMOD ↑b]\n[PROOFSTEP]\nrw [← add_zero ((a : ℤ) * _), Nat.gcd_eq_gcd_ab]\n[GOAL]\nm n a✝ b✝ c d : ℤ\na b : ℕ\n⊢ ↑a * Nat.gcdA a b + 0 ≡ ↑a * Nat.gcdA a b + ↑b * Nat.gcdB a b [ZMOD ↑b]\n[PROOFSTEP]\nexact (dvd_mul_right _ _).zero_modEq_int.add_left _\n[GOAL]\nm n✝ a✝ b✝ c✝ d a b n c : ℤ\nha : a ≡ b [ZMOD n]\n⊢ b + 0 ≡ b [ZMOD n]\n[PROOFSTEP]\nrw [add_zero]\n[GOAL]\nm n✝ a✝ b✝ c✝ d a b n c : ℤ\nha : a ≡ b [ZMOD n]\n⊢ a - n * c ≡ b [ZMOD n]\n[PROOFSTEP]\nconvert Int.modEq_add_fac (-c) ha using 1\n[GOAL]\ncase h.e'_2\nm n✝ a✝ b✝ c✝ d a b n c : ℤ\nha : a ≡ b [ZMOD n]\n⊢ a - n * c = a + n * -c\n[PROOFSTEP]\nring\n[GOAL]\nm n a✝ b✝ c d : ℤ\na b : ℕ\nhab : Nat.coprime a b\nhgcd : Nat.gcd a b = 1\n⊢ ↑a * Nat.gcdA a b + ↑b * Nat.gcdB a b ≡ 1 [ZMOD ↑b]\n[PROOFSTEP]\nrw [← Nat.gcd_eq_gcd_ab, hgcd]\n[GOAL]\nm n a✝ b✝ c d : ℤ\na b : ℕ\nhab : Nat.coprime a b\nhgcd : Nat.gcd a b = 1\n⊢ ↑1 ≡ 1 [ZMOD ↑b]\n[PROOFSTEP]\nrfl\n[GOAL]\nm n a✝ b✝ c d a b : ℤ\nhb : 0 < b\n⊢ a % b < b\n[PROOFSTEP]\nhave : a % b < |b| := emod_lt _ (ne_of_gt hb)\n[GOAL]\nm n a✝ b✝ c d a b : ℤ\nhb : 0 < b\nthis : a % b < |b|\n⊢ a % b < b\n[PROOFSTEP]\nrwa [abs_of_pos hb] at this \n[GOAL]\nm n a✝ b✝ c d a b : ℤ\nhb : 0 < b\n⊢ a % b ≡ a [ZMOD b]\n[PROOFSTEP]\nsimp [ModEq]\n[GOAL]\nm n a✝ b✝ c d a b : ℤ\nhb : 0 < b\nz : ℤ\nhz1 : 0 ≤ z\nhz2 : z < b\nhz3 : z ≡ a [ZMOD b]\n⊢ ↑(natAbs z) < b ∧ ↑(natAbs z) ≡ a [ZMOD b]\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nm n a✝ b✝ c d a b : ℤ\nhb : 0 < b\nz : ℤ\nhz1 : 0 ≤ z\nhz2 : z < b\nhz3 : z ≡ a [ZMOD b]\n⊢ ↑(natAbs z) < b\n[PROOFSTEP]\nrw [ofNat_natAbs_eq_of_nonneg z hz1]\n[GOAL]\ncase right\nm n a✝ b✝ c d a b : ℤ\nhb : 0 < b\nz : ℤ\nhz1 : 0 ≤ z\nhz2 : z < b\nhz3 : z ≡ a [ZMOD b]\n⊢ ↑(natAbs z) ≡ a [ZMOD b]\n[PROOFSTEP]\nrw [ofNat_natAbs_eq_of_nonneg z hz1]\n[GOAL]\ncase left\nm n a✝ b✝ c d a b : ℤ\nhb : 0 < b\nz : ℤ\nhz1 : 0 ≤ z\nhz2 : z < b\nhz3 : z ≡ a [ZMOD b]\n⊢ z < b\n[PROOFSTEP]\nassumption\n[GOAL]\ncase right\nm n a✝ b✝ c d a b : ℤ\nhb : 0 < b\nz : ℤ\nhz1 : 0 ≤ z\nhz2 : z < b\nhz3 : z ≡ a [ZMOD b]\n⊢ z ≡ a [ZMOD b]\n[PROOFSTEP]\nassumption\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.ModEq", "llama_tokens": 6366, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.831143060406073, "lm_q2_score": 0.6959583187272711, "lm_q1q2_score": 0.5784409269420493}} {"text": "[GOAL]\nα : Type u\nβ : α → Type u\n⊢ #(WType β) = sum fun a => #(WType β) ^ #(β a)\n[PROOFSTEP]\nsimp only [Cardinal.power_def, ← Cardinal.mk_sigma]\n[GOAL]\nα : Type u\nβ : α → Type u\n⊢ #(WType β) = #((i : α) × (β i → WType β))\n[PROOFSTEP]\nexact mk_congr (equivSigma β)\n[GOAL]\nα : Type u\nβ : α → Type u\nκ : Cardinal.{u}\nhκ : (sum fun a => κ ^ #(β a)) ≤ κ\n⊢ #(WType β) ≤ κ\n[PROOFSTEP]\ninduction' κ using Cardinal.inductionOn with γ\n[GOAL]\ncase h\nα : Type u\nβ : α → Type u\nκ : Cardinal.{u}\nhκ✝ : (sum fun a => κ ^ #(β a)) ≤ κ\nγ : Type u\nhκ : (sum fun a => #γ ^ #(β a)) ≤ #γ\n⊢ #(WType β) ≤ #γ\n[PROOFSTEP]\nsimp only [Cardinal.power_def, ← Cardinal.mk_sigma, Cardinal.le_def] at hκ \n[GOAL]\ncase h\nα : Type u\nβ : α → Type u\nκ : Cardinal.{u}\nhκ✝ : (sum fun a => κ ^ #(β a)) ≤ κ\nγ : Type u\nhκ : Nonempty ((i : α) × (β i → γ) ↪ γ)\n⊢ #(WType β) ≤ #γ\n[PROOFSTEP]\ncases' hκ with hκ\n[GOAL]\ncase h.intro\nα : Type u\nβ : α → Type u\nκ : Cardinal.{u}\nhκ✝ : (sum fun a => κ ^ #(β a)) ≤ κ\nγ : Type u\nhκ : (i : α) × (β i → γ) ↪ γ\n⊢ #(WType β) ≤ #γ\n[PROOFSTEP]\nexact Cardinal.mk_le_of_injective (elim_injective _ hκ.1 hκ.2)\n[GOAL]\nα : Type u\nβ : α → Type u\ninst✝ : ∀ (a : α), Finite (β a)\n⊢ IsEmpty α → #(WType β) ≤ max #α ℵ₀\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u\nβ : α → Type u\ninst✝ : ∀ (a : α), Finite (β a)\nh : IsEmpty α\n⊢ #(WType β) ≤ max #α ℵ₀\n[PROOFSTEP]\nrw [Cardinal.mk_eq_zero (WType β)]\n[GOAL]\nα : Type u\nβ : α → Type u\ninst✝ : ∀ (a : α), Finite (β a)\nh : IsEmpty α\n⊢ 0 ≤ max #α ℵ₀\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\nα : Type u\nβ : α → Type u\ninst✝ : ∀ (a : α), Finite (β a)\nhn : Nonempty α\nm : Cardinal.{u} := max #α ℵ₀\n⊢ Order.succ 0 ≤ ⨆ (a : α), m ^ #(β a)\n[PROOFSTEP]\nrw [succ_zero]\n[GOAL]\nα : Type u\nβ : α → Type u\ninst✝ : ∀ (a : α), Finite (β a)\nhn : Nonempty α\nm : Cardinal.{u} := max #α ℵ₀\n⊢ 1 ≤ ⨆ (a : α), m ^ #(β a)\n[PROOFSTEP]\nobtain ⟨a⟩ : Nonempty α := hn\n[GOAL]\ncase intro\nα : Type u\nβ : α → Type u\ninst✝ : ∀ (a : α), Finite (β a)\nm : Cardinal.{u} := max #α ℵ₀\na : α\n⊢ 1 ≤ ⨆ (a : α), m ^ #(β a)\n[PROOFSTEP]\nrefine' le_trans _ (le_ciSup (bddAbove_range.{u, u} _) a)\n[GOAL]\ncase intro\nα : Type u\nβ : α → Type u\ninst✝ : ∀ (a : α), Finite (β a)\nm : Cardinal.{u} := max #α ℵ₀\na : α\n⊢ 1 ≤ m ^ #(β a)\n[PROOFSTEP]\nrw [← power_zero]\n[GOAL]\ncase intro\nα : Type u\nβ : α → Type u\ninst✝ : ∀ (a : α), Finite (β a)\nm : Cardinal.{u} := max #α ℵ₀\na : α\n⊢ ?m.2506 ^ 0 ≤ m ^ #(β a)\nα : Type u β : α → Type u inst✝ : ∀ (a : α), Finite (β a) m : Cardinal.{u} := max #α ℵ₀ a : α ⊢ Cardinal.{u}\n[PROOFSTEP]\nexact power_le_power_left (pos_iff_ne_zero.1 (aleph0_pos.trans_le (le_max_right _ _))) (zero_le _)\n", "meta": {"mathlib_filename": "Mathlib.Data.W.Cardinal", "llama_tokens": 1400, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8577681158979306, "lm_q2_score": 0.6723316991792861, "lm_q1q2_score": 0.5767046948634705}} {"text": "[GOAL]\nR : Type u_1\ninst✝ : CommRing R\n⊢ (Fin 3 → R) →ₗ[R] (Fin 3 → R) →ₗ[R] Fin 3 → R\n[PROOFSTEP]\napply LinearMap.mk₂ R fun a b : Fin 3 → R => ![a 1 * b 2 - a 2 * b 1, a 2 * b 0 - a 0 * b 2, a 0 * b 1 - a 1 * b 0]\n[GOAL]\ncase H1\nR : Type u_1\ninst✝ : CommRing R\n⊢ ∀ (m₁ m₂ n : Fin 3 → R),\n ![(m₁ + m₂) 1 * n 2 - (m₁ + m₂) 2 * n 1, (m₁ + m₂) 2 * n 0 - (m₁ + m₂) 0 * n 2,\n (m₁ + m₂) 0 * n 1 - (m₁ + m₂) 1 * n 0] =\n ![m₁ 1 * n 2 - m₁ 2 * n 1, m₁ 2 * n 0 - m₁ 0 * n 2, m₁ 0 * n 1 - m₁ 1 * n 0] +\n ![m₂ 1 * n 2 - m₂ 2 * n 1, m₂ 2 * n 0 - m₂ 0 * n 2, m₂ 0 * n 1 - m₂ 1 * n 0]\n[PROOFSTEP]\nintros\n[GOAL]\ncase H1\nR : Type u_1\ninst✝ : CommRing R\nm₁✝ m₂✝ n✝ : Fin 3 → R\n⊢ ![(m₁✝ + m₂✝) 1 * n✝ 2 - (m₁✝ + m₂✝) 2 * n✝ 1, (m₁✝ + m₂✝) 2 * n✝ 0 - (m₁✝ + m₂✝) 0 * n✝ 2,\n (m₁✝ + m₂✝) 0 * n✝ 1 - (m₁✝ + m₂✝) 1 * n✝ 0] =\n ![m₁✝ 1 * n✝ 2 - m₁✝ 2 * n✝ 1, m₁✝ 2 * n✝ 0 - m₁✝ 0 * n✝ 2, m₁✝ 0 * n✝ 1 - m₁✝ 1 * n✝ 0] +\n ![m₂✝ 1 * n✝ 2 - m₂✝ 2 * n✝ 1, m₂✝ 2 * n✝ 0 - m₂✝ 0 * n✝ 2, m₂✝ 0 * n✝ 1 - m₂✝ 1 * n✝ 0]\n[PROOFSTEP]\nsimp_rw [vec3_add, Pi.add_apply]\n[GOAL]\ncase H1\nR : Type u_1\ninst✝ : CommRing R\nm₁✝ m₂✝ n✝ : Fin 3 → R\n⊢ ![(m₁✝ 1 + m₂✝ 1) * n✝ 2 - (m₁✝ 2 + m₂✝ 2) * n✝ 1, (m₁✝ 2 + m₂✝ 2) * n✝ 0 - (m₁✝ 0 + m₂✝ 0) * n✝ 2,\n (m₁✝ 0 + m₂✝ 0) * n✝ 1 - (m₁✝ 1 + m₂✝ 1) * n✝ 0] =\n ![m₁✝ 1 * n✝ 2 - m₁✝ 2 * n✝ 1 + (m₂✝ 1 * n✝ 2 - m₂✝ 2 * n✝ 1),\n m₁✝ 2 * n✝ 0 - m₁✝ 0 * n✝ 2 + (m₂✝ 2 * n✝ 0 - m₂✝ 0 * n✝ 2),\n m₁✝ 0 * n✝ 1 - m₁✝ 1 * n✝ 0 + (m₂✝ 0 * n✝ 1 - m₂✝ 1 * n✝ 0)]\n[PROOFSTEP]\napply vec3_eq\n[GOAL]\ncase H1.h₀\nR : Type u_1\ninst✝ : CommRing R\nm₁✝ m₂✝ n✝ : Fin 3 → R\n⊢ (m₁✝ 1 + m₂✝ 1) * n✝ 2 - (m₁✝ 2 + m₂✝ 2) * n✝ 1 = m₁✝ 1 * n✝ 2 - m₁✝ 2 * n✝ 1 + (m₂✝ 1 * n✝ 2 - m₂✝ 2 * n✝ 1)\n[PROOFSTEP]\nring\n[GOAL]\ncase H1.h₁\nR : Type u_1\ninst✝ : CommRing R\nm₁✝ m₂✝ n✝ : Fin 3 → R\n⊢ (m₁✝ 2 + m₂✝ 2) * n✝ 0 - (m₁✝ 0 + m₂✝ 0) * n✝ 2 = m₁✝ 2 * n✝ 0 - m₁✝ 0 * n✝ 2 + (m₂✝ 2 * n✝ 0 - m₂✝ 0 * n✝ 2)\n[PROOFSTEP]\nring\n[GOAL]\ncase H1.h₂\nR : Type u_1\ninst✝ : CommRing R\nm₁✝ m₂✝ n✝ : Fin 3 → R\n⊢ (m₁✝ 0 + m₂✝ 0) * n✝ 1 - (m₁✝ 1 + m₂✝ 1) * n✝ 0 = m₁✝ 0 * n✝ 1 - m₁✝ 1 * n✝ 0 + (m₂✝ 0 * n✝ 1 - m₂✝ 1 * n✝ 0)\n[PROOFSTEP]\nring\n[GOAL]\ncase H2\nR : Type u_1\ninst✝ : CommRing R\n⊢ ∀ (c : R) (m n : Fin 3 → R),\n ![(c • m) 1 * n 2 - (c • m) 2 * n 1, (c • m) 2 * n 0 - (c • m) 0 * n 2, (c • m) 0 * n 1 - (c • m) 1 * n 0] =\n c • ![m 1 * n 2 - m 2 * n 1, m 2 * n 0 - m 0 * n 2, m 0 * n 1 - m 1 * n 0]\n[PROOFSTEP]\nintros\n[GOAL]\ncase H2\nR : Type u_1\ninst✝ : CommRing R\nc✝ : R\nm✝ n✝ : Fin 3 → R\n⊢ ![(c✝ • m✝) 1 * n✝ 2 - (c✝ • m✝) 2 * n✝ 1, (c✝ • m✝) 2 * n✝ 0 - (c✝ • m✝) 0 * n✝ 2,\n (c✝ • m✝) 0 * n✝ 1 - (c✝ • m✝) 1 * n✝ 0] =\n c✝ • ![m✝ 1 * n✝ 2 - m✝ 2 * n✝ 1, m✝ 2 * n✝ 0 - m✝ 0 * n✝ 2, m✝ 0 * n✝ 1 - m✝ 1 * n✝ 0]\n[PROOFSTEP]\nsimp_rw [smul_vec3, Pi.smul_apply, smul_sub, smul_mul_assoc]\n[GOAL]\ncase H3\nR : Type u_1\ninst✝ : CommRing R\n⊢ ∀ (m n₁ n₂ : Fin 3 → R),\n ![m 1 * (n₁ + n₂) 2 - m 2 * (n₁ + n₂) 1, m 2 * (n₁ + n₂) 0 - m 0 * (n₁ + n₂) 2,\n m 0 * (n₁ + n₂) 1 - m 1 * (n₁ + n₂) 0] =\n ![m 1 * n₁ 2 - m 2 * n₁ 1, m 2 * n₁ 0 - m 0 * n₁ 2, m 0 * n₁ 1 - m 1 * n₁ 0] +\n ![m 1 * n₂ 2 - m 2 * n₂ 1, m 2 * n₂ 0 - m 0 * n₂ 2, m 0 * n₂ 1 - m 1 * n₂ 0]\n[PROOFSTEP]\nintros\n[GOAL]\ncase H3\nR : Type u_1\ninst✝ : CommRing R\nm✝ n₁✝ n₂✝ : Fin 3 → R\n⊢ ![m✝ 1 * (n₁✝ + n₂✝) 2 - m✝ 2 * (n₁✝ + n₂✝) 1, m✝ 2 * (n₁✝ + n₂✝) 0 - m✝ 0 * (n₁✝ + n₂✝) 2,\n m✝ 0 * (n₁✝ + n₂✝) 1 - m✝ 1 * (n₁✝ + n₂✝) 0] =\n ![m✝ 1 * n₁✝ 2 - m✝ 2 * n₁✝ 1, m✝ 2 * n₁✝ 0 - m✝ 0 * n₁✝ 2, m✝ 0 * n₁✝ 1 - m✝ 1 * n₁✝ 0] +\n ![m✝ 1 * n₂✝ 2 - m✝ 2 * n₂✝ 1, m✝ 2 * n₂✝ 0 - m✝ 0 * n₂✝ 2, m✝ 0 * n₂✝ 1 - m✝ 1 * n₂✝ 0]\n[PROOFSTEP]\nsimp_rw [vec3_add, Pi.add_apply]\n[GOAL]\ncase H3\nR : Type u_1\ninst✝ : CommRing R\nm✝ n₁✝ n₂✝ : Fin 3 → R\n⊢ ![m✝ 1 * (n₁✝ 2 + n₂✝ 2) - m✝ 2 * (n₁✝ 1 + n₂✝ 1), m✝ 2 * (n₁✝ 0 + n₂✝ 0) - m✝ 0 * (n₁✝ 2 + n₂✝ 2),\n m✝ 0 * (n₁✝ 1 + n₂✝ 1) - m✝ 1 * (n₁✝ 0 + n₂✝ 0)] =\n ![m✝ 1 * n₁✝ 2 - m✝ 2 * n₁✝ 1 + (m✝ 1 * n₂✝ 2 - m✝ 2 * n₂✝ 1),\n m✝ 2 * n₁✝ 0 - m✝ 0 * n₁✝ 2 + (m✝ 2 * n₂✝ 0 - m✝ 0 * n₂✝ 2),\n m✝ 0 * n₁✝ 1 - m✝ 1 * n₁✝ 0 + (m✝ 0 * n₂✝ 1 - m✝ 1 * n₂✝ 0)]\n[PROOFSTEP]\napply vec3_eq\n[GOAL]\ncase H3.h₀\nR : Type u_1\ninst✝ : CommRing R\nm✝ n₁✝ n₂✝ : Fin 3 → R\n⊢ m✝ 1 * (n₁✝ 2 + n₂✝ 2) - m✝ 2 * (n₁✝ 1 + n₂✝ 1) = m✝ 1 * n₁✝ 2 - m✝ 2 * n₁✝ 1 + (m✝ 1 * n₂✝ 2 - m✝ 2 * n₂✝ 1)\n[PROOFSTEP]\nring\n[GOAL]\ncase H3.h₁\nR : Type u_1\ninst✝ : CommRing R\nm✝ n₁✝ n₂✝ : Fin 3 → R\n⊢ m✝ 2 * (n₁✝ 0 + n₂✝ 0) - m✝ 0 * (n₁✝ 2 + n₂✝ 2) = m✝ 2 * n₁✝ 0 - m✝ 0 * n₁✝ 2 + (m✝ 2 * n₂✝ 0 - m✝ 0 * n₂✝ 2)\n[PROOFSTEP]\nring\n[GOAL]\ncase H3.h₂\nR : Type u_1\ninst✝ : CommRing R\nm✝ n₁✝ n₂✝ : Fin 3 → R\n⊢ m✝ 0 * (n₁✝ 1 + n₂✝ 1) - m✝ 1 * (n₁✝ 0 + n₂✝ 0) = m✝ 0 * n₁✝ 1 - m✝ 1 * n₁✝ 0 + (m✝ 0 * n₂✝ 1 - m✝ 1 * n₂✝ 0)\n[PROOFSTEP]\nring\n[GOAL]\ncase H4\nR : Type u_1\ninst✝ : CommRing R\n⊢ ∀ (c : R) (m n : Fin 3 → R),\n ![m 1 * (c • n) 2 - m 2 * (c • n) 1, m 2 * (c • n) 0 - m 0 * (c • n) 2, m 0 * (c • n) 1 - m 1 * (c • n) 0] =\n c • ![m 1 * n 2 - m 2 * n 1, m 2 * n 0 - m 0 * n 2, m 0 * n 1 - m 1 * n 0]\n[PROOFSTEP]\nintros\n[GOAL]\ncase H4\nR : Type u_1\ninst✝ : CommRing R\nc✝ : R\nm✝ n✝ : Fin 3 → R\n⊢ ![m✝ 1 * (c✝ • n✝) 2 - m✝ 2 * (c✝ • n✝) 1, m✝ 2 * (c✝ • n✝) 0 - m✝ 0 * (c✝ • n✝) 2,\n m✝ 0 * (c✝ • n✝) 1 - m✝ 1 * (c✝ • n✝) 0] =\n c✝ • ![m✝ 1 * n✝ 2 - m✝ 2 * n✝ 1, m✝ 2 * n✝ 0 - m✝ 0 * n✝ 2, m✝ 0 * n✝ 1 - m✝ 1 * n✝ 0]\n[PROOFSTEP]\nsimp_rw [smul_vec3, Pi.smul_apply, smul_sub, mul_smul_comm]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nv w : Fin 3 → R\n⊢ -↑(↑crossProduct v) w = ↑(↑crossProduct w) v\n[PROOFSTEP]\nsimp [cross_apply, mul_comm]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nv w : Fin 3 → R\n⊢ ↑(↑crossProduct v) w + ↑(↑crossProduct w) v = 0\n[PROOFSTEP]\nrw [add_eq_zero_iff_eq_neg, cross_anticomm]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nv : Fin 3 → R\n⊢ ↑(↑crossProduct v) v = 0\n[PROOFSTEP]\nsimp_rw [cross_apply, mul_comm, cons_eq_zero_iff]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nv : Fin 3 → R\n⊢ v 1 * v 2 - v 1 * v 2 = 0 ∧ v 0 * v 2 - v 0 * v 2 = 0 ∧ v 0 * v 1 - v 0 * v 1 = 0 ∧ ![] = 0\n[PROOFSTEP]\nexact ⟨sub_self _, sub_self _, sub_self _, zero_empty.symm⟩\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nv w : Fin 3 → R\n⊢ v ⬝ᵥ ↑(↑crossProduct v) w = 0\n[PROOFSTEP]\nrw [cross_apply, vec3_dotProduct]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nv w : Fin 3 → R\n⊢ v 0 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 0 +\n v 1 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 1 +\n v 2 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 2 =\n 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nv w : Fin 3 → R\n⊢ v 0 * (v 1 * w 2 - v 2 * w 1) + v 1 * (v 2 * w 0 - v 0 * w 2) + v 2 * (v 0 * w 1 - v 1 * w 0) = 0\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nv w : Fin 3 → R\n⊢ w ⬝ᵥ ↑(↑crossProduct v) w = 0\n[PROOFSTEP]\nrw [← cross_anticomm, Matrix.dotProduct_neg, dot_self_cross, neg_zero]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nu v w : Fin 3 → R\n⊢ u ⬝ᵥ ↑(↑crossProduct v) w = v ⬝ᵥ ↑(↑crossProduct w) u\n[PROOFSTEP]\nsimp_rw [cross_apply, vec3_dotProduct]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nu v w : Fin 3 → R\n⊢ u 0 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 0 +\n u 1 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 1 +\n u 2 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 2 =\n v 0 * vecCons (w 1 * u 2 - w 2 * u 1) ![w 2 * u 0 - w 0 * u 2, w 0 * u 1 - w 1 * u 0] 0 +\n v 1 * vecCons (w 1 * u 2 - w 2 * u 1) ![w 2 * u 0 - w 0 * u 2, w 0 * u 1 - w 1 * u 0] 1 +\n v 2 * vecCons (w 1 * u 2 - w 2 * u 1) ![w 2 * u 0 - w 0 * u 2, w 0 * u 1 - w 1 * u 0] 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nu v w : Fin 3 → R\n⊢ u 0 * (v 1 * w 2 - v 2 * w 1) + u 1 * (v 2 * w 0 - v 0 * w 2) + u 2 * (v 0 * w 1 - v 1 * w 0) =\n v 0 * (w 1 * u 2 - w 2 * u 1) + v 1 * (w 2 * u 0 - w 0 * u 2) + v 2 * (w 0 * u 1 - w 1 * u 0)\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nu v w : Fin 3 → R\n⊢ u ⬝ᵥ ↑(↑crossProduct v) w = det ![u, v, w]\n[PROOFSTEP]\nrw [vec3_dotProduct, cross_apply, det_fin_three]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nu v w : Fin 3 → R\n⊢ u 0 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 0 +\n u 1 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 1 +\n u 2 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 2 =\n vecCons u ![v, w] 0 0 * vecCons u ![v, w] 1 1 * vecCons u ![v, w] 2 2 -\n vecCons u ![v, w] 0 0 * vecCons u ![v, w] 1 2 * vecCons u ![v, w] 2 1 -\n vecCons u ![v, w] 0 1 * vecCons u ![v, w] 1 0 * vecCons u ![v, w] 2 2 +\n vecCons u ![v, w] 0 1 * vecCons u ![v, w] 1 2 * vecCons u ![v, w] 2 0 +\n vecCons u ![v, w] 0 2 * vecCons u ![v, w] 1 0 * vecCons u ![v, w] 2 1 -\n vecCons u ![v, w] 0 2 * vecCons u ![v, w] 1 1 * vecCons u ![v, w] 2 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nu v w : Fin 3 → R\n⊢ u 0 * (v 1 * w 2 - v 2 * w 1) + u 1 * (v 2 * w 0 - v 0 * w 2) + u 2 * (v 0 * w 1 - v 1 * w 0) =\n u 0 * v 1 * w 2 - u 0 * v 2 * w 1 - u 1 * v 0 * w 2 + u 1 * v 2 * w 0 + u 2 * v 0 * w 1 - u 2 * v 1 * w 0\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nu v w x : Fin 3 → R\n⊢ ↑(↑crossProduct u) v ⬝ᵥ ↑(↑crossProduct w) x = u ⬝ᵥ w * v ⬝ᵥ x - u ⬝ᵥ x * v ⬝ᵥ w\n[PROOFSTEP]\nsimp_rw [cross_apply, vec3_dotProduct]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nu v w x : Fin 3 → R\n⊢ vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 0 *\n vecCons (w 1 * x 2 - w 2 * x 1) ![w 2 * x 0 - w 0 * x 2, w 0 * x 1 - w 1 * x 0] 0 +\n vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 1 *\n vecCons (w 1 * x 2 - w 2 * x 1) ![w 2 * x 0 - w 0 * x 2, w 0 * x 1 - w 1 * x 0] 1 +\n vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 2 *\n vecCons (w 1 * x 2 - w 2 * x 1) ![w 2 * x 0 - w 0 * x 2, w 0 * x 1 - w 1 * x 0] 2 =\n (u 0 * w 0 + u 1 * w 1 + u 2 * w 2) * (v 0 * x 0 + v 1 * x 1 + v 2 * x 2) -\n (u 0 * x 0 + u 1 * x 1 + u 2 * x 2) * (v 0 * w 0 + v 1 * w 1 + v 2 * w 2)\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nu v w x : Fin 3 → R\n⊢ (u 1 * v 2 - u 2 * v 1) * (w 1 * x 2 - w 2 * x 1) + (u 2 * v 0 - u 0 * v 2) * (w 2 * x 0 - w 0 * x 2) +\n (u 0 * v 1 - u 1 * v 0) * (w 0 * x 1 - w 1 * x 0) =\n (u 0 * w 0 + u 1 * w 1 + u 2 * w 2) * (v 0 * x 0 + v 1 * x 1 + v 2 * x 2) -\n (u 0 * x 0 + u 1 * x 1 + u 2 * x 2) * (v 0 * w 0 + v 1 * w 1 + v 2 * w 2)\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nu v w : Fin 3 → R\n⊢ ↑(↑crossProduct u) (↑(↑crossProduct v) w) =\n ↑(↑crossProduct (↑(↑crossProduct u) v)) w + ↑(↑crossProduct v) (↑(↑crossProduct u) w)\n[PROOFSTEP]\nsimp_rw [cross_apply, vec3_add]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nu v w : Fin 3 → R\n⊢ ![u 1 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 2 -\n u 2 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 1,\n u 2 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 0 -\n u 0 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 2,\n u 0 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 1 -\n u 1 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 0] =\n ![vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 1 * w 2 -\n vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 2 * w 1 +\n (v 1 * vecCons (u 1 * w 2 - u 2 * w 1) ![u 2 * w 0 - u 0 * w 2, u 0 * w 1 - u 1 * w 0] 2 -\n v 2 * vecCons (u 1 * w 2 - u 2 * w 1) ![u 2 * w 0 - u 0 * w 2, u 0 * w 1 - u 1 * w 0] 1),\n vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 2 * w 0 -\n vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 0 * w 2 +\n (v 2 * vecCons (u 1 * w 2 - u 2 * w 1) ![u 2 * w 0 - u 0 * w 2, u 0 * w 1 - u 1 * w 0] 0 -\n v 0 * vecCons (u 1 * w 2 - u 2 * w 1) ![u 2 * w 0 - u 0 * w 2, u 0 * w 1 - u 1 * w 0] 2),\n vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 0 * w 1 -\n vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 1 * w 0 +\n (v 0 * vecCons (u 1 * w 2 - u 2 * w 1) ![u 2 * w 0 - u 0 * w 2, u 0 * w 1 - u 1 * w 0] 1 -\n v 1 * vecCons (u 1 * w 2 - u 2 * w 1) ![u 2 * w 0 - u 0 * w 2, u 0 * w 1 - u 1 * w 0] 0)]\n[PROOFSTEP]\napply vec3_eq\n[GOAL]\ncase h₀\nR : Type u_1\ninst✝ : CommRing R\nu v w : Fin 3 → R\n⊢ u 1 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 2 -\n u 2 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 1 =\n vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 1 * w 2 -\n vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 2 * w 1 +\n (v 1 * vecCons (u 1 * w 2 - u 2 * w 1) ![u 2 * w 0 - u 0 * w 2, u 0 * w 1 - u 1 * w 0] 2 -\n v 2 * vecCons (u 1 * w 2 - u 2 * w 1) ![u 2 * w 0 - u 0 * w 2, u 0 * w 1 - u 1 * w 0] 1)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h₁\nR : Type u_1\ninst✝ : CommRing R\nu v w : Fin 3 → R\n⊢ u 2 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 0 -\n u 0 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 2 =\n vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 2 * w 0 -\n vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 0 * w 2 +\n (v 2 * vecCons (u 1 * w 2 - u 2 * w 1) ![u 2 * w 0 - u 0 * w 2, u 0 * w 1 - u 1 * w 0] 0 -\n v 0 * vecCons (u 1 * w 2 - u 2 * w 1) ![u 2 * w 0 - u 0 * w 2, u 0 * w 1 - u 1 * w 0] 2)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h₂\nR : Type u_1\ninst✝ : CommRing R\nu v w : Fin 3 → R\n⊢ u 0 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 1 -\n u 1 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 0 =\n vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 0 * w 1 -\n vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 1 * w 0 +\n (v 0 * vecCons (u 1 * w 2 - u 2 * w 1) ![u 2 * w 0 - u 0 * w 2, u 0 * w 1 - u 1 * w 0] 1 -\n v 1 * vecCons (u 1 * w 2 - u 2 * w 1) ![u 2 * w 0 - u 0 * w 2, u 0 * w 1 - u 1 * w 0] 0)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h₀\nR : Type u_1\ninst✝ : CommRing R\nu v w : Fin 3 → R\n⊢ u 1 * (v 0 * w 1 - v 1 * w 0) - u 2 * (v 2 * w 0 - v 0 * w 2) =\n (u 2 * v 0 - u 0 * v 2) * w 2 - (u 0 * v 1 - u 1 * v 0) * w 1 +\n (v 1 * (u 0 * w 1 - u 1 * w 0) - v 2 * (u 2 * w 0 - u 0 * w 2))\n[PROOFSTEP]\nring\n[GOAL]\ncase h₁\nR : Type u_1\ninst✝ : CommRing R\nu v w : Fin 3 → R\n⊢ u 2 * (v 1 * w 2 - v 2 * w 1) - u 0 * (v 0 * w 1 - v 1 * w 0) =\n (u 0 * v 1 - u 1 * v 0) * w 0 - (u 1 * v 2 - u 2 * v 1) * w 2 +\n (v 2 * (u 1 * w 2 - u 2 * w 1) - v 0 * (u 0 * w 1 - u 1 * w 0))\n[PROOFSTEP]\nring\n[GOAL]\ncase h₂\nR : Type u_1\ninst✝ : CommRing R\nu v w : Fin 3 → R\n⊢ u 0 * (v 2 * w 0 - v 0 * w 2) - u 1 * (v 1 * w 2 - v 2 * w 1) =\n (u 1 * v 2 - u 2 * v 1) * w 1 - (u 2 * v 0 - u 0 * v 2) * w 0 +\n (v 0 * (u 2 * w 0 - u 0 * w 2) - v 1 * (u 1 * w 2 - u 2 * w 1))\n[PROOFSTEP]\nring\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.CrossProduct", "llama_tokens": 10557, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8577680977182187, "lm_q2_score": 0.6723316860482763, "lm_q1q2_score": 0.5767046713773126}} {"text": "[GOAL]\nX : Type u_1\nt : TopologicalSpace X\n⊢ t = ⨅ (u : Opens X), induced (fun x => x ∈ u) sierpinskiSpace\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nX : Type u_1\nt : TopologicalSpace X\n⊢ t ≤ ⨅ (u : Opens X), induced (fun x => x ∈ u) sierpinskiSpace\n[PROOFSTEP]\nrw [le_iInf_iff]\n[GOAL]\ncase a\nX : Type u_1\nt : TopologicalSpace X\n⊢ ∀ (i : Opens X), t ≤ induced (fun x => x ∈ i) sierpinskiSpace\n[PROOFSTEP]\nexact fun u => Continuous.le_induced (isOpen_iff_continuous_mem.mp u.2)\n[GOAL]\ncase a\nX : Type u_1\nt : TopologicalSpace X\n⊢ ⨅ (u : Opens X), induced (fun x => x ∈ u) sierpinskiSpace ≤ t\n[PROOFSTEP]\nintro u h\n[GOAL]\ncase a\nX : Type u_1\nt : TopologicalSpace X\nu : Set X\nh : IsOpen u\n⊢ IsOpen u\n[PROOFSTEP]\nrw [← generateFrom_iUnion_isOpen]\n[GOAL]\ncase a\nX : Type u_1\nt : TopologicalSpace X\nu : Set X\nh : IsOpen u\n⊢ IsOpen u\n[PROOFSTEP]\napply isOpen_generateFrom_of_mem\n[GOAL]\ncase a.hs\nX : Type u_1\nt : TopologicalSpace X\nu : Set X\nh : IsOpen u\n⊢ u ∈ ⋃ (i : Opens X), {s | IsOpen s}\n[PROOFSTEP]\nsimp only [Set.mem_iUnion, Set.mem_setOf_eq, isOpen_induced_iff]\n[GOAL]\ncase a.hs\nX : Type u_1\nt : TopologicalSpace X\nu : Set X\nh : IsOpen u\n⊢ ∃ i t_1, IsOpen t_1 ∧ (fun x => x ∈ i) ⁻¹' t_1 = u\n[PROOFSTEP]\nexact ⟨⟨u, h⟩, { True }, isOpen_singleton_true, by simp [Set.preimage]⟩\n[GOAL]\nX : Type u_1\nt : TopologicalSpace X\nu : Set X\nh : IsOpen u\n⊢ (fun x => x ∈ { carrier := u, is_open' := h }) ⁻¹' {True} = u\n[PROOFSTEP]\nsimp [Set.preimage]\n[GOAL]\nX : Type u_1\ninst✝ : TopologicalSpace X\n⊢ Inducing ↑(productOfMemOpens X)\n[PROOFSTEP]\nconvert inducing_iInf_to_pi fun (u : Opens X) (x : X) => x ∈ u\n[GOAL]\ncase h.e'_3\nX : Type u_1\ninst✝ : TopologicalSpace X\n⊢ inst✝ = ⨅ (i : Opens X), induced (fun x => x ∈ i) inferInstance\n[PROOFSTEP]\napply eq_induced_by_maps_to_sierpinski\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : T0Space X\n⊢ Function.Injective ↑(productOfMemOpens X)\n[PROOFSTEP]\nintro x1 x2 h\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : T0Space X\nx1 x2 : X\nh : ↑(productOfMemOpens X) x1 = ↑(productOfMemOpens X) x2\n⊢ x1 = x2\n[PROOFSTEP]\napply Inseparable.eq\n[GOAL]\ncase h\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : T0Space X\nx1 x2 : X\nh : ↑(productOfMemOpens X) x1 = ↑(productOfMemOpens X) x2\n⊢ Inseparable x1 x2\n[PROOFSTEP]\nrw [← Inducing.inseparable_iff (productOfMemOpens_inducing X), h]\n", "meta": {"mathlib_filename": "Mathlib.Topology.ContinuousFunction.T0Sierpinski", "llama_tokens": 1094, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8244619177503205, "lm_q2_score": 0.6992544085240401, "lm_q1q2_score": 0.5765086306470961}} {"text": "[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁶ : TopologicalSpace X\ninst✝⁵ : TopologicalSpace B\ninst✝⁴ : TopologicalSpace F\nE : B → Type u_5\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (b : B) → TopologicalSpace (E b)\ninst✝¹ : FiberBundle F E\ninst✝ : T1Space B\nx : B\n⊢ IsClosed (range (TotalSpace.mk x))\n[PROOFSTEP]\nrw [TotalSpace.range_mk]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁶ : TopologicalSpace X\ninst✝⁵ : TopologicalSpace B\ninst✝⁴ : TopologicalSpace F\nE : B → Type u_5\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (b : B) → TopologicalSpace (E b)\ninst✝¹ : FiberBundle F E\ninst✝ : T1Space B\nx : B\n⊢ IsClosed (TotalSpace.proj ⁻¹' {x})\n[PROOFSTEP]\nexact isClosed_singleton.preimage <| continuous_proj F E\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\n⊢ ∃ e, Icc a b ⊆ e.baseSet\n[PROOFSTEP]\nobtain ⟨ea, hea⟩ : ∃ ea : Trivialization F (π F E), a ∈ ea.baseSet :=\n ⟨trivializationAt F E a, mem_baseSet_trivializationAt F E a⟩\n -- If `a < b`, then `[a, b] = ∅`, and the statement is trivial\n[GOAL]\ncase intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\n⊢ ∃ e, Icc a b ⊆ e.baseSet\n[PROOFSTEP]\ncases' lt_or_le b a with hab hab\n[GOAL]\ncase intro.inl\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : b < a\n⊢ ∃ e, Icc a b ⊆ e.baseSet\n[PROOFSTEP]\nexact\n ⟨ea, by simp [*]⟩\n /- Let `s` be the set of points `x ∈ [a, b]` such that `E` is trivializable over `[a, x]`.\n We need to show that `b ∈ s`. Let `c = Sup s`. We will show that `c ∈ s` and `c = b`. -/\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : b < a\n⊢ Icc a b ⊆ ea.baseSet\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase intro.inr\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\n⊢ ∃ e, Icc a b ⊆ e.baseSet\n[PROOFSTEP]\nset s : Set B := {x ∈ Icc a b | ∃ e : Trivialization F (π F E), Icc a x ⊆ e.baseSet}\n[GOAL]\ncase intro.inr\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\n⊢ ∃ e, Icc a b ⊆ e.baseSet\n[PROOFSTEP]\nhave ha : a ∈ s := ⟨left_mem_Icc.2 hab, ea, by simp [hea]⟩\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\n⊢ Icc a a ⊆ ea.baseSet\n[PROOFSTEP]\nsimp [hea]\n[GOAL]\ncase intro.inr\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\n⊢ ∃ e, Icc a b ⊆ e.baseSet\n[PROOFSTEP]\nhave sne : s.Nonempty := ⟨a, ha⟩\n[GOAL]\ncase intro.inr\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\n⊢ ∃ e, Icc a b ⊆ e.baseSet\n[PROOFSTEP]\nhave hsb : b ∈ upperBounds s := fun x hx => hx.1.2\n[GOAL]\ncase intro.inr\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\n⊢ ∃ e, Icc a b ⊆ e.baseSet\n[PROOFSTEP]\nhave sbd : BddAbove s := ⟨b, hsb⟩\n[GOAL]\ncase intro.inr\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\n⊢ ∃ e, Icc a b ⊆ e.baseSet\n[PROOFSTEP]\nset c := sSup s\n[GOAL]\ncase intro.inr\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\n⊢ ∃ e, Icc a b ⊆ e.baseSet\n[PROOFSTEP]\nhave hsc : IsLUB s c := isLUB_csSup sne sbd\n[GOAL]\ncase intro.inr\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\n⊢ ∃ e, Icc a b ⊆ e.baseSet\n[PROOFSTEP]\nhave hc : c ∈ Icc a b := ⟨hsc.1 ha, hsc.2 hsb⟩\n[GOAL]\ncase intro.inr\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\n⊢ ∃ e, Icc a b ⊆ e.baseSet\n[PROOFSTEP]\nobtain ⟨-, ec : Trivialization F (π F E), hec : Icc a c ⊆ ec.baseSet⟩ : c ∈ s :=\n by\n cases' hc.1.eq_or_lt with heq hlt\n · rwa [← heq]\n refine\n ⟨hc, ?_⟩\n /- In order to show that `c ∈ s`, consider a trivialization `ec` of `proj` over a neighborhood\n of `c`. Its base set includes `(c', c]` for some `c' ∈ [a, c)`. -/\n obtain ⟨ec, hc⟩ : ∃ ec : Trivialization F (π F E), c ∈ ec.baseSet :=\n ⟨trivializationAt F E c, mem_baseSet_trivializationAt F E c⟩\n obtain ⟨c', hc', hc'e⟩ : ∃ c' ∈ Ico a c, Ioc c' c ⊆ ec.baseSet :=\n (mem_nhdsWithin_Iic_iff_exists_mem_Ico_Ioc_subset hlt).1\n (mem_nhdsWithin_of_mem_nhds <| IsOpen.mem_nhds ec.open_baseSet hc)\n /- Since `c' < c = Sup s`, there exists `d ∈ s ∩ (c', c]`. Let `ead` be a trivialization of\n `proj` over `[a, d]`. Then we can glue `ead` and `ec` into a trivialization over `[a, c]`. -/\n obtain ⟨d, ⟨hdab, ead, had⟩, hd⟩ : ∃ d ∈ s, d ∈ Ioc c' c := hsc.exists_between hc'.2\n refine' ⟨ead.piecewiseLe ec d (had ⟨hdab.1, le_rfl⟩) (hc'e hd), subset_ite.2 _⟩\n refine'\n ⟨fun x hx => had ⟨hx.1.1, hx.2⟩, fun x hx => hc'e ⟨hd.1.trans (not_le.1 hx.2), hx.1.2⟩⟩\n /- So, `c ∈ s`. Let `ec` be a trivialization of `proj` over `[a, c]`. If `c = b`, then we are\n done. Otherwise we show that `proj` can be trivialized over a larger interval `[a, d]`,\n `d ∈ (c, b]`, hence `c` is not an upper bound of `s`. -/\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\n⊢ c ∈ s\n[PROOFSTEP]\ncases' hc.1.eq_or_lt with heq hlt\n[GOAL]\ncase inl\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nheq : a = c\n⊢ c ∈ s\n[PROOFSTEP]\nrwa [← heq]\n[GOAL]\ncase inr\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nhlt : a < c\n⊢ c ∈ s\n[PROOFSTEP]\nrefine\n ⟨hc, ?_⟩\n /- In order to show that `c ∈ s`, consider a trivialization `ec` of `proj` over a neighborhood\n of `c`. Its base set includes `(c', c]` for some `c' ∈ [a, c)`. -/\n[GOAL]\ncase inr\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nhlt : a < c\n⊢ ∃ e, Icc a c ⊆ e.baseSet\n[PROOFSTEP]\nobtain ⟨ec, hc⟩ : ∃ ec : Trivialization F (π F E), c ∈ ec.baseSet :=\n ⟨trivializationAt F E c, mem_baseSet_trivializationAt F E c⟩\n[GOAL]\ncase inr.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc✝ : c ∈ Icc a b\nhlt : a < c\nec : Trivialization F TotalSpace.proj\nhc : c ∈ ec.baseSet\n⊢ ∃ e, Icc a c ⊆ e.baseSet\n[PROOFSTEP]\nobtain ⟨c', hc', hc'e⟩ : ∃ c' ∈ Ico a c, Ioc c' c ⊆ ec.baseSet :=\n (mem_nhdsWithin_Iic_iff_exists_mem_Ico_Ioc_subset hlt).1\n (mem_nhdsWithin_of_mem_nhds <| IsOpen.mem_nhds ec.open_baseSet hc)\n /- Since `c' < c = Sup s`, there exists `d ∈ s ∩ (c', c]`. Let `ead` be a trivialization of\n `proj` over `[a, d]`. Then we can glue `ead` and `ec` into a trivialization over `[a, c]`. -/\n[GOAL]\ncase inr.intro.intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc✝ : c ∈ Icc a b\nhlt : a < c\nec : Trivialization F TotalSpace.proj\nhc : c ∈ ec.baseSet\nc' : B\nhc' : c' ∈ Ico a c\nhc'e : Ioc c' c ⊆ ec.baseSet\n⊢ ∃ e, Icc a c ⊆ e.baseSet\n[PROOFSTEP]\nobtain ⟨d, ⟨hdab, ead, had⟩, hd⟩ : ∃ d ∈ s, d ∈ Ioc c' c := hsc.exists_between hc'.2\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc✝ : c ∈ Icc a b\nhlt : a < c\nec : Trivialization F TotalSpace.proj\nhc : c ∈ ec.baseSet\nc' : B\nhc' : c' ∈ Ico a c\nhc'e : Ioc c' c ⊆ ec.baseSet\nd : B\nhd : d ∈ Ioc c' c\nhdab : d ∈ Icc a b\nead : Trivialization F TotalSpace.proj\nhad : Icc a d ⊆ ead.baseSet\n⊢ ∃ e, Icc a c ⊆ e.baseSet\n[PROOFSTEP]\nrefine' ⟨ead.piecewiseLe ec d (had ⟨hdab.1, le_rfl⟩) (hc'e hd), subset_ite.2 _⟩\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc✝ : c ∈ Icc a b\nhlt : a < c\nec : Trivialization F TotalSpace.proj\nhc : c ∈ ec.baseSet\nc' : B\nhc' : c' ∈ Ico a c\nhc'e : Ioc c' c ⊆ ec.baseSet\nd : B\nhd : d ∈ Ioc c' c\nhdab : d ∈ Icc a b\nead : Trivialization F TotalSpace.proj\nhad : Icc a d ⊆ ead.baseSet\n⊢ Icc a c ∩ Iic d ⊆ ead.baseSet ∧\n Icc a c \\ Iic d ⊆\n (Trivialization.transFiberHomeomorph ec\n (Trivialization.coordChangeHomeomorph ec ead (_ : d ∈ ec.baseSet) (_ : d ∈ ead.baseSet))).baseSet\n[PROOFSTEP]\nrefine'\n ⟨fun x hx => had ⟨hx.1.1, hx.2⟩, fun x hx => hc'e ⟨hd.1.trans (not_le.1 hx.2), hx.1.2⟩⟩\n /- So, `c ∈ s`. Let `ec` be a trivialization of `proj` over `[a, c]`. If `c = b`, then we are\n done. Otherwise we show that `proj` can be trivialized over a larger interval `[a, d]`,\n `d ∈ (c, b]`, hence `c` is not an upper bound of `s`. -/\n[GOAL]\ncase intro.inr.intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nec : Trivialization F TotalSpace.proj\nhec : Icc a c ⊆ ec.baseSet\n⊢ ∃ e, Icc a b ⊆ e.baseSet\n[PROOFSTEP]\ncases' hc.2.eq_or_lt with heq hlt\n[GOAL]\ncase intro.inr.intro.intro.inl\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nec : Trivialization F TotalSpace.proj\nhec : Icc a c ⊆ ec.baseSet\nheq : c = b\n⊢ ∃ e, Icc a b ⊆ e.baseSet\n[PROOFSTEP]\nexact ⟨ec, heq ▸ hec⟩\n[GOAL]\ncase intro.inr.intro.intro.inr\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nec : Trivialization F TotalSpace.proj\nhec : Icc a c ⊆ ec.baseSet\nhlt : c < b\n⊢ ∃ e, Icc a b ⊆ e.baseSet\n[PROOFSTEP]\nsuffices : ∃ d ∈ Ioc c b, ∃ e : Trivialization F (π F E), Icc a d ⊆ e.baseSet\n[GOAL]\ncase intro.inr.intro.intro.inr\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nec : Trivialization F TotalSpace.proj\nhec : Icc a c ⊆ ec.baseSet\nhlt : c < b\nthis : ∃ d, d ∈ Ioc c b ∧ ∃ e, Icc a d ⊆ e.baseSet\n⊢ ∃ e, Icc a b ⊆ e.baseSet\n[PROOFSTEP]\nrcases this with\n ⟨d, hdcb, hd⟩\n -- porting note: todo: use `rsuffices`\n[GOAL]\ncase intro.inr.intro.intro.inr.intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nec : Trivialization F TotalSpace.proj\nhec : Icc a c ⊆ ec.baseSet\nhlt : c < b\nd : B\nhdcb : d ∈ Ioc c b\nhd : ∃ e, Icc a d ⊆ e.baseSet\n⊢ ∃ e, Icc a b ⊆ e.baseSet\n[PROOFSTEP]\nexact ((hsc.1 ⟨⟨hc.1.trans hdcb.1.le, hdcb.2⟩, hd⟩).not_lt hdcb.1).elim\n[GOAL]\ncase this\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nec : Trivialization F TotalSpace.proj\nhec : Icc a c ⊆ ec.baseSet\nhlt : c < b\n⊢ ∃ d, d ∈ Ioc c b ∧ ∃ e, Icc a d ⊆ e.baseSet\n[PROOFSTEP]\nobtain ⟨d, hdcb, hd⟩ : ∃ d ∈ Ioc c b, Ico c d ⊆ ec.baseSet :=\n (mem_nhdsWithin_Ici_iff_exists_mem_Ioc_Ico_subset hlt).1\n (mem_nhdsWithin_of_mem_nhds <| IsOpen.mem_nhds ec.open_baseSet (hec ⟨hc.1, le_rfl⟩))\n[GOAL]\ncase this.intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nec : Trivialization F TotalSpace.proj\nhec : Icc a c ⊆ ec.baseSet\nhlt : c < b\nd : B\nhdcb : d ∈ Ioc c b\nhd : Ico c d ⊆ ec.baseSet\n⊢ ∃ d, d ∈ Ioc c b ∧ ∃ e, Icc a d ⊆ e.baseSet\n[PROOFSTEP]\nhave had : Ico a d ⊆ ec.baseSet := Ico_subset_Icc_union_Ico.trans (union_subset hec hd)\n[GOAL]\ncase this.intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nec : Trivialization F TotalSpace.proj\nhec : Icc a c ⊆ ec.baseSet\nhlt : c < b\nd : B\nhdcb : d ∈ Ioc c b\nhd : Ico c d ⊆ ec.baseSet\nhad : Ico a d ⊆ ec.baseSet\n⊢ ∃ d, d ∈ Ioc c b ∧ ∃ e, Icc a d ⊆ e.baseSet\n[PROOFSTEP]\nby_cases he : Disjoint (Iio d) (Ioi c)\n[GOAL]\ncase pos\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nec : Trivialization F TotalSpace.proj\nhec : Icc a c ⊆ ec.baseSet\nhlt : c < b\nd : B\nhdcb : d ∈ Ioc c b\nhd : Ico c d ⊆ ec.baseSet\nhad : Ico a d ⊆ ec.baseSet\nhe : Disjoint (Iio d) (Ioi c)\n⊢ ∃ d, d ∈ Ioc c b ∧ ∃ e, Icc a d ⊆ e.baseSet\n[PROOFSTEP]\nobtain ⟨ed, hed⟩ : ∃ ed : Trivialization F (π F E), d ∈ ed.baseSet :=\n ⟨trivializationAt F E d, mem_baseSet_trivializationAt F E d⟩\n[GOAL]\ncase pos.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nec : Trivialization F TotalSpace.proj\nhec : Icc a c ⊆ ec.baseSet\nhlt : c < b\nd : B\nhdcb : d ∈ Ioc c b\nhd : Ico c d ⊆ ec.baseSet\nhad : Ico a d ⊆ ec.baseSet\nhe : Disjoint (Iio d) (Ioi c)\ned : Trivialization F TotalSpace.proj\nhed : d ∈ ed.baseSet\n⊢ ∃ d, d ∈ Ioc c b ∧ ∃ e, Icc a d ⊆ e.baseSet\n[PROOFSTEP]\nrefine'\n ⟨d, hdcb,\n (ec.restrOpen (Iio d) isOpen_Iio).disjointUnion (ed.restrOpen (Ioi c) isOpen_Ioi)\n (he.mono (inter_subset_right _ _) (inter_subset_right _ _)),\n fun x hx => _⟩\n[GOAL]\ncase pos.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nec : Trivialization F TotalSpace.proj\nhec : Icc a c ⊆ ec.baseSet\nhlt : c < b\nd : B\nhdcb : d ∈ Ioc c b\nhd : Ico c d ⊆ ec.baseSet\nhad : Ico a d ⊆ ec.baseSet\nhe : Disjoint (Iio d) (Ioi c)\ned : Trivialization F TotalSpace.proj\nhed : d ∈ ed.baseSet\nx : B\nhx : x ∈ Icc a d\n⊢ x ∈\n (Trivialization.disjointUnion (Trivialization.restrOpen ec (Iio d) (_ : IsOpen (Iio d)))\n (Trivialization.restrOpen ed (Ioi c) (_ : IsOpen (Ioi c)))\n (_ :\n Disjoint (Trivialization.restrOpen ec (Iio d) (_ : IsOpen (Iio d))).baseSet\n (Trivialization.restrOpen ed (Ioi c) (_ : IsOpen (Ioi c))).baseSet)).baseSet\n[PROOFSTEP]\nrcases hx.2.eq_or_lt with (rfl | hxd)\n[GOAL]\ncase pos.intro.inl\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nec : Trivialization F TotalSpace.proj\nhec : Icc a c ⊆ ec.baseSet\nhlt : c < b\ned : Trivialization F TotalSpace.proj\nx : B\nhdcb : x ∈ Ioc c b\nhd : Ico c x ⊆ ec.baseSet\nhad : Ico a x ⊆ ec.baseSet\nhe : Disjoint (Iio x) (Ioi c)\nhed : x ∈ ed.baseSet\nhx : x ∈ Icc a x\n⊢ x ∈\n (Trivialization.disjointUnion (Trivialization.restrOpen ec (Iio x) (_ : IsOpen (Iio x)))\n (Trivialization.restrOpen ed (Ioi c) (_ : IsOpen (Ioi c)))\n (_ :\n Disjoint (Trivialization.restrOpen ec (Iio x) (_ : IsOpen (Iio x))).baseSet\n (Trivialization.restrOpen ed (Ioi c) (_ : IsOpen (Ioi c))).baseSet)).baseSet\ncase pos.intro.inr\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nec : Trivialization F TotalSpace.proj\nhec : Icc a c ⊆ ec.baseSet\nhlt : c < b\nd : B\nhdcb : d ∈ Ioc c b\nhd : Ico c d ⊆ ec.baseSet\nhad : Ico a d ⊆ ec.baseSet\nhe : Disjoint (Iio d) (Ioi c)\ned : Trivialization F TotalSpace.proj\nhed : d ∈ ed.baseSet\nx : B\nhx : x ∈ Icc a d\nhxd : x < d\n⊢ x ∈\n (Trivialization.disjointUnion (Trivialization.restrOpen ec (Iio d) (_ : IsOpen (Iio d)))\n (Trivialization.restrOpen ed (Ioi c) (_ : IsOpen (Ioi c)))\n (_ :\n Disjoint (Trivialization.restrOpen ec (Iio d) (_ : IsOpen (Iio d))).baseSet\n (Trivialization.restrOpen ed (Ioi c) (_ : IsOpen (Ioi c))).baseSet)).baseSet\n[PROOFSTEP]\nexacts [Or.inr ⟨hed, hdcb.1⟩, Or.inl ⟨had ⟨hx.1, hxd⟩, hxd⟩]\n[GOAL]\ncase neg\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nec : Trivialization F TotalSpace.proj\nhec : Icc a c ⊆ ec.baseSet\nhlt : c < b\nd : B\nhdcb : d ∈ Ioc c b\nhd : Ico c d ⊆ ec.baseSet\nhad : Ico a d ⊆ ec.baseSet\nhe : ¬Disjoint (Iio d) (Ioi c)\n⊢ ∃ d, d ∈ Ioc c b ∧ ∃ e, Icc a d ⊆ e.baseSet\n[PROOFSTEP]\nrw [disjoint_left] at he \n[GOAL]\ncase neg\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nec : Trivialization F TotalSpace.proj\nhec : Icc a c ⊆ ec.baseSet\nhlt : c < b\nd : B\nhdcb : d ∈ Ioc c b\nhd : Ico c d ⊆ ec.baseSet\nhad : Ico a d ⊆ ec.baseSet\nhe : ¬∀ ⦃a : B⦄, a ∈ Iio d → ¬a ∈ Ioi c\n⊢ ∃ d, d ∈ Ioc c b ∧ ∃ e, Icc a d ⊆ e.baseSet\n[PROOFSTEP]\npush_neg at he \n[GOAL]\ncase neg\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nec : Trivialization F TotalSpace.proj\nhec : Icc a c ⊆ ec.baseSet\nhlt : c < b\nd : B\nhdcb : d ∈ Ioc c b\nhd : Ico c d ⊆ ec.baseSet\nhad : Ico a d ⊆ ec.baseSet\nhe : Exists fun ⦃a⦄ => a ∈ Iio d ∧ a ∈ Ioi (sSup s)\n⊢ ∃ d, d ∈ Ioc c b ∧ ∃ e, Icc a d ⊆ e.baseSet\n[PROOFSTEP]\nrcases he with ⟨d', hdd' : d' < d, hd'c⟩\n[GOAL]\ncase neg.intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nE : B → Type u_5\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (b : B) → TopologicalSpace (E b)\ninst✝² : ConditionallyCompleteLinearOrder B\ninst✝¹ : OrderTopology B\ninst✝ : FiberBundle F E\na b : B\nea : Trivialization F TotalSpace.proj\nhea : a ∈ ea.baseSet\nhab : a ≤ b\ns : Set B := {x | x ∈ Icc a b ∧ ∃ e, Icc a x ⊆ e.baseSet}\nha : a ∈ s\nsne : Set.Nonempty s\nhsb : b ∈ upperBounds s\nsbd : BddAbove s\nc : B := sSup s\nhsc : IsLUB s c\nhc : c ∈ Icc a b\nec : Trivialization F TotalSpace.proj\nhec : Icc a c ⊆ ec.baseSet\nhlt : c < b\nd : B\nhdcb : d ∈ Ioc c b\nhd : Ico c d ⊆ ec.baseSet\nhad : Ico a d ⊆ ec.baseSet\nd' : B\nhdd' : d' < d\nhd'c : d' ∈ Ioi (sSup s)\n⊢ ∃ d, d ∈ Ioc c b ∧ ∃ e, Icc a d ⊆ e.baseSet\n[PROOFSTEP]\nexact ⟨d', ⟨hd'c, hdd'.le.trans hdcb.2⟩, ec, (Icc_subset_Ico_right hdd').trans had⟩\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni j : ι\np : B × F\nhp : p ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ\n⊢ (fun p => (p.fst, coordChange Z i j p.fst p.snd)) p ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ\n[PROOFSTEP]\nsimpa using hp\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni j : ι\np : B × F\nhp : p ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ\n⊢ (fun p => (p.fst, coordChange Z j i p.fst p.snd)) p ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ\n[PROOFSTEP]\nsimpa using hp\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni j : ι\n⊢ ∀ ⦃x : B × F⦄,\n x ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ →\n (fun p => (p.fst, coordChange Z j i p.fst p.snd)) ((fun p => (p.fst, coordChange Z i j p.fst p.snd)) x) = x\n[PROOFSTEP]\nrintro ⟨x, v⟩ hx\n[GOAL]\ncase mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni j : ι\nx : B\nv : F\nhx : (x, v) ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ\n⊢ (fun p => (p.fst, coordChange Z j i p.fst p.snd)) ((fun p => (p.fst, coordChange Z i j p.fst p.snd)) (x, v)) = (x, v)\n[PROOFSTEP]\nsimp only [prod_mk_mem_set_prod_eq, mem_inter_iff, and_true, mem_univ] at hx \n[GOAL]\ncase mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni j : ι\nx : B\nv : F\nhx : x ∈ baseSet Z i ∧ x ∈ baseSet Z j\n⊢ (fun p => (p.fst, coordChange Z j i p.fst p.snd)) ((fun p => (p.fst, coordChange Z i j p.fst p.snd)) (x, v)) = (x, v)\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni j : ι\nx : B\nv : F\nhx : x ∈ baseSet Z i ∧ x ∈ baseSet Z j\n⊢ (x, coordChange Z j i x (coordChange Z i j x v)) = (x, v)\n[PROOFSTEP]\nrw [coordChange_comp, Z.coordChange_self]\n[GOAL]\ncase mk.a\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni j : ι\nx : B\nv : F\nhx : x ∈ baseSet Z i ∧ x ∈ baseSet Z j\n⊢ x ∈ baseSet Z i\ncase mk.a\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni j : ι\nx : B\nv : F\nhx : x ∈ baseSet Z i ∧ x ∈ baseSet Z j\n⊢ x ∈ baseSet Z i ∩ baseSet Z j ∩ baseSet Z i\n[PROOFSTEP]\nexacts [hx.1, ⟨⟨hx.1, hx.2⟩, hx.1⟩]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni j : ι\n⊢ ∀ ⦃x : B × F⦄,\n x ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ →\n (fun p => (p.fst, coordChange Z i j p.fst p.snd)) ((fun p => (p.fst, coordChange Z j i p.fst p.snd)) x) = x\n[PROOFSTEP]\nrintro ⟨x, v⟩ hx\n[GOAL]\ncase mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni j : ι\nx : B\nv : F\nhx : (x, v) ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ\n⊢ (fun p => (p.fst, coordChange Z i j p.fst p.snd)) ((fun p => (p.fst, coordChange Z j i p.fst p.snd)) (x, v)) = (x, v)\n[PROOFSTEP]\nsimp only [prod_mk_mem_set_prod_eq, mem_inter_iff, and_true_iff, mem_univ] at hx \n[GOAL]\ncase mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni j : ι\nx : B\nv : F\nhx : x ∈ baseSet Z i ∧ x ∈ baseSet Z j\n⊢ (fun p => (p.fst, coordChange Z i j p.fst p.snd)) ((fun p => (p.fst, coordChange Z j i p.fst p.snd)) (x, v)) = (x, v)\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni j : ι\nx : B\nv : F\nhx : x ∈ baseSet Z i ∧ x ∈ baseSet Z j\n⊢ (x, coordChange Z i j x (coordChange Z j i x v)) = (x, v)\n[PROOFSTEP]\nrw [Z.coordChange_comp, Z.coordChange_self]\n[GOAL]\ncase mk.a\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni j : ι\nx : B\nv : F\nhx : x ∈ baseSet Z i ∧ x ∈ baseSet Z j\n⊢ x ∈ baseSet Z j\n[PROOFSTEP]\nexact hx.2\n[GOAL]\ncase mk.a\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni j : ι\nx : B\nv : F\nhx : x ∈ baseSet Z i ∧ x ∈ baseSet Z j\n⊢ x ∈ baseSet Z j ∩ baseSet Z i ∩ baseSet Z j\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni j : ι\n⊢ ContinuousOn\n { toFun := fun p => (p.fst, coordChange Z i j p.fst p.snd),\n invFun := fun p => (p.fst, coordChange Z j i p.fst p.snd), source := (baseSet Z i ∩ baseSet Z j) ×ˢ univ,\n target := (baseSet Z i ∩ baseSet Z j) ×ˢ univ,\n map_source' :=\n (_ :\n ∀ (p : B × F),\n p ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ →\n (fun p => (p.fst, coordChange Z i j p.fst p.snd)) p ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ),\n map_target' :=\n (_ :\n ∀ (p : B × F),\n p ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ →\n (fun p => (p.fst, coordChange Z j i p.fst p.snd)) p ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ),\n left_inv' :=\n (_ :\n ∀ ⦃x : B × F⦄,\n x ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ →\n (fun p => (p.fst, coordChange Z j i p.fst p.snd))\n ((fun p => (p.fst, coordChange Z i j p.fst p.snd)) x) =\n x),\n right_inv' :=\n (_ :\n ∀ ⦃x : B × F⦄,\n x ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ →\n (fun p => (p.fst, coordChange Z i j p.fst p.snd))\n ((fun p => (p.fst, coordChange Z j i p.fst p.snd)) x) =\n x) }.invFun\n { toFun := fun p => (p.fst, coordChange Z i j p.fst p.snd),\n invFun := fun p => (p.fst, coordChange Z j i p.fst p.snd), source := (baseSet Z i ∩ baseSet Z j) ×ˢ univ,\n target := (baseSet Z i ∩ baseSet Z j) ×ˢ univ,\n map_source' :=\n (_ :\n ∀ (p : B × F),\n p ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ →\n (fun p => (p.fst, coordChange Z i j p.fst p.snd)) p ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ),\n map_target' :=\n (_ :\n ∀ (p : B × F),\n p ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ →\n (fun p => (p.fst, coordChange Z j i p.fst p.snd)) p ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ),\n left_inv' :=\n (_ :\n ∀ ⦃x : B × F⦄,\n x ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ →\n (fun p => (p.fst, coordChange Z j i p.fst p.snd))\n ((fun p => (p.fst, coordChange Z i j p.fst p.snd)) x) =\n x),\n right_inv' :=\n (_ :\n ∀ ⦃x : B × F⦄,\n x ∈ (baseSet Z i ∩ baseSet Z j) ×ˢ univ →\n (fun p => (p.fst, coordChange Z i j p.fst p.snd))\n ((fun p => (p.fst, coordChange Z j i p.fst p.snd)) x) =\n x) }.target\n[PROOFSTEP]\nsimpa [inter_comm] using continuous_fst.continuousOn.prod (Z.continuousOn_coordChange j i)\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni j : ι\np : B × F\n⊢ p ∈ (trivChange Z i j).toLocalEquiv.source ↔ p.fst ∈ baseSet Z i ∩ baseSet Z j\n[PROOFSTEP]\nerw [mem_prod]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni j : ι\np : B × F\n⊢ p.fst ∈ baseSet Z i ∩ baseSet Z j ∧ p.snd ∈ univ ↔ p.fst ∈ baseSet Z i ∩ baseSet Z j\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\np : TotalSpace Z\nhp : p ∈ proj Z ⁻¹' baseSet Z i\n⊢ (fun p => (p.proj, coordChange Z (indexAt Z p.proj) i p.proj p.snd)) p ∈ baseSet Z i ×ˢ univ\n[PROOFSTEP]\nsimpa only [Set.mem_preimage, and_true_iff, Set.mem_univ, Set.prod_mk_mem_set_prod_eq] using hp\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\np : B × F\nhp : p ∈ baseSet Z i ×ˢ univ\n⊢ (fun p => { proj := p.fst, snd := coordChange Z i (indexAt Z p.fst) p.fst p.snd }) p ∈ proj Z ⁻¹' baseSet Z i\n[PROOFSTEP]\nsimpa only [Set.mem_preimage, and_true_iff, Set.mem_univ, Set.mem_prod] using hp\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\n⊢ ∀ ⦃x : TotalSpace Z⦄,\n x ∈ proj Z ⁻¹' baseSet Z i →\n (fun p => { proj := p.fst, snd := coordChange Z i (indexAt Z p.fst) p.fst p.snd })\n ((fun p => (p.proj, coordChange Z (indexAt Z p.proj) i p.proj p.snd)) x) =\n x\n[PROOFSTEP]\nrintro ⟨x, v⟩ hx\n[GOAL]\ncase mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nx : B\nv : Fiber Z x\nhx : { proj := x, snd := v } ∈ proj Z ⁻¹' baseSet Z i\n⊢ (fun p => { proj := p.fst, snd := coordChange Z i (indexAt Z p.fst) p.fst p.snd })\n ((fun p => (p.proj, coordChange Z (indexAt Z p.proj) i p.proj p.snd)) { proj := x, snd := v }) =\n { proj := x, snd := v }\n[PROOFSTEP]\nreplace hx : x ∈ Z.baseSet i := hx\n[GOAL]\ncase mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nx : B\nv : Fiber Z x\nhx : x ∈ baseSet Z i\n⊢ (fun p => { proj := p.fst, snd := coordChange Z i (indexAt Z p.fst) p.fst p.snd })\n ((fun p => (p.proj, coordChange Z (indexAt Z p.proj) i p.proj p.snd)) { proj := x, snd := v }) =\n { proj := x, snd := v }\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nx : B\nv : Fiber Z x\nhx : x ∈ baseSet Z i\n⊢ { proj := x, snd := coordChange Z i (indexAt Z x) x (coordChange Z (indexAt Z x) i x v) } = { proj := x, snd := v }\n[PROOFSTEP]\nrw [Z.coordChange_comp, Z.coordChange_self]\n[GOAL]\ncase mk.a\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nx : B\nv : Fiber Z x\nhx : x ∈ baseSet Z i\n⊢ x ∈ baseSet Z (indexAt Z x)\n[PROOFSTEP]\napply_rules [mem_baseSet_at, mem_inter]\n[GOAL]\ncase mk.a\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nx : B\nv : Fiber Z x\nhx : x ∈ baseSet Z i\n⊢ x ∈ baseSet Z (indexAt Z x) ∩ baseSet Z i ∩ baseSet Z (indexAt Z x)\n[PROOFSTEP]\napply_rules [mem_baseSet_at, mem_inter]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\n⊢ ∀ ⦃x : B × F⦄,\n x ∈ baseSet Z i ×ˢ univ →\n (fun p => (p.proj, coordChange Z (indexAt Z p.proj) i p.proj p.snd))\n ((fun p => { proj := p.fst, snd := coordChange Z i (indexAt Z p.fst) p.fst p.snd }) x) =\n x\n[PROOFSTEP]\nrintro ⟨x, v⟩ hx\n[GOAL]\ncase mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nx : B\nv : F\nhx : (x, v) ∈ baseSet Z i ×ˢ univ\n⊢ (fun p => (p.proj, coordChange Z (indexAt Z p.proj) i p.proj p.snd))\n ((fun p => { proj := p.fst, snd := coordChange Z i (indexAt Z p.fst) p.fst p.snd }) (x, v)) =\n (x, v)\n[PROOFSTEP]\nsimp only [prod_mk_mem_set_prod_eq, and_true_iff, mem_univ] at hx \n[GOAL]\ncase mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nx : B\nv : F\nhx : x ∈ baseSet Z i\n⊢ (fun p => (p.proj, coordChange Z (indexAt Z p.proj) i p.proj p.snd))\n ((fun p => { proj := p.fst, snd := coordChange Z i (indexAt Z p.fst) p.fst p.snd }) (x, v)) =\n (x, v)\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nx : B\nv : F\nhx : x ∈ baseSet Z i\n⊢ (x, coordChange Z (indexAt Z x) i x (coordChange Z i (indexAt Z x) x v)) = (x, v)\n[PROOFSTEP]\nrw [Z.coordChange_comp, Z.coordChange_self]\n[GOAL]\ncase mk.a\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nx : B\nv : F\nhx : x ∈ baseSet Z i\n⊢ x ∈ baseSet Z i\ncase mk.a\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nx : B\nv : F\nhx : x ∈ baseSet Z i\n⊢ x ∈ baseSet Z i ∩ baseSet Z (indexAt Z x) ∩ baseSet Z i\n[PROOFSTEP]\nexacts [hx, ⟨⟨hx, Z.mem_baseSet_at _⟩, hx⟩]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\np : B × F\n⊢ p ∈ (localTrivAsLocalEquiv Z i).target ↔ p.fst ∈ baseSet Z i\n[PROOFSTEP]\nerw [mem_prod]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\np : B × F\n⊢ p.fst ∈ baseSet Z i ∧ p.snd ∈ univ ↔ p.fst ∈ baseSet Z i\n[PROOFSTEP]\nsimp only [and_true_iff, mem_univ]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ i j : ι\n⊢ LocalEquiv.trans (LocalEquiv.symm (localTrivAsLocalEquiv Z i)) (localTrivAsLocalEquiv Z j) ≈\n (trivChange Z i j).toLocalEquiv\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ i j : ι\n⊢ (LocalEquiv.trans (LocalEquiv.symm (localTrivAsLocalEquiv Z i)) (localTrivAsLocalEquiv Z j)).source =\n (trivChange Z i j).toLocalEquiv.source\n[PROOFSTEP]\next x\n[GOAL]\ncase left.h\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ i j : ι\nx : B × F\n⊢ x ∈ (LocalEquiv.trans (LocalEquiv.symm (localTrivAsLocalEquiv Z i)) (localTrivAsLocalEquiv Z j)).source ↔\n x ∈ (trivChange Z i j).toLocalEquiv.source\n[PROOFSTEP]\nsimp only [mem_localTrivAsLocalEquiv_target, mfld_simps]\n[GOAL]\ncase left.h\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ i j : ι\nx : B × F\n⊢ x.fst ∈ baseSet Z i ∧ ↑(LocalEquiv.symm (localTrivAsLocalEquiv Z i)) x ∈ (localTrivAsLocalEquiv Z j).source ↔\n x.fst ∈ baseSet Z i ∧ x.fst ∈ baseSet Z j\n[PROOFSTEP]\nrfl\n[GOAL]\ncase right\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ i j : ι\n⊢ EqOn (↑(LocalEquiv.trans (LocalEquiv.symm (localTrivAsLocalEquiv Z i)) (localTrivAsLocalEquiv Z j)))\n (↑(trivChange Z i j).toLocalEquiv)\n (LocalEquiv.trans (LocalEquiv.symm (localTrivAsLocalEquiv Z i)) (localTrivAsLocalEquiv Z j)).source\n[PROOFSTEP]\nrintro ⟨x, v⟩ hx\n[GOAL]\ncase right.mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ i j : ι\nx : B\nv : F\nhx : (x, v) ∈ (LocalEquiv.trans (LocalEquiv.symm (localTrivAsLocalEquiv Z i)) (localTrivAsLocalEquiv Z j)).source\n⊢ ↑(LocalEquiv.trans (LocalEquiv.symm (localTrivAsLocalEquiv Z i)) (localTrivAsLocalEquiv Z j)) (x, v) =\n ↑(trivChange Z i j).toLocalEquiv (x, v)\n[PROOFSTEP]\nsimp only [trivChange, localTrivAsLocalEquiv, LocalEquiv.symm, true_and_iff, Prod.mk.inj_iff, prod_mk_mem_set_prod_eq,\n LocalEquiv.trans_source, mem_inter_iff, and_true_iff, mem_preimage, proj, mem_univ, eq_self_iff_true, (· ∘ ·),\n LocalEquiv.coe_trans, TotalSpace.proj] at hx ⊢\n[GOAL]\ncase right.mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ i j : ι\nx : B\nv : F\nhx : x ∈ baseSet Z i ∧ x ∈ baseSet Z j\n⊢ coordChange Z (indexAt Z x) j x (coordChange Z i (indexAt Z x) x v) = coordChange Z i j x v\n[PROOFSTEP]\nsimp only [Z.coordChange_comp, hx, mem_inter_iff, and_self_iff, mem_baseSet_at]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\n⊢ IsOpen (localTrivAsLocalEquiv Z i).source\n[PROOFSTEP]\napply TopologicalSpace.GenerateOpen.basic\n[GOAL]\ncase a\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\n⊢ (localTrivAsLocalEquiv Z i).source ∈\n ⋃ (i : ι) (s : Set (B × F)) (_ : IsOpen s),\n {(localTrivAsLocalEquiv Z i).source ∩ ↑(localTrivAsLocalEquiv Z i) ⁻¹' s}\n[PROOFSTEP]\nsimp only [exists_prop, mem_iUnion, mem_singleton_iff]\n[GOAL]\ncase a\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\n⊢ ∃ i_1 i_2,\n IsOpen i_2 ∧\n (localTrivAsLocalEquiv Z i).source = (localTrivAsLocalEquiv Z i_1).source ∩ ↑(localTrivAsLocalEquiv Z i_1) ⁻¹' i_2\n[PROOFSTEP]\nrefine ⟨i, Z.baseSet i ×ˢ univ, (Z.isOpen_baseSet i).prod isOpen_univ, ?_⟩\n[GOAL]\ncase a\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\n⊢ (localTrivAsLocalEquiv Z i).source =\n (localTrivAsLocalEquiv Z i).source ∩ ↑(localTrivAsLocalEquiv Z i) ⁻¹' baseSet Z i ×ˢ univ\n[PROOFSTEP]\next p\n[GOAL]\ncase a.h\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\np : TotalSpace Z\n⊢ p ∈ (localTrivAsLocalEquiv Z i).source ↔\n p ∈ (localTrivAsLocalEquiv Z i).source ∩ ↑(localTrivAsLocalEquiv Z i) ⁻¹' baseSet Z i ×ˢ univ\n[PROOFSTEP]\nsimp only [localTrivAsLocalEquiv_apply, prod_mk_mem_set_prod_eq, mem_inter_iff, and_self_iff,\n mem_localTrivAsLocalEquiv_source, and_true, mem_univ, mem_preimage]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\n⊢ ContinuousOn (↑(localTrivAsLocalEquiv Z i)) (localTrivAsLocalEquiv Z i).source\n[PROOFSTEP]\nrw [continuousOn_open_iff (Z.open_source' i)]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\n⊢ ∀ (t : Set (B × F)), IsOpen t → IsOpen ((localTrivAsLocalEquiv Z i).source ∩ ↑(localTrivAsLocalEquiv Z i) ⁻¹' t)\n[PROOFSTEP]\nintro s s_open\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\ns : Set (B × F)\ns_open : IsOpen s\n⊢ IsOpen ((localTrivAsLocalEquiv Z i).source ∩ ↑(localTrivAsLocalEquiv Z i) ⁻¹' s)\n[PROOFSTEP]\napply TopologicalSpace.GenerateOpen.basic\n[GOAL]\ncase a\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\ns : Set (B × F)\ns_open : IsOpen s\n⊢ (localTrivAsLocalEquiv Z i).source ∩ ↑(localTrivAsLocalEquiv Z i) ⁻¹' s ∈\n ⋃ (i : ι) (s : Set (B × F)) (_ : IsOpen s),\n {(localTrivAsLocalEquiv Z i).source ∩ ↑(localTrivAsLocalEquiv Z i) ⁻¹' s}\n[PROOFSTEP]\nsimp only [exists_prop, mem_iUnion, mem_singleton_iff]\n[GOAL]\ncase a\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\ns : Set (B × F)\ns_open : IsOpen s\n⊢ ∃ i_1 i_2,\n IsOpen i_2 ∧\n (localTrivAsLocalEquiv Z i).source ∩ ↑(localTrivAsLocalEquiv Z i) ⁻¹' s =\n (localTrivAsLocalEquiv Z i_1).source ∩ ↑(localTrivAsLocalEquiv Z i_1) ⁻¹' i_2\n[PROOFSTEP]\nexact ⟨i, s, s_open, rfl⟩\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\n⊢ ContinuousOn (localTrivAsLocalEquiv Z i).invFun (localTrivAsLocalEquiv Z i).target\n[PROOFSTEP]\nrefine continuousOn_open_of_generateFrom fun t ht ↦ ?_\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\nt : Set (TotalSpace Z)\nht :\n t ∈\n ⋃ (i : ι) (s : Set (B × F)) (_ : IsOpen s),\n {(localTrivAsLocalEquiv Z i).source ∩ ↑(localTrivAsLocalEquiv Z i) ⁻¹' s}\n⊢ IsOpen ((localTrivAsLocalEquiv Z i).target ∩ (localTrivAsLocalEquiv Z i).invFun ⁻¹' t)\n[PROOFSTEP]\nsimp only [exists_prop, mem_iUnion, mem_singleton_iff] at ht \n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\nt : Set (TotalSpace Z)\nht : ∃ i i_1, IsOpen i_1 ∧ t = (localTrivAsLocalEquiv Z i).source ∩ ↑(localTrivAsLocalEquiv Z i) ⁻¹' i_1\n⊢ IsOpen ((localTrivAsLocalEquiv Z i).target ∩ (localTrivAsLocalEquiv Z i).invFun ⁻¹' t)\n[PROOFSTEP]\nobtain ⟨j, s, s_open, ts⟩ :\n ∃ j s, IsOpen s ∧ t = (localTrivAsLocalEquiv Z j).source ∩ localTrivAsLocalEquiv Z j ⁻¹' s := ht\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\nt : Set (TotalSpace Z)\nj : ι\ns : Set (B × F)\ns_open : IsOpen s\nts : t = (localTrivAsLocalEquiv Z j).source ∩ ↑(localTrivAsLocalEquiv Z j) ⁻¹' s\n⊢ IsOpen ((localTrivAsLocalEquiv Z i).target ∩ (localTrivAsLocalEquiv Z i).invFun ⁻¹' t)\n[PROOFSTEP]\nrw [ts]\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\nt : Set (TotalSpace Z)\nj : ι\ns : Set (B × F)\ns_open : IsOpen s\nts : t = (localTrivAsLocalEquiv Z j).source ∩ ↑(localTrivAsLocalEquiv Z j) ⁻¹' s\n⊢ IsOpen\n ((localTrivAsLocalEquiv Z i).target ∩\n (localTrivAsLocalEquiv Z i).invFun ⁻¹' ((localTrivAsLocalEquiv Z j).source ∩ ↑(localTrivAsLocalEquiv Z j) ⁻¹' s))\n[PROOFSTEP]\nsimp only [LocalEquiv.right_inv, preimage_inter, LocalEquiv.left_inv]\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\nt : Set (TotalSpace Z)\nj : ι\ns : Set (B × F)\ns_open : IsOpen s\nts : t = (localTrivAsLocalEquiv Z j).source ∩ ↑(localTrivAsLocalEquiv Z j) ⁻¹' s\n⊢ IsOpen\n ((localTrivAsLocalEquiv Z i).target ∩\n ((localTrivAsLocalEquiv Z i).invFun ⁻¹' (localTrivAsLocalEquiv Z j).source ∩\n (localTrivAsLocalEquiv Z i).invFun ⁻¹' (↑(localTrivAsLocalEquiv Z j) ⁻¹' s)))\n[PROOFSTEP]\nlet e := Z.localTrivAsLocalEquiv i\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\nt : Set (TotalSpace Z)\nj : ι\ns : Set (B × F)\ns_open : IsOpen s\nts : t = (localTrivAsLocalEquiv Z j).source ∩ ↑(localTrivAsLocalEquiv Z j) ⁻¹' s\ne : LocalEquiv (TotalSpace Z) (B × F) := localTrivAsLocalEquiv Z i\n⊢ IsOpen\n ((localTrivAsLocalEquiv Z i).target ∩\n ((localTrivAsLocalEquiv Z i).invFun ⁻¹' (localTrivAsLocalEquiv Z j).source ∩\n (localTrivAsLocalEquiv Z i).invFun ⁻¹' (↑(localTrivAsLocalEquiv Z j) ⁻¹' s)))\n[PROOFSTEP]\nlet e' := Z.localTrivAsLocalEquiv j\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\nt : Set (TotalSpace Z)\nj : ι\ns : Set (B × F)\ns_open : IsOpen s\nts : t = (localTrivAsLocalEquiv Z j).source ∩ ↑(localTrivAsLocalEquiv Z j) ⁻¹' s\ne : LocalEquiv (TotalSpace Z) (B × F) := localTrivAsLocalEquiv Z i\ne' : LocalEquiv (TotalSpace Z) (B × F) := localTrivAsLocalEquiv Z j\n⊢ IsOpen\n ((localTrivAsLocalEquiv Z i).target ∩\n ((localTrivAsLocalEquiv Z i).invFun ⁻¹' (localTrivAsLocalEquiv Z j).source ∩\n (localTrivAsLocalEquiv Z i).invFun ⁻¹' (↑(localTrivAsLocalEquiv Z j) ⁻¹' s)))\n[PROOFSTEP]\nlet f := e.symm.trans e'\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\nt : Set (TotalSpace Z)\nj : ι\ns : Set (B × F)\ns_open : IsOpen s\nts : t = (localTrivAsLocalEquiv Z j).source ∩ ↑(localTrivAsLocalEquiv Z j) ⁻¹' s\ne : LocalEquiv (TotalSpace Z) (B × F) := localTrivAsLocalEquiv Z i\ne' : LocalEquiv (TotalSpace Z) (B × F) := localTrivAsLocalEquiv Z j\nf : LocalEquiv (B × F) (B × F) := LocalEquiv.trans (LocalEquiv.symm e) e'\n⊢ IsOpen\n ((localTrivAsLocalEquiv Z i).target ∩\n ((localTrivAsLocalEquiv Z i).invFun ⁻¹' (localTrivAsLocalEquiv Z j).source ∩\n (localTrivAsLocalEquiv Z i).invFun ⁻¹' (↑(localTrivAsLocalEquiv Z j) ⁻¹' s)))\n[PROOFSTEP]\nhave : IsOpen (f.source ∩ f ⁻¹' s) :=\n by\n rw [LocalEquiv.EqOnSource.source_inter_preimage_eq (Z.localTrivAsLocalEquiv_trans i j)]\n exact (continuousOn_open_iff (Z.trivChange i j).open_source).1 (Z.trivChange i j).continuousOn _ s_open\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\nt : Set (TotalSpace Z)\nj : ι\ns : Set (B × F)\ns_open : IsOpen s\nts : t = (localTrivAsLocalEquiv Z j).source ∩ ↑(localTrivAsLocalEquiv Z j) ⁻¹' s\ne : LocalEquiv (TotalSpace Z) (B × F) := localTrivAsLocalEquiv Z i\ne' : LocalEquiv (TotalSpace Z) (B × F) := localTrivAsLocalEquiv Z j\nf : LocalEquiv (B × F) (B × F) := LocalEquiv.trans (LocalEquiv.symm e) e'\n⊢ IsOpen (f.source ∩ ↑f ⁻¹' s)\n[PROOFSTEP]\nrw [LocalEquiv.EqOnSource.source_inter_preimage_eq (Z.localTrivAsLocalEquiv_trans i j)]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\nt : Set (TotalSpace Z)\nj : ι\ns : Set (B × F)\ns_open : IsOpen s\nts : t = (localTrivAsLocalEquiv Z j).source ∩ ↑(localTrivAsLocalEquiv Z j) ⁻¹' s\ne : LocalEquiv (TotalSpace Z) (B × F) := localTrivAsLocalEquiv Z i\ne' : LocalEquiv (TotalSpace Z) (B × F) := localTrivAsLocalEquiv Z j\nf : LocalEquiv (B × F) (B × F) := LocalEquiv.trans (LocalEquiv.symm e) e'\n⊢ IsOpen ((trivChange Z i j).toLocalEquiv.source ∩ ↑(trivChange Z i j).toLocalEquiv ⁻¹' s)\n[PROOFSTEP]\nexact (continuousOn_open_iff (Z.trivChange i j).open_source).1 (Z.trivChange i j).continuousOn _ s_open\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\nt : Set (TotalSpace Z)\nj : ι\ns : Set (B × F)\ns_open : IsOpen s\nts : t = (localTrivAsLocalEquiv Z j).source ∩ ↑(localTrivAsLocalEquiv Z j) ⁻¹' s\ne : LocalEquiv (TotalSpace Z) (B × F) := localTrivAsLocalEquiv Z i\ne' : LocalEquiv (TotalSpace Z) (B × F) := localTrivAsLocalEquiv Z j\nf : LocalEquiv (B × F) (B × F) := LocalEquiv.trans (LocalEquiv.symm e) e'\nthis : IsOpen (f.source ∩ ↑f ⁻¹' s)\n⊢ IsOpen\n ((localTrivAsLocalEquiv Z i).target ∩\n ((localTrivAsLocalEquiv Z i).invFun ⁻¹' (localTrivAsLocalEquiv Z j).source ∩\n (localTrivAsLocalEquiv Z i).invFun ⁻¹' (↑(localTrivAsLocalEquiv Z j) ⁻¹' s)))\n[PROOFSTEP]\nconvert this using 1\n[GOAL]\ncase h.e'_3\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\nt : Set (TotalSpace Z)\nj : ι\ns : Set (B × F)\ns_open : IsOpen s\nts : t = (localTrivAsLocalEquiv Z j).source ∩ ↑(localTrivAsLocalEquiv Z j) ⁻¹' s\ne : LocalEquiv (TotalSpace Z) (B × F) := localTrivAsLocalEquiv Z i\ne' : LocalEquiv (TotalSpace Z) (B × F) := localTrivAsLocalEquiv Z j\nf : LocalEquiv (B × F) (B × F) := LocalEquiv.trans (LocalEquiv.symm e) e'\nthis : IsOpen (f.source ∩ ↑f ⁻¹' s)\n⊢ (localTrivAsLocalEquiv Z i).target ∩\n ((localTrivAsLocalEquiv Z i).invFun ⁻¹' (localTrivAsLocalEquiv Z j).source ∩\n (localTrivAsLocalEquiv Z i).invFun ⁻¹' (↑(localTrivAsLocalEquiv Z j) ⁻¹' s)) =\n f.source ∩ ↑f ⁻¹' s\n[PROOFSTEP]\ndsimp [LocalEquiv.trans_source]\n[GOAL]\ncase h.e'_3\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\nt : Set (TotalSpace Z)\nj : ι\ns : Set (B × F)\ns_open : IsOpen s\nts : t = (localTrivAsLocalEquiv Z j).source ∩ ↑(localTrivAsLocalEquiv Z j) ⁻¹' s\ne : LocalEquiv (TotalSpace Z) (B × F) := localTrivAsLocalEquiv Z i\ne' : LocalEquiv (TotalSpace Z) (B × F) := localTrivAsLocalEquiv Z j\nf : LocalEquiv (B × F) (B × F) := LocalEquiv.trans (LocalEquiv.symm e) e'\nthis : IsOpen (f.source ∩ ↑f ⁻¹' s)\n⊢ (localTrivAsLocalEquiv Z i).target ∩\n (↑(LocalEquiv.symm (localTrivAsLocalEquiv Z i)) ⁻¹' (localTrivAsLocalEquiv Z j).source ∩\n ↑(LocalEquiv.symm (localTrivAsLocalEquiv Z i)) ⁻¹' (↑(localTrivAsLocalEquiv Z j) ⁻¹' s)) =\n (localTrivAsLocalEquiv Z i).target ∩\n ↑(LocalEquiv.symm (localTrivAsLocalEquiv Z i)) ⁻¹' (localTrivAsLocalEquiv Z j).source ∩\n ↑(localTrivAsLocalEquiv Z j) ∘ ↑(LocalEquiv.symm (localTrivAsLocalEquiv Z i)) ⁻¹' s\n[PROOFSTEP]\nrw [← preimage_comp, inter_assoc]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\np : TotalSpace Z\nx✝ :\n p ∈\n { toLocalEquiv := localTrivAsLocalEquiv Z i, open_source := (_ : IsOpen (localTrivAsLocalEquiv Z i).source),\n open_target := (_ : IsOpen (baseSet Z i ×ˢ univ)),\n continuous_toFun := (_ : ContinuousOn (↑(localTrivAsLocalEquiv Z i)) (localTrivAsLocalEquiv Z i).source),\n continuous_invFun :=\n (_ :\n ContinuousOn (localTrivAsLocalEquiv Z i).invFun (localTrivAsLocalEquiv Z i).target) }.toLocalEquiv.source\n⊢ (↑{ toLocalEquiv := localTrivAsLocalEquiv Z i, open_source := (_ : IsOpen (localTrivAsLocalEquiv Z i).source),\n open_target := (_ : IsOpen (baseSet Z i ×ˢ univ)),\n continuous_toFun := (_ : ContinuousOn (↑(localTrivAsLocalEquiv Z i)) (localTrivAsLocalEquiv Z i).source),\n continuous_invFun :=\n (_ : ContinuousOn (localTrivAsLocalEquiv Z i).invFun (localTrivAsLocalEquiv Z i).target) }\n p).fst =\n proj Z p\n[PROOFSTEP]\nsimp only [mfld_simps]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni✝ : ι\nb : B\na : F\ni : ι\np : TotalSpace Z\nx✝ :\n p ∈\n { toLocalEquiv := localTrivAsLocalEquiv Z i, open_source := (_ : IsOpen (localTrivAsLocalEquiv Z i).source),\n open_target := (_ : IsOpen (baseSet Z i ×ˢ univ)),\n continuous_toFun := (_ : ContinuousOn (↑(localTrivAsLocalEquiv Z i)) (localTrivAsLocalEquiv Z i).source),\n continuous_invFun :=\n (_ :\n ContinuousOn (localTrivAsLocalEquiv Z i).invFun (localTrivAsLocalEquiv Z i).target) }.toLocalEquiv.source\n⊢ (↑(localTrivAsLocalEquiv Z i) p).fst = p.proj\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb : B\na v : F\nh : ∀ (i j : ι) (x : B), x ∈ baseSet Z i ∩ baseSet Z j → coordChange Z i j x v = v\n⊢ Continuous\n (let_fun this := fun x => { proj := x, snd := v };\n this)\n[PROOFSTEP]\nrefine continuous_iff_continuousAt.2 fun x => ?_\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb : B\na v : F\nh : ∀ (i j : ι) (x : B), x ∈ baseSet Z i ∩ baseSet Z j → coordChange Z i j x v = v\nx : B\n⊢ ContinuousAt\n (let_fun this := fun x => { proj := x, snd := v };\n this)\n x\n[PROOFSTEP]\nhave A : Z.baseSet (Z.indexAt x) ∈ 𝓝 x := IsOpen.mem_nhds (Z.isOpen_baseSet (Z.indexAt x)) (Z.mem_baseSet_at x)\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb : B\na v : F\nh : ∀ (i j : ι) (x : B), x ∈ baseSet Z i ∩ baseSet Z j → coordChange Z i j x v = v\nx : B\nA : baseSet Z (indexAt Z x) ∈ 𝓝 x\n⊢ ContinuousAt\n (let_fun this := fun x => { proj := x, snd := v };\n this)\n x\n[PROOFSTEP]\nrefine ((Z.localTrivAt x).toLocalHomeomorph.continuousAt_iff_continuousAt_comp_left ?_).2 ?_\n[GOAL]\ncase refine_1\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb : B\na v : F\nh : ∀ (i j : ι) (x : B), x ∈ baseSet Z i ∩ baseSet Z j → coordChange Z i j x v = v\nx : B\nA : baseSet Z (indexAt Z x) ∈ 𝓝 x\n⊢ (let_fun this := fun x => { proj := x, snd := v };\n this) ⁻¹'\n (localTrivAt Z x).toLocalHomeomorph.toLocalEquiv.source ∈\n 𝓝 x\n[PROOFSTEP]\nexact A\n[GOAL]\ncase refine_2\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb : B\na v : F\nh : ∀ (i j : ι) (x : B), x ∈ baseSet Z i ∩ baseSet Z j → coordChange Z i j x v = v\nx : B\nA : baseSet Z (indexAt Z x) ∈ 𝓝 x\n⊢ ContinuousAt\n (↑(localTrivAt Z x).toLocalHomeomorph ∘\n let_fun this := fun x => { proj := x, snd := v };\n this)\n x\n[PROOFSTEP]\napply continuousAt_id.prod\n[GOAL]\ncase refine_2\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb : B\na v : F\nh : ∀ (i j : ι) (x : B), x ∈ baseSet Z i ∩ baseSet Z j → coordChange Z i j x v = v\nx : B\nA : baseSet Z (indexAt Z x) ∈ 𝓝 x\n⊢ ContinuousAt\n (fun x_1 =>\n coordChange Z\n (indexAt Z\n ((let_fun this := fun x => { proj := x, snd := v };\n this)\n x_1).proj)\n (indexAt Z x)\n ((let_fun this := fun x => { proj := x, snd := v };\n this)\n x_1).proj\n ((let_fun this := fun x => { proj := x, snd := v };\n this)\n x_1).snd)\n x\n[PROOFSTEP]\nsimp only [(· ∘ ·), mfld_simps, localTrivAt_snd]\n[GOAL]\ncase refine_2\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb : B\na v : F\nh : ∀ (i j : ι) (x : B), x ∈ baseSet Z i ∩ baseSet Z j → coordChange Z i j x v = v\nx : B\nA : baseSet Z (indexAt Z x) ∈ 𝓝 x\n⊢ ContinuousAt (fun x_1 => coordChange Z (indexAt Z x_1) (indexAt Z x) x_1 v) x\n[PROOFSTEP]\nhave : ContinuousOn (fun _ : B => v) (Z.baseSet (Z.indexAt x)) := continuousOn_const\n[GOAL]\ncase refine_2\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb : B\na v : F\nh : ∀ (i j : ι) (x : B), x ∈ baseSet Z i ∩ baseSet Z j → coordChange Z i j x v = v\nx : B\nA : baseSet Z (indexAt Z x) ∈ 𝓝 x\nthis : ContinuousOn (fun x => v) (baseSet Z (indexAt Z x))\n⊢ ContinuousAt (fun x_1 => coordChange Z (indexAt Z x_1) (indexAt Z x) x_1 v) x\n[PROOFSTEP]\nrefine (this.congr fun y hy ↦ ?_).continuousAt A\n[GOAL]\ncase refine_2\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb : B\na v : F\nh : ∀ (i j : ι) (x : B), x ∈ baseSet Z i ∩ baseSet Z j → coordChange Z i j x v = v\nx : B\nA : baseSet Z (indexAt Z x) ∈ 𝓝 x\nthis : ContinuousOn (fun x => v) (baseSet Z (indexAt Z x))\ny : B\nhy : y ∈ baseSet Z (indexAt Z x)\n⊢ coordChange Z (indexAt Z y) (indexAt Z x) y v = v\n[PROOFSTEP]\nexact h _ _ _ ⟨mem_baseSet_at _ _, hy⟩\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb : B\na : F\np : TotalSpace Z\n⊢ ↑(localTrivAt Z p.proj) p = (p.proj, p.snd)\n[PROOFSTEP]\nrw [localTrivAt, localTriv_apply, coordChange_self]\n[GOAL]\ncase a\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb : B\na : F\np : TotalSpace Z\n⊢ p.proj ∈ baseSet Z (indexAt Z p.proj)\n[PROOFSTEP]\nexact Z.mem_baseSet_at p.1\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb✝ : B\na : F\nb : B\n⊢ b ∈ (localTrivAt Z b).baseSet\n[PROOFSTEP]\nrw [localTrivAt, ← baseSet_at]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb✝ : B\na : F\nb : B\n⊢ b ∈ baseSet Z (indexAt Z b)\n[PROOFSTEP]\nexact Z.mem_baseSet_at b\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb : B\na : F\n⊢ { proj := b, snd := a } ∈ (localTrivAt Z b).toLocalHomeomorph.toLocalEquiv.source\n[PROOFSTEP]\nsimp only [mfld_simps]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb✝ : B\na : F\nb : B\nx : Fiber Z b\n⊢ 𝓝 x = comap (TotalSpace.mk b) (𝓝 { proj := b, snd := x })\n[PROOFSTEP]\nrw [(Z.localTrivAt b).nhds_eq_comap_inf_principal (mk_mem_localTrivAt_source _ _ _), comap_inf, comap_principal,\n comap_comap]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb✝ : B\na : F\nb : B\nx : Fiber Z b\n⊢ 𝓝 x =\n comap (↑(localTrivAt Z b).toLocalHomeomorph ∘ TotalSpace.mk b)\n (𝓝 (↑(localTrivAt Z b).toLocalHomeomorph { proj := b, snd := x })) ⊓\n 𝓟 (TotalSpace.mk b ⁻¹' (localTrivAt Z b).toLocalHomeomorph.toLocalEquiv.source)\n[PROOFSTEP]\nsimp only [(· ∘ ·), localTrivAt_apply_mk, Trivialization.coe_coe, ← (embedding_prod_mk b).nhds_eq_comap]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb✝ : B\na : F\nb : B\nx : Fiber Z b\n⊢ 𝓝 x = 𝓝 x ⊓ 𝓟 (TotalSpace.mk b ⁻¹' (localTrivAt Z b).toLocalHomeomorph.toLocalEquiv.source)\n[PROOFSTEP]\nconvert_to 𝓝 x = 𝓝 x ⊓ 𝓟 univ\n[GOAL]\ncase h.e'_3\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb✝ : B\na : F\nb : B\nx : Fiber Z b\n⊢ 𝓝 x ⊓ 𝓟 (TotalSpace.mk b ⁻¹' (localTrivAt Z b).toLocalHomeomorph.toLocalEquiv.source) = 𝓝 x ⊓ 𝓟 univ\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e'_3.e_a.e_s\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb✝ : B\na : F\nb : B\nx : Fiber Z b\n⊢ TotalSpace.mk b ⁻¹' (localTrivAt Z b).toLocalHomeomorph.toLocalEquiv.source = univ\n[PROOFSTEP]\nexact eq_univ_of_forall (mk_mem_localTrivAt_source Z _)\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nZ : FiberBundleCore ι B F\ni : ι\nb✝ : B\na : F\nb : B\nx : Fiber Z b\n⊢ 𝓝 x = 𝓝 x ⊓ 𝓟 univ\n[PROOFSTEP]\nrw [principal_univ, inf_top_eq]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\n⊢ ContinuousOn (↑(LocalEquiv.symm e.toLocalEquiv)) e.target\n[PROOFSTEP]\nrefine' fun z H U h => preimage_nhdsWithin_coinduced' H (le_def.1 (nhds_mono _) U h)\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nz : B × F\nH : z ∈ e.target\nU : Set (TotalSpace F E)\nh : U ∈ 𝓝 (↑(LocalEquiv.symm e.toLocalEquiv) z)\n⊢ coinduced (fun x => ↑(LocalEquiv.symm e.toLocalEquiv) ↑x) inferInstance ≤ totalSpaceTopology a\n[PROOFSTEP]\nexact le_iSup₂ (α := TopologicalSpace (TotalSpace F E)) e he\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne✝ e : Pretrivialization F TotalSpace.proj\n⊢ IsOpen e.source\n[PROOFSTEP]\nrefine isOpen_iSup_iff.mpr fun e' => isOpen_iSup_iff.mpr fun _ => ?_\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne✝ e e' : Pretrivialization F TotalSpace.proj\nx✝ : e' ∈ a.pretrivializationAtlas\n⊢ IsOpen e.source\n[PROOFSTEP]\nrefine' isOpen_coinduced.mpr (isOpen_induced_iff.mpr ⟨e.target, e.open_target, _⟩)\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne✝ e e' : Pretrivialization F TotalSpace.proj\nx✝ : e' ∈ a.pretrivializationAtlas\n⊢ Subtype.val ⁻¹' e.target = Pretrivialization.setSymm e' ⁻¹' e.source\n[PROOFSTEP]\next ⟨x, hx⟩\n[GOAL]\ncase h.mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne✝ e e' : Pretrivialization F TotalSpace.proj\nx✝ : e' ∈ a.pretrivializationAtlas\nx : B × F\nhx : x ∈ e'.target\n⊢ { val := x, property := hx } ∈ Subtype.val ⁻¹' e.target ↔\n { val := x, property := hx } ∈ Pretrivialization.setSymm e' ⁻¹' e.source\n[PROOFSTEP]\nsimp only [mem_preimage, Pretrivialization.setSymm, restrict, e.mem_target, e.mem_source, e'.proj_symm_apply hx]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne✝ e e' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\n⊢ IsOpen (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)\n[PROOFSTEP]\nletI := a.totalSpaceTopology\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne✝ e e' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\n⊢ IsOpen (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)\n[PROOFSTEP]\nobtain ⟨u, hu1, hu2⟩ :=\n continuousOn_iff'.mp (a.continuous_symm_of_mem_pretrivializationAtlas he') e.source (a.isOpen_source e)\n[GOAL]\ncase intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne✝ e e' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nu : Set (B × F)\nhu1 : IsOpen u\nhu2 : ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source ∩ e'.target = u ∩ e'.target\n⊢ IsOpen (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)\n[PROOFSTEP]\nrw [inter_comm, hu2]\n[GOAL]\ncase intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne✝ e e' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nu : Set (B × F)\nhu1 : IsOpen u\nhu2 : ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source ∩ e'.target = u ∩ e'.target\n⊢ IsOpen (u ∩ e'.target)\n[PROOFSTEP]\nexact hu1.inter e'.open_target\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nx✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\n⊢ ContinuousOn (↑e.toLocalEquiv) e.source\n[PROOFSTEP]\nrefine\n continuousOn_iff'.mpr fun s hs =>\n ⟨e ⁻¹' s ∩ e.source, isOpen_iSup_iff.mpr fun e' => ?_, by rw [inter_assoc, inter_self]; rfl⟩\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nx✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\ns : Set (B × F)\nhs : IsOpen s\n⊢ ↑e.toLocalEquiv ⁻¹' s ∩ e.source = ↑e ⁻¹' s ∩ e.source ∩ e.source\n[PROOFSTEP]\nrw [inter_assoc, inter_self]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nx✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\ns : Set (B × F)\nhs : IsOpen s\n⊢ ↑e.toLocalEquiv ⁻¹' s ∩ e.source = ↑e ⁻¹' s ∩ e.source\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nx✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\ns : Set (B × F)\nhs : IsOpen s\ne' : Pretrivialization F TotalSpace.proj\n⊢ IsOpen (↑e ⁻¹' s ∩ e.source)\n[PROOFSTEP]\nrefine isOpen_iSup_iff.mpr fun he' => ?_\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nx✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\ns : Set (B × F)\nhs : IsOpen s\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\n⊢ IsOpen (↑e ⁻¹' s ∩ e.source)\n[PROOFSTEP]\nrw [isOpen_coinduced, isOpen_induced_iff]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nx✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\ns : Set (B × F)\nhs : IsOpen s\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\n⊢ ∃ t, IsOpen t ∧ Subtype.val ⁻¹' t = Pretrivialization.setSymm e' ⁻¹' (↑e ⁻¹' s ∩ e.source)\n[PROOFSTEP]\nobtain ⟨u, hu1, hu2⟩ := continuousOn_iff'.mp (a.continuous_trivChange _ he _ he') s hs\n[GOAL]\ncase intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nx✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\ns : Set (B × F)\nhs : IsOpen s\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\nu : Set (B × F)\nhu1 : IsOpen u\nhu2 :\n ↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' s ∩ (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source) =\n u ∩ (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)\n⊢ ∃ t, IsOpen t ∧ Subtype.val ⁻¹' t = Pretrivialization.setSymm e' ⁻¹' (↑e ⁻¹' s ∩ e.source)\n[PROOFSTEP]\nhave hu3 := congr_arg (fun s => (fun x : e'.target => (x : B × F)) ⁻¹' s) hu2\n[GOAL]\ncase intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nx✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\ns : Set (B × F)\nhs : IsOpen s\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\nu : Set (B × F)\nhu1 : IsOpen u\nhu2 :\n ↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' s ∩ (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source) =\n u ∩ (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)\nhu3 :\n (fun s => (fun x => ↑x) ⁻¹' s)\n (↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' s ∩ (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)) =\n (fun s => (fun x => ↑x) ⁻¹' s) (u ∩ (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source))\n⊢ ∃ t, IsOpen t ∧ Subtype.val ⁻¹' t = Pretrivialization.setSymm e' ⁻¹' (↑e ⁻¹' s ∩ e.source)\n[PROOFSTEP]\nsimp only [Subtype.coe_preimage_self, preimage_inter, univ_inter] at hu3 \n[GOAL]\ncase intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nx✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\ns : Set (B × F)\nhs : IsOpen s\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\nu : Set (B × F)\nhu1 : IsOpen u\nhu2 :\n ↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' s ∩ (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source) =\n u ∩ (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)\nhu3 :\n (fun x => ↑x) ⁻¹' (↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' s) ∩\n (fun x => ↑x) ⁻¹' (↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source) =\n (fun x => ↑x) ⁻¹' u ∩ (fun x => ↑x) ⁻¹' (↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)\n⊢ ∃ t, IsOpen t ∧ Subtype.val ⁻¹' t = Pretrivialization.setSymm e' ⁻¹' (↑e ⁻¹' s ∩ e.source)\n[PROOFSTEP]\nrefine\n ⟨u ∩ e'.toLocalEquiv.target ∩ e'.toLocalEquiv.symm ⁻¹' e.source, ?_, by\n simp only [preimage_inter, inter_univ, Subtype.coe_preimage_self, hu3.symm]; rfl⟩\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nx✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\ns : Set (B × F)\nhs : IsOpen s\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\nu : Set (B × F)\nhu1 : IsOpen u\nhu2 :\n ↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' s ∩ (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source) =\n u ∩ (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)\nhu3 :\n (fun x => ↑x) ⁻¹' (↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' s) ∩\n (fun x => ↑x) ⁻¹' (↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source) =\n (fun x => ↑x) ⁻¹' u ∩ (fun x => ↑x) ⁻¹' (↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)\n⊢ Subtype.val ⁻¹' (u ∩ e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source) =\n Pretrivialization.setSymm e' ⁻¹' (↑e ⁻¹' s ∩ e.source)\n[PROOFSTEP]\nsimp only [preimage_inter, inter_univ, Subtype.coe_preimage_self, hu3.symm]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nx✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\ns : Set (B × F)\nhs : IsOpen s\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\nu : Set (B × F)\nhu1 : IsOpen u\nhu2 :\n ↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' s ∩ (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source) =\n u ∩ (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)\nhu3 :\n (fun x => ↑x) ⁻¹' (↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' s) ∩\n (fun x => ↑x) ⁻¹' (↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source) =\n (fun x => ↑x) ⁻¹' u ∩ (fun x => ↑x) ⁻¹' (↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)\n⊢ (fun x => ↑x) ⁻¹' (↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' s) ∩\n (fun x => ↑x) ⁻¹' (↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source) =\n Pretrivialization.setSymm e' ⁻¹' (↑e ⁻¹' s) ∩ Pretrivialization.setSymm e' ⁻¹' e.source\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nx✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\ns : Set (B × F)\nhs : IsOpen s\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\nu : Set (B × F)\nhu1 : IsOpen u\nhu2 :\n ↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' s ∩ (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source) =\n u ∩ (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)\nhu3 :\n (fun x => ↑x) ⁻¹' (↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' s) ∩\n (fun x => ↑x) ⁻¹' (↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source) =\n (fun x => ↑x) ⁻¹' u ∩ (fun x => ↑x) ⁻¹' (↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)\n⊢ IsOpen (u ∩ e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)\n[PROOFSTEP]\nrw [inter_assoc]\n[GOAL]\ncase intro.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nx✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\ns : Set (B × F)\nhs : IsOpen s\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\nu : Set (B × F)\nhu1 : IsOpen u\nhu2 :\n ↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' s ∩ (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source) =\n u ∩ (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)\nhu3 :\n (fun x => ↑x) ⁻¹' (↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' s) ∩\n (fun x => ↑x) ⁻¹' (↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source) =\n (fun x => ↑x) ⁻¹' u ∩ (fun x => ↑x) ⁻¹' (↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)\n⊢ IsOpen (u ∩ (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source))\n[PROOFSTEP]\nexact hu1.inter (a.isOpen_target_of_mem_pretrivializationAtlas_inter e e' he')\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nb : B\nx : E b\n⊢ { proj := b, snd := x } ∈ (pretrivializationAt a b).source\n[PROOFSTEP]\nsimp only [(a.pretrivializationAt b).source_eq, mem_preimage, TotalSpace.proj]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nb : B\nx : E b\n⊢ b ∈ (pretrivializationAt a b).baseSet\n[PROOFSTEP]\nexact a.mem_base_pretrivializationAt b\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nb : B\n⊢ Continuous (TotalSpace.mk b)\n[PROOFSTEP]\nletI := a.totalSpaceTopology\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nb : B\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\n⊢ Continuous (TotalSpace.mk b)\n[PROOFSTEP]\nlet e := a.trivializationOfMemPretrivializationAtlas (a.pretrivialization_mem_atlas b)\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne✝ : Pretrivialization F TotalSpace.proj\nb : B\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\ne : Trivialization F TotalSpace.proj :=\n trivializationOfMemPretrivializationAtlas a (_ : pretrivializationAt a b ∈ a.pretrivializationAtlas)\n⊢ Continuous (TotalSpace.mk b)\n[PROOFSTEP]\nrw [e.toLocalHomeomorph.continuous_iff_continuous_comp_left (a.totalSpaceMk_preimage_source b)]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne✝ : Pretrivialization F TotalSpace.proj\nb : B\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\ne : Trivialization F TotalSpace.proj :=\n trivializationOfMemPretrivializationAtlas a (_ : pretrivializationAt a b ∈ a.pretrivializationAtlas)\n⊢ Continuous (↑e.toLocalHomeomorph ∘ TotalSpace.mk b)\n[PROOFSTEP]\nexact continuous_iff_le_induced.mpr (le_antisymm_iff.mp (a.totalSpaceMk_inducing b).induced).1\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nb : B\nh : Inducing (↑(pretrivializationAt a b) ∘ TotalSpace.mk b)\n⊢ Inducing (TotalSpace.mk b)\n[PROOFSTEP]\nletI := a.totalSpaceTopology\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nb : B\nh : Inducing (↑(pretrivializationAt a b) ∘ TotalSpace.mk b)\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\n⊢ Inducing (TotalSpace.mk b)\n[PROOFSTEP]\nrw [← restrict_comp_codRestrict (a.mem_pretrivializationAt_source b)] at h \n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nb : B\nh :\n Inducing\n (restrict (pretrivializationAt a b).source ↑(pretrivializationAt a b) ∘\n codRestrict (fun x => { proj := b, snd := x }) (pretrivializationAt a b).source\n (_ : ∀ (x : E b), { proj := b, snd := x } ∈ (pretrivializationAt a b).source))\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\n⊢ Inducing (TotalSpace.mk b)\n[PROOFSTEP]\napply Inducing.of_codRestrict (a.mem_pretrivializationAt_source b)\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nb : B\nh :\n Inducing\n (restrict (pretrivializationAt a b).source ↑(pretrivializationAt a b) ∘\n codRestrict (fun x => { proj := b, snd := x }) (pretrivializationAt a b).source\n (_ : ∀ (x : E b), { proj := b, snd := x } ∈ (pretrivializationAt a b).source))\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\n⊢ Inducing\n (codRestrict (fun a => { proj := b, snd := a }) (pretrivializationAt a b).source\n (_ : ∀ (x : E b), { proj := b, snd := x } ∈ (pretrivializationAt a b).source))\n[PROOFSTEP]\nrefine\n inducing_of_inducing_compose ?_\n (continuousOn_iff_continuous_restrict.mp\n (a.trivializationOfMemPretrivializationAtlas (a.pretrivialization_mem_atlas b)).continuous_toFun)\n h\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nb : B\nh :\n Inducing\n (restrict (pretrivializationAt a b).source ↑(pretrivializationAt a b) ∘\n codRestrict (fun x => { proj := b, snd := x }) (pretrivializationAt a b).source\n (_ : ∀ (x : E b), { proj := b, snd := x } ∈ (pretrivializationAt a b).source))\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\n⊢ Continuous\n (codRestrict (fun a => { proj := b, snd := a }) (pretrivializationAt a b).source\n (_ : ∀ (x : E b), { proj := b, snd := x } ∈ (pretrivializationAt a b).source))\n[PROOFSTEP]\nexact (a.continuous_totalSpaceMk b).codRestrict (a.mem_pretrivializationAt_source b)\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\n⊢ Continuous TotalSpace.proj\n[PROOFSTEP]\nletI := a.totalSpaceTopology\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\n⊢ Continuous TotalSpace.proj\n[PROOFSTEP]\nletI := a.toFiberBundle\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX : Type u_4\ninst✝³ : TopologicalSpace X\nE : B → Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\ninst✝ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nthis✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nthis : FiberBundle F E := toFiberBundle a\n⊢ Continuous TotalSpace.proj\n[PROOFSTEP]\nexact FiberBundle.continuous_proj F E\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX✝ : Type u_4\ninst✝⁴ : TopologicalSpace X✝\nE : B → Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\ninst✝¹ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : TotalSpace F E → X\ns : Set B\nhs : IsOpen s\nhf :\n ∀ (b : B),\n b ∈ s →\n ContinuousOn (f ∘ ↑(LocalEquiv.symm (pretrivializationAt a b).toLocalEquiv))\n ((s ∩ (pretrivializationAt a b).baseSet) ×ˢ univ)\n⊢ ContinuousOn f (TotalSpace.proj ⁻¹' s)\n[PROOFSTEP]\nletI := a.totalSpaceTopology\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX✝ : Type u_4\ninst✝⁴ : TopologicalSpace X✝\nE : B → Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\ninst✝¹ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : TotalSpace F E → X\ns : Set B\nhs : IsOpen s\nhf :\n ∀ (b : B),\n b ∈ s →\n ContinuousOn (f ∘ ↑(LocalEquiv.symm (pretrivializationAt a b).toLocalEquiv))\n ((s ∩ (pretrivializationAt a b).baseSet) ×ˢ univ)\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\n⊢ ContinuousOn f (TotalSpace.proj ⁻¹' s)\n[PROOFSTEP]\nintro z hz\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX✝ : Type u_4\ninst✝⁴ : TopologicalSpace X✝\nE : B → Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\ninst✝¹ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne : Pretrivialization F TotalSpace.proj\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : TotalSpace F E → X\ns : Set B\nhs : IsOpen s\nhf :\n ∀ (b : B),\n b ∈ s →\n ContinuousOn (f ∘ ↑(LocalEquiv.symm (pretrivializationAt a b).toLocalEquiv))\n ((s ∩ (pretrivializationAt a b).baseSet) ×ˢ univ)\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nz : TotalSpace F E\nhz : z ∈ TotalSpace.proj ⁻¹' s\n⊢ ContinuousWithinAt f (TotalSpace.proj ⁻¹' s) z\n[PROOFSTEP]\nlet e : Trivialization F (π F E) := a.trivializationOfMemPretrivializationAtlas (a.pretrivialization_mem_atlas z.proj)\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX✝ : Type u_4\ninst✝⁴ : TopologicalSpace X✝\nE : B → Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\ninst✝¹ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne✝ : Pretrivialization F TotalSpace.proj\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : TotalSpace F E → X\ns : Set B\nhs : IsOpen s\nhf :\n ∀ (b : B),\n b ∈ s →\n ContinuousOn (f ∘ ↑(LocalEquiv.symm (pretrivializationAt a b).toLocalEquiv))\n ((s ∩ (pretrivializationAt a b).baseSet) ×ˢ univ)\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nz : TotalSpace F E\nhz : z ∈ TotalSpace.proj ⁻¹' s\ne : Trivialization F TotalSpace.proj :=\n trivializationOfMemPretrivializationAtlas a (_ : pretrivializationAt a z.proj ∈ a.pretrivializationAtlas)\n⊢ ContinuousWithinAt f (TotalSpace.proj ⁻¹' s) z\n[PROOFSTEP]\nrefine' (e.continuousAt_of_comp_right _ ((hf z.proj hz).continuousAt (IsOpen.mem_nhds _ _))).continuousWithinAt\n[GOAL]\ncase refine'_1\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX✝ : Type u_4\ninst✝⁴ : TopologicalSpace X✝\nE : B → Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\ninst✝¹ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne✝ : Pretrivialization F TotalSpace.proj\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : TotalSpace F E → X\ns : Set B\nhs : IsOpen s\nhf :\n ∀ (b : B),\n b ∈ s →\n ContinuousOn (f ∘ ↑(LocalEquiv.symm (pretrivializationAt a b).toLocalEquiv))\n ((s ∩ (pretrivializationAt a b).baseSet) ×ˢ univ)\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nz : TotalSpace F E\nhz : z ∈ TotalSpace.proj ⁻¹' s\ne : Trivialization F TotalSpace.proj :=\n trivializationOfMemPretrivializationAtlas a (_ : pretrivializationAt a z.proj ∈ a.pretrivializationAtlas)\n⊢ z.proj ∈ e.baseSet\n[PROOFSTEP]\nexact a.mem_base_pretrivializationAt z.proj\n[GOAL]\ncase refine'_2\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX✝ : Type u_4\ninst✝⁴ : TopologicalSpace X✝\nE : B → Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\ninst✝¹ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne✝ : Pretrivialization F TotalSpace.proj\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : TotalSpace F E → X\ns : Set B\nhs : IsOpen s\nhf :\n ∀ (b : B),\n b ∈ s →\n ContinuousOn (f ∘ ↑(LocalEquiv.symm (pretrivializationAt a b).toLocalEquiv))\n ((s ∩ (pretrivializationAt a b).baseSet) ×ˢ univ)\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nz : TotalSpace F E\nhz : z ∈ TotalSpace.proj ⁻¹' s\ne : Trivialization F TotalSpace.proj :=\n trivializationOfMemPretrivializationAtlas a (_ : pretrivializationAt a z.proj ∈ a.pretrivializationAtlas)\n⊢ IsOpen ((s ∩ (pretrivializationAt a z.proj).baseSet) ×ˢ univ)\n[PROOFSTEP]\nexact (hs.inter (a.pretrivializationAt z.proj).open_baseSet).prod isOpen_univ\n[GOAL]\ncase refine'_3\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX✝ : Type u_4\ninst✝⁴ : TopologicalSpace X✝\nE : B → Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\ninst✝¹ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne✝ : Pretrivialization F TotalSpace.proj\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : TotalSpace F E → X\ns : Set B\nhs : IsOpen s\nhf :\n ∀ (b : B),\n b ∈ s →\n ContinuousOn (f ∘ ↑(LocalEquiv.symm (pretrivializationAt a b).toLocalEquiv))\n ((s ∩ (pretrivializationAt a b).baseSet) ×ˢ univ)\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nz : TotalSpace F E\nhz : z ∈ TotalSpace.proj ⁻¹' s\ne : Trivialization F TotalSpace.proj :=\n trivializationOfMemPretrivializationAtlas a (_ : pretrivializationAt a z.proj ∈ a.pretrivializationAtlas)\n⊢ ↑e z ∈ (s ∩ (pretrivializationAt a z.proj).baseSet) ×ˢ univ\n[PROOFSTEP]\nrefine' ⟨_, mem_univ _⟩\n[GOAL]\ncase refine'_3\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX✝ : Type u_4\ninst✝⁴ : TopologicalSpace X✝\nE : B → Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\ninst✝¹ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne✝ : Pretrivialization F TotalSpace.proj\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : TotalSpace F E → X\ns : Set B\nhs : IsOpen s\nhf :\n ∀ (b : B),\n b ∈ s →\n ContinuousOn (f ∘ ↑(LocalEquiv.symm (pretrivializationAt a b).toLocalEquiv))\n ((s ∩ (pretrivializationAt a b).baseSet) ×ˢ univ)\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nz : TotalSpace F E\nhz : z ∈ TotalSpace.proj ⁻¹' s\ne : Trivialization F TotalSpace.proj :=\n trivializationOfMemPretrivializationAtlas a (_ : pretrivializationAt a z.proj ∈ a.pretrivializationAtlas)\n⊢ (↑e z).fst ∈ s ∩ (pretrivializationAt a z.proj).baseSet\n[PROOFSTEP]\nrw [e.coe_fst]\n[GOAL]\ncase refine'_3\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX✝ : Type u_4\ninst✝⁴ : TopologicalSpace X✝\nE : B → Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\ninst✝¹ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne✝ : Pretrivialization F TotalSpace.proj\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : TotalSpace F E → X\ns : Set B\nhs : IsOpen s\nhf :\n ∀ (b : B),\n b ∈ s →\n ContinuousOn (f ∘ ↑(LocalEquiv.symm (pretrivializationAt a b).toLocalEquiv))\n ((s ∩ (pretrivializationAt a b).baseSet) ×ˢ univ)\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nz : TotalSpace F E\nhz : z ∈ TotalSpace.proj ⁻¹' s\ne : Trivialization F TotalSpace.proj :=\n trivializationOfMemPretrivializationAtlas a (_ : pretrivializationAt a z.proj ∈ a.pretrivializationAtlas)\n⊢ z.proj ∈ s ∩ (pretrivializationAt a z.proj).baseSet\n[PROOFSTEP]\nexact ⟨hz, a.mem_base_pretrivializationAt z.proj⟩\n[GOAL]\ncase refine'_3\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX✝ : Type u_4\ninst✝⁴ : TopologicalSpace X✝\nE : B → Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\ninst✝¹ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne✝ : Pretrivialization F TotalSpace.proj\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : TotalSpace F E → X\ns : Set B\nhs : IsOpen s\nhf :\n ∀ (b : B),\n b ∈ s →\n ContinuousOn (f ∘ ↑(LocalEquiv.symm (pretrivializationAt a b).toLocalEquiv))\n ((s ∩ (pretrivializationAt a b).baseSet) ×ˢ univ)\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nz : TotalSpace F E\nhz : z ∈ TotalSpace.proj ⁻¹' s\ne : Trivialization F TotalSpace.proj :=\n trivializationOfMemPretrivializationAtlas a (_ : pretrivializationAt a z.proj ∈ a.pretrivializationAtlas)\n⊢ z ∈ e.source\n[PROOFSTEP]\nrw [e.mem_source]\n[GOAL]\ncase refine'_3\nι : Type u_1\nB : Type u_2\nF : Type u_3\nX✝ : Type u_4\ninst✝⁴ : TopologicalSpace X✝\nE : B → Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\ninst✝¹ : (x : B) → TopologicalSpace (E x)\na : FiberPrebundle F E\ne✝ : Pretrivialization F TotalSpace.proj\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : TotalSpace F E → X\ns : Set B\nhs : IsOpen s\nhf :\n ∀ (b : B),\n b ∈ s →\n ContinuousOn (f ∘ ↑(LocalEquiv.symm (pretrivializationAt a b).toLocalEquiv))\n ((s ∩ (pretrivializationAt a b).baseSet) ×ˢ univ)\nthis : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nz : TotalSpace F E\nhz : z ∈ TotalSpace.proj ⁻¹' s\ne : Trivialization F TotalSpace.proj :=\n trivializationOfMemPretrivializationAtlas a (_ : pretrivializationAt a z.proj ∈ a.pretrivializationAtlas)\n⊢ z.proj ∈ e.baseSet\n[PROOFSTEP]\nexact a.mem_base_pretrivializationAt z.proj\n", "meta": {"mathlib_filename": "Mathlib.Topology.FiberBundle.Basic", "llama_tokens": 49332, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8354835411997897, "lm_q2_score": 0.689305616785446, "lm_q1q2_score": 0.5759034976808096}} {"text": "[GOAL]\nK : Type u_1\nF : Type u_2\ninst✝³ : Field K\ninst✝² : Fintype K\ninst✝¹ : Field F\ninst✝ : Algebra F K\n⊢ Splits (algebraMap F K) (X ^ Fintype.card K - X)\n[PROOFSTEP]\nhave h : (X ^ Fintype.card K - X : K[X]).natDegree = Fintype.card K :=\n FiniteField.X_pow_card_sub_X_natDegree_eq K Fintype.one_lt_card\n[GOAL]\nK : Type u_1\nF : Type u_2\ninst✝³ : Field K\ninst✝² : Fintype K\ninst✝¹ : Field F\ninst✝ : Algebra F K\nh : natDegree (X ^ Fintype.card K - X) = Fintype.card K\n⊢ Splits (algebraMap F K) (X ^ Fintype.card K - X)\n[PROOFSTEP]\nrw [← splits_id_iff_splits, splits_iff_card_roots, Polynomial.map_sub, Polynomial.map_pow, map_X, h,\n FiniteField.roots_X_pow_card_sub_X K, ← Finset.card_def, Finset.card_univ]\n[GOAL]\nK : Type u_1\nF : Type u_2\ninst✝³ : Field K\ninst✝² : Fintype K\ninst✝¹ : Field F\ninst✝ : Algebra F K\n⊢ Algebra.adjoin F (rootSet (X ^ Fintype.card K - X) K) = ⊤\n[PROOFSTEP]\nclassical\ntrans Algebra.adjoin F ((roots (X ^ Fintype.card K - X : K[X])).toFinset : Set K)\n· simp only [rootSet, Polynomial.map_pow, map_X, Polynomial.map_sub]\n· rw [FiniteField.roots_X_pow_card_sub_X, val_toFinset, coe_univ, Algebra.adjoin_univ]\n[GOAL]\nK : Type u_1\nF : Type u_2\ninst✝³ : Field K\ninst✝² : Fintype K\ninst✝¹ : Field F\ninst✝ : Algebra F K\n⊢ Algebra.adjoin F (rootSet (X ^ Fintype.card K - X) K) = ⊤\n[PROOFSTEP]\ntrans Algebra.adjoin F ((roots (X ^ Fintype.card K - X : K[X])).toFinset : Set K)\n[GOAL]\nK : Type u_1\nF : Type u_2\ninst✝³ : Field K\ninst✝² : Fintype K\ninst✝¹ : Field F\ninst✝ : Algebra F K\n⊢ Algebra.adjoin F (rootSet (X ^ Fintype.card K - X) K) =\n Algebra.adjoin F ↑(Multiset.toFinset (roots (X ^ Fintype.card K - X)))\n[PROOFSTEP]\nsimp only [rootSet, Polynomial.map_pow, map_X, Polynomial.map_sub]\n[GOAL]\nK : Type u_1\nF : Type u_2\ninst✝³ : Field K\ninst✝² : Fintype K\ninst✝¹ : Field F\ninst✝ : Algebra F K\n⊢ Algebra.adjoin F ↑(Multiset.toFinset (roots (X ^ Fintype.card K - X))) = ⊤\n[PROOFSTEP]\nrw [FiniteField.roots_X_pow_card_sub_X, val_toFinset, coe_univ, Algebra.adjoin_univ]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\np q : ℕ\ninst✝ : CharP K p\nh : p ∣ q\n⊢ Separable (X ^ q - X)\n[PROOFSTEP]\nuse 1, X ^ q - X - 1\n[GOAL]\ncase h\nK : Type u_1\ninst✝¹ : Field K\np q : ℕ\ninst✝ : CharP K p\nh : p ∣ q\n⊢ 1 * (X ^ q - X) + (X ^ q - X - 1) * ↑derivative (X ^ q - X) = 1\n[PROOFSTEP]\nrw [← CharP.cast_eq_zero_iff K[X] p] at h \n[GOAL]\ncase h\nK : Type u_1\ninst✝¹ : Field K\np q : ℕ\ninst✝ : CharP K p\nh : ↑q = 0\n⊢ 1 * (X ^ q - X) + (X ^ q - X - 1) * ↑derivative (X ^ q - X) = 1\n[PROOFSTEP]\nrw [derivative_sub, derivative_X_pow, derivative_X, C_eq_nat_cast, h]\n[GOAL]\ncase h\nK : Type u_1\ninst✝¹ : Field K\np q : ℕ\ninst✝ : CharP K p\nh : ↑q = 0\n⊢ 1 * (X ^ q - X) + (X ^ q - X - 1) * (0 * X ^ (q - 1) - 1) = 1\n[PROOFSTEP]\nring\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn : ℕ\n⊢ CharP (ZMod p) p\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn : ℕ\n⊢ FiniteDimensional (ZMod p) (GaloisField p n)\n[PROOFSTEP]\ndsimp only [GaloisField]\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn : ℕ\n⊢ FiniteDimensional (ZMod p) (SplittingField (X ^ p ^ n - X))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn : ℕ\n⊢ Fintype (GaloisField p n)\n[PROOFSTEP]\ndsimp only [GaloisField]\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn : ℕ\n⊢ Fintype (SplittingField (X ^ p ^ n - X))\n[PROOFSTEP]\nexact FiniteDimensional.fintypeOfFintype (ZMod p) (GaloisField p n)\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝¹ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn✝ n : ℕ\nh : n ≠ 0\n⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n\n[PROOFSTEP]\nset g_poly := (X ^ p ^ n - X : (ZMod p)[X])\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝¹ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn✝ n : ℕ\nh : n ≠ 0\ng_poly : (ZMod p)[X] := X ^ p ^ n - X\n⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n\n[PROOFSTEP]\nhave hp : 1 < p := h_prime.out.one_lt\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝¹ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn✝ n : ℕ\nh : n ≠ 0\ng_poly : (ZMod p)[X] := X ^ p ^ n - X\nhp : 1 < p\n⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n\n[PROOFSTEP]\nhave aux : g_poly ≠ 0 := FiniteField.X_pow_card_pow_sub_X_ne_zero _ h hp\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝¹ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn✝ n : ℕ\nh : n ≠ 0\ng_poly : (ZMod p)[X] := X ^ p ^ n - X\nhp : 1 < p\naux : g_poly ≠ 0\n⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n\n[PROOFSTEP]\nhave key : Fintype.card (g_poly.rootSet (GaloisField p n)) = g_poly.natDegree :=\n card_rootSet_eq_natDegree (galois_poly_separable p _ (dvd_pow (dvd_refl p) h))\n (SplittingField.splits (X ^ p ^ n - X : (ZMod p)[X]))\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝¹ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn✝ n : ℕ\nh : n ≠ 0\ng_poly : (ZMod p)[X] := X ^ p ^ n - X\nhp : 1 < p\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField p n)) = natDegree g_poly\n⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n\n[PROOFSTEP]\nhave nat_degree_eq : g_poly.natDegree = p ^ n := FiniteField.X_pow_card_pow_sub_X_natDegree_eq _ h hp\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝¹ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn✝ n : ℕ\nh : n ≠ 0\ng_poly : (ZMod p)[X] := X ^ p ^ n - X\nhp : 1 < p\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField p n)) = natDegree g_poly\nnat_degree_eq : natDegree g_poly = p ^ n\n⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n\n[PROOFSTEP]\nrw [nat_degree_eq] at key \n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝¹ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn✝ n : ℕ\nh : n ≠ 0\ng_poly : (ZMod p)[X] := X ^ p ^ n - X\nhp : 1 < p\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField p n)) = p ^ n\nnat_degree_eq : natDegree g_poly = p ^ n\n⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n\n[PROOFSTEP]\nsuffices g_poly.rootSet (GaloisField p n) = Set.univ\n by\n simp_rw [this, ← Fintype.ofEquiv_card (Equiv.Set.univ _)] at key \n rw [@card_eq_pow_finrank (ZMod p) _ _ _ _ _ (_), ZMod.card] at key \n exact Nat.pow_right_injective (Nat.Prime.one_lt' p).out key\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝¹ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn✝ n : ℕ\nh : n ≠ 0\ng_poly : (ZMod p)[X] := X ^ p ^ n - X\nhp : 1 < p\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField p n)) = p ^ n\nnat_degree_eq : natDegree g_poly = p ^ n\nthis : rootSet g_poly (GaloisField p n) = Set.univ\n⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n\n[PROOFSTEP]\nsimp_rw [this, ← Fintype.ofEquiv_card (Equiv.Set.univ _)] at key \n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝¹ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn✝ n : ℕ\nh : n ≠ 0\ng_poly : (ZMod p)[X] := X ^ p ^ n - X\nhp : 1 < p\naux : g_poly ≠ 0\nnat_degree_eq : natDegree g_poly = p ^ n\nthis : rootSet g_poly (GaloisField p n) = Set.univ\nkey : Fintype.card (GaloisField p n) = p ^ n\n⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n\n[PROOFSTEP]\nrw [@card_eq_pow_finrank (ZMod p) _ _ _ _ _ (_), ZMod.card] at key \n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝¹ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn✝ n : ℕ\nh : n ≠ 0\ng_poly : (ZMod p)[X] := X ^ p ^ n - X\nhp : 1 < p\naux : g_poly ≠ 0\nnat_degree_eq : natDegree g_poly = p ^ n\nthis : rootSet g_poly (GaloisField p n) = Set.univ\nkey✝ : Fintype.card (GaloisField p n) = p ^ n\nkey : p ^ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = p ^ n\n⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n\n[PROOFSTEP]\nexact Nat.pow_right_injective (Nat.Prime.one_lt' p).out key\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝¹ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn✝ n : ℕ\nh : n ≠ 0\ng_poly : (ZMod p)[X] := X ^ p ^ n - X\nhp : 1 < p\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField p n)) = p ^ n\nnat_degree_eq : natDegree g_poly = p ^ n\n⊢ rootSet g_poly (GaloisField p n) = Set.univ\n[PROOFSTEP]\nrw [Set.eq_univ_iff_forall]\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝¹ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn✝ n : ℕ\nh : n ≠ 0\ng_poly : (ZMod p)[X] := X ^ p ^ n - X\nhp : 1 < p\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField p n)) = p ^ n\nnat_degree_eq : natDegree g_poly = p ^ n\n⊢ ∀ (x : GaloisField p n), x ∈ rootSet g_poly (GaloisField p n)\n[PROOFSTEP]\nsuffices\n ∀ (x) (hx : x ∈ (⊤ : Subalgebra (ZMod p) (GaloisField p n))),\n x ∈ (X ^ p ^ n - X : (ZMod p)[X]).rootSet (GaloisField p n)\n by simpa\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝¹ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn✝ n : ℕ\nh : n ≠ 0\ng_poly : (ZMod p)[X] := X ^ p ^ n - X\nhp : 1 < p\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField p n)) = p ^ n\nnat_degree_eq : natDegree g_poly = p ^ n\nthis : ∀ (x : GaloisField p n), x ∈ ⊤ → x ∈ rootSet (X ^ p ^ n - X) (GaloisField p n)\n⊢ ∀ (x : GaloisField p n), x ∈ rootSet g_poly (GaloisField p n)\n[PROOFSTEP]\nsimpa\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝¹ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn✝ n : ℕ\nh : n ≠ 0\ng_poly : (ZMod p)[X] := X ^ p ^ n - X\nhp : 1 < p\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField p n)) = p ^ n\nnat_degree_eq : natDegree g_poly = p ^ n\n⊢ ∀ (x : GaloisField p n), x ∈ ⊤ → x ∈ rootSet (X ^ p ^ n - X) (GaloisField p n)\n[PROOFSTEP]\nrw [← SplittingField.adjoin_rootSet]\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝¹ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn✝ n : ℕ\nh : n ≠ 0\ng_poly : (ZMod p)[X] := X ^ p ^ n - X\nhp : 1 < p\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField p n)) = p ^ n\nnat_degree_eq : natDegree g_poly = p ^ n\n⊢ ∀ (x : GaloisField p n),\n x ∈ Algebra.adjoin (ZMod p) (rootSet (X ^ p ^ n - X) (SplittingField (X ^ p ^ n - X))) →\n x ∈ rootSet (X ^ p ^ n - X) (GaloisField p n)\n[PROOFSTEP]\nsimp_rw [Algebra.mem_adjoin_iff]\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝¹ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn✝ n : ℕ\nh : n ≠ 0\ng_poly : (ZMod p)[X] := X ^ p ^ n - X\nhp : 1 < p\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField p n)) = p ^ n\nnat_degree_eq : natDegree g_poly = p ^ n\n⊢ ∀ (x : GaloisField p n),\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod p) (GaloisField p n)) ∪\n rootSet (X ^ p ^ n - X) (SplittingField (X ^ p ^ n - X))) →\n x ∈ rootSet (X ^ p ^ n - X) (GaloisField p n)\n[PROOFSTEP]\nintro x hx\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝¹ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn✝ n : ℕ\nh : n ≠ 0\ng_poly : (ZMod p)[X] := X ^ p ^ n - X\nhp : 1 < p\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField p n)) = p ^ n\nnat_degree_eq : natDegree g_poly = p ^ n\nx : GaloisField p n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod p) (GaloisField p n)) ∪ rootSet (X ^ p ^ n - X) (SplittingField (X ^ p ^ n - X)))\n⊢ x ∈ rootSet (X ^ p ^ n - X) (GaloisField p n)\n[PROOFSTEP]\ncases p\n[GOAL]\ncase zero\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝¹ n✝ n : ℕ\nh : n ≠ 0\nh_prime : Fact (Nat.Prime Nat.zero)\ng_poly : (ZMod Nat.zero)[X] := X ^ Nat.zero ^ n - X\nhp : 1 < Nat.zero\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField Nat.zero n)) = Nat.zero ^ n\nnat_degree_eq : natDegree g_poly = Nat.zero ^ n\nx : GaloisField Nat.zero n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod Nat.zero) (GaloisField Nat.zero n)) ∪\n rootSet (X ^ Nat.zero ^ n - X) (SplittingField (X ^ Nat.zero ^ n - X)))\n⊢ x ∈ rootSet (X ^ Nat.zero ^ n - X) (GaloisField Nat.zero n)\ncase succ\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\n⊢ x ∈ rootSet (X ^ Nat.succ n✝ ^ n - X) (GaloisField (Nat.succ n✝) n)\n[PROOFSTEP]\ncases hp\n[GOAL]\ncase succ\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\n⊢ x ∈ rootSet (X ^ Nat.succ n✝ ^ n - X) (GaloisField (Nat.succ n✝) n)\n[PROOFSTEP]\nrefine Subring.closure_induction hx ?_ ?_ ?_ ?_ ?_ ?_\n[GOAL]\ncase succ.refine_1\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\n⊢ ∀ (x : GaloisField (Nat.succ n✝) n),\n x ∈\n Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)) →\n x ∈ rootSet (X ^ Nat.succ n✝ ^ n - X) (GaloisField (Nat.succ n✝) n)\n[PROOFSTEP]\nsimp_rw [mem_rootSet_of_ne aux]\n[GOAL]\ncase succ.refine_2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\n⊢ 0 ∈ rootSet (X ^ Nat.succ n✝ ^ n - X) (GaloisField (Nat.succ n✝) n)\n[PROOFSTEP]\nsimp_rw [mem_rootSet_of_ne aux]\n[GOAL]\ncase succ.refine_3\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\n⊢ 1 ∈ rootSet (X ^ Nat.succ n✝ ^ n - X) (GaloisField (Nat.succ n✝) n)\n[PROOFSTEP]\nsimp_rw [mem_rootSet_of_ne aux]\n[GOAL]\ncase succ.refine_4\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\n⊢ ∀ (x y : GaloisField (Nat.succ n✝) n),\n x ∈ rootSet (X ^ Nat.succ n✝ ^ n - X) (GaloisField (Nat.succ n✝) n) →\n y ∈ rootSet (X ^ Nat.succ n✝ ^ n - X) (GaloisField (Nat.succ n✝) n) →\n x + y ∈ rootSet (X ^ Nat.succ n✝ ^ n - X) (GaloisField (Nat.succ n✝) n)\n[PROOFSTEP]\nsimp_rw [mem_rootSet_of_ne aux]\n[GOAL]\ncase succ.refine_5\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\n⊢ ∀ (x : GaloisField (Nat.succ n✝) n),\n x ∈ rootSet (X ^ Nat.succ n✝ ^ n - X) (GaloisField (Nat.succ n✝) n) →\n -x ∈ rootSet (X ^ Nat.succ n✝ ^ n - X) (GaloisField (Nat.succ n✝) n)\n[PROOFSTEP]\nsimp_rw [mem_rootSet_of_ne aux]\n[GOAL]\ncase succ.refine_6\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\n⊢ ∀ (x y : GaloisField (Nat.succ n✝) n),\n x ∈ rootSet (X ^ Nat.succ n✝ ^ n - X) (GaloisField (Nat.succ n✝) n) →\n y ∈ rootSet (X ^ Nat.succ n✝ ^ n - X) (GaloisField (Nat.succ n✝) n) →\n x * y ∈ rootSet (X ^ Nat.succ n✝ ^ n - X) (GaloisField (Nat.succ n✝) n)\n[PROOFSTEP]\nsimp_rw [mem_rootSet_of_ne aux]\n[GOAL]\ncase succ.refine_1\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\n⊢ ∀ (x : GaloisField (Nat.succ n✝) n),\n x ∈\n Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)) →\n ↑(aeval x) (X ^ Nat.succ n✝ ^ n - X) = 0\n[PROOFSTEP]\nrintro x (⟨r, rfl⟩ | hx)\n[GOAL]\ncase succ.refine_1.inl.intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\nr : ZMod (Nat.succ n✝)\n⊢ ↑(aeval (↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) r)) (X ^ Nat.succ n✝ ^ n - X) = 0\n[PROOFSTEP]\nsimp only [map_sub, map_pow, aeval_X]\n[GOAL]\ncase succ.refine_1.inl.intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\nr : ZMod (Nat.succ n✝)\n⊢ ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) r ^ Nat.succ n✝ ^ n -\n ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) r =\n 0\n[PROOFSTEP]\nrw [← map_pow, ZMod.pow_card_pow, sub_self]\n[GOAL]\ncase succ.refine_1.inr\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx✝ : GaloisField (Nat.succ n✝) n\nhx✝ :\n x✝ ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\nx : GaloisField (Nat.succ n✝) n\nhx : x ∈ rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X))\n⊢ ↑(aeval x) (X ^ Nat.succ n✝ ^ n - X) = 0\n[PROOFSTEP]\ndsimp only [GaloisField] at hx \n[GOAL]\ncase succ.refine_1.inr\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx✝ : GaloisField (Nat.succ n✝) n\nhx✝ :\n x✝ ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\nx : GaloisField (Nat.succ n✝) n\nhx : x ∈ rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X))\n⊢ ↑(aeval x) (X ^ Nat.succ n✝ ^ n - X) = 0\n[PROOFSTEP]\nrwa [mem_rootSet_of_ne aux] at hx \n[GOAL]\ncase succ.refine_2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\n⊢ ↑(aeval 0) (X ^ Nat.succ n✝ ^ n - X) = 0\n[PROOFSTEP]\nrw [← coeff_zero_eq_aeval_zero']\n[GOAL]\ncase succ.refine_2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\n⊢ ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) (coeff (X ^ Nat.succ n✝ ^ n - X) 0) = 0\n[PROOFSTEP]\nsimp only [coeff_X_pow, coeff_X_zero, sub_zero, _root_.map_eq_zero, ite_eq_right_iff, one_ne_zero, coeff_sub]\n[GOAL]\ncase succ.refine_2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\n⊢ 0 = Nat.succ n✝ ^ n → False\n[PROOFSTEP]\nintro hn\n[GOAL]\ncase succ.refine_2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\nhn : 0 = Nat.succ n✝ ^ n\n⊢ False\n[PROOFSTEP]\nexact Nat.not_lt_zero 1 (pow_eq_zero hn.symm ▸ hp)\n[GOAL]\ncase succ.refine_3\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\n⊢ ↑(aeval 1) (X ^ Nat.succ n✝ ^ n - X) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.refine_4\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\n⊢ ∀ (x y : GaloisField (Nat.succ n✝) n),\n ↑(aeval x) (X ^ Nat.succ n✝ ^ n - X) = 0 →\n ↑(aeval y) (X ^ Nat.succ n✝ ^ n - X) = 0 → ↑(aeval (x + y)) (X ^ Nat.succ n✝ ^ n - X) = 0\n[PROOFSTEP]\nsimp only [aeval_X_pow, aeval_X, AlgHom.map_sub, add_pow_char_pow, sub_eq_zero]\n[GOAL]\ncase succ.refine_4\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\n⊢ ∀ (x y : GaloisField (Nat.succ n✝) n),\n x ^ Nat.succ n✝ ^ n = x → y ^ Nat.succ n✝ ^ n = y → x ^ Nat.succ n✝ ^ n + y ^ Nat.succ n✝ ^ n = x + y\n[PROOFSTEP]\nintro x y hx hy\n[GOAL]\ncase succ.refine_4\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx✝ : GaloisField (Nat.succ n✝) n\nhx✝ :\n x✝ ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\nx y : GaloisField (Nat.succ n✝) n\nhx : x ^ Nat.succ n✝ ^ n = x\nhy : y ^ Nat.succ n✝ ^ n = y\n⊢ x ^ Nat.succ n✝ ^ n + y ^ Nat.succ n✝ ^ n = x + y\n[PROOFSTEP]\nrw [hx, hy]\n[GOAL]\ncase succ.refine_5\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\n⊢ ∀ (x : GaloisField (Nat.succ n✝) n),\n ↑(aeval x) (X ^ Nat.succ n✝ ^ n - X) = 0 → ↑(aeval (-x)) (X ^ Nat.succ n✝ ^ n - X) = 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase succ.refine_5\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx✝ : GaloisField (Nat.succ n✝) n\nhx✝ :\n x✝ ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\nx : GaloisField (Nat.succ n✝) n\nhx : ↑(aeval x) (X ^ Nat.succ n✝ ^ n - X) = 0\n⊢ ↑(aeval (-x)) (X ^ Nat.succ n✝ ^ n - X) = 0\n[PROOFSTEP]\nsimp only [sub_eq_zero, aeval_X_pow, aeval_X, AlgHom.map_sub, sub_neg_eq_add] at *\n[GOAL]\ncase succ.refine_5\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : X ^ Nat.succ n✝ ^ n - X ≠ 0\nkey : Fintype.card ↑(rootSet (X ^ Nat.succ n✝ ^ n - X) (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree (X ^ Nat.succ n✝ ^ n - X) = Nat.succ n✝ ^ n\nx✝ : GaloisField (Nat.succ n✝) n\nhx✝ :\n x✝ ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\nx : GaloisField (Nat.succ n✝) n\nhx : x ^ Nat.succ n✝ ^ n = x\n⊢ (-x) ^ Nat.succ n✝ ^ n + x = 0\n[PROOFSTEP]\nrw [neg_pow, hx, CharP.neg_one_pow_char_pow]\n[GOAL]\ncase succ.refine_5\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : X ^ Nat.succ n✝ ^ n - X ≠ 0\nkey : Fintype.card ↑(rootSet (X ^ Nat.succ n✝ ^ n - X) (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree (X ^ Nat.succ n✝ ^ n - X) = Nat.succ n✝ ^ n\nx✝ : GaloisField (Nat.succ n✝) n\nhx✝ :\n x✝ ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\nx : GaloisField (Nat.succ n✝) n\nhx : x ^ Nat.succ n✝ ^ n = x\n⊢ -1 * x + x = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.refine_6\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\n⊢ ∀ (x y : GaloisField (Nat.succ n✝) n),\n ↑(aeval x) (X ^ Nat.succ n✝ ^ n - X) = 0 →\n ↑(aeval y) (X ^ Nat.succ n✝ ^ n - X) = 0 → ↑(aeval (x * y)) (X ^ Nat.succ n✝ ^ n - X) = 0\n[PROOFSTEP]\nsimp only [aeval_X_pow, aeval_X, AlgHom.map_sub, mul_pow, sub_eq_zero]\n[GOAL]\ncase succ.refine_6\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx : GaloisField (Nat.succ n✝) n\nhx :\n x ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\n⊢ ∀ (x y : GaloisField (Nat.succ n✝) n),\n x ^ Nat.succ n✝ ^ n = x → y ^ Nat.succ n✝ ^ n = y → x ^ Nat.succ n✝ ^ n * y ^ Nat.succ n✝ ^ n = x * y\n[PROOFSTEP]\nintro x y hx hy\n[GOAL]\ncase succ.refine_6\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝² n✝¹ n : ℕ\nh : n ≠ 0\nn✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\ng_poly : (ZMod (Nat.succ n✝))[X] := X ^ Nat.succ n✝ ^ n - X\nhp : 1 < Nat.succ n✝\naux : g_poly ≠ 0\nkey : Fintype.card ↑(rootSet g_poly (GaloisField (Nat.succ n✝) n)) = Nat.succ n✝ ^ n\nnat_degree_eq : natDegree g_poly = Nat.succ n✝ ^ n\nx✝ : GaloisField (Nat.succ n✝) n\nhx✝ :\n x✝ ∈\n Subring.closure\n (Set.range ↑(algebraMap (ZMod (Nat.succ n✝)) (GaloisField (Nat.succ n✝) n)) ∪\n rootSet (X ^ Nat.succ n✝ ^ n - X) (SplittingField (X ^ Nat.succ n✝ ^ n - X)))\nx y : GaloisField (Nat.succ n✝) n\nhx : x ^ Nat.succ n✝ ^ n = x\nhy : y ^ Nat.succ n✝ ^ n = y\n⊢ x ^ Nat.succ n✝ ^ n * y ^ Nat.succ n✝ ^ n = x * y\n[PROOFSTEP]\nrw [hx, hy]\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn : ℕ\nh : n ≠ 0\n⊢ Fintype.card (GaloisField p n) = p ^ n\n[PROOFSTEP]\nlet b := IsNoetherian.finsetBasis (ZMod p) (GaloisField p n)\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn : ℕ\nh : n ≠ 0\nb : Basis { x // x ∈ IsNoetherian.finsetBasisIndex (ZMod p) (GaloisField p n) } (ZMod p) (GaloisField p n) :=\n IsNoetherian.finsetBasis (ZMod p) (GaloisField p n)\n⊢ Fintype.card (GaloisField p n) = p ^ n\n[PROOFSTEP]\nrw [Module.card_fintype b, ← FiniteDimensional.finrank_eq_card_basis b, ZMod.card, finrank p h]\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn : ℕ\n⊢ Splits (RingHom.id (ZMod p)) (X ^ p - X)\n[PROOFSTEP]\nhave hp : 1 < p := h_prime.out.one_lt\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn : ℕ\nhp : 1 < p\n⊢ Splits (RingHom.id (ZMod p)) (X ^ p - X)\n[PROOFSTEP]\nhave h1 : roots (X ^ p - X : (ZMod p)[X]) = Finset.univ.val :=\n by\n convert FiniteField.roots_X_pow_card_sub_X (ZMod p)\n exact (ZMod.card p).symm\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn : ℕ\nhp : 1 < p\n⊢ roots (X ^ p - X) = univ.val\n[PROOFSTEP]\nconvert FiniteField.roots_X_pow_card_sub_X (ZMod p)\n[GOAL]\ncase h.e'_2.h.e'_4.h.h.e'_5.h.e'_6\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn : ℕ\nhp : 1 < p\ne_2✝ : ZMod.commRing p = EuclideanDomain.toCommRing\n⊢ p = Fintype.card (ZMod p)\n[PROOFSTEP]\nexact (ZMod.card p).symm\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn : ℕ\nhp : 1 < p\nh1 : roots (X ^ p - X) = univ.val\n⊢ Splits (RingHom.id (ZMod p)) (X ^ p - X)\n[PROOFSTEP]\nhave h2 := FiniteField.X_pow_card_sub_X_natDegree_eq (ZMod p) hp\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn : ℕ\nhp : 1 < p\nh1 : roots (X ^ p - X) = univ.val\nh2 : natDegree (X ^ p - X) = p\n⊢ Splits (RingHom.id (ZMod p)) (X ^ p - X)\n[PROOFSTEP]\ncases p\n[GOAL]\ncase zero\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝ n : ℕ\nh_prime : Fact (Nat.Prime Nat.zero)\nhp : 1 < Nat.zero\nh1 : roots (X ^ Nat.zero - X) = univ.val\nh2 : natDegree (X ^ Nat.zero - X) = Nat.zero\n⊢ Splits (RingHom.id (ZMod Nat.zero)) (X ^ Nat.zero - X)\ncase succ\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝¹ n n✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\nhp : 1 < Nat.succ n✝\nh1 : roots (X ^ Nat.succ n✝ - X) = univ.val\nh2 : natDegree (X ^ Nat.succ n✝ - X) = Nat.succ n✝\n⊢ Splits (RingHom.id (ZMod (Nat.succ n✝))) (X ^ Nat.succ n✝ - X)\n[PROOFSTEP]\ncases hp\n[GOAL]\ncase succ\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nn✝¹ n n✝ : ℕ\nh_prime : Fact (Nat.Prime (Nat.succ n✝))\nhp : 1 < Nat.succ n✝\nh1 : roots (X ^ Nat.succ n✝ - X) = univ.val\nh2 : natDegree (X ^ Nat.succ n✝ - X) = Nat.succ n✝\n⊢ Splits (RingHom.id (ZMod (Nat.succ n✝))) (X ^ Nat.succ n✝ - X)\n[PROOFSTEP]\nrw [splits_iff_card_roots, h1, ← Finset.card_def, Finset.card_univ, h2, ZMod.card]\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn : ℕ\n⊢ X ^ p ^ 1 = X ^ Fintype.card (ZMod p)\n[PROOFSTEP]\nrw [pow_one, ZMod.card p]\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn : ℕ\nh : X ^ p ^ 1 = X ^ Fintype.card (ZMod p) :=\n Eq.mpr (id (pow_one p ▸ Eq.refl (X ^ p ^ 1 = X ^ Fintype.card (ZMod p))))\n (Eq.mpr (id (ZMod.card p ▸ Eq.refl (X ^ p = X ^ Fintype.card (ZMod p)))) (Eq.refl (X ^ p)))\n⊢ IsSplittingField (ZMod p) (ZMod p) (X ^ p ^ 1 - X)\n[PROOFSTEP]\nrw [h]\n[GOAL]\np✝ : ℕ\ninst✝ : Fact (Nat.Prime p✝)\nn✝ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn : ℕ\nh : X ^ p ^ 1 = X ^ Fintype.card (ZMod p) :=\n Eq.mpr (id (pow_one p ▸ Eq.refl (X ^ p ^ 1 = X ^ Fintype.card (ZMod p))))\n (Eq.mpr (id (ZMod.card p ▸ Eq.refl (X ^ p = X ^ Fintype.card (ZMod p)))) (Eq.refl (X ^ p)))\n⊢ IsSplittingField (ZMod p) (ZMod p) (X ^ Fintype.card (ZMod p) - X)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np✝ : ℕ\ninst✝⁷ : Fact (Nat.Prime p✝)\nn✝ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn : ℕ\nK✝ : Type u_1\ninst✝⁶ : Field K✝\ninst✝⁵ : Fintype K✝\ninst✝⁴ : Algebra (ZMod p) K✝\nK : Type u_2\nK' : Type u_3\ninst✝³ : Field K\ninst✝² : Field K'\ninst✝¹ : Finite K'\ninst✝ : Algebra K K'\n⊢ IsGalois K K'\n[PROOFSTEP]\ncases nonempty_fintype K'\n[GOAL]\ncase intro\np✝ : ℕ\ninst✝⁷ : Fact (Nat.Prime p✝)\nn✝ p : ℕ\nh_prime : Fact (Nat.Prime p)\nn : ℕ\nK✝ : Type u_1\ninst✝⁶ : Field K✝\ninst✝⁵ : Fintype K✝\ninst✝⁴ : Algebra (ZMod p) K✝\nK : Type u_2\nK' : Type u_3\ninst✝³ : Field K\ninst✝² : Field K'\ninst✝¹ : Finite K'\ninst✝ : Algebra K K'\nval✝ : Fintype K'\n⊢ IsGalois K K'\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := CharP.exists K\n[GOAL]\ncase intro.intro\np✝¹ : ℕ\ninst✝⁷ : Fact (Nat.Prime p✝¹)\nn✝ p✝ : ℕ\nh_prime : Fact (Nat.Prime p✝)\nn : ℕ\nK✝ : Type u_1\ninst✝⁶ : Field K✝\ninst✝⁵ : Fintype K✝\ninst✝⁴ : Algebra (ZMod p✝) K✝\nK : Type u_2\nK' : Type u_3\ninst✝³ : Field K\ninst✝² : Field K'\ninst✝¹ : Finite K'\ninst✝ : Algebra K K'\nval✝ : Fintype K'\np : ℕ\nhp : CharP K p\n⊢ IsGalois K K'\n[PROOFSTEP]\nhaveI : CharP K p := hp\n[GOAL]\ncase intro.intro\np✝¹ : ℕ\ninst✝⁷ : Fact (Nat.Prime p✝¹)\nn✝ p✝ : ℕ\nh_prime : Fact (Nat.Prime p✝)\nn : ℕ\nK✝ : Type u_1\ninst✝⁶ : Field K✝\ninst✝⁵ : Fintype K✝\ninst✝⁴ : Algebra (ZMod p✝) K✝\nK : Type u_2\nK' : Type u_3\ninst✝³ : Field K\ninst✝² : Field K'\ninst✝¹ : Finite K'\ninst✝ : Algebra K K'\nval✝ : Fintype K'\np : ℕ\nhp : CharP K p\nthis : CharP K p\n⊢ IsGalois K K'\n[PROOFSTEP]\nhaveI : CharP K' p := charP_of_injective_algebraMap' K K' p\n[GOAL]\ncase intro.intro\np✝¹ : ℕ\ninst✝⁷ : Fact (Nat.Prime p✝¹)\nn✝ p✝ : ℕ\nh_prime : Fact (Nat.Prime p✝)\nn : ℕ\nK✝ : Type u_1\ninst✝⁶ : Field K✝\ninst✝⁵ : Fintype K✝\ninst✝⁴ : Algebra (ZMod p✝) K✝\nK : Type u_2\nK' : Type u_3\ninst✝³ : Field K\ninst✝² : Field K'\ninst✝¹ : Finite K'\ninst✝ : Algebra K K'\nval✝ : Fintype K'\np : ℕ\nhp : CharP K p\nthis✝ : CharP K p\nthis : CharP K' p\n⊢ IsGalois K K'\n[PROOFSTEP]\nexact\n IsGalois.of_separable_splitting_field\n (galois_poly_separable p (Fintype.card K')\n (let ⟨n, _, hn⟩ := FiniteField.card K' p\n hn.symm ▸ dvd_pow_self p n.ne_zero))\n[GOAL]\np✝ : ℕ\ninst✝⁶ : Fact (Nat.Prime p✝)\nn : ℕ\nK : Type u_1\ninst✝⁵ : Field K\ninst✝⁴ : Fintype K\nK' : Type u_2\ninst✝³ : Field K'\ninst✝² : Fintype K'\np : ℕ\nh_prime : Fact (Nat.Prime p)\ninst✝¹ : Algebra (ZMod p) K\ninst✝ : Algebra (ZMod p) K'\nhKK' : Fintype.card K = Fintype.card K'\n⊢ K ≃ₐ[ZMod p] K'\n[PROOFSTEP]\nhave : CharP K p := by rw [← Algebra.charP_iff (ZMod p) K p]; exact ZMod.charP p\n[GOAL]\np✝ : ℕ\ninst✝⁶ : Fact (Nat.Prime p✝)\nn : ℕ\nK : Type u_1\ninst✝⁵ : Field K\ninst✝⁴ : Fintype K\nK' : Type u_2\ninst✝³ : Field K'\ninst✝² : Fintype K'\np : ℕ\nh_prime : Fact (Nat.Prime p)\ninst✝¹ : Algebra (ZMod p) K\ninst✝ : Algebra (ZMod p) K'\nhKK' : Fintype.card K = Fintype.card K'\n⊢ CharP K p\n[PROOFSTEP]\nrw [← Algebra.charP_iff (ZMod p) K p]\n[GOAL]\np✝ : ℕ\ninst✝⁶ : Fact (Nat.Prime p✝)\nn : ℕ\nK : Type u_1\ninst✝⁵ : Field K\ninst✝⁴ : Fintype K\nK' : Type u_2\ninst✝³ : Field K'\ninst✝² : Fintype K'\np : ℕ\nh_prime : Fact (Nat.Prime p)\ninst✝¹ : Algebra (ZMod p) K\ninst✝ : Algebra (ZMod p) K'\nhKK' : Fintype.card K = Fintype.card K'\n⊢ CharP (ZMod p) p\n[PROOFSTEP]\nexact ZMod.charP p\n[GOAL]\np✝ : ℕ\ninst✝⁶ : Fact (Nat.Prime p✝)\nn : ℕ\nK : Type u_1\ninst✝⁵ : Field K\ninst✝⁴ : Fintype K\nK' : Type u_2\ninst✝³ : Field K'\ninst✝² : Fintype K'\np : ℕ\nh_prime : Fact (Nat.Prime p)\ninst✝¹ : Algebra (ZMod p) K\ninst✝ : Algebra (ZMod p) K'\nhKK' : Fintype.card K = Fintype.card K'\nthis : CharP K p\n⊢ K ≃ₐ[ZMod p] K'\n[PROOFSTEP]\nhave : CharP K' p := by rw [← Algebra.charP_iff (ZMod p) K' p]; exact ZMod.charP p\n[GOAL]\np✝ : ℕ\ninst✝⁶ : Fact (Nat.Prime p✝)\nn : ℕ\nK : Type u_1\ninst✝⁵ : Field K\ninst✝⁴ : Fintype K\nK' : Type u_2\ninst✝³ : Field K'\ninst✝² : Fintype K'\np : ℕ\nh_prime : Fact (Nat.Prime p)\ninst✝¹ : Algebra (ZMod p) K\ninst✝ : Algebra (ZMod p) K'\nhKK' : Fintype.card K = Fintype.card K'\nthis : CharP K p\n⊢ CharP K' p\n[PROOFSTEP]\nrw [← Algebra.charP_iff (ZMod p) K' p]\n[GOAL]\np✝ : ℕ\ninst✝⁶ : Fact (Nat.Prime p✝)\nn : ℕ\nK : Type u_1\ninst✝⁵ : Field K\ninst✝⁴ : Fintype K\nK' : Type u_2\ninst✝³ : Field K'\ninst✝² : Fintype K'\np : ℕ\nh_prime : Fact (Nat.Prime p)\ninst✝¹ : Algebra (ZMod p) K\ninst✝ : Algebra (ZMod p) K'\nhKK' : Fintype.card K = Fintype.card K'\nthis : CharP K p\n⊢ CharP (ZMod p) p\n[PROOFSTEP]\nexact ZMod.charP p\n[GOAL]\np✝ : ℕ\ninst✝⁶ : Fact (Nat.Prime p✝)\nn : ℕ\nK : Type u_1\ninst✝⁵ : Field K\ninst✝⁴ : Fintype K\nK' : Type u_2\ninst✝³ : Field K'\ninst✝² : Fintype K'\np : ℕ\nh_prime : Fact (Nat.Prime p)\ninst✝¹ : Algebra (ZMod p) K\ninst✝ : Algebra (ZMod p) K'\nhKK' : Fintype.card K = Fintype.card K'\nthis✝ : CharP K p\nthis : CharP K' p\n⊢ K ≃ₐ[ZMod p] K'\n[PROOFSTEP]\nchoose n a hK using FiniteField.card K p\n[GOAL]\np✝ : ℕ\ninst✝⁶ : Fact (Nat.Prime p✝)\nn✝ : ℕ\nK : Type u_1\ninst✝⁵ : Field K\ninst✝⁴ : Fintype K\nK' : Type u_2\ninst✝³ : Field K'\ninst✝² : Fintype K'\np : ℕ\nh_prime : Fact (Nat.Prime p)\ninst✝¹ : Algebra (ZMod p) K\ninst✝ : Algebra (ZMod p) K'\nhKK' : Fintype.card K = Fintype.card K'\nthis✝ : CharP K p\nthis : CharP K' p\nn : ℕ+\na : Nat.Prime p\nhK : Fintype.card K = p ^ ↑n\n⊢ K ≃ₐ[ZMod p] K'\n[PROOFSTEP]\nchoose n' a' hK' using FiniteField.card K' p\n[GOAL]\np✝ : ℕ\ninst✝⁶ : Fact (Nat.Prime p✝)\nn✝ : ℕ\nK : Type u_1\ninst✝⁵ : Field K\ninst✝⁴ : Fintype K\nK' : Type u_2\ninst✝³ : Field K'\ninst✝² : Fintype K'\np : ℕ\nh_prime : Fact (Nat.Prime p)\ninst✝¹ : Algebra (ZMod p) K\ninst✝ : Algebra (ZMod p) K'\nhKK' : Fintype.card K = Fintype.card K'\nthis✝ : CharP K p\nthis : CharP K' p\nn : ℕ+\na : Nat.Prime p\nhK : Fintype.card K = p ^ ↑n\nn' : ℕ+\na' : Nat.Prime p\nhK' : Fintype.card K' = p ^ ↑n'\n⊢ K ≃ₐ[ZMod p] K'\n[PROOFSTEP]\nrw [hK, hK'] at hKK' \n[GOAL]\np✝ : ℕ\ninst✝⁶ : Fact (Nat.Prime p✝)\nn✝ : ℕ\nK : Type u_1\ninst✝⁵ : Field K\ninst✝⁴ : Fintype K\nK' : Type u_2\ninst✝³ : Field K'\ninst✝² : Fintype K'\np : ℕ\nh_prime : Fact (Nat.Prime p)\ninst✝¹ : Algebra (ZMod p) K\ninst✝ : Algebra (ZMod p) K'\nthis✝ : CharP K p\nthis : CharP K' p\nn : ℕ+\na : Nat.Prime p\nhK : Fintype.card K = p ^ ↑n\nn' : ℕ+\nhKK' : p ^ ↑n = p ^ ↑n'\na' : Nat.Prime p\nhK' : Fintype.card K' = p ^ ↑n'\n⊢ K ≃ₐ[ZMod p] K'\n[PROOFSTEP]\nhave hGalK := GaloisField.algEquivGaloisField p n hK\n[GOAL]\np✝ : ℕ\ninst✝⁶ : Fact (Nat.Prime p✝)\nn✝ : ℕ\nK : Type u_1\ninst✝⁵ : Field K\ninst✝⁴ : Fintype K\nK' : Type u_2\ninst✝³ : Field K'\ninst✝² : Fintype K'\np : ℕ\nh_prime : Fact (Nat.Prime p)\ninst✝¹ : Algebra (ZMod p) K\ninst✝ : Algebra (ZMod p) K'\nthis✝ : CharP K p\nthis : CharP K' p\nn : ℕ+\na : Nat.Prime p\nhK : Fintype.card K = p ^ ↑n\nn' : ℕ+\nhKK' : p ^ ↑n = p ^ ↑n'\na' : Nat.Prime p\nhK' : Fintype.card K' = p ^ ↑n'\nhGalK : K ≃ₐ[ZMod p] GaloisField p ↑n\n⊢ K ≃ₐ[ZMod p] K'\n[PROOFSTEP]\nhave hK'Gal := (GaloisField.algEquivGaloisField p n' hK').symm\n[GOAL]\np✝ : ℕ\ninst✝⁶ : Fact (Nat.Prime p✝)\nn✝ : ℕ\nK : Type u_1\ninst✝⁵ : Field K\ninst✝⁴ : Fintype K\nK' : Type u_2\ninst✝³ : Field K'\ninst✝² : Fintype K'\np : ℕ\nh_prime : Fact (Nat.Prime p)\ninst✝¹ : Algebra (ZMod p) K\ninst✝ : Algebra (ZMod p) K'\nthis✝ : CharP K p\nthis : CharP K' p\nn : ℕ+\na : Nat.Prime p\nhK : Fintype.card K = p ^ ↑n\nn' : ℕ+\nhKK' : p ^ ↑n = p ^ ↑n'\na' : Nat.Prime p\nhK' : Fintype.card K' = p ^ ↑n'\nhGalK : K ≃ₐ[ZMod p] GaloisField p ↑n\nhK'Gal : GaloisField p ↑n' ≃ₐ[ZMod p] K'\n⊢ K ≃ₐ[ZMod p] K'\n[PROOFSTEP]\nrw [Nat.pow_right_injective h_prime.out.one_lt hKK'] at *\n[GOAL]\np✝ : ℕ\ninst✝⁶ : Fact (Nat.Prime p✝)\nn✝ : ℕ\nK : Type u_1\ninst✝⁵ : Field K\ninst✝⁴ : Fintype K\nK' : Type u_2\ninst✝³ : Field K'\ninst✝² : Fintype K'\np : ℕ\nh_prime : Fact (Nat.Prime p)\ninst✝¹ : Algebra (ZMod p) K\ninst✝ : Algebra (ZMod p) K'\nthis✝ : CharP K p\nthis : CharP K' p\nn : ℕ+\na : Nat.Prime p\nhK : Fintype.card K = p ^ ↑n\nn' : ℕ+\nhKK' : p ^ ↑n' = p ^ ↑n'\na' : Nat.Prime p\nhK' : Fintype.card K' = p ^ ↑n'\nhGalK : K ≃ₐ[ZMod p] GaloisField p ↑n'\nhK'Gal : GaloisField p ↑n' ≃ₐ[ZMod p] K'\n⊢ K ≃ₐ[ZMod p] K'\n[PROOFSTEP]\nexact AlgEquiv.trans hGalK hK'Gal\n[GOAL]\np : ℕ\ninst✝⁴ : Fact (Nat.Prime p)\nn : ℕ\nK : Type u_1\ninst✝³ : Field K\ninst✝² : Fintype K\nK' : Type u_2\ninst✝¹ : Field K'\ninst✝ : Fintype K'\nhKK' : Fintype.card K = Fintype.card K'\n⊢ K ≃+* K'\n[PROOFSTEP]\nchoose p _char_p_K using CharP.exists K\n[GOAL]\np✝ : ℕ\ninst✝⁴ : Fact (Nat.Prime p✝)\nn : ℕ\nK : Type u_1\ninst✝³ : Field K\ninst✝² : Fintype K\nK' : Type u_2\ninst✝¹ : Field K'\ninst✝ : Fintype K'\nhKK' : Fintype.card K = Fintype.card K'\np : ℕ\n_char_p_K : CharP K p\n⊢ K ≃+* K'\n[PROOFSTEP]\nchoose p' _char_p'_K' using CharP.exists K'\n[GOAL]\np✝ : ℕ\ninst✝⁴ : Fact (Nat.Prime p✝)\nn : ℕ\nK : Type u_1\ninst✝³ : Field K\ninst✝² : Fintype K\nK' : Type u_2\ninst✝¹ : Field K'\ninst✝ : Fintype K'\nhKK' : Fintype.card K = Fintype.card K'\np : ℕ\n_char_p_K : CharP K p\np' : ℕ\n_char_p'_K' : CharP K' p'\n⊢ K ≃+* K'\n[PROOFSTEP]\nchoose n hp hK using FiniteField.card K p\n[GOAL]\np✝ : ℕ\ninst✝⁴ : Fact (Nat.Prime p✝)\nn✝ : ℕ\nK : Type u_1\ninst✝³ : Field K\ninst✝² : Fintype K\nK' : Type u_2\ninst✝¹ : Field K'\ninst✝ : Fintype K'\nhKK' : Fintype.card K = Fintype.card K'\np : ℕ\n_char_p_K : CharP K p\np' : ℕ\n_char_p'_K' : CharP K' p'\nn : ℕ+\nhp : Nat.Prime p\nhK : Fintype.card K = p ^ ↑n\n⊢ K ≃+* K'\n[PROOFSTEP]\nchoose n' hp' hK' using FiniteField.card K' p'\n[GOAL]\np✝ : ℕ\ninst✝⁴ : Fact (Nat.Prime p✝)\nn✝ : ℕ\nK : Type u_1\ninst✝³ : Field K\ninst✝² : Fintype K\nK' : Type u_2\ninst✝¹ : Field K'\ninst✝ : Fintype K'\nhKK' : Fintype.card K = Fintype.card K'\np : ℕ\n_char_p_K : CharP K p\np' : ℕ\n_char_p'_K' : CharP K' p'\nn : ℕ+\nhp : Nat.Prime p\nhK : Fintype.card K = p ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime p'\nhK' : Fintype.card K' = p' ^ ↑n'\n⊢ K ≃+* K'\n[PROOFSTEP]\nhave hpp' : p = p' := by\n by_contra hne\n have h2 := Nat.coprime_pow_primes n n' hp hp' hne\n rw [(Eq.congr hK hK').mp hKK', Nat.coprime_self, pow_eq_one_iff (PNat.ne_zero n')] at h2 \n exact Nat.Prime.ne_one hp' h2\n[GOAL]\np✝ : ℕ\ninst✝⁴ : Fact (Nat.Prime p✝)\nn✝ : ℕ\nK : Type u_1\ninst✝³ : Field K\ninst✝² : Fintype K\nK' : Type u_2\ninst✝¹ : Field K'\ninst✝ : Fintype K'\nhKK' : Fintype.card K = Fintype.card K'\np : ℕ\n_char_p_K : CharP K p\np' : ℕ\n_char_p'_K' : CharP K' p'\nn : ℕ+\nhp : Nat.Prime p\nhK : Fintype.card K = p ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime p'\nhK' : Fintype.card K' = p' ^ ↑n'\n⊢ p = p'\n[PROOFSTEP]\nby_contra hne\n[GOAL]\np✝ : ℕ\ninst✝⁴ : Fact (Nat.Prime p✝)\nn✝ : ℕ\nK : Type u_1\ninst✝³ : Field K\ninst✝² : Fintype K\nK' : Type u_2\ninst✝¹ : Field K'\ninst✝ : Fintype K'\nhKK' : Fintype.card K = Fintype.card K'\np : ℕ\n_char_p_K : CharP K p\np' : ℕ\n_char_p'_K' : CharP K' p'\nn : ℕ+\nhp : Nat.Prime p\nhK : Fintype.card K = p ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime p'\nhK' : Fintype.card K' = p' ^ ↑n'\nhne : ¬p = p'\n⊢ False\n[PROOFSTEP]\nhave h2 := Nat.coprime_pow_primes n n' hp hp' hne\n[GOAL]\np✝ : ℕ\ninst✝⁴ : Fact (Nat.Prime p✝)\nn✝ : ℕ\nK : Type u_1\ninst✝³ : Field K\ninst✝² : Fintype K\nK' : Type u_2\ninst✝¹ : Field K'\ninst✝ : Fintype K'\nhKK' : Fintype.card K = Fintype.card K'\np : ℕ\n_char_p_K : CharP K p\np' : ℕ\n_char_p'_K' : CharP K' p'\nn : ℕ+\nhp : Nat.Prime p\nhK : Fintype.card K = p ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime p'\nhK' : Fintype.card K' = p' ^ ↑n'\nhne : ¬p = p'\nh2 : Nat.coprime (p ^ ↑n) (p' ^ ↑n')\n⊢ False\n[PROOFSTEP]\nrw [(Eq.congr hK hK').mp hKK', Nat.coprime_self, pow_eq_one_iff (PNat.ne_zero n')] at h2 \n[GOAL]\np✝ : ℕ\ninst✝⁴ : Fact (Nat.Prime p✝)\nn✝ : ℕ\nK : Type u_1\ninst✝³ : Field K\ninst✝² : Fintype K\nK' : Type u_2\ninst✝¹ : Field K'\ninst✝ : Fintype K'\nhKK' : Fintype.card K = Fintype.card K'\np : ℕ\n_char_p_K : CharP K p\np' : ℕ\n_char_p'_K' : CharP K' p'\nn : ℕ+\nhp : Nat.Prime p\nhK : Fintype.card K = p ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime p'\nhK' : Fintype.card K' = p' ^ ↑n'\nhne : ¬p = p'\nh2 : p' = 1\n⊢ False\n[PROOFSTEP]\nexact Nat.Prime.ne_one hp' h2\n[GOAL]\np✝ : ℕ\ninst✝⁴ : Fact (Nat.Prime p✝)\nn✝ : ℕ\nK : Type u_1\ninst✝³ : Field K\ninst✝² : Fintype K\nK' : Type u_2\ninst✝¹ : Field K'\ninst✝ : Fintype K'\nhKK' : Fintype.card K = Fintype.card K'\np : ℕ\n_char_p_K : CharP K p\np' : ℕ\n_char_p'_K' : CharP K' p'\nn : ℕ+\nhp : Nat.Prime p\nhK : Fintype.card K = p ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime p'\nhK' : Fintype.card K' = p' ^ ↑n'\nhpp' : p = p'\n⊢ K ≃+* K'\n[PROOFSTEP]\nrw [← hpp'] at _char_p'_K' \n[GOAL]\np✝ : ℕ\ninst✝⁴ : Fact (Nat.Prime p✝)\nn✝ : ℕ\nK : Type u_1\ninst✝³ : Field K\ninst✝² : Fintype K\nK' : Type u_2\ninst✝¹ : Field K'\ninst✝ : Fintype K'\nhKK' : Fintype.card K = Fintype.card K'\np : ℕ\n_char_p_K : CharP K p\np' : ℕ\n_char_p'_K' : CharP K' p\nn : ℕ+\nhp : Nat.Prime p\nhK : Fintype.card K = p ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime p'\nhK' : Fintype.card K' = p' ^ ↑n'\nhpp' : p = p'\n⊢ K ≃+* K'\n[PROOFSTEP]\nhaveI := fact_iff.2 hp\n[GOAL]\np✝ : ℕ\ninst✝⁴ : Fact (Nat.Prime p✝)\nn✝ : ℕ\nK : Type u_1\ninst✝³ : Field K\ninst✝² : Fintype K\nK' : Type u_2\ninst✝¹ : Field K'\ninst✝ : Fintype K'\nhKK' : Fintype.card K = Fintype.card K'\np : ℕ\n_char_p_K : CharP K p\np' : ℕ\n_char_p'_K' : CharP K' p\nn : ℕ+\nhp : Nat.Prime p\nhK : Fintype.card K = p ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime p'\nhK' : Fintype.card K' = p' ^ ↑n'\nhpp' : p = p'\nthis : Fact (Nat.Prime p)\n⊢ K ≃+* K'\n[PROOFSTEP]\nletI : Algebra (ZMod p) K := ZMod.algebra _ _\n[GOAL]\np✝ : ℕ\ninst✝⁴ : Fact (Nat.Prime p✝)\nn✝ : ℕ\nK : Type u_1\ninst✝³ : Field K\ninst✝² : Fintype K\nK' : Type u_2\ninst✝¹ : Field K'\ninst✝ : Fintype K'\nhKK' : Fintype.card K = Fintype.card K'\np : ℕ\n_char_p_K : CharP K p\np' : ℕ\n_char_p'_K' : CharP K' p\nn : ℕ+\nhp : Nat.Prime p\nhK : Fintype.card K = p ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime p'\nhK' : Fintype.card K' = p' ^ ↑n'\nhpp' : p = p'\nthis✝ : Fact (Nat.Prime p)\nthis : Algebra (ZMod p) K := ZMod.algebra K p\n⊢ K ≃+* K'\n[PROOFSTEP]\nletI : Algebra (ZMod p) K' := ZMod.algebra _ _\n[GOAL]\np✝ : ℕ\ninst✝⁴ : Fact (Nat.Prime p✝)\nn✝ : ℕ\nK : Type u_1\ninst✝³ : Field K\ninst✝² : Fintype K\nK' : Type u_2\ninst✝¹ : Field K'\ninst✝ : Fintype K'\nhKK' : Fintype.card K = Fintype.card K'\np : ℕ\n_char_p_K : CharP K p\np' : ℕ\n_char_p'_K' : CharP K' p\nn : ℕ+\nhp : Nat.Prime p\nhK : Fintype.card K = p ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime p'\nhK' : Fintype.card K' = p' ^ ↑n'\nhpp' : p = p'\nthis✝¹ : Fact (Nat.Prime p)\nthis✝ : Algebra (ZMod p) K := ZMod.algebra K p\nthis : Algebra (ZMod p) K' := ZMod.algebra K' p\n⊢ K ≃+* K'\n[PROOFSTEP]\nexact ↑(algEquivOfCardEq p hKK')\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.Finite.GaloisField", "llama_tokens": 28707, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8311430562234878, "lm_q2_score": 0.6926419831347361, "lm_q1q2_score": 0.5756845747313021}} {"text": "[GOAL]\n⊢ NoncompactSpace ℍ\n[PROOFSTEP]\nrefine' ⟨fun h => _⟩\n[GOAL]\nh : IsCompact univ\n⊢ False\n[PROOFSTEP]\nhave : IsCompact (Complex.im ⁻¹' Ioi 0) := isCompact_iff_isCompact_univ.2 h\n[GOAL]\nh : IsCompact univ\nthis : IsCompact (Complex.im ⁻¹' Ioi 0)\n⊢ False\n[PROOFSTEP]\nreplace := this.isClosed.closure_eq\n[GOAL]\nh : IsCompact univ\nthis : closure (Complex.im ⁻¹' Ioi 0) = Complex.im ⁻¹' Ioi 0\n⊢ False\n[PROOFSTEP]\nrw [closure_preimage_im, closure_Ioi, Set.ext_iff] at this \n[GOAL]\nh : IsCompact univ\nthis : ∀ (x : ℂ), x ∈ Complex.im ⁻¹' Ici 0 ↔ x ∈ Complex.im ⁻¹' Ioi 0\n⊢ False\n[PROOFSTEP]\nexact absurd ((this 0).1 (@left_mem_Ici ℝ _ 0)) (@lt_irrefl ℝ _ 0)\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Complex.UpperHalfPlane.Topology", "llama_tokens": 324, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8558511543206819, "lm_q2_score": 0.6723316991792861, "lm_q1q2_score": 0.5754158608289776}} {"text": "[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\n⊢ (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\n[PROOFSTEP]\nhave hxz := hxy.trans hyz\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxz : x < z\n⊢ (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\n[PROOFSTEP]\nrw [← sub_pos] at hxy hxz hyz \n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\n⊢ (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\n[PROOFSTEP]\nsuffices f y / (y - x) + f y / (z - y) ≤ f x / (y - x) + f z / (z - y)\n by\n ring_nf at this ⊢\n linarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nthis : f y / (y - x) + f y / (z - y) ≤ f x / (y - x) + f z / (z - y)\n⊢ (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\n[PROOFSTEP]\nring_nf at this ⊢\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nthis : f y * (y - x)⁻¹ + f y * (-y + z)⁻¹ ≤ (y - x)⁻¹ * f x + (-y + z)⁻¹ * f z\n⊢ f y * (y - x)⁻¹ - (y - x)⁻¹ * f x ≤ -(f y * (-y + z)⁻¹) + (-y + z)⁻¹ * f z\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\n⊢ f y / (y - x) + f y / (z - y) ≤ f x / (y - x) + f z / (z - y)\n[PROOFSTEP]\nset a := (z - y) / (z - x)\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\n⊢ f y / (y - x) + f y / (z - y) ≤ f x / (y - x) + f z / (z - y)\n[PROOFSTEP]\nset b := (y - x) / (z - x)\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\n⊢ f y / (y - x) + f y / (z - y) ≤ f x / (y - x) + f z / (z - y)\n[PROOFSTEP]\nhave hy : a • x + b • z = y := by\n field_simp\n rw [div_eq_iff] <;> [ring; linarith]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\n⊢ a • x + b • z = y\n[PROOFSTEP]\nfield_simp\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\n⊢ ((z - y) * x + (y - x) * z) / (z - x) = y\n[PROOFSTEP]\nrw [div_eq_iff] <;> [ring; linarith]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\n⊢ ((z - y) * x + (y - x) * z) / (z - x) = y\n[PROOFSTEP]\nrw [div_eq_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\n⊢ (z - y) * x + (y - x) * z = y * (z - x)\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\n⊢ z - x ≠ 0\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\n⊢ f y / (y - x) + f y / (z - y) ≤ f x / (y - x) + f z / (z - y)\n[PROOFSTEP]\nhave key :=\n hf.2 hx hz (show 0 ≤ a by apply div_nonneg <;> linarith) (show 0 ≤ b by apply div_nonneg <;> linarith)\n (show a + b = 1 by\n field_simp\n rw [div_eq_iff] <;> [ring; linarith])\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\n⊢ 0 ≤ a\n[PROOFSTEP]\napply div_nonneg\n[GOAL]\ncase ha\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\n⊢ 0 ≤ z - y\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase hb\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\n⊢ 0 ≤ z - x\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\n⊢ 0 ≤ b\n[PROOFSTEP]\napply div_nonneg\n[GOAL]\ncase ha\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\n⊢ 0 ≤ y - x\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase hb\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\n⊢ 0 ≤ z - x\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\n⊢ a + b = 1\n[PROOFSTEP]\nfield_simp\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\n⊢ (z - x) / (z - x) = 1\n[PROOFSTEP]\nrw [div_eq_iff] <;> [ring; linarith]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\n⊢ (z - x) / (z - x) = 1\n[PROOFSTEP]\nrw [div_eq_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\n⊢ z - x = 1 * (z - x)\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\n⊢ z - x ≠ 0\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\nkey : f (a • x + b • z) ≤ a • f x + b • f z\n⊢ f y / (y - x) + f y / (z - y) ≤ f x / (y - x) + f z / (z - y)\n[PROOFSTEP]\nrw [hy] at key \n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\nkey : f y ≤ a • f x + b • f z\n⊢ f y / (y - x) + f y / (z - y) ≤ f x / (y - x) + f z / (z - y)\n[PROOFSTEP]\nreplace key := mul_le_mul_of_nonneg_left key hxz.le\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\nkey : (z - x) * f y ≤ (z - x) * (a • f x + b • f z)\n⊢ f y / (y - x) + f y / (z - y) ≤ f x / (y - x) + f z / (z - y)\n[PROOFSTEP]\nfield_simp [hxy.ne', hyz.ne', hxz.ne', mul_comm (z - x) _] at key ⊢\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\nkey : f y * (z - x) ≤ (z - y) * f x + (y - x) * f z\n⊢ (f y * (z - y) + f y * (y - x)) / ((y - x) * (z - y)) ≤ (f x * (z - y) + f z * (y - x)) / ((y - x) * (z - y))\n[PROOFSTEP]\nrw [div_le_div_right]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\nkey : f y * (z - x) ≤ (z - y) * f x + (y - x) * f z\n⊢ f y * (z - y) + f y * (y - x) ≤ f x * (z - y) + f z * (y - x)\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\nkey : f y * (z - x) ≤ (z - y) * f x + (y - x) * f z\n⊢ 0 < (y - x) * (z - y)\n[PROOFSTEP]\nnlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConcaveOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\n⊢ (f z - f y) / (z - y) ≤ (f y - f x) / (y - x)\n[PROOFSTEP]\nhave := neg_le_neg (ConvexOn.slope_mono_adjacent hf.neg hx hz hxy hyz)\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConcaveOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nthis : -(((-f) z - (-f) y) / (z - y)) ≤ -(((-f) y - (-f) x) / (y - x))\n⊢ (f z - f y) / (z - y) ≤ (f y - f x) / (y - x)\n[PROOFSTEP]\nsimp only [Pi.neg_apply, ← neg_div, neg_sub', neg_neg] at this \n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConcaveOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nthis : (f z - f y) / (z - y) ≤ (f y - f x) / (y - x)\n⊢ (f z - f y) / (z - y) ≤ (f y - f x) / (y - x)\n[PROOFSTEP]\nexact this\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\n⊢ (f y - f x) / (y - x) < (f z - f y) / (z - y)\n[PROOFSTEP]\nhave hxz := hxy.trans hyz\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxz : x < z\n⊢ (f y - f x) / (y - x) < (f z - f y) / (z - y)\n[PROOFSTEP]\nhave hxz' := hxz.ne\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxz : x < z\nhxz' : x ≠ z\n⊢ (f y - f x) / (y - x) < (f z - f y) / (z - y)\n[PROOFSTEP]\nrw [← sub_pos] at hxy hxz hyz \n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\n⊢ (f y - f x) / (y - x) < (f z - f y) / (z - y)\n[PROOFSTEP]\nsuffices f y / (y - x) + f y / (z - y) < f x / (y - x) + f z / (z - y)\n by\n ring_nf at this ⊢\n linarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\nthis : f y / (y - x) + f y / (z - y) < f x / (y - x) + f z / (z - y)\n⊢ (f y - f x) / (y - x) < (f z - f y) / (z - y)\n[PROOFSTEP]\nring_nf at this ⊢\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\nthis : f y * (y - x)⁻¹ + f y * (-y + z)⁻¹ < (y - x)⁻¹ * f x + (-y + z)⁻¹ * f z\n⊢ f y * (y - x)⁻¹ - (y - x)⁻¹ * f x < -(f y * (-y + z)⁻¹) + (-y + z)⁻¹ * f z\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\n⊢ f y / (y - x) + f y / (z - y) < f x / (y - x) + f z / (z - y)\n[PROOFSTEP]\nset a := (z - y) / (z - x)\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\n⊢ f y / (y - x) + f y / (z - y) < f x / (y - x) + f z / (z - y)\n[PROOFSTEP]\nset b := (y - x) / (z - x)\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\n⊢ f y / (y - x) + f y / (z - y) < f x / (y - x) + f z / (z - y)\n[PROOFSTEP]\nhave hy : a • x + b • z = y := by\n field_simp\n rw [div_eq_iff] <;> [ring; linarith]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\n⊢ a • x + b • z = y\n[PROOFSTEP]\nfield_simp\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\n⊢ ((z - y) * x + (y - x) * z) / (z - x) = y\n[PROOFSTEP]\nrw [div_eq_iff] <;> [ring; linarith]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\n⊢ ((z - y) * x + (y - x) * z) / (z - x) = y\n[PROOFSTEP]\nrw [div_eq_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\n⊢ (z - y) * x + (y - x) * z = y * (z - x)\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\n⊢ z - x ≠ 0\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\n⊢ f y / (y - x) + f y / (z - y) < f x / (y - x) + f z / (z - y)\n[PROOFSTEP]\nhave key :=\n hf.2 hx hz hxz' (div_pos hyz hxz) (div_pos hxy hxz)\n (show a + b = 1 by\n field_simp\n rw [div_eq_iff] <;> [ring; linarith])\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\n⊢ a + b = 1\n[PROOFSTEP]\nfield_simp\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\n⊢ (z - x) / (z - x) = 1\n[PROOFSTEP]\nrw [div_eq_iff] <;> [ring; linarith]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\n⊢ (z - x) / (z - x) = 1\n[PROOFSTEP]\nrw [div_eq_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\n⊢ z - x = 1 * (z - x)\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\n⊢ z - x ≠ 0\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\nkey : f (((z - y) / (z - x)) • x + ((y - x) / (z - x)) • z) < ((z - y) / (z - x)) • f x + ((y - x) / (z - x)) • f z\n⊢ f y / (y - x) + f y / (z - y) < f x / (y - x) + f z / (z - y)\n[PROOFSTEP]\nrw [hy] at key \n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\nkey : f y < ((z - y) / (z - x)) • f x + ((y - x) / (z - x)) • f z\n⊢ f y / (y - x) + f y / (z - y) < f x / (y - x) + f z / (z - y)\n[PROOFSTEP]\nreplace key := mul_lt_mul_of_pos_left key hxz\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\nkey : (z - x) * f y < (z - x) * (((z - y) / (z - x)) • f x + ((y - x) / (z - x)) • f z)\n⊢ f y / (y - x) + f y / (z - y) < f x / (y - x) + f z / (z - y)\n[PROOFSTEP]\nfield_simp [hxy.ne', hyz.ne', hxz.ne', mul_comm (z - x) _] at key ⊢\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\nkey : f y * (z - x) < (z - y) * f x + (y - x) * f z\n⊢ (f y * (z - y) + f y * (y - x)) / ((y - x) * (z - y)) < (f x * (z - y) + f z * (y - x)) / ((y - x) * (z - y))\n[PROOFSTEP]\nrw [div_lt_div_right]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\nkey : f y * (z - x) < (z - y) * f x + (y - x) * f z\n⊢ f y * (z - y) + f y * (y - x) < f x * (z - y) + f z * (y - x)\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy✝ : x < y\nhxy : 0 < y - x\nhyz✝ : y < z\nhyz : 0 < z - y\nhxz✝ : x < z\nhxz : 0 < z - x\nhxz' : x ≠ z\na : 𝕜 := (z - y) / (z - x)\nb : 𝕜 := (y - x) / (z - x)\nhy : a • x + b • z = y\nkey : f y * (z - x) < (z - y) * f x + (y - x) * f z\n⊢ 0 < (y - x) * (z - y)\n[PROOFSTEP]\nnlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConcaveOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\n⊢ (f z - f y) / (z - y) < (f y - f x) / (y - x)\n[PROOFSTEP]\nhave := neg_lt_neg (StrictConvexOn.slope_strict_mono_adjacent hf.neg hx hz hxy hyz)\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConcaveOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nthis : -(((-f) z - (-f) y) / (z - y)) < -(((-f) y - (-f) x) / (y - x))\n⊢ (f z - f y) / (z - y) < (f y - f x) / (y - x)\n[PROOFSTEP]\nsimp only [Pi.neg_apply, ← neg_div, neg_sub', neg_neg] at this \n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConcaveOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nthis : (f z - f y) / (z - y) < (f y - f x) / (y - x)\n⊢ (f z - f y) / (z - y) < (f y - f x) / (y - x)\n[PROOFSTEP]\nexact this\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ f (a • x + b • z) ≤ a • f x + b • f z\n[PROOFSTEP]\nlet y := a * x + b * z\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\n⊢ f (a • x + b • z) ≤ a • f x + b • f z\n[PROOFSTEP]\nhave hxy : x < y := by\n rw [← one_mul x, ← hab, add_mul]\n exact add_lt_add_left ((mul_lt_mul_left hb).2 hxz) _\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\n⊢ x < y\n[PROOFSTEP]\nrw [← one_mul x, ← hab, add_mul]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\n⊢ a * x + b * x < y\n[PROOFSTEP]\nexact add_lt_add_left ((mul_lt_mul_left hb).2 hxz) _\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\n⊢ f (a • x + b • z) ≤ a • f x + b • f z\n[PROOFSTEP]\nhave hyz : y < z := by\n rw [← one_mul z, ← hab, add_mul]\n exact add_lt_add_right ((mul_lt_mul_left ha).2 hxz) _\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\n⊢ y < z\n[PROOFSTEP]\nrw [← one_mul z, ← hab, add_mul]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\n⊢ y < a * z + b * z\n[PROOFSTEP]\nexact add_lt_add_right ((mul_lt_mul_left ha).2 hxz) _\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\n⊢ f (a • x + b • z) ≤ a • f x + b • f z\n[PROOFSTEP]\nhave : (f y - f x) * (z - y) ≤ (f z - f y) * (y - x) :=\n (div_le_div_iff (sub_pos.2 hxy) (sub_pos.2 hyz)).1 (hf hx hz hxy hyz)\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) ≤ (f z - f y) * (y - x)\n⊢ f (a • x + b • z) ≤ a • f x + b • f z\n[PROOFSTEP]\nhave hxz : 0 < z - x := sub_pos.2 (hxy.trans hyz)\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz✝ : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) ≤ (f z - f y) * (y - x)\nhxz : 0 < z - x\n⊢ f (a • x + b • z) ≤ a • f x + b • f z\n[PROOFSTEP]\nhave ha : (z - y) / (z - x) = a := by\n rw [eq_comm, ← sub_eq_iff_eq_add'] at hab \n simp_rw [div_eq_iff hxz.ne', ← hab]\n ring\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz✝ : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) ≤ (f z - f y) * (y - x)\nhxz : 0 < z - x\n⊢ (z - y) / (z - x) = a\n[PROOFSTEP]\nrw [eq_comm, ← sub_eq_iff_eq_add'] at hab \n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz✝ : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : 1 - a = b\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) ≤ (f z - f y) * (y - x)\nhxz : 0 < z - x\n⊢ (z - y) / (z - x) = a\n[PROOFSTEP]\nsimp_rw [div_eq_iff hxz.ne', ← hab]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz✝ : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : 1 - a = b\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) ≤ (f z - f y) * (y - x)\nhxz : 0 < z - x\n⊢ z - (a * x + (1 - a) * z) = a * (z - x)\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz✝ : x < z\na b : 𝕜\nha✝ : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) ≤ (f z - f y) * (y - x)\nhxz : 0 < z - x\nha : (z - y) / (z - x) = a\n⊢ f (a • x + b • z) ≤ a • f x + b • f z\n[PROOFSTEP]\nhave hb : (y - x) / (z - x) = b := by\n rw [eq_comm, ← sub_eq_iff_eq_add] at hab \n simp_rw [div_eq_iff hxz.ne', ← hab]\n ring\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz✝ : x < z\na b : 𝕜\nha✝ : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) ≤ (f z - f y) * (y - x)\nhxz : 0 < z - x\nha : (z - y) / (z - x) = a\n⊢ (y - x) / (z - x) = b\n[PROOFSTEP]\nrw [eq_comm, ← sub_eq_iff_eq_add] at hab \n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz✝ : x < z\na b : 𝕜\nha✝ : 0 < a\nhb : 0 < b\nhab : 1 - b = a\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) ≤ (f z - f y) * (y - x)\nhxz : 0 < z - x\nha : (z - y) / (z - x) = a\n⊢ (y - x) / (z - x) = b\n[PROOFSTEP]\nsimp_rw [div_eq_iff hxz.ne', ← hab]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz✝ : x < z\na b : 𝕜\nha✝ : 0 < a\nhb : 0 < b\nhab : 1 - b = a\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) ≤ (f z - f y) * (y - x)\nhxz : 0 < z - x\nha : (z - y) / (z - x) = a\n⊢ (1 - b) * x + b * z - x = b * (z - x)\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz✝ : x < z\na b : 𝕜\nha✝ : 0 < a\nhb✝ : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) ≤ (f z - f y) * (y - x)\nhxz : 0 < z - x\nha : (z - y) / (z - x) = a\nhb : (y - x) / (z - x) = b\n⊢ f (a • x + b • z) ≤ a • f x + b • f z\n[PROOFSTEP]\nrwa [sub_mul, sub_mul, sub_le_iff_le_add', ← add_sub_assoc, le_sub_iff_add_le, ← mul_add, sub_add_sub_cancel, ←\n le_div_iff hxz, add_div, mul_div_assoc, mul_div_assoc, mul_comm (f x), mul_comm (f z), ha, hb] at this \n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f z - f y) / (z - y) ≤ (f y - f x) / (y - x)\n⊢ ConcaveOn 𝕜 s f\n[PROOFSTEP]\nrw [← neg_convexOn_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f z - f y) / (z - y) ≤ (f y - f x) / (y - x)\n⊢ ConvexOn 𝕜 s (-f)\n[PROOFSTEP]\nrefine' convexOn_of_slope_mono_adjacent hs fun hx hz hxy hyz => _\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f z - f y) / (z - y) ≤ (f y - f x) / (y - x)\nx✝ y✝ z✝ : 𝕜\nhx : x✝ ∈ s\nhz : z✝ ∈ s\nhxy : x✝ < y✝\nhyz : y✝ < z✝\n⊢ ((-f) y✝ - (-f) x✝) / (y✝ - x✝) ≤ ((-f) z✝ - (-f) y✝) / (z✝ - y✝)\n[PROOFSTEP]\nrw [← neg_le_neg_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f z - f y) / (z - y) ≤ (f y - f x) / (y - x)\nx✝ y✝ z✝ : 𝕜\nhx : x✝ ∈ s\nhz : z✝ ∈ s\nhxy : x✝ < y✝\nhyz : y✝ < z✝\n⊢ -(((-f) z✝ - (-f) y✝) / (z✝ - y✝)) ≤ -(((-f) y✝ - (-f) x✝) / (y✝ - x✝))\n[PROOFSTEP]\nsimp_rw [← neg_div, neg_sub, Pi.neg_apply, neg_sub_neg]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f z - f y) / (z - y) ≤ (f y - f x) / (y - x)\nx✝ y✝ z✝ : 𝕜\nhx : x✝ ∈ s\nhz : z✝ ∈ s\nhxy : x✝ < y✝\nhyz : y✝ < z✝\n⊢ (f z✝ - f y✝) / (z✝ - y✝) ≤ (f y✝ - f x✝) / (y✝ - x✝)\n[PROOFSTEP]\nexact hf hx hz hxy hyz\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ f (a • x + b • z) < a • f x + b • f z\n[PROOFSTEP]\nlet y := a * x + b * z\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\n⊢ f (a • x + b • z) < a • f x + b • f z\n[PROOFSTEP]\nhave hxy : x < y := by\n rw [← one_mul x, ← hab, add_mul]\n exact add_lt_add_left ((mul_lt_mul_left hb).2 hxz) _\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\n⊢ x < y\n[PROOFSTEP]\nrw [← one_mul x, ← hab, add_mul]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\n⊢ a * x + b * x < y\n[PROOFSTEP]\nexact add_lt_add_left ((mul_lt_mul_left hb).2 hxz) _\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\n⊢ f (a • x + b • z) < a • f x + b • f z\n[PROOFSTEP]\nhave hyz : y < z := by\n rw [← one_mul z, ← hab, add_mul]\n exact add_lt_add_right ((mul_lt_mul_left ha).2 hxz) _\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\n⊢ y < z\n[PROOFSTEP]\nrw [← one_mul z, ← hab, add_mul]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\n⊢ y < a * z + b * z\n[PROOFSTEP]\nexact add_lt_add_right ((mul_lt_mul_left ha).2 hxz) _\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\n⊢ f (a • x + b • z) < a • f x + b • f z\n[PROOFSTEP]\nhave : (f y - f x) * (z - y) < (f z - f y) * (y - x) :=\n (div_lt_div_iff (sub_pos.2 hxy) (sub_pos.2 hyz)).1 (hf hx hz hxy hyz)\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) < (f z - f y) * (y - x)\n⊢ f (a • x + b • z) < a • f x + b • f z\n[PROOFSTEP]\nhave hxz : 0 < z - x := sub_pos.2 (hxy.trans hyz)\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz✝ : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) < (f z - f y) * (y - x)\nhxz : 0 < z - x\n⊢ f (a • x + b • z) < a • f x + b • f z\n[PROOFSTEP]\nhave ha : (z - y) / (z - x) = a := by\n rw [eq_comm, ← sub_eq_iff_eq_add'] at hab \n simp_rw [div_eq_iff hxz.ne', ← hab]\n ring\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz✝ : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) < (f z - f y) * (y - x)\nhxz : 0 < z - x\n⊢ (z - y) / (z - x) = a\n[PROOFSTEP]\nrw [eq_comm, ← sub_eq_iff_eq_add'] at hab \n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz✝ : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : 1 - a = b\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) < (f z - f y) * (y - x)\nhxz : 0 < z - x\n⊢ (z - y) / (z - x) = a\n[PROOFSTEP]\nsimp_rw [div_eq_iff hxz.ne', ← hab]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz✝ : x < z\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : 1 - a = b\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) < (f z - f y) * (y - x)\nhxz : 0 < z - x\n⊢ z - (a * x + (1 - a) * z) = a * (z - x)\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz✝ : x < z\na b : 𝕜\nha✝ : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) < (f z - f y) * (y - x)\nhxz : 0 < z - x\nha : (z - y) / (z - x) = a\n⊢ f (a • x + b • z) < a • f x + b • f z\n[PROOFSTEP]\nhave hb : (y - x) / (z - x) = b := by\n rw [eq_comm, ← sub_eq_iff_eq_add] at hab \n simp_rw [div_eq_iff hxz.ne', ← hab]\n ring\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz✝ : x < z\na b : 𝕜\nha✝ : 0 < a\nhb : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) < (f z - f y) * (y - x)\nhxz : 0 < z - x\nha : (z - y) / (z - x) = a\n⊢ (y - x) / (z - x) = b\n[PROOFSTEP]\nrw [eq_comm, ← sub_eq_iff_eq_add] at hab \n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz✝ : x < z\na b : 𝕜\nha✝ : 0 < a\nhb : 0 < b\nhab : 1 - b = a\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) < (f z - f y) * (y - x)\nhxz : 0 < z - x\nha : (z - y) / (z - x) = a\n⊢ (y - x) / (z - x) = b\n[PROOFSTEP]\nsimp_rw [div_eq_iff hxz.ne', ← hab]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz✝ : x < z\na b : 𝕜\nha✝ : 0 < a\nhb : 0 < b\nhab : 1 - b = a\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) < (f z - f y) * (y - x)\nhxz : 0 < z - x\nha : (z - y) / (z - x) = a\n⊢ (1 - b) * x + b * z - x = b * (z - x)\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)\nx : 𝕜\nhx : x ∈ s\nz : 𝕜\nhz : z ∈ s\nhxz✝ : x < z\na b : 𝕜\nha✝ : 0 < a\nhb✝ : 0 < b\nhab : a + b = 1\ny : 𝕜 := a * x + b * z\nhxy : x < y\nhyz : y < z\nthis : (f y - f x) * (z - y) < (f z - f y) * (y - x)\nhxz : 0 < z - x\nha : (z - y) / (z - x) = a\nhb : (y - x) / (z - x) = b\n⊢ f (a • x + b • z) < a • f x + b • f z\n[PROOFSTEP]\nrwa [sub_mul, sub_mul, sub_lt_iff_lt_add', ← add_sub_assoc, lt_sub_iff_add_lt, ← mul_add, sub_add_sub_cancel, ←\n lt_div_iff hxz, add_div, mul_div_assoc, mul_div_assoc, mul_comm (f x), mul_comm (f z), ha, hb] at this \n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f z - f y) / (z - y) < (f y - f x) / (y - x)\n⊢ StrictConcaveOn 𝕜 s f\n[PROOFSTEP]\nrw [← neg_strictConvexOn_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f z - f y) / (z - y) < (f y - f x) / (y - x)\n⊢ StrictConvexOn 𝕜 s (-f)\n[PROOFSTEP]\nrefine' strictConvexOn_of_slope_strict_mono_adjacent hs fun hx hz hxy hyz => _\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f z - f y) / (z - y) < (f y - f x) / (y - x)\nx✝ y✝ z✝ : 𝕜\nhx : x✝ ∈ s\nhz : z✝ ∈ s\nhxy : x✝ < y✝\nhyz : y✝ < z✝\n⊢ ((-f) y✝ - (-f) x✝) / (y✝ - x✝) < ((-f) z✝ - (-f) y✝) / (z✝ - y✝)\n[PROOFSTEP]\nrw [← neg_lt_neg_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f z - f y) / (z - y) < (f y - f x) / (y - x)\nx✝ y✝ z✝ : 𝕜\nhx : x✝ ∈ s\nhz : z✝ ∈ s\nhxy : x✝ < y✝\nhyz : y✝ < z✝\n⊢ -(((-f) z✝ - (-f) y✝) / (z✝ - y✝)) < -(((-f) y✝ - (-f) x✝) / (y✝ - x✝))\n[PROOFSTEP]\nsimp_rw [← neg_div, neg_sub, Pi.neg_apply, neg_sub_neg]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhs : Convex 𝕜 s\nhf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f z - f y) / (z - y) < (f y - f x) / (y - x)\nx✝ y✝ z✝ : 𝕜\nhx : x✝ ∈ s\nhz : z✝ ∈ s\nhxy : x✝ < y✝\nhyz : y✝ < z✝\n⊢ (f z✝ - f y✝) / (z✝ - y✝) < (f y✝ - f x✝) / (y✝ - x✝)\n[PROOFSTEP]\nexact hf hx hz hxy hyz\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\n⊢ (z - x) * f y ≤ (z - y) * f x + (y - x) * f z\n[PROOFSTEP]\nhave hxy' : 0 < y - x := by linarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\n⊢ 0 < y - x\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\n⊢ (z - x) * f y ≤ (z - y) * f x + (y - x) * f z\n[PROOFSTEP]\nhave hyz' : 0 < z - y := by linarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\n⊢ 0 < z - y\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\n⊢ (z - x) * f y ≤ (z - y) * f x + (y - x) * f z\n[PROOFSTEP]\nhave hxz' : 0 < z - x := by linarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\n⊢ 0 < z - x\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\n⊢ (z - x) * f y ≤ (z - y) * f x + (y - x) * f z\n[PROOFSTEP]\nrw [← le_div_iff' hxz']\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\n⊢ f y ≤ ((z - y) * f x + (y - x) * f z) / (z - x)\n[PROOFSTEP]\nhave ha : 0 ≤ (z - y) / (z - x) := by positivity\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\n⊢ 0 ≤ (z - y) / (z - x)\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 ≤ (z - y) / (z - x)\n⊢ f y ≤ ((z - y) * f x + (y - x) * f z) / (z - x)\n[PROOFSTEP]\nhave hb : 0 ≤ (y - x) / (z - x) := by positivity\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 ≤ (z - y) / (z - x)\n⊢ 0 ≤ (y - x) / (z - x)\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 ≤ (z - y) / (z - x)\nhb : 0 ≤ (y - x) / (z - x)\n⊢ f y ≤ ((z - y) * f x + (y - x) * f z) / (z - x)\n[PROOFSTEP]\ncalc\n f y = f ((z - y) / (z - x) * x + (y - x) / (z - x) * z) := ?_\n _ ≤ (z - y) / (z - x) * f x + (y - x) / (z - x) * f z := (hf.2 hx hz ha hb ?_)\n _ = ((z - y) * f x + (y - x) * f z) / (z - x) := ?_\n[GOAL]\ncase calc_1\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 ≤ (z - y) / (z - x)\nhb : 0 ≤ (y - x) / (z - x)\n⊢ f y = f ((z - y) / (z - x) * x + (y - x) / (z - x) * z)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase calc_1.e_a\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 ≤ (z - y) / (z - x)\nhb : 0 ≤ (y - x) / (z - x)\n⊢ y = (z - y) / (z - x) * x + (y - x) / (z - x) * z\n[PROOFSTEP]\nfield_simp [hxy'.ne', hyz'.ne', hxz'.ne']\n[GOAL]\ncase calc_1.e_a\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 ≤ (z - y) / (z - x)\nhb : 0 ≤ (y - x) / (z - x)\n⊢ y * (z - x) = (z - y) * x + (y - x) * z\n[PROOFSTEP]\nring\n[GOAL]\ncase calc_2\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 ≤ (z - y) / (z - x)\nhb : 0 ≤ (y - x) / (z - x)\n⊢ Div.div (z - y) (z - x) + Div.div (y - x) (z - x) = 1\n[PROOFSTEP]\nshow (z - y) / (z - x) + (y - x) / (z - x) = 1\n[GOAL]\ncase calc_2\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 ≤ (z - y) / (z - x)\nhb : 0 ≤ (y - x) / (z - x)\n⊢ (z - y) / (z - x) + (y - x) / (z - x) = 1\n[PROOFSTEP]\nfield_simp [hxy'.ne', hyz'.ne', hxz'.ne']\n[GOAL]\ncase calc_3\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 ≤ (z - y) / (z - x)\nhb : 0 ≤ (y - x) / (z - x)\n⊢ (z - y) / (z - x) * f x + (y - x) / (z - x) * f z = ((z - y) * f x + (y - x) * f z) / (z - x)\n[PROOFSTEP]\nfield_simp [hxy'.ne', hyz'.ne', hxz'.ne']\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\n⊢ (f y - f x) / (y - x) ≤ (f z - f x) / (z - x)\n[PROOFSTEP]\nhave hxy' : 0 < y - x := by linarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\n⊢ 0 < y - x\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\n⊢ (f y - f x) / (y - x) ≤ (f z - f x) / (z - x)\n[PROOFSTEP]\nhave hxz' : 0 < z - x := by linarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\n⊢ 0 < z - x\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhxz' : 0 < z - x\n⊢ (f y - f x) / (y - x) ≤ (f z - f x) / (z - x)\n[PROOFSTEP]\nrw [div_le_div_iff hxy' hxz']\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhxz' : 0 < z - x\n⊢ (f y - f x) * (z - x) ≤ (f z - f x) * (y - x)\n[PROOFSTEP]\nlinarith only [hf.secant_mono_aux1 hx hz hxy hyz]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\n⊢ (f z - f x) / (z - x) ≤ (f z - f y) / (z - y)\n[PROOFSTEP]\nhave hyz' : 0 < z - y := by linarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\n⊢ 0 < z - y\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhyz' : 0 < z - y\n⊢ (f z - f x) / (z - x) ≤ (f z - f y) / (z - y)\n[PROOFSTEP]\nhave hxz' : 0 < z - x := by linarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhyz' : 0 < z - y\n⊢ 0 < z - x\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhyz' : 0 < z - y\nhxz' : 0 < z - x\n⊢ (f z - f x) / (z - x) ≤ (f z - f y) / (z - y)\n[PROOFSTEP]\nrw [div_le_div_iff hxz' hyz']\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhyz' : 0 < z - y\nhxz' : 0 < z - x\n⊢ (f z - f x) * (z - y) ≤ (f z - f y) * (z - x)\n[PROOFSTEP]\nlinarith only [hf.secant_mono_aux1 hx hz hxy hyz]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa : x ≠ a\nhya : y ≠ a\nhxy : x ≤ y\n⊢ (f x - f a) / (x - a) ≤ (f y - f a) / (y - a)\n[PROOFSTEP]\nrcases eq_or_lt_of_le hxy with (rfl | hxy)\n[GOAL]\ncase inl\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\na x : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhxa : x ≠ a\nhy : x ∈ s\nhya : x ≠ a\nhxy : x ≤ x\n⊢ (f x - f a) / (x - a) ≤ (f x - f a) / (x - a)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa : x ≠ a\nhya : y ≠ a\nhxy✝ : x ≤ y\nhxy : x < y\n⊢ (f x - f a) / (x - a) ≤ (f y - f a) / (y - a)\n[PROOFSTEP]\ncases' lt_or_gt_of_ne hxa with hxa hxa\n[GOAL]\ncase inr.inl\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya : y ≠ a\nhxy✝ : x ≤ y\nhxy : x < y\nhxa : x < a\n⊢ (f x - f a) / (x - a) ≤ (f y - f a) / (y - a)\n[PROOFSTEP]\ncases' lt_or_gt_of_ne hya with hya hya\n[GOAL]\ncase inr.inl.inl\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya✝ : y ≠ a\nhxy✝ : x ≤ y\nhxy : x < y\nhxa : x < a\nhya : y < a\n⊢ (f x - f a) / (x - a) ≤ (f y - f a) / (y - a)\n[PROOFSTEP]\nconvert hf.secant_mono_aux3 hx ha hxy hya using 1\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya✝ : y ≠ a\nhxy✝ : x ≤ y\nhxy : x < y\nhxa : x < a\nhya : y < a\n⊢ (f x - f a) / (x - a) = (f a - f x) / (a - x)\n[PROOFSTEP]\nrw [← neg_div_neg_eq]\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya✝ : y ≠ a\nhxy✝ : x ≤ y\nhxy : x < y\nhxa : x < a\nhya : y < a\n⊢ (f y - f a) / (y - a) = (f a - f y) / (a - y)\n[PROOFSTEP]\nrw [← neg_div_neg_eq]\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya✝ : y ≠ a\nhxy✝ : x ≤ y\nhxy : x < y\nhxa : x < a\nhya : y < a\n⊢ -(f x - f a) / -(x - a) = (f a - f x) / (a - x)\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya✝ : y ≠ a\nhxy✝ : x ≤ y\nhxy : x < y\nhxa : x < a\nhya : y < a\n⊢ -(f y - f a) / -(y - a) = (f a - f y) / (a - y)\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase inr.inl.inr\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya✝ : y ≠ a\nhxy✝ : x ≤ y\nhxy : x < y\nhxa : x < a\nhya : y > a\n⊢ (f x - f a) / (x - a) ≤ (f y - f a) / (y - a)\n[PROOFSTEP]\nconvert hf.slope_mono_adjacent hx hy hxa hya using 1\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya✝ : y ≠ a\nhxy✝ : x ≤ y\nhxy : x < y\nhxa : x < a\nhya : y > a\n⊢ (f x - f a) / (x - a) = (f a - f x) / (a - x)\n[PROOFSTEP]\nrw [← neg_div_neg_eq]\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya✝ : y ≠ a\nhxy✝ : x ≤ y\nhxy : x < y\nhxa : x < a\nhya : y > a\n⊢ -(f x - f a) / -(x - a) = (f a - f x) / (a - x)\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase inr.inr\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya : y ≠ a\nhxy✝ : x ≤ y\nhxy : x < y\nhxa : x > a\n⊢ (f x - f a) / (x - a) ≤ (f y - f a) / (y - a)\n[PROOFSTEP]\nexact hf.secant_mono_aux2 ha hy hxa hxy\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\n⊢ (z - x) * f y < (z - y) * f x + (y - x) * f z\n[PROOFSTEP]\nhave hxy' : 0 < y - x := by linarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\n⊢ 0 < y - x\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\n⊢ (z - x) * f y < (z - y) * f x + (y - x) * f z\n[PROOFSTEP]\nhave hyz' : 0 < z - y := by linarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\n⊢ 0 < z - y\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\n⊢ (z - x) * f y < (z - y) * f x + (y - x) * f z\n[PROOFSTEP]\nhave hxz' : 0 < z - x := by linarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\n⊢ 0 < z - x\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\n⊢ (z - x) * f y < (z - y) * f x + (y - x) * f z\n[PROOFSTEP]\nrw [← lt_div_iff' hxz']\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\n⊢ f y < ((z - y) * f x + (y - x) * f z) / (z - x)\n[PROOFSTEP]\nhave ha : 0 < (z - y) / (z - x) := by positivity\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\n⊢ 0 < (z - y) / (z - x)\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 < (z - y) / (z - x)\n⊢ f y < ((z - y) * f x + (y - x) * f z) / (z - x)\n[PROOFSTEP]\nhave hb : 0 < (y - x) / (z - x) := by positivity\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 < (z - y) / (z - x)\n⊢ 0 < (y - x) / (z - x)\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 < (z - y) / (z - x)\nhb : 0 < (y - x) / (z - x)\n⊢ f y < ((z - y) * f x + (y - x) * f z) / (z - x)\n[PROOFSTEP]\ncalc\n f y = f ((z - y) / (z - x) * x + (y - x) / (z - x) * z) := ?_\n _ < (z - y) / (z - x) * f x + (y - x) / (z - x) * f z := (hf.2 hx hz (by linarith) ha hb ?_)\n _ = ((z - y) * f x + (y - x) * f z) / (z - x) := ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 < (z - y) / (z - x)\nhb : 0 < (y - x) / (z - x)\n⊢ x ≠ z\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase calc_1\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 < (z - y) / (z - x)\nhb : 0 < (y - x) / (z - x)\n⊢ f y = f ((z - y) / (z - x) * x + (y - x) / (z - x) * z)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase calc_1.e_a\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 < (z - y) / (z - x)\nhb : 0 < (y - x) / (z - x)\n⊢ y = (z - y) / (z - x) * x + (y - x) / (z - x) * z\n[PROOFSTEP]\nfield_simp [hxy'.ne', hyz'.ne', hxz'.ne']\n[GOAL]\ncase calc_1.e_a\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 < (z - y) / (z - x)\nhb : 0 < (y - x) / (z - x)\n⊢ y * (z - x) = (z - y) * x + (y - x) * z\n[PROOFSTEP]\nring\n[GOAL]\ncase calc_2\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 < (z - y) / (z - x)\nhb : 0 < (y - x) / (z - x)\n⊢ Div.div (z - y) (z - x) + Div.div (y - x) (z - x) = 1\n[PROOFSTEP]\nshow (z - y) / (z - x) + (y - x) / (z - x) = 1\n[GOAL]\ncase calc_2\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 < (z - y) / (z - x)\nhb : 0 < (y - x) / (z - x)\n⊢ (z - y) / (z - x) + (y - x) / (z - x) = 1\n[PROOFSTEP]\nfield_simp [hxy'.ne', hyz'.ne', hxz'.ne']\n[GOAL]\ncase calc_3\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhyz' : 0 < z - y\nhxz' : 0 < z - x\nha : 0 < (z - y) / (z - x)\nhb : 0 < (y - x) / (z - x)\n⊢ (z - y) / (z - x) * f x + (y - x) / (z - x) * f z = ((z - y) * f x + (y - x) * f z) / (z - x)\n[PROOFSTEP]\nfield_simp [hxy'.ne', hyz'.ne', hxz'.ne']\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\n⊢ (f y - f x) / (y - x) < (f z - f x) / (z - x)\n[PROOFSTEP]\nhave hxy' : 0 < y - x := by linarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\n⊢ 0 < y - x\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\n⊢ (f y - f x) / (y - x) < (f z - f x) / (z - x)\n[PROOFSTEP]\nhave hxz' : 0 < z - x := by linarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\n⊢ 0 < z - x\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhxz' : 0 < z - x\n⊢ (f y - f x) / (y - x) < (f z - f x) / (z - x)\n[PROOFSTEP]\nrw [div_lt_div_iff hxy' hxz']\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhxy' : 0 < y - x\nhxz' : 0 < z - x\n⊢ (f y - f x) * (z - x) < (f z - f x) * (y - x)\n[PROOFSTEP]\nlinarith only [hf.secant_strict_mono_aux1 hx hz hxy hyz]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\n⊢ (f z - f x) / (z - x) < (f z - f y) / (z - y)\n[PROOFSTEP]\nhave hyz' : 0 < z - y := by linarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\n⊢ 0 < z - y\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhyz' : 0 < z - y\n⊢ (f z - f x) / (z - x) < (f z - f y) / (z - y)\n[PROOFSTEP]\nhave hxz' : 0 < z - x := by linarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhyz' : 0 < z - y\n⊢ 0 < z - x\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhyz' : 0 < z - y\nhxz' : 0 < z - x\n⊢ (f z - f x) / (z - x) < (f z - f y) / (z - y)\n[PROOFSTEP]\nrw [div_lt_div_iff hxz' hyz']\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\nx y z : 𝕜\nhx : x ∈ s\nhz : z ∈ s\nhxy : x < y\nhyz : y < z\nhyz' : 0 < z - y\nhxz' : 0 < z - x\n⊢ (f z - f x) * (z - y) < (f z - f y) * (z - x)\n[PROOFSTEP]\nlinarith only [hf.secant_strict_mono_aux1 hx hz hxy hyz]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa : x ≠ a\nhya : y ≠ a\nhxy : x < y\n⊢ (f x - f a) / (x - a) < (f y - f a) / (y - a)\n[PROOFSTEP]\ncases' lt_or_gt_of_ne hxa with hxa hxa\n[GOAL]\ncase inl\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya : y ≠ a\nhxy : x < y\nhxa : x < a\n⊢ (f x - f a) / (x - a) < (f y - f a) / (y - a)\n[PROOFSTEP]\ncases' lt_or_gt_of_ne hya with hya hya\n[GOAL]\ncase inl.inl\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya✝ : y ≠ a\nhxy : x < y\nhxa : x < a\nhya : y < a\n⊢ (f x - f a) / (x - a) < (f y - f a) / (y - a)\n[PROOFSTEP]\nconvert hf.secant_strict_mono_aux3 hx ha hxy hya using 1\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya✝ : y ≠ a\nhxy : x < y\nhxa : x < a\nhya : y < a\n⊢ (f x - f a) / (x - a) = (f a - f x) / (a - x)\n[PROOFSTEP]\nrw [← neg_div_neg_eq]\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya✝ : y ≠ a\nhxy : x < y\nhxa : x < a\nhya : y < a\n⊢ (f y - f a) / (y - a) = (f a - f y) / (a - y)\n[PROOFSTEP]\nrw [← neg_div_neg_eq]\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya✝ : y ≠ a\nhxy : x < y\nhxa : x < a\nhya : y < a\n⊢ -(f x - f a) / -(x - a) = (f a - f x) / (a - x)\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya✝ : y ≠ a\nhxy : x < y\nhxa : x < a\nhya : y < a\n⊢ -(f y - f a) / -(y - a) = (f a - f y) / (a - y)\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase inl.inr\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya✝ : y ≠ a\nhxy : x < y\nhxa : x < a\nhya : y > a\n⊢ (f x - f a) / (x - a) < (f y - f a) / (y - a)\n[PROOFSTEP]\nconvert hf.slope_strict_mono_adjacent hx hy hxa hya using 1\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya✝ : y ≠ a\nhxy : x < y\nhxa : x < a\nhya : y > a\n⊢ (f x - f a) / (x - a) = (f a - f x) / (a - x)\n[PROOFSTEP]\nrw [← neg_div_neg_eq]\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya✝ : y ≠ a\nhxy : x < y\nhxa : x < a\nhya : y > a\n⊢ -(f x - f a) / -(x - a) = (f a - f x) / (a - x)\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase inr\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConvexOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa✝ : x ≠ a\nhya : y ≠ a\nhxy : x < y\nhxa : x > a\n⊢ (f x - f a) / (x - a) < (f y - f a) / (y - a)\n[PROOFSTEP]\nexact hf.secant_strict_mono_aux2 ha hy hxa hxy\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConcaveOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa : x ≠ a\nhya : y ≠ a\nhxy : x < y\n⊢ (f y - f a) / (y - a) < (f x - f a) / (x - a)\n[PROOFSTEP]\nhave key := hf.neg.secant_strict_mono ha hx hy hxa hya hxy\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConcaveOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa : x ≠ a\nhya : y ≠ a\nhxy : x < y\nkey : ((-f) x - (-f) a) / (x - a) < ((-f) y - (-f) a) / (y - a)\n⊢ (f y - f a) / (y - a) < (f x - f a) / (x - a)\n[PROOFSTEP]\nsimp only [Pi.neg_apply] at key \n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConcaveOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa : x ≠ a\nhya : y ≠ a\nhxy : x < y\nkey : (-f x - -f a) / (x - a) < (-f y - -f a) / (y - a)\n⊢ (f y - f a) / (y - a) < (f x - f a) / (x - a)\n[PROOFSTEP]\nrw [← neg_lt_neg_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConcaveOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa : x ≠ a\nhya : y ≠ a\nhxy : x < y\nkey : (-f x - -f a) / (x - a) < (-f y - -f a) / (y - a)\n⊢ -((f x - f a) / (x - a)) < -((f y - f a) / (y - a))\n[PROOFSTEP]\nconvert key using 1\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConcaveOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa : x ≠ a\nhya : y ≠ a\nhxy : x < y\nkey : (-f x - -f a) / (x - a) < (-f y - -f a) / (y - a)\n⊢ -((f x - f a) / (x - a)) = (-f x - -f a) / (x - a)\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConcaveOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa : x ≠ a\nhya : y ≠ a\nhxy : x < y\nkey : (-f x - -f a) / (x - a) < (-f y - -f a) / (y - a)\n⊢ -((f y - f a) / (y - a)) = (-f y - -f a) / (y - a)\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConcaveOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa : x ≠ a\nhya : y ≠ a\nhxy : x < y\nkey : (-f x - -f a) / (x - a) < (-f y - -f a) / (y - a)\n⊢ (f a - f x) / (x - a) = (-f x + f a) / (x - a)\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : StrictConcaveOn 𝕜 s f\na x y : 𝕜\nha : a ∈ s\nhx : x ∈ s\nhy : y ∈ s\nhxa : x ≠ a\nhya : y ≠ a\nhxy : x < y\nkey : (-f x - -f a) / (x - a) < (-f y - -f a) / (y - a)\n⊢ (f a - f y) / (y - a) = (-f y + f a) / (y - a)\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y : 𝕜\nhx : x ∈ s\nhxy : x < y\nhxy' : f x < f y\n⊢ StrictMonoOn f (s ∩ Set.Ici y)\n[PROOFSTEP]\nintro u hu v hv huv\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y : 𝕜\nhx : x ∈ s\nhxy : x < y\nhxy' : f x < f y\nu : 𝕜\nhu : u ∈ s ∩ Set.Ici y\nv : 𝕜\nhv : v ∈ s ∩ Set.Ici y\nhuv : u < v\n⊢ f u < f v\n[PROOFSTEP]\nhave step1 : ∀ {z : 𝕜}, z ∈ s ∩ Set.Ioi y → f y < f z :=\n by\n intros z hz\n refine hf.lt_right_of_left_lt hx hz.1 ?_ hxy'\n rw [openSegment_eq_Ioo (hxy.trans hz.2)]\n exact ⟨hxy, hz.2⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y : 𝕜\nhx : x ∈ s\nhxy : x < y\nhxy' : f x < f y\nu : 𝕜\nhu : u ∈ s ∩ Set.Ici y\nv : 𝕜\nhv : v ∈ s ∩ Set.Ici y\nhuv : u < v\n⊢ ∀ {z : 𝕜}, z ∈ s ∩ Set.Ioi y → f y < f z\n[PROOFSTEP]\nintros z hz\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y : 𝕜\nhx : x ∈ s\nhxy : x < y\nhxy' : f x < f y\nu : 𝕜\nhu : u ∈ s ∩ Set.Ici y\nv : 𝕜\nhv : v ∈ s ∩ Set.Ici y\nhuv : u < v\nz : 𝕜\nhz : z ∈ s ∩ Set.Ioi y\n⊢ f y < f z\n[PROOFSTEP]\nrefine hf.lt_right_of_left_lt hx hz.1 ?_ hxy'\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y : 𝕜\nhx : x ∈ s\nhxy : x < y\nhxy' : f x < f y\nu : 𝕜\nhu : u ∈ s ∩ Set.Ici y\nv : 𝕜\nhv : v ∈ s ∩ Set.Ici y\nhuv : u < v\nz : 𝕜\nhz : z ∈ s ∩ Set.Ioi y\n⊢ y ∈ openSegment 𝕜 x z\n[PROOFSTEP]\nrw [openSegment_eq_Ioo (hxy.trans hz.2)]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y : 𝕜\nhx : x ∈ s\nhxy : x < y\nhxy' : f x < f y\nu : 𝕜\nhu : u ∈ s ∩ Set.Ici y\nv : 𝕜\nhv : v ∈ s ∩ Set.Ici y\nhuv : u < v\nz : 𝕜\nhz : z ∈ s ∩ Set.Ioi y\n⊢ y ∈ Set.Ioo x z\n[PROOFSTEP]\nexact ⟨hxy, hz.2⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y : 𝕜\nhx : x ∈ s\nhxy : x < y\nhxy' : f x < f y\nu : 𝕜\nhu : u ∈ s ∩ Set.Ici y\nv : 𝕜\nhv : v ∈ s ∩ Set.Ici y\nhuv : u < v\nstep1 : ∀ {z : 𝕜}, z ∈ s ∩ Set.Ioi y → f y < f z\n⊢ f u < f v\n[PROOFSTEP]\nrcases eq_or_lt_of_le hu.2 with (rfl | hu2)\n[GOAL]\ncase inl\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y : 𝕜\nhx : x ∈ s\nhxy : x < y\nhxy' : f x < f y\nv : 𝕜\nhv : v ∈ s ∩ Set.Ici y\nstep1 : ∀ {z : 𝕜}, z ∈ s ∩ Set.Ioi y → f y < f z\nhu : y ∈ s ∩ Set.Ici y\nhuv : y < v\n⊢ f y < f v\n[PROOFSTEP]\nexact step1 ⟨hv.1, huv⟩\n[GOAL]\ncase inr\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y : 𝕜\nhx : x ∈ s\nhxy : x < y\nhxy' : f x < f y\nu : 𝕜\nhu : u ∈ s ∩ Set.Ici y\nv : 𝕜\nhv : v ∈ s ∩ Set.Ici y\nhuv : u < v\nstep1 : ∀ {z : 𝕜}, z ∈ s ∩ Set.Ioi y → f y < f z\nhu2 : y < u\n⊢ f u < f v\n[PROOFSTEP]\nrefine' hf.lt_right_of_left_lt _ hv.1 _ (step1 ⟨hu.1, hu2⟩)\n[GOAL]\ncase inr.refine'_1\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y : 𝕜\nhx : x ∈ s\nhxy : x < y\nhxy' : f x < f y\nu : 𝕜\nhu : u ∈ s ∩ Set.Ici y\nv : 𝕜\nhv : v ∈ s ∩ Set.Ici y\nhuv : u < v\nstep1 : ∀ {z : 𝕜}, z ∈ s ∩ Set.Ioi y → f y < f z\nhu2 : y < u\n⊢ y ∈ s\n[PROOFSTEP]\napply hf.1.segment_subset hx hu.1\n[GOAL]\ncase inr.refine'_1.a\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y : 𝕜\nhx : x ∈ s\nhxy : x < y\nhxy' : f x < f y\nu : 𝕜\nhu : u ∈ s ∩ Set.Ici y\nv : 𝕜\nhv : v ∈ s ∩ Set.Ici y\nhuv : u < v\nstep1 : ∀ {z : 𝕜}, z ∈ s ∩ Set.Ioi y → f y < f z\nhu2 : y < u\n⊢ y ∈ segment 𝕜 x u\n[PROOFSTEP]\nrw [segment_eq_Icc (hxy.le.trans hu.2)]\n[GOAL]\ncase inr.refine'_1.a\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y : 𝕜\nhx : x ∈ s\nhxy : x < y\nhxy' : f x < f y\nu : 𝕜\nhu : u ∈ s ∩ Set.Ici y\nv : 𝕜\nhv : v ∈ s ∩ Set.Ici y\nhuv : u < v\nstep1 : ∀ {z : 𝕜}, z ∈ s ∩ Set.Ioi y → f y < f z\nhu2 : y < u\n⊢ y ∈ Set.Icc x u\n[PROOFSTEP]\nexact ⟨hxy.le, hu.2⟩\n[GOAL]\ncase inr.refine'_2\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y : 𝕜\nhx : x ∈ s\nhxy : x < y\nhxy' : f x < f y\nu : 𝕜\nhu : u ∈ s ∩ Set.Ici y\nv : 𝕜\nhv : v ∈ s ∩ Set.Ici y\nhuv : u < v\nstep1 : ∀ {z : 𝕜}, z ∈ s ∩ Set.Ioi y → f y < f z\nhu2 : y < u\n⊢ u ∈ openSegment 𝕜 y v\n[PROOFSTEP]\nrw [openSegment_eq_Ioo (hu2.trans huv)]\n[GOAL]\ncase inr.refine'_2\n𝕜 : Type u_1\ninst✝ : LinearOrderedField 𝕜\ns : Set 𝕜\nf : 𝕜 → 𝕜\nhf : ConvexOn 𝕜 s f\nx y : 𝕜\nhx : x ∈ s\nhxy : x < y\nhxy' : f x < f y\nu : 𝕜\nhu : u ∈ s ∩ Set.Ici y\nv : 𝕜\nhv : v ∈ s ∩ Set.Ici y\nhuv : u < v\nstep1 : ∀ {z : 𝕜}, z ∈ s ∩ Set.Ioi y → f y < f z\nhu2 : y < u\n⊢ u ∈ Set.Ioo y v\n[PROOFSTEP]\nexact ⟨hu2, huv⟩\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.Slope", "llama_tokens": 44727, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8267117940706734, "lm_q2_score": 0.6959583250334526, "lm_q1q2_score": 0.5753569554868264}} {"text": "[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nx : E\nc : 𝕜\nhc : c ≠ 0\n⊢ rayleighQuotient T (c • x) = rayleighQuotient T x\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nx : E\nc : 𝕜\nhc : c ≠ 0\nhx : x = 0\n⊢ rayleighQuotient T (c • x) = rayleighQuotient T x\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nx : E\nc : 𝕜\nhc : c ≠ 0\nhx : ¬x = 0\n⊢ rayleighQuotient T (c • x) = rayleighQuotient T x\n[PROOFSTEP]\nhave : ‖c‖ ≠ 0 := by simp [hc]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nx : E\nc : 𝕜\nhc : c ≠ 0\nhx : ¬x = 0\n⊢ ‖c‖ ≠ 0\n[PROOFSTEP]\nsimp [hc]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nx : E\nc : 𝕜\nhc : c ≠ 0\nhx : ¬x = 0\nthis : ‖c‖ ≠ 0\n⊢ rayleighQuotient T (c • x) = rayleighQuotient T x\n[PROOFSTEP]\nhave : ‖x‖ ≠ 0 := by simp [hx]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nx : E\nc : 𝕜\nhc : c ≠ 0\nhx : ¬x = 0\nthis : ‖c‖ ≠ 0\n⊢ ‖x‖ ≠ 0\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nx : E\nc : 𝕜\nhc : c ≠ 0\nhx : ¬x = 0\nthis✝ : ‖c‖ ≠ 0\nthis : ‖x‖ ≠ 0\n⊢ rayleighQuotient T (c • x) = rayleighQuotient T x\n[PROOFSTEP]\nfield_simp [norm_smul, T.reApplyInnerSelf_smul]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nx : E\nc : 𝕜\nhc : c ≠ 0\nhx : ¬x = 0\nthis✝ : ‖c‖ ≠ 0\nthis : ‖x‖ ≠ 0\n⊢ ‖c‖ ^ 2 * reApplyInnerSelf T x * ‖x‖ ^ 2 = reApplyInnerSelf T x * (‖c‖ * ‖x‖) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nr : ℝ\nhr : 0 < r\n⊢ rayleighQuotient T '' {0}ᶜ = rayleighQuotient T '' sphere 0 r\n[PROOFSTEP]\next a\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nr : ℝ\nhr : 0 < r\na : ℝ\n⊢ a ∈ rayleighQuotient T '' {0}ᶜ ↔ a ∈ rayleighQuotient T '' sphere 0 r\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nr : ℝ\nhr : 0 < r\na : ℝ\n⊢ a ∈ rayleighQuotient T '' {0}ᶜ → a ∈ rayleighQuotient T '' sphere 0 r\n[PROOFSTEP]\nrintro ⟨x, hx : x ≠ 0, hxT⟩\n[GOAL]\ncase h.mp.intro.intro\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nr : ℝ\nhr : 0 < r\na : ℝ\nx : E\nhx : x ≠ 0\nhxT : rayleighQuotient T x = a\n⊢ a ∈ rayleighQuotient T '' sphere 0 r\n[PROOFSTEP]\nhave : ‖x‖ ≠ 0 := by simp [hx]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nr : ℝ\nhr : 0 < r\na : ℝ\nx : E\nhx : x ≠ 0\nhxT : rayleighQuotient T x = a\n⊢ ‖x‖ ≠ 0\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase h.mp.intro.intro\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nr : ℝ\nhr : 0 < r\na : ℝ\nx : E\nhx : x ≠ 0\nhxT : rayleighQuotient T x = a\nthis : ‖x‖ ≠ 0\n⊢ a ∈ rayleighQuotient T '' sphere 0 r\n[PROOFSTEP]\nlet c : 𝕜 := ↑‖x‖⁻¹ * r\n[GOAL]\ncase h.mp.intro.intro\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nr : ℝ\nhr : 0 < r\na : ℝ\nx : E\nhx : x ≠ 0\nhxT : rayleighQuotient T x = a\nthis : ‖x‖ ≠ 0\nc : 𝕜 := ↑‖x‖⁻¹ * ↑r\n⊢ a ∈ rayleighQuotient T '' sphere 0 r\n[PROOFSTEP]\nhave : c ≠ 0 := by simp [hx, hr.ne']\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nr : ℝ\nhr : 0 < r\na : ℝ\nx : E\nhx : x ≠ 0\nhxT : rayleighQuotient T x = a\nthis : ‖x‖ ≠ 0\nc : 𝕜 := ↑‖x‖⁻¹ * ↑r\n⊢ c ≠ 0\n[PROOFSTEP]\nsimp [hx, hr.ne']\n[GOAL]\ncase h.mp.intro.intro\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nr : ℝ\nhr : 0 < r\na : ℝ\nx : E\nhx : x ≠ 0\nhxT : rayleighQuotient T x = a\nthis✝ : ‖x‖ ≠ 0\nc : 𝕜 := ↑‖x‖⁻¹ * ↑r\nthis : c ≠ 0\n⊢ a ∈ rayleighQuotient T '' sphere 0 r\n[PROOFSTEP]\nrefine' ⟨c • x, _, _⟩\n[GOAL]\ncase h.mp.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nr : ℝ\nhr : 0 < r\na : ℝ\nx : E\nhx : x ≠ 0\nhxT : rayleighQuotient T x = a\nthis✝ : ‖x‖ ≠ 0\nc : 𝕜 := ↑‖x‖⁻¹ * ↑r\nthis : c ≠ 0\n⊢ c • x ∈ sphere 0 r\n[PROOFSTEP]\nfield_simp [norm_smul, abs_of_pos hr]\n[GOAL]\ncase h.mp.intro.intro.refine'_2\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nr : ℝ\nhr : 0 < r\na : ℝ\nx : E\nhx : x ≠ 0\nhxT : rayleighQuotient T x = a\nthis✝ : ‖x‖ ≠ 0\nc : 𝕜 := ↑‖x‖⁻¹ * ↑r\nthis : c ≠ 0\n⊢ rayleighQuotient T (c • x) = a\n[PROOFSTEP]\nrw [T.rayleigh_smul x this]\n[GOAL]\ncase h.mp.intro.intro.refine'_2\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nr : ℝ\nhr : 0 < r\na : ℝ\nx : E\nhx : x ≠ 0\nhxT : rayleighQuotient T x = a\nthis✝ : ‖x‖ ≠ 0\nc : 𝕜 := ↑‖x‖⁻¹ * ↑r\nthis : c ≠ 0\n⊢ rayleighQuotient T x = a\n[PROOFSTEP]\nexact hxT\n[GOAL]\ncase h.mpr\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nr : ℝ\nhr : 0 < r\na : ℝ\n⊢ a ∈ rayleighQuotient T '' sphere 0 r → a ∈ rayleighQuotient T '' {0}ᶜ\n[PROOFSTEP]\nrintro ⟨x, hx, hxT⟩\n[GOAL]\ncase h.mpr.intro.intro\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nr : ℝ\nhr : 0 < r\na : ℝ\nx : E\nhx : x ∈ sphere 0 r\nhxT : rayleighQuotient T x = a\n⊢ a ∈ rayleighQuotient T '' {0}ᶜ\n[PROOFSTEP]\nexact ⟨x, ne_zero_of_mem_sphere hr.ne' ⟨x, hx⟩, hxT⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nr : ℝ\nhr : 0 < r\n⊢ ⨆ (x : ↑{0}ᶜ), rayleighQuotient T ↑x = ⨆ (x : ↑(sphere 0 r)), rayleighQuotient T ↑x\n[PROOFSTEP]\nsimp only [← @sSup_image' _ _ _ _ (rayleighQuotient T), T.image_rayleigh_eq_image_rayleigh_sphere hr]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace 𝕜 E\nT : E →L[𝕜] E\nr : ℝ\nhr : 0 < r\n⊢ ⨅ (x : ↑{0}ᶜ), rayleighQuotient T ↑x = ⨅ (x : ↑(sphere 0 r)), rayleighQuotient T ↑x\n[PROOFSTEP]\nsimp only [← @sInf_image' _ _ _ _ (rayleighQuotient T), T.image_rayleigh_eq_image_rayleigh_sphere hr]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : IsROrC 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\nT : F →L[ℝ] F\nhT : LinearMap.IsSymmetric ↑T\nx₀ : F\n⊢ HasStrictFDerivAt (ContinuousLinearMap.reApplyInnerSelf T) (2 • ↑(innerSL ℝ) (↑T x₀)) x₀\n[PROOFSTEP]\nconvert T.hasStrictFDerivAt.inner ℝ (hasStrictFDerivAt_id x₀) using 1\n[GOAL]\ncase h.e'_10.h.h\n𝕜 : Type u_1\ninst✝⁴ : IsROrC 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\nT : F →L[ℝ] F\nhT : LinearMap.IsSymmetric ↑T\nx₀ : F\ne_7✝ : Real.normedAddCommGroup = NonUnitalNormedRing.toNormedAddCommGroup\nhe✝ : InnerProductSpace.toNormedSpace = NormedAlgebra.toNormedSpace'\n⊢ 2 • ↑(innerSL ℝ) (↑T x₀) =\n ContinuousLinearMap.comp (fderivInnerClm ℝ (↑T x₀, id x₀)) (ContinuousLinearMap.prod T (ContinuousLinearMap.id ℝ F))\n[PROOFSTEP]\next y\n[GOAL]\ncase h.e'_10.h.h.h\n𝕜 : Type u_1\ninst✝⁴ : IsROrC 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\nT : F →L[ℝ] F\nhT : LinearMap.IsSymmetric ↑T\nx₀ : F\ne_7✝ : Real.normedAddCommGroup = NonUnitalNormedRing.toNormedAddCommGroup\nhe✝ : InnerProductSpace.toNormedSpace = NormedAlgebra.toNormedSpace'\ny : (fun x => F) x₀\n⊢ ↑(2 • ↑(innerSL ℝ) (↑T x₀)) y =\n ↑(ContinuousLinearMap.comp (fderivInnerClm ℝ (↑T x₀, id x₀))\n (ContinuousLinearMap.prod T (ContinuousLinearMap.id ℝ F)))\n y\n[PROOFSTEP]\nrw [ContinuousLinearMap.smul_apply, ContinuousLinearMap.comp_apply, fderivInnerClm_apply,\n ContinuousLinearMap.prod_apply, innerSL_apply, id.def, ContinuousLinearMap.id_apply, hT.apply_clm x₀ y,\n real_inner_comm _ x₀, two_smul]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\n⊢ ∃ a b, (a, b) ≠ 0 ∧ a • x₀ + b • ↑T x₀ = 0\n[PROOFSTEP]\nhave H : IsLocalExtrOn T.reApplyInnerSelf {x : F | ‖x‖ ^ 2 = ‖x₀‖ ^ 2} x₀ :=\n by\n convert hextr\n ext x\n simp [dist_eq_norm]\n -- find Lagrange multipliers for the function `T.re_apply_inner_self` and the\n -- hypersurface-defining function `λ x, ‖x‖ ^ 2`\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\n⊢ IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) {x | ‖x‖ ^ 2 = ‖x₀‖ ^ 2} x₀\n[PROOFSTEP]\nconvert hextr\n[GOAL]\ncase h.e'_6\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\n⊢ {x | ‖x‖ ^ 2 = ‖x₀‖ ^ 2} = sphere 0 ‖x₀‖\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_6.h\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nx : F\n⊢ x ∈ {x | ‖x‖ ^ 2 = ‖x₀‖ ^ 2} ↔ x ∈ sphere 0 ‖x₀‖\n[PROOFSTEP]\nsimp [dist_eq_norm]\n -- find Lagrange multipliers for the function `T.re_apply_inner_self` and the\n -- hypersurface-defining function `λ x, ‖x‖ ^ 2`\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nH : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) {x | ‖x‖ ^ 2 = ‖x₀‖ ^ 2} x₀\n⊢ ∃ a b, (a, b) ≠ 0 ∧ a • x₀ + b • ↑T x₀ = 0\n[PROOFSTEP]\nobtain ⟨a, b, h₁, h₂⟩ :=\n IsLocalExtrOn.exists_multipliers_of_hasStrictFDerivAt_1d H (hasStrictFDerivAt_norm_sq x₀)\n (hT.isSymmetric.hasStrictFDerivAt_reApplyInnerSelf x₀)\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nH : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) {x | ‖x‖ ^ 2 = ‖x₀‖ ^ 2} x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • 2 • ↑(innerSL ℝ) x₀ + b • 2 • ↑(innerSL ℝ) (↑T x₀) = 0\n⊢ ∃ a b, (a, b) ≠ 0 ∧ a • x₀ + b • ↑T x₀ = 0\n[PROOFSTEP]\nrefine' ⟨a, b, h₁, _⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nH : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) {x | ‖x‖ ^ 2 = ‖x₀‖ ^ 2} x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • 2 • ↑(innerSL ℝ) x₀ + b • 2 • ↑(innerSL ℝ) (↑T x₀) = 0\n⊢ a • x₀ + b • ↑T x₀ = 0\n[PROOFSTEP]\napply (InnerProductSpace.toDualMap ℝ F).injective\n[GOAL]\ncase intro.intro.intro.a\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nH : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) {x | ‖x‖ ^ 2 = ‖x₀‖ ^ 2} x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • 2 • ↑(innerSL ℝ) x₀ + b • 2 • ↑(innerSL ℝ) (↑T x₀) = 0\n⊢ ↑(InnerProductSpace.toDualMap ℝ F) (a • x₀ + b • ↑T x₀) = ↑(InnerProductSpace.toDualMap ℝ F) 0\n[PROOFSTEP]\nsimp only [LinearIsometry.map_add, LinearIsometry.map_smul, LinearIsometry.map_zero]\n[GOAL]\ncase intro.intro.intro.a\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nH : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) {x | ‖x‖ ^ 2 = ‖x₀‖ ^ 2} x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • 2 • ↑(innerSL ℝ) x₀ + b • 2 • ↑(innerSL ℝ) (↑T x₀) = 0\n⊢ ↑(InnerProductSpace.toDualMap ℝ F) (a • x₀) + ↑(InnerProductSpace.toDualMap ℝ F) (b • ↑T x₀) = 0\n[PROOFSTEP]\nsimp only [map_smulₛₗ, IsROrC.conj_to_real]\n[GOAL]\ncase intro.intro.intro.a\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nH : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) {x | ‖x‖ ^ 2 = ‖x₀‖ ^ 2} x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • 2 • ↑(innerSL ℝ) x₀ + b • 2 • ↑(innerSL ℝ) (↑T x₀) = 0\n⊢ a • ↑(InnerProductSpace.toDualMap ℝ F) x₀ + b • ↑(InnerProductSpace.toDualMap ℝ F) (↑T x₀) = 0\n[PROOFSTEP]\nchange a • innerSL ℝ x₀ + b • innerSL ℝ (T x₀) = 0\n[GOAL]\ncase intro.intro.intro.a\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nH : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) {x | ‖x‖ ^ 2 = ‖x₀‖ ^ 2} x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • 2 • ↑(innerSL ℝ) x₀ + b • 2 • ↑(innerSL ℝ) (↑T x₀) = 0\n⊢ a • ↑(innerSL ℝ) x₀ + b • ↑(innerSL ℝ) (↑T x₀) = 0\n[PROOFSTEP]\napply smul_right_injective (F →L[ℝ] ℝ) (two_ne_zero : (2 : ℝ) ≠ 0)\n[GOAL]\ncase intro.intro.intro.a.a\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nH : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) {x | ‖x‖ ^ 2 = ‖x₀‖ ^ 2} x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • 2 • ↑(innerSL ℝ) x₀ + b • 2 • ↑(innerSL ℝ) (↑T x₀) = 0\n⊢ (fun x x_1 => x • x_1) 2 (a • ↑(innerSL ℝ) x₀ + b • ↑(innerSL ℝ) (↑T x₀)) = (fun x x_1 => x • x_1) 2 0\n[PROOFSTEP]\nsimpa only [two_smul, smul_add, add_smul, add_zero] using h₂\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\n⊢ ↑T x₀ = ContinuousLinearMap.rayleighQuotient T x₀ • x₀\n[PROOFSTEP]\nobtain ⟨a, b, h₁, h₂⟩ := hT.linearly_dependent_of_isLocalExtrOn hextr\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\n⊢ ↑T x₀ = ContinuousLinearMap.rayleighQuotient T x₀ • x₀\n[PROOFSTEP]\nby_cases hx₀ : x₀ = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : x₀ = 0\n⊢ ↑T x₀ = ContinuousLinearMap.rayleighQuotient T x₀ • x₀\n[PROOFSTEP]\nsimp [hx₀]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : ¬x₀ = 0\n⊢ ↑T x₀ = ContinuousLinearMap.rayleighQuotient T x₀ • x₀\n[PROOFSTEP]\nby_cases hb : b = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : ¬x₀ = 0\nhb : b = 0\n⊢ ↑T x₀ = ContinuousLinearMap.rayleighQuotient T x₀ • x₀\n[PROOFSTEP]\nhave : a ≠ 0 := by simpa [hb] using h₁\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : ¬x₀ = 0\nhb : b = 0\n⊢ a ≠ 0\n[PROOFSTEP]\nsimpa [hb] using h₁\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : ¬x₀ = 0\nhb : b = 0\nthis : a ≠ 0\n⊢ ↑T x₀ = ContinuousLinearMap.rayleighQuotient T x₀ • x₀\n[PROOFSTEP]\nrefine' absurd _ hx₀\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : ¬x₀ = 0\nhb : b = 0\nthis : a ≠ 0\n⊢ x₀ = 0\n[PROOFSTEP]\napply smul_right_injective F this\n[GOAL]\ncase pos.a\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : ¬x₀ = 0\nhb : b = 0\nthis : a ≠ 0\n⊢ (fun x x_1 => x • x_1) a x₀ = (fun x x_1 => x • x_1) a 0\n[PROOFSTEP]\nsimpa [hb] using h₂\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : ¬x₀ = 0\nhb : ¬b = 0\n⊢ ↑T x₀ = ContinuousLinearMap.rayleighQuotient T x₀ • x₀\n[PROOFSTEP]\nlet c : ℝ := -b⁻¹ * a\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : ¬x₀ = 0\nhb : ¬b = 0\nc : ℝ := -b⁻¹ * a\n⊢ ↑T x₀ = ContinuousLinearMap.rayleighQuotient T x₀ • x₀\n[PROOFSTEP]\nhave hc : T x₀ = c • x₀ := by\n have : b * (b⁻¹ * a) = a := by field_simp [mul_comm]\n apply smul_right_injective F hb\n simp [eq_neg_of_add_eq_zero_left h₂, ← mul_smul, this]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : ¬x₀ = 0\nhb : ¬b = 0\nc : ℝ := -b⁻¹ * a\n⊢ ↑T x₀ = c • x₀\n[PROOFSTEP]\nhave : b * (b⁻¹ * a) = a := by field_simp [mul_comm]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : ¬x₀ = 0\nhb : ¬b = 0\nc : ℝ := -b⁻¹ * a\n⊢ b * (b⁻¹ * a) = a\n[PROOFSTEP]\nfield_simp [mul_comm]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : ¬x₀ = 0\nhb : ¬b = 0\nc : ℝ := -b⁻¹ * a\nthis : b * (b⁻¹ * a) = a\n⊢ ↑T x₀ = c • x₀\n[PROOFSTEP]\napply smul_right_injective F hb\n[GOAL]\ncase a\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : ¬x₀ = 0\nhb : ¬b = 0\nc : ℝ := -b⁻¹ * a\nthis : b * (b⁻¹ * a) = a\n⊢ (fun x x_1 => x • x_1) b (↑T x₀) = (fun x x_1 => x • x_1) b (c • x₀)\n[PROOFSTEP]\nsimp [eq_neg_of_add_eq_zero_left h₂, ← mul_smul, this]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : ¬x₀ = 0\nhb : ¬b = 0\nc : ℝ := -b⁻¹ * a\nhc : ↑T x₀ = c • x₀\n⊢ ↑T x₀ = ContinuousLinearMap.rayleighQuotient T x₀ • x₀\n[PROOFSTEP]\nconvert hc\n[GOAL]\ncase h.e'_3.h.e'_5\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : ¬x₀ = 0\nhb : ¬b = 0\nc : ℝ := -b⁻¹ * a\nhc : ↑T x₀ = c • x₀\n⊢ ContinuousLinearMap.rayleighQuotient T x₀ = c\n[PROOFSTEP]\nhave : ‖x₀‖ ≠ 0 := by simp [hx₀]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : ¬x₀ = 0\nhb : ¬b = 0\nc : ℝ := -b⁻¹ * a\nhc : ↑T x₀ = c • x₀\n⊢ ‖x₀‖ ≠ 0\n[PROOFSTEP]\nsimp [hx₀]\n[GOAL]\ncase h.e'_3.h.e'_5\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : ¬x₀ = 0\nhb : ¬b = 0\nc : ℝ := -b⁻¹ * a\nhc : ↑T x₀ = c • x₀\nthis : ‖x₀‖ ≠ 0\n⊢ ContinuousLinearMap.rayleighQuotient T x₀ = c\n[PROOFSTEP]\nhave := congr_arg (fun x => ⟪x, x₀⟫_ℝ) hc\n[GOAL]\ncase h.e'_3.h.e'_5\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : ¬x₀ = 0\nhb : ¬b = 0\nc : ℝ := -b⁻¹ * a\nhc : ↑T x₀ = c • x₀\nthis✝ : ‖x₀‖ ≠ 0\nthis : (fun x => inner x x₀) (↑T x₀) = (fun x => inner x x₀) (c • x₀)\n⊢ ContinuousLinearMap.rayleighQuotient T x₀ = c\n[PROOFSTEP]\nfield_simp [inner_smul_left, real_inner_self_eq_norm_mul_norm, sq] at this ⊢\n[GOAL]\ncase h.e'_3.h.e'_5\n𝕜 : Type u_1\ninst✝⁵ : IsROrC 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ninst✝ : CompleteSpace F\nT : F →L[ℝ] F\nhT : IsSelfAdjoint T\nx₀ : F\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\na b : ℝ\nh₁ : (a, b) ≠ 0\nh₂ : a • x₀ + b • ↑T x₀ = 0\nhx₀ : ¬x₀ = 0\nhb : ¬b = 0\nc : ℝ := -b⁻¹ * a\nhc : ↑T x₀ = c • x₀\nthis✝ : ‖x₀‖ ≠ 0\nthis : inner (↑T x₀) x₀ * b = -(a * (‖x₀‖ * ‖x₀‖))\n⊢ ContinuousLinearMap.reApplyInnerSelf T x₀ * b = -(a * (‖x₀‖ * ‖x₀‖))\n[PROOFSTEP]\nexact this\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\n⊢ ↑T x₀ = ↑(ContinuousLinearMap.rayleighQuotient T x₀) • x₀\n[PROOFSTEP]\nletI := InnerProductSpace.isROrCToReal 𝕜 E\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nthis : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\n⊢ ↑T x₀ = ↑(ContinuousLinearMap.rayleighQuotient T x₀) • x₀\n[PROOFSTEP]\nlet hSA := hT.isSymmetric.restrictScalars.toSelfAdjoint.prop\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nthis : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nhSA : ↑(LinearMap.IsSymmetric.toSelfAdjoint (_ : LinearMap.IsSymmetric (↑ℝ ↑T))) ∈ selfAdjoint (E →L[ℝ] E) :=\n Subtype.prop (LinearMap.IsSymmetric.toSelfAdjoint (LinearMap.IsSymmetric.restrictScalars (isSymmetric hT)))\n⊢ ↑T x₀ = ↑(ContinuousLinearMap.rayleighQuotient T x₀) • x₀\n[PROOFSTEP]\nexact hSA.eq_smul_self_of_isLocalExtrOn_real hextr\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\n⊢ HasEigenvector (↑T) (↑(ContinuousLinearMap.rayleighQuotient T x₀)) x₀\n[PROOFSTEP]\nrefine' ⟨_, hx₀⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\n⊢ x₀ ∈ eigenspace ↑T ↑(ContinuousLinearMap.rayleighQuotient T x₀)\n[PROOFSTEP]\nrw [Module.End.mem_eigenspace_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsLocalExtrOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\n⊢ ↑↑T x₀ = ↑(ContinuousLinearMap.rayleighQuotient T x₀) • x₀\n[PROOFSTEP]\nexact hT.eq_smul_self_of_isLocalExtrOn hextr\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\n⊢ HasEigenvector (↑T) (↑(⨆ (x : { x // x ≠ 0 }), ContinuousLinearMap.rayleighQuotient T ↑x)) x₀\n[PROOFSTEP]\nconvert hT.hasEigenvector_of_isLocalExtrOn hx₀ (Or.inr hextr.localize)\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\n⊢ ⨆ (x : { x // x ≠ 0 }), ContinuousLinearMap.rayleighQuotient T ↑x = ContinuousLinearMap.rayleighQuotient T x₀\n[PROOFSTEP]\nhave hx₀' : 0 < ‖x₀‖ := by simp [hx₀]\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\n⊢ 0 < ‖x₀‖\n[PROOFSTEP]\nsimp [hx₀]\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\n⊢ ⨆ (x : { x // x ≠ 0 }), ContinuousLinearMap.rayleighQuotient T ↑x = ContinuousLinearMap.rayleighQuotient T x₀\n[PROOFSTEP]\nhave hx₀'' : x₀ ∈ sphere (0 : E) ‖x₀‖ := by simp\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\n⊢ x₀ ∈ sphere 0 ‖x₀‖\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\n⊢ ⨆ (x : { x // x ≠ 0 }), ContinuousLinearMap.rayleighQuotient T ↑x = ContinuousLinearMap.rayleighQuotient T x₀\n[PROOFSTEP]\nrw [T.iSup_rayleigh_eq_iSup_rayleigh_sphere hx₀']\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\n⊢ ⨆ (x : ↑(sphere 0 ‖x₀‖)), ContinuousLinearMap.rayleighQuotient T ↑x = ContinuousLinearMap.rayleighQuotient T x₀\n[PROOFSTEP]\nrefine' IsMaxOn.iSup_eq hx₀'' _\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\n⊢ IsMaxOn (ContinuousLinearMap.rayleighQuotient T) (sphere 0 ‖x₀‖) x₀\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\nx : E\nhx : x ∈ sphere 0 ‖x₀‖\n⊢ x ∈ {x | (fun x => ContinuousLinearMap.rayleighQuotient T x ≤ ContinuousLinearMap.rayleighQuotient T x₀) x}\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\nx : E\nhx : x ∈ sphere 0 ‖x₀‖\n⊢ ContinuousLinearMap.rayleighQuotient T x ≤ ContinuousLinearMap.rayleighQuotient T x₀\n[PROOFSTEP]\nhave : ‖x‖ = ‖x₀‖ := by simpa using hx\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\nx : E\nhx : x ∈ sphere 0 ‖x₀‖\n⊢ ‖x‖ = ‖x₀‖\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\nx : E\nhx : x ∈ sphere 0 ‖x₀‖\nthis : ‖x‖ = ‖x₀‖\n⊢ ContinuousLinearMap.rayleighQuotient T x ≤ ContinuousLinearMap.rayleighQuotient T x₀\n[PROOFSTEP]\nsimp only [ContinuousLinearMap.rayleighQuotient]\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\nx : E\nhx : x ∈ sphere 0 ‖x₀‖\nthis : ‖x‖ = ‖x₀‖\n⊢ ContinuousLinearMap.reApplyInnerSelf T x / ‖x‖ ^ 2 ≤ ContinuousLinearMap.reApplyInnerSelf T x₀ / ‖x₀‖ ^ 2\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\nx : E\nhx : x ∈ sphere 0 ‖x₀‖\nthis : ‖x‖ = ‖x₀‖\n⊢ ContinuousLinearMap.reApplyInnerSelf T x / ‖x₀‖ ^ 2 ≤ ContinuousLinearMap.reApplyInnerSelf T x₀ / ‖x₀‖ ^ 2\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.e'_7.h.e'_3.h\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\nx : E\nhx : x ∈ sphere 0 ‖x₀‖\nthis : ‖x‖ = ‖x₀‖\n⊢ ContinuousLinearMap.reApplyInnerSelf T x ≤ ContinuousLinearMap.reApplyInnerSelf T x₀\n[PROOFSTEP]\nexact hextr hx\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMinOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\n⊢ HasEigenvector (↑T) (↑(⨅ (x : { x // x ≠ 0 }), ContinuousLinearMap.rayleighQuotient T ↑x)) x₀\n[PROOFSTEP]\nconvert hT.hasEigenvector_of_isLocalExtrOn hx₀ (Or.inl hextr.localize)\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMinOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\n⊢ ⨅ (x : { x // x ≠ 0 }), ContinuousLinearMap.rayleighQuotient T ↑x = ContinuousLinearMap.rayleighQuotient T x₀\n[PROOFSTEP]\nhave hx₀' : 0 < ‖x₀‖ := by simp [hx₀]\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMinOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\n⊢ 0 < ‖x₀‖\n[PROOFSTEP]\nsimp [hx₀]\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMinOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\n⊢ ⨅ (x : { x // x ≠ 0 }), ContinuousLinearMap.rayleighQuotient T ↑x = ContinuousLinearMap.rayleighQuotient T x₀\n[PROOFSTEP]\nhave hx₀'' : x₀ ∈ sphere (0 : E) ‖x₀‖ := by simp\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMinOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\n⊢ x₀ ∈ sphere 0 ‖x₀‖\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMinOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\n⊢ ⨅ (x : { x // x ≠ 0 }), ContinuousLinearMap.rayleighQuotient T ↑x = ContinuousLinearMap.rayleighQuotient T x₀\n[PROOFSTEP]\nrw [T.iInf_rayleigh_eq_iInf_rayleigh_sphere hx₀']\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMinOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\n⊢ ⨅ (x : ↑(sphere 0 ‖x₀‖)), ContinuousLinearMap.rayleighQuotient T ↑x = ContinuousLinearMap.rayleighQuotient T x₀\n[PROOFSTEP]\nrefine' IsMinOn.iInf_eq hx₀'' _\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMinOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\n⊢ IsMinOn (ContinuousLinearMap.rayleighQuotient T) (sphere 0 ‖x₀‖) x₀\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMinOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\nx : E\nhx : x ∈ sphere 0 ‖x₀‖\n⊢ x ∈ {x | (fun x => ContinuousLinearMap.rayleighQuotient T x₀ ≤ ContinuousLinearMap.rayleighQuotient T x) x}\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMinOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\nx : E\nhx : x ∈ sphere 0 ‖x₀‖\n⊢ ContinuousLinearMap.rayleighQuotient T x₀ ≤ ContinuousLinearMap.rayleighQuotient T x\n[PROOFSTEP]\nhave : ‖x‖ = ‖x₀‖ := by simpa using hx\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMinOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\nx : E\nhx : x ∈ sphere 0 ‖x₀‖\n⊢ ‖x‖ = ‖x₀‖\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMinOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\nx : E\nhx : x ∈ sphere 0 ‖x₀‖\nthis : ‖x‖ = ‖x₀‖\n⊢ ContinuousLinearMap.rayleighQuotient T x₀ ≤ ContinuousLinearMap.rayleighQuotient T x\n[PROOFSTEP]\nsimp only [ContinuousLinearMap.rayleighQuotient]\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMinOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\nx : E\nhx : x ∈ sphere 0 ‖x₀‖\nthis : ‖x‖ = ‖x₀‖\n⊢ ContinuousLinearMap.reApplyInnerSelf T x₀ / ‖x₀‖ ^ 2 ≤ ContinuousLinearMap.reApplyInnerSelf T x / ‖x‖ ^ 2\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase h.e'_7.h.e'_3\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMinOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\nx : E\nhx : x ∈ sphere 0 ‖x₀‖\nthis : ‖x‖ = ‖x₀‖\n⊢ ContinuousLinearMap.reApplyInnerSelf T x₀ / ‖x₀‖ ^ 2 ≤ ContinuousLinearMap.reApplyInnerSelf T x / ‖x₀‖ ^ 2\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.e'_7.h.e'_3.h\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : CompleteSpace E\nT : E →L[𝕜] E\nhT : IsSelfAdjoint T\nx₀ : E\nhx₀ : x₀ ≠ 0\nhextr : IsMinOn (ContinuousLinearMap.reApplyInnerSelf T) (sphere 0 ‖x₀‖) x₀\nhx₀' : 0 < ‖x₀‖\nhx₀'' : x₀ ∈ sphere 0 ‖x₀‖\nx : E\nhx : x ∈ sphere 0 ‖x₀‖\nthis : ‖x‖ = ‖x₀‖\n⊢ ContinuousLinearMap.reApplyInnerSelf T x₀ ≤ ContinuousLinearMap.reApplyInnerSelf T x\n[PROOFSTEP]\nexact hextr hx\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\n⊢ HasEigenvalue T ↑(⨆ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nhaveI := FiniteDimensional.proper_isROrC 𝕜 E\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\n⊢ HasEigenvalue T ↑(⨆ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nlet T' := hT.toSelfAdjoint\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\n⊢ HasEigenvalue T ↑(⨆ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nobtain ⟨x, hx⟩ : ∃ x : E, x ≠ 0 := exists_ne 0\n[GOAL]\ncase intro\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\n⊢ HasEigenvalue T ↑(⨆ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nhave H₁ : IsCompact (sphere (0 : E) ‖x‖) := isCompact_sphere _ _\n[GOAL]\ncase intro\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\n⊢ HasEigenvalue T ↑(⨆ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nhave H₂ : (sphere (0 : E) ‖x‖).Nonempty :=\n ⟨x, by simp⟩\n -- key point: in finite dimension, a continuous function on the sphere has a max\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\n⊢ x ∈ sphere 0 ‖x‖\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\n⊢ HasEigenvalue T ↑(⨆ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nobtain ⟨x₀, hx₀', hTx₀⟩ := H₁.exists_forall_ge H₂ T'.val.reApplyInnerSelf_continuous.continuousOn\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\nx₀ : E\nhx₀' : x₀ ∈ sphere 0 ‖x‖\nhTx₀ :\n ∀ (y : E),\n y ∈ sphere 0 ‖x‖ → ContinuousLinearMap.reApplyInnerSelf (↑T') y ≤ ContinuousLinearMap.reApplyInnerSelf (↑T') x₀\n⊢ HasEigenvalue T ↑(⨆ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nhave hx₀ : ‖x₀‖ = ‖x‖ := by simpa using hx₀'\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\nx₀ : E\nhx₀' : x₀ ∈ sphere 0 ‖x‖\nhTx₀ :\n ∀ (y : E),\n y ∈ sphere 0 ‖x‖ → ContinuousLinearMap.reApplyInnerSelf (↑T') y ≤ ContinuousLinearMap.reApplyInnerSelf (↑T') x₀\n⊢ ‖x₀‖ = ‖x‖\n[PROOFSTEP]\nsimpa using hx₀'\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\nx₀ : E\nhx₀' : x₀ ∈ sphere 0 ‖x‖\nhTx₀ :\n ∀ (y : E),\n y ∈ sphere 0 ‖x‖ → ContinuousLinearMap.reApplyInnerSelf (↑T') y ≤ ContinuousLinearMap.reApplyInnerSelf (↑T') x₀\nhx₀ : ‖x₀‖ = ‖x‖\n⊢ HasEigenvalue T ↑(⨆ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nhave : IsMaxOn T'.val.reApplyInnerSelf (sphere 0 ‖x₀‖) x₀ := by simpa only [← hx₀] using hTx₀\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\nx₀ : E\nhx₀' : x₀ ∈ sphere 0 ‖x‖\nhTx₀ :\n ∀ (y : E),\n y ∈ sphere 0 ‖x‖ → ContinuousLinearMap.reApplyInnerSelf (↑T') y ≤ ContinuousLinearMap.reApplyInnerSelf (↑T') x₀\nhx₀ : ‖x₀‖ = ‖x‖\n⊢ IsMaxOn (ContinuousLinearMap.reApplyInnerSelf ↑T') (sphere 0 ‖x₀‖) x₀\n[PROOFSTEP]\nsimpa only [← hx₀] using hTx₀\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis✝ : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\nx₀ : E\nhx₀' : x₀ ∈ sphere 0 ‖x‖\nhTx₀ :\n ∀ (y : E),\n y ∈ sphere 0 ‖x‖ → ContinuousLinearMap.reApplyInnerSelf (↑T') y ≤ ContinuousLinearMap.reApplyInnerSelf (↑T') x₀\nhx₀ : ‖x₀‖ = ‖x‖\nthis : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf ↑T') (sphere 0 ‖x₀‖) x₀\n⊢ HasEigenvalue T ↑(⨆ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nhave hx₀_ne : x₀ ≠ 0 :=\n by\n have : ‖x₀‖ ≠ 0 := by simp only [hx₀, norm_eq_zero, hx, Ne.def, not_false_iff]\n simpa [← norm_eq_zero, Ne.def]\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis✝ : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\nx₀ : E\nhx₀' : x₀ ∈ sphere 0 ‖x‖\nhTx₀ :\n ∀ (y : E),\n y ∈ sphere 0 ‖x‖ → ContinuousLinearMap.reApplyInnerSelf (↑T') y ≤ ContinuousLinearMap.reApplyInnerSelf (↑T') x₀\nhx₀ : ‖x₀‖ = ‖x‖\nthis : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf ↑T') (sphere 0 ‖x₀‖) x₀\n⊢ x₀ ≠ 0\n[PROOFSTEP]\nhave : ‖x₀‖ ≠ 0 := by simp only [hx₀, norm_eq_zero, hx, Ne.def, not_false_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis✝ : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\nx₀ : E\nhx₀' : x₀ ∈ sphere 0 ‖x‖\nhTx₀ :\n ∀ (y : E),\n y ∈ sphere 0 ‖x‖ → ContinuousLinearMap.reApplyInnerSelf (↑T') y ≤ ContinuousLinearMap.reApplyInnerSelf (↑T') x₀\nhx₀ : ‖x₀‖ = ‖x‖\nthis : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf ↑T') (sphere 0 ‖x₀‖) x₀\n⊢ ‖x₀‖ ≠ 0\n[PROOFSTEP]\nsimp only [hx₀, norm_eq_zero, hx, Ne.def, not_false_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis✝¹ : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\nx₀ : E\nhx₀' : x₀ ∈ sphere 0 ‖x‖\nhTx₀ :\n ∀ (y : E),\n y ∈ sphere 0 ‖x‖ → ContinuousLinearMap.reApplyInnerSelf (↑T') y ≤ ContinuousLinearMap.reApplyInnerSelf (↑T') x₀\nhx₀ : ‖x₀‖ = ‖x‖\nthis✝ : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf ↑T') (sphere 0 ‖x₀‖) x₀\nthis : ‖x₀‖ ≠ 0\n⊢ x₀ ≠ 0\n[PROOFSTEP]\nsimpa [← norm_eq_zero, Ne.def]\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis✝ : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\nx₀ : E\nhx₀' : x₀ ∈ sphere 0 ‖x‖\nhTx₀ :\n ∀ (y : E),\n y ∈ sphere 0 ‖x‖ → ContinuousLinearMap.reApplyInnerSelf (↑T') y ≤ ContinuousLinearMap.reApplyInnerSelf (↑T') x₀\nhx₀ : ‖x₀‖ = ‖x‖\nthis : IsMaxOn (ContinuousLinearMap.reApplyInnerSelf ↑T') (sphere 0 ‖x₀‖) x₀\nhx₀_ne : x₀ ≠ 0\n⊢ HasEigenvalue T ↑(⨆ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nexact hasEigenvalue_of_hasEigenvector (T'.prop.hasEigenvector_of_isMaxOn hx₀_ne this)\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\n⊢ HasEigenvalue T ↑(⨅ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nhaveI := FiniteDimensional.proper_isROrC 𝕜 E\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\n⊢ HasEigenvalue T ↑(⨅ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nlet T' := hT.toSelfAdjoint\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\n⊢ HasEigenvalue T ↑(⨅ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nobtain ⟨x, hx⟩ : ∃ x : E, x ≠ 0 := exists_ne 0\n[GOAL]\ncase intro\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\n⊢ HasEigenvalue T ↑(⨅ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nhave H₁ : IsCompact (sphere (0 : E) ‖x‖) := isCompact_sphere _ _\n[GOAL]\ncase intro\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\n⊢ HasEigenvalue T ↑(⨅ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nhave H₂ : (sphere (0 : E) ‖x‖).Nonempty :=\n ⟨x, by simp⟩\n -- key point: in finite dimension, a continuous function on the sphere has a min\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\n⊢ x ∈ sphere 0 ‖x‖\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\n⊢ HasEigenvalue T ↑(⨅ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nobtain ⟨x₀, hx₀', hTx₀⟩ := H₁.exists_forall_le H₂ T'.val.reApplyInnerSelf_continuous.continuousOn\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\nx₀ : E\nhx₀' : x₀ ∈ sphere 0 ‖x‖\nhTx₀ :\n ∀ (y : E),\n y ∈ sphere 0 ‖x‖ → ContinuousLinearMap.reApplyInnerSelf (↑T') x₀ ≤ ContinuousLinearMap.reApplyInnerSelf (↑T') y\n⊢ HasEigenvalue T ↑(⨅ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nhave hx₀ : ‖x₀‖ = ‖x‖ := by simpa using hx₀'\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\nx₀ : E\nhx₀' : x₀ ∈ sphere 0 ‖x‖\nhTx₀ :\n ∀ (y : E),\n y ∈ sphere 0 ‖x‖ → ContinuousLinearMap.reApplyInnerSelf (↑T') x₀ ≤ ContinuousLinearMap.reApplyInnerSelf (↑T') y\n⊢ ‖x₀‖ = ‖x‖\n[PROOFSTEP]\nsimpa using hx₀'\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\nx₀ : E\nhx₀' : x₀ ∈ sphere 0 ‖x‖\nhTx₀ :\n ∀ (y : E),\n y ∈ sphere 0 ‖x‖ → ContinuousLinearMap.reApplyInnerSelf (↑T') x₀ ≤ ContinuousLinearMap.reApplyInnerSelf (↑T') y\nhx₀ : ‖x₀‖ = ‖x‖\n⊢ HasEigenvalue T ↑(⨅ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nhave : IsMinOn T'.val.reApplyInnerSelf (sphere 0 ‖x₀‖) x₀ := by simpa only [← hx₀] using hTx₀\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\nx₀ : E\nhx₀' : x₀ ∈ sphere 0 ‖x‖\nhTx₀ :\n ∀ (y : E),\n y ∈ sphere 0 ‖x‖ → ContinuousLinearMap.reApplyInnerSelf (↑T') x₀ ≤ ContinuousLinearMap.reApplyInnerSelf (↑T') y\nhx₀ : ‖x₀‖ = ‖x‖\n⊢ IsMinOn (ContinuousLinearMap.reApplyInnerSelf ↑T') (sphere 0 ‖x₀‖) x₀\n[PROOFSTEP]\nsimpa only [← hx₀] using hTx₀\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis✝ : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\nx₀ : E\nhx₀' : x₀ ∈ sphere 0 ‖x‖\nhTx₀ :\n ∀ (y : E),\n y ∈ sphere 0 ‖x‖ → ContinuousLinearMap.reApplyInnerSelf (↑T') x₀ ≤ ContinuousLinearMap.reApplyInnerSelf (↑T') y\nhx₀ : ‖x₀‖ = ‖x‖\nthis : IsMinOn (ContinuousLinearMap.reApplyInnerSelf ↑T') (sphere 0 ‖x₀‖) x₀\n⊢ HasEigenvalue T ↑(⨅ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nhave hx₀_ne : x₀ ≠ 0 :=\n by\n have : ‖x₀‖ ≠ 0 := by simp only [hx₀, norm_eq_zero, hx, Ne.def, not_false_iff]\n simpa [← norm_eq_zero, Ne.def]\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis✝ : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\nx₀ : E\nhx₀' : x₀ ∈ sphere 0 ‖x‖\nhTx₀ :\n ∀ (y : E),\n y ∈ sphere 0 ‖x‖ → ContinuousLinearMap.reApplyInnerSelf (↑T') x₀ ≤ ContinuousLinearMap.reApplyInnerSelf (↑T') y\nhx₀ : ‖x₀‖ = ‖x‖\nthis : IsMinOn (ContinuousLinearMap.reApplyInnerSelf ↑T') (sphere 0 ‖x₀‖) x₀\n⊢ x₀ ≠ 0\n[PROOFSTEP]\nhave : ‖x₀‖ ≠ 0 := by simp only [hx₀, norm_eq_zero, hx, Ne.def, not_false_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis✝ : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\nx₀ : E\nhx₀' : x₀ ∈ sphere 0 ‖x‖\nhTx₀ :\n ∀ (y : E),\n y ∈ sphere 0 ‖x‖ → ContinuousLinearMap.reApplyInnerSelf (↑T') x₀ ≤ ContinuousLinearMap.reApplyInnerSelf (↑T') y\nhx₀ : ‖x₀‖ = ‖x‖\nthis : IsMinOn (ContinuousLinearMap.reApplyInnerSelf ↑T') (sphere 0 ‖x₀‖) x₀\n⊢ ‖x₀‖ ≠ 0\n[PROOFSTEP]\nsimp only [hx₀, norm_eq_zero, hx, Ne.def, not_false_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis✝¹ : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\nx₀ : E\nhx₀' : x₀ ∈ sphere 0 ‖x‖\nhTx₀ :\n ∀ (y : E),\n y ∈ sphere 0 ‖x‖ → ContinuousLinearMap.reApplyInnerSelf (↑T') x₀ ≤ ContinuousLinearMap.reApplyInnerSelf (↑T') y\nhx₀ : ‖x₀‖ = ‖x‖\nthis✝ : IsMinOn (ContinuousLinearMap.reApplyInnerSelf ↑T') (sphere 0 ‖x₀‖) x₀\nthis : ‖x₀‖ ≠ 0\n⊢ x₀ ≠ 0\n[PROOFSTEP]\nsimpa [← norm_eq_zero, Ne.def]\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝³ : IsROrC 𝕜\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n_i : Nontrivial E\nT : E →ₗ[𝕜] E\nhT : IsSymmetric T\nthis✝ : ProperSpace E\nT' : { x // x ∈ selfAdjoint (E →L[𝕜] E) } := toSelfAdjoint hT\nx : E\nhx : x ≠ 0\nH₁ : IsCompact (sphere 0 ‖x‖)\nH₂ : Set.Nonempty (sphere 0 ‖x‖)\nx₀ : E\nhx₀' : x₀ ∈ sphere 0 ‖x‖\nhTx₀ :\n ∀ (y : E),\n y ∈ sphere 0 ‖x‖ → ContinuousLinearMap.reApplyInnerSelf (↑T') x₀ ≤ ContinuousLinearMap.reApplyInnerSelf (↑T') y\nhx₀ : ‖x₀‖ = ‖x‖\nthis : IsMinOn (ContinuousLinearMap.reApplyInnerSelf ↑T') (sphere 0 ‖x₀‖) x₀\nhx₀_ne : x₀ ≠ 0\n⊢ HasEigenvalue T ↑(⨅ (x : { x // x ≠ 0 }), ↑IsROrC.re (inner (↑T ↑x) ↑x) / ‖↑x‖ ^ 2)\n[PROOFSTEP]\nexact hasEigenvalue_of_hasEigenvector (T'.prop.hasEigenvector_of_isMinOn hx₀_ne this)\n", "meta": {"mathlib_filename": "Mathlib.Analysis.InnerProductSpace.Rayleigh", "llama_tokens": 32942, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8031737963569016, "lm_q2_score": 0.7154240079185319, "lm_q1q2_score": 0.5746098164447973}} {"text": "[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf✝ : R →+* S\nx✝ : S\nf : R →+* S\nx : S\n⊢ eval₂ f x p = sum p fun e a => ↑f a * x ^ e\n[PROOFSTEP]\nrw [eval₂_def]\n[GOAL]\nR✝ : Type u\nS✝ : Type v\nT : Type w\nι : Type y\na b : R✝\nm n : ℕ\ninst✝³ : Semiring R✝\np q r : R✝[X]\ninst✝² : Semiring S✝\nf✝ : R✝ →+* S✝\nx : S✝\nR : Type u_1\nS : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nf g : R →+* S\ns t : S\nφ ψ : R[X]\n⊢ f = g → s = t → φ = ψ → eval₂ f s φ = eval₂ g t ψ\n[PROOFSTEP]\nrintro rfl rfl rfl\n[GOAL]\nR✝ : Type u\nS✝ : Type v\nT : Type w\nι : Type y\na b : R✝\nm n : ℕ\ninst✝³ : Semiring R✝\np q r : R✝[X]\ninst✝² : Semiring S✝\nf✝ : R✝ →+* S✝\nx : S✝\nR : Type u_1\nS : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nf : R →+* S\ns : S\nφ : R[X]\n⊢ eval₂ f s φ = eval₂ f s φ\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\n⊢ eval₂ f 0 p = ↑f (coeff p 0)\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [eval₂_eq_sum, zero_pow_eq, mul_ite, mul_zero, mul_one, sum,\n Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff, RingHom.map_zero, imp_true_iff, eq_self_iff_true]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\n⊢ eval₂ f x 0 = 0\n[PROOFSTEP]\nsimp [eval₂_eq_sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\n⊢ eval₂ f x (↑C a) = ↑f a\n[PROOFSTEP]\nsimp [eval₂_eq_sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\n⊢ eval₂ f x X = x\n[PROOFSTEP]\nsimp [eval₂_eq_sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r✝ : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\nn : ℕ\nr : R\n⊢ eval₂ f x (↑(monomial n) r) = ↑f r * x ^ n\n[PROOFSTEP]\nsimp [eval₂_eq_sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\nn : ℕ\n⊢ eval₂ f x (X ^ n) = x ^ n\n[PROOFSTEP]\nrw [X_pow_eq_monomial]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\nn : ℕ\n⊢ eval₂ f x (↑(monomial n) 1) = x ^ n\n[PROOFSTEP]\nconvert eval₂_monomial f x (n := n) (r := 1)\n[GOAL]\ncase h.e'_3\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\nn : ℕ\n⊢ x ^ n = ↑f 1 * x ^ n\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\n⊢ eval₂ f x (p + q) = eval₂ f x p + eval₂ f x q\n[PROOFSTEP]\nsimp only [eval₂_eq_sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\n⊢ (sum (p + q) fun e a => ↑f a * x ^ e) = (sum p fun e a => ↑f a * x ^ e) + sum q fun e a => ↑f a * x ^ e\n[PROOFSTEP]\napply sum_add_index\n[GOAL]\ncase hf\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\n⊢ ∀ (i : ℕ), ↑f 0 * x ^ i = 0\n[PROOFSTEP]\nsimp [add_mul]\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\n⊢ ∀ (a : ℕ) (b₁ b₂ : R), ↑f (b₁ + b₂) * x ^ a = ↑f b₁ * x ^ a + ↑f b₂ * x ^ a\n[PROOFSTEP]\nsimp [add_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\n⊢ eval₂ f x 1 = 1\n[PROOFSTEP]\nrw [← C_1, eval₂_C, f.map_one]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\n⊢ eval₂ f x (bit0 p) = bit0 (eval₂ f x p)\n[PROOFSTEP]\nrw [bit0, eval₂_add, bit0]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\n⊢ eval₂ f x (bit1 p) = bit1 (eval₂ f x p)\n[PROOFSTEP]\nrw [bit1, eval₂_add, eval₂_bit0, eval₂_one, bit1]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx✝ : S\ng : R →+* S\np : R[X]\nx : S\ns : R\n⊢ eval₂ g x (s • p) = ↑g s * eval₂ g x p\n[PROOFSTEP]\nhave A : p.natDegree < p.natDegree.succ := Nat.lt_succ_self _\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx✝ : S\ng : R →+* S\np : R[X]\nx : S\ns : R\nA : natDegree p < Nat.succ (natDegree p)\n⊢ eval₂ g x (s • p) = ↑g s * eval₂ g x p\n[PROOFSTEP]\nhave B : (s • p).natDegree < p.natDegree.succ := (natDegree_smul_le _ _).trans_lt A\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx✝ : S\ng : R →+* S\np : R[X]\nx : S\ns : R\nA : natDegree p < Nat.succ (natDegree p)\nB : natDegree (s • p) < Nat.succ (natDegree p)\n⊢ eval₂ g x (s • p) = ↑g s * eval₂ g x p\n[PROOFSTEP]\nrw [eval₂_eq_sum, eval₂_eq_sum, sum_over_range' _ _ _ A, sum_over_range' _ _ _ B]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx✝ : S\ng : R →+* S\np : R[X]\nx : S\ns : R\nA : natDegree p < Nat.succ (natDegree p)\nB : natDegree (s • p) < Nat.succ (natDegree p)\n⊢ ∑ a in range (Nat.succ (natDegree p)), ↑g (coeff (s • p) a) * x ^ a =\n ↑g s * ∑ a in range (Nat.succ (natDegree p)), ↑g (coeff p a) * x ^ a\n[PROOFSTEP]\nsimp [mul_sum, mul_assoc]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx✝ : S\ng : R →+* S\np : R[X]\nx : S\ns : R\nA : natDegree p < Nat.succ (natDegree p)\nB : natDegree (s • p) < Nat.succ (natDegree p)\n⊢ ∀ (n : ℕ), ↑g 0 * x ^ n = 0\n[PROOFSTEP]\nsimp [mul_sum, mul_assoc]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx✝ : S\ng : R →+* S\np : R[X]\nx : S\ns : R\nA : natDegree p < Nat.succ (natDegree p)\nB : natDegree (s • p) < Nat.succ (natDegree p)\n⊢ ∀ (n : ℕ), ↑g 0 * x ^ n = 0\n[PROOFSTEP]\nsimp [mul_sum, mul_assoc]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q✝ r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\np q : R[X]\nhp : eval₂ C X p = p\nhq : eval₂ C X q = q\n⊢ eval₂ C X (p + q) = p + q\n[PROOFSTEP]\nsimp [hp, hq]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx✝ : S\nn : ℕ\nx : R\n⊢ eval₂ C X (↑(monomial n) x) = ↑(monomial n) x\n[PROOFSTEP]\nrw [eval₂_monomial, ← smul_X_eq_monomial, C_mul']\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\nn : ℕ\n⊢ eval₂ f x ↑n = ↑n\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\n⊢ eval₂ f x ↑Nat.zero = ↑Nat.zero\n[PROOFSTEP]\nsimp only [eval₂_zero, Nat.cast_zero, Nat.zero_eq]\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\nn : ℕ\nih : eval₂ f x ↑n = ↑n\n⊢ eval₂ f x ↑(Nat.succ n) = ↑(Nat.succ n)\n[PROOFSTEP]\nrw [n.cast_succ, eval₂_add, ih, eval₂_one, n.cast_succ]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np✝ q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx✝ : S\ninst✝ : Semiring T\np : T[X]\ng : ℕ → T → R[X]\nx : S\n⊢ eval₂ f x (sum p g) = sum p fun n a => eval₂ f x (g n a)\n[PROOFSTEP]\nlet T : R[X] →+ S :=\n { toFun := eval₂ f x\n map_zero' := eval₂_zero _ _\n map_add' := fun p q => eval₂_add _ _ }\n[GOAL]\nR : Type u\nS : Type v\nT✝ : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np✝ q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx✝ : S\ninst✝ : Semiring T✝\np : T✝[X]\ng : ℕ → T✝ → R[X]\nx : S\nT : R[X] →+ S :=\n { toZeroHom := { toFun := eval₂ f x, map_zero' := (_ : eval₂ f x 0 = 0) },\n map_add' := (_ : ∀ (p q : R[X]), eval₂ f x (p + q) = eval₂ f x p + eval₂ f x q) }\n⊢ eval₂ f x (sum p g) = sum p fun n a => eval₂ f x (g n a)\n[PROOFSTEP]\nhave A : ∀ y, eval₂ f x y = T y := fun y => rfl\n[GOAL]\nR : Type u\nS : Type v\nT✝ : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np✝ q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx✝ : S\ninst✝ : Semiring T✝\np : T✝[X]\ng : ℕ → T✝ → R[X]\nx : S\nT : R[X] →+ S :=\n { toZeroHom := { toFun := eval₂ f x, map_zero' := (_ : eval₂ f x 0 = 0) },\n map_add' := (_ : ∀ (p q : R[X]), eval₂ f x (p + q) = eval₂ f x p + eval₂ f x q) }\nA : ∀ (y : R[X]), eval₂ f x y = ↑T y\n⊢ eval₂ f x (sum p g) = sum p fun n a => eval₂ f x (g n a)\n[PROOFSTEP]\nsimp only [A]\n[GOAL]\nR : Type u\nS : Type v\nT✝ : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np✝ q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx✝ : S\ninst✝ : Semiring T✝\np : T✝[X]\ng : ℕ → T✝ → R[X]\nx : S\nT : R[X] →+ S :=\n { toZeroHom := { toFun := eval₂ f x, map_zero' := (_ : eval₂ f x 0 = 0) },\n map_add' := (_ : ∀ (p q : R[X]), eval₂ f x (p + q) = eval₂ f x p + eval₂ f x q) }\nA : ∀ (y : R[X]), eval₂ f x y = ↑T y\n⊢ ↑{ toZeroHom := { toFun := eval₂ f x, map_zero' := (_ : eval₂ f x 0 = 0) },\n map_add' := (_ : ∀ (p q : R[X]), eval₂ f x (p + q) = eval₂ f x p + eval₂ f x q) }\n (sum p g) =\n sum p fun n a =>\n ↑{ toZeroHom := { toFun := eval₂ f x, map_zero' := (_ : eval₂ f x 0 = 0) },\n map_add' := (_ : ∀ (p q : R[X]), eval₂ f x (p + q) = eval₂ f x p + eval₂ f x q) }\n (g n a)\n[PROOFSTEP]\nrw [sum, T.map_sum, sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np✝ q r : R[X]\ninst✝¹ : Semiring S\nf✝ : R →+* S\nx✝ : S\ninst✝ : Semiring T\nf : R →+* S\nx : S\np : AddMonoidAlgebra R ℕ\n⊢ eval₂ f x { toFinsupp := p } = ↑(liftNC ↑f ↑(↑(powersHom S) x)) p\n[PROOFSTEP]\nsimp only [eval₂_eq_sum, sum, toFinsupp_sum, support, coeff]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np✝ q r : R[X]\ninst✝¹ : Semiring S\nf✝ : R →+* S\nx✝ : S\ninst✝ : Semiring T\nf : R →+* S\nx : S\np : AddMonoidAlgebra R ℕ\n⊢ ∑ x_1 in p.support, ↑f (↑p x_1) * x ^ x_1 = ↑(liftNC ↑f ↑(↑(powersHom S) x)) p\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\nhf : ∀ (k : ℕ), Commute (↑f (coeff q k)) x\n⊢ eval₂ f x (p * q) = eval₂ f x p * eval₂ f x q\n[PROOFSTEP]\nrcases p with ⟨p⟩\n[GOAL]\ncase ofFinsupp\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\nq r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\nhf : ∀ (k : ℕ), Commute (↑f (coeff q k)) x\np : AddMonoidAlgebra R ℕ\n⊢ eval₂ f x ({ toFinsupp := p } * q) = eval₂ f x { toFinsupp := p } * eval₂ f x q\n[PROOFSTEP]\nrcases q with ⟨q⟩\n[GOAL]\ncase ofFinsupp.ofFinsupp\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\nr : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\np q : AddMonoidAlgebra R ℕ\nhf : ∀ (k : ℕ), Commute (↑f (coeff { toFinsupp := q } k)) x\n⊢ eval₂ f x ({ toFinsupp := p } * { toFinsupp := q }) = eval₂ f x { toFinsupp := p } * eval₂ f x { toFinsupp := q }\n[PROOFSTEP]\nsimp only [coeff] at hf \n[GOAL]\ncase ofFinsupp.ofFinsupp\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\nr : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\np q : AddMonoidAlgebra R ℕ\nhf : ∀ (k : ℕ), Commute (↑f (↑q k)) x\n⊢ eval₂ f x ({ toFinsupp := p } * { toFinsupp := q }) = eval₂ f x { toFinsupp := p } * eval₂ f x { toFinsupp := q }\n[PROOFSTEP]\nsimp only [← ofFinsupp_mul, eval₂_ofFinsupp]\n[GOAL]\ncase ofFinsupp.ofFinsupp\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\nr : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\np q : AddMonoidAlgebra R ℕ\nhf : ∀ (k : ℕ), Commute (↑f (↑q k)) x\n⊢ ↑(liftNC ↑f ↑(↑(powersHom S) x)) (p * q) = ↑(liftNC ↑f ↑(↑(powersHom S) x)) p * ↑(liftNC ↑f ↑(↑(powersHom S) x)) q\n[PROOFSTEP]\nexact liftNC_mul _ _ p q fun {k n} _hn => (hf k).pow_right n\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\n⊢ eval₂ f x (p * X) = eval₂ f x p * x\n[PROOFSTEP]\nrefine' _root_.trans (eval₂_mul_noncomm _ _ fun k => _) (by rw [eval₂_X])\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\n⊢ eval₂ f x p * eval₂ f x X = eval₂ f x p * x\n[PROOFSTEP]\nrw [eval₂_X]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\nk : ℕ\n⊢ Commute (↑f (coeff X k)) x\n[PROOFSTEP]\nrcases em (k = 1) with (rfl | hk)\n[GOAL]\ncase inl\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\n⊢ Commute (↑f (coeff X 1)) x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\nk : ℕ\nhk : ¬k = 1\n⊢ Commute (↑f (coeff X k)) x\n[PROOFSTEP]\nsimp [coeff_X_of_ne_one hk]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\n⊢ eval₂ f x (X * p) = eval₂ f x p * x\n[PROOFSTEP]\nrw [X_mul, eval₂_mul_X]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\nh : Commute (↑f a) x\n⊢ eval₂ f x (p * ↑C a) = eval₂ f x p * ↑f a\n[PROOFSTEP]\nrw [eval₂_mul_noncomm, eval₂_C]\n[GOAL]\ncase hf\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\nh : Commute (↑f a) x\n⊢ ∀ (k : ℕ), Commute (↑f (coeff (↑C a) k)) x\n[PROOFSTEP]\nintro k\n[GOAL]\ncase hf\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\nh : Commute (↑f a) x\nk : ℕ\n⊢ Commute (↑f (coeff (↑C a) k)) x\n[PROOFSTEP]\nby_cases hk : k = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\nh : Commute (↑f a) x\nk : ℕ\nhk : k = 0\n⊢ Commute (↑f (coeff (↑C a) k)) x\n[PROOFSTEP]\nsimp only [hk, h, coeff_C_zero, coeff_C_ne_zero]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\nh : Commute (↑f a) x\nk : ℕ\nhk : ¬k = 0\n⊢ Commute (↑f (coeff (↑C a) k)) x\n[PROOFSTEP]\nsimp only [coeff_C_ne_zero hk, RingHom.map_zero, Commute.zero_left]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\nps : List R[X]\nhf : ∀ (p : R[X]), p ∈ ps → ∀ (k : ℕ), Commute (↑f (coeff p k)) x\n⊢ eval₂ f x (List.prod ps) = List.prod (List.map (eval₂ f x) ps)\n[PROOFSTEP]\ninduction' ps using List.reverseRecOn with ps p ihp\n[GOAL]\ncase H0\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\nps : List R[X]\nhf✝ : ∀ (p : R[X]), p ∈ ps → ∀ (k : ℕ), Commute (↑f (coeff p k)) x\nhf : ∀ (p : R[X]), p ∈ [] → ∀ (k : ℕ), Commute (↑f (coeff p k)) x\n⊢ eval₂ f x (List.prod []) = List.prod (List.map (eval₂ f x) [])\n[PROOFSTEP]\nsimp\n[GOAL]\ncase H1\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np✝ q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\nps✝ : List R[X]\nhf✝ : ∀ (p : R[X]), p ∈ ps✝ → ∀ (k : ℕ), Commute (↑f (coeff p k)) x\nps : List R[X]\np : R[X]\nihp :\n (∀ (p : R[X]), p ∈ ps → ∀ (k : ℕ), Commute (↑f (coeff p k)) x) →\n eval₂ f x (List.prod ps) = List.prod (List.map (eval₂ f x) ps)\nhf : ∀ (p_1 : R[X]), p_1 ∈ ps ++ [p] → ∀ (k : ℕ), Commute (↑f (coeff p_1 k)) x\n⊢ eval₂ f x (List.prod (ps ++ [p])) = List.prod (List.map (eval₂ f x) (ps ++ [p]))\n[PROOFSTEP]\nsimp only [List.forall_mem_append, List.forall_mem_singleton] at hf \n[GOAL]\ncase H1\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np✝ q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nx : S\ninst✝ : Semiring T\nps✝ : List R[X]\nhf✝ : ∀ (p : R[X]), p ∈ ps✝ → ∀ (k : ℕ), Commute (↑f (coeff p k)) x\nps : List R[X]\np : R[X]\nihp :\n (∀ (p : R[X]), p ∈ ps → ∀ (k : ℕ), Commute (↑f (coeff p k)) x) →\n eval₂ f x (List.prod ps) = List.prod (List.map (eval₂ f x) ps)\nhf : (∀ (x_1 : R[X]), x_1 ∈ ps → ∀ (k : ℕ), Commute (↑f (coeff x_1 k)) x) ∧ ∀ (k : ℕ), Commute (↑f (coeff p k)) x\n⊢ eval₂ f x (List.prod (ps ++ [p])) = List.prod (List.map (eval₂ f x) (ps ++ [p]))\n[PROOFSTEP]\nsimp [eval₂_mul_noncomm _ _ hf.2, ihp hf.1]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\n⊢ (fun i => eval₂ f x (↑(monomial i) (coeff p i))) = fun i => ↑f (coeff p i) * x ^ i\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf✝ : R →+* S\nx✝ : S\nf : R →+* S\np : R[X]\nn : ℕ\nhn : natDegree p < n\nx : S\n⊢ eval₂ f x p = ∑ i in range n, ↑f (coeff p i) * x ^ i\n[PROOFSTEP]\nrw [eval₂_eq_sum, p.sum_over_range' _ _ hn]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf✝ : R →+* S\nx✝ : S\nf : R →+* S\np : R[X]\nn : ℕ\nhn : natDegree p < n\nx : S\n⊢ ∀ (n : ℕ), ↑f 0 * x ^ n = 0\n[PROOFSTEP]\nintro i\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf✝ : R →+* S\nx✝ : S\nf : R →+* S\np : R[X]\nn : ℕ\nhn : natDegree p < n\nx : S\ni : ℕ\n⊢ ↑f 0 * x ^ i = 0\n[PROOFSTEP]\nrw [f.map_zero, zero_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q✝ r : R[X]\ninst✝ : CommSemiring S\nf : R →+* S\nx : S\nq : R[X]\nhp : eval₂ f x p = 0\n⊢ eval₂ f x (p * q) = 0\n[PROOFSTEP]\nrw [eval₂_mul f x]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q✝ r : R[X]\ninst✝ : CommSemiring S\nf : R →+* S\nx : S\nq : R[X]\nhp : eval₂ f x p = 0\n⊢ eval₂ f x p * eval₂ f x q = 0\n[PROOFSTEP]\nexact mul_eq_zero_of_left hp (q.eval₂ f x)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : CommSemiring S\nf : R →+* S\nx : S\np : R[X]\nhq : eval₂ f x q = 0\n⊢ eval₂ f x (p * q) = 0\n[PROOFSTEP]\nrw [eval₂_mul f x]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : CommSemiring S\nf : R →+* S\nx : S\np : R[X]\nhq : eval₂ f x q = 0\n⊢ eval₂ f x p * eval₂ f x q = 0\n[PROOFSTEP]\nexact mul_eq_zero_of_right (p.eval₂ f x) hq\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nx : R\n⊢ eval x p = sum p fun e a => a * x ^ e\n[PROOFSTEP]\nrw [eval, eval₂_eq_sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nx : R\n⊢ (sum p fun e a => ↑(RingHom.id R) a * x ^ e) = sum p fun e a => a * x ^ e\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nx✝ : R\np : R[X]\nx : R\n⊢ eval x p = ∑ i in range (natDegree p + 1), coeff p i * x ^ i\n[PROOFSTEP]\nrw [eval_eq_sum, sum_over_range]\n[GOAL]\ncase h\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nx✝ : R\np : R[X]\nx : R\n⊢ ∀ (n : ℕ), 0 * x ^ n = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nx✝ : R\np : R[X]\nn : ℕ\nhn : natDegree p < n\nx : R\n⊢ eval x p = ∑ i in range n, coeff p i * x ^ i\n[PROOFSTEP]\nrw [eval_eq_sum, p.sum_over_range' _ _ hn]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nx✝ : R\np : R[X]\nn : ℕ\nhn : natDegree p < n\nx : R\n⊢ ∀ (n : ℕ), 0 * x ^ n = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r✝ : R[X]\nx : R\nS : Type u_1\ninst✝ : Semiring S\nf : R →+* S\nr : R\n⊢ eval₂ f (↑f r) p = ↑f (eval r p)\n[PROOFSTEP]\nrw [eval₂_eq_sum, eval_eq_sum, sum, sum, f.map_sum]\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r✝ : R[X]\nx : R\nS : Type u_1\ninst✝ : Semiring S\nf : R →+* S\nr : R\n⊢ ∑ n in support p, ↑f (coeff p n) * ↑f r ^ n = ∑ x in support p, ↑f (coeff p x * r ^ x)\n[PROOFSTEP]\nsimp only [f.map_mul, f.map_pow]\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\nS : Type u_1\ninst✝ : Semiring S\nf : R →+* S\n⊢ eval₂ f 1 p = ↑f (eval 1 p)\n[PROOFSTEP]\nconvert eval₂_at_apply (p := p) f 1\n[GOAL]\ncase h.e'_2.h.e'_6\nR : Type u\nS✝ : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\nS : Type u_1\ninst✝ : Semiring S\nf : R →+* S\n⊢ 1 = ↑f 1\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\nS : Type u_1\ninst✝ : Semiring S\nf : R →+* S\nn : ℕ\n⊢ eval₂ f (↑n) p = ↑f (eval (↑n) p)\n[PROOFSTEP]\nconvert eval₂_at_apply (p := p) f n\n[GOAL]\ncase h.e'_2.h.e'_6\nR : Type u\nS✝ : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\nS : Type u_1\ninst✝ : Semiring S\nf : R →+* S\nn : ℕ\n⊢ ↑n = ↑f ↑n\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\nx : R\nn : ℕ\n⊢ eval x ↑n = ↑n\n[PROOFSTEP]\nsimp only [← C_eq_nat_cast, eval_C]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝³ : Semiring R\np✝ q r : R[X]\nx✝ : R\ninst✝² : Monoid S\ninst✝¹ : DistribMulAction S R\ninst✝ : IsScalarTower S R R\ns : S\np : R[X]\nx : R\n⊢ eval x (s • p) = s • eval x p\n[PROOFSTEP]\nrw [← smul_one_smul R s p, eval, eval₂_smul, RingHom.id_apply, smul_one_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nx : R\n⊢ eval x (↑C a * p) = a * eval x p\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_add p q ph qh => simp only [mul_add, eval_add, ph, qh]\n| h_monomial n b => simp only [mul_assoc, C_mul_monomial, eval_monomial]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nx : R\n⊢ eval x (↑C a * p) = a * eval x p\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_add p q ph qh => simp only [mul_add, eval_add, ph, qh]\n| h_monomial n b => simp only [mul_assoc, C_mul_monomial, eval_monomial]\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q✝ r : R[X]\nx : R\np q : R[X]\nph : eval x (↑C a * p) = a * eval x p\nqh : eval x (↑C a * q) = a * eval x q\n⊢ eval x (↑C a * (p + q)) = a * eval x (p + q)\n[PROOFSTEP]\n\n| h_add p q ph qh => simp only [mul_add, eval_add, ph, qh]\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q✝ r : R[X]\nx : R\np q : R[X]\nph : eval x (↑C a * p) = a * eval x p\nqh : eval x (↑C a * q) = a * eval x q\n⊢ eval x (↑C a * (p + q)) = a * eval x (p + q)\n[PROOFSTEP]\nsimp only [mul_add, eval_add, ph, qh]\n[GOAL]\ncase h_monomial\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b✝ : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\nx : R\nn : ℕ\nb : R\n⊢ eval x (↑C a * ↑(monomial n) b) = a * eval x (↑(monomial n) b)\n[PROOFSTEP]\n\n| h_monomial n b => simp only [mul_assoc, C_mul_monomial, eval_monomial]\n[GOAL]\ncase h_monomial\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b✝ : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\nx : R\nn : ℕ\nb : R\n⊢ eval x (↑C a * ↑(monomial n) b) = a * eval x (↑(monomial n) b)\n[PROOFSTEP]\nsimp only [mul_assoc, C_mul_monomial, eval_monomial]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\n⊢ eval (1 + y) (↑(monomial d) (↑d + 1)) - eval y (↑(monomial d) (↑d + 1)) =\n ∑ x_1 in range (d + 1), ↑(Nat.choose (d + 1) x_1) * (↑x_1 * y ^ (x_1 - 1))\n[PROOFSTEP]\nhave cast_succ : (d + 1 : S) = ((d.succ : ℕ) : S) := by simp only [Nat.cast_succ]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\n⊢ ↑d + 1 = ↑(Nat.succ d)\n[PROOFSTEP]\nsimp only [Nat.cast_succ]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n⊢ eval (1 + y) (↑(monomial d) (↑d + 1)) - eval y (↑(monomial d) (↑d + 1)) =\n ∑ x_1 in range (d + 1), ↑(Nat.choose (d + 1) x_1) * (↑x_1 * y ^ (x_1 - 1))\n[PROOFSTEP]\nrw [cast_succ, eval_monomial, eval_monomial, add_comm, add_pow]\n -- Porting note: `apply_congr` hadn't been ported yet, so `congr` & `ext` is used.\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n⊢ ↑(Nat.succ d) * ∑ m in range (d + 1), y ^ m * 1 ^ (d - m) * ↑(Nat.choose d m) - ↑(Nat.succ d) * y ^ d =\n ∑ x_1 in range (d + 1), ↑(Nat.choose (d + 1) x_1) * (↑x_1 * y ^ (x_1 - 1))\n[PROOFSTEP]\nconv_lhs =>\n congr\n · congr\n ·skip\n · congr\n ·skip\n · ext\n rw [one_pow, mul_one, mul_comm]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| ↑(Nat.succ d) * ∑ m in range (d + 1), y ^ m * 1 ^ (d - m) * ↑(Nat.choose d m) - ↑(Nat.succ d) * y ^ d\n[PROOFSTEP]\n congr\n · congr\n ·skip\n · congr\n ·skip\n · ext\n rw [one_pow, mul_one, mul_comm]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| ↑(Nat.succ d) * ∑ m in range (d + 1), y ^ m * 1 ^ (d - m) * ↑(Nat.choose d m) - ↑(Nat.succ d) * y ^ d\n[PROOFSTEP]\n congr\n · congr\n ·skip\n · congr\n ·skip\n · ext\n rw [one_pow, mul_one, mul_comm]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| ↑(Nat.succ d) * ∑ m in range (d + 1), y ^ m * 1 ^ (d - m) * ↑(Nat.choose d m) - ↑(Nat.succ d) * y ^ d\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| ↑(Nat.succ d) * ∑ m in range (d + 1), y ^ m * 1 ^ (d - m) * ↑(Nat.choose d m)\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| ↑(Nat.succ d) * y ^ d\n[PROOFSTEP]\n· congr\n ·skip\n · congr\n ·skip\n · ext\n rw [one_pow, mul_one, mul_comm]\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| ↑(Nat.succ d) * ∑ m in range (d + 1), y ^ m * 1 ^ (d - m) * ↑(Nat.choose d m)\n[PROOFSTEP]\n congr\n ·skip\n · congr\n ·skip\n · ext\n rw [one_pow, mul_one, mul_comm]\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| ↑(Nat.succ d) * ∑ m in range (d + 1), y ^ m * 1 ^ (d - m) * ↑(Nat.choose d m)\n[PROOFSTEP]\n congr\n ·skip\n · congr\n ·skip\n · ext\n rw [one_pow, mul_one, mul_comm]\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| ↑(Nat.succ d) * ∑ m in range (d + 1), y ^ m * 1 ^ (d - m) * ↑(Nat.choose d m)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a.a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| ↑(Nat.succ d)\ncase a.a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| ∑ m in range (d + 1), y ^ m * 1 ^ (d - m) * ↑(Nat.choose d m)\n[PROOFSTEP]\n·skip\n[GOAL]\ncase a.a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| ↑(Nat.succ d)\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| ↑(Nat.succ d)\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| ↑(Nat.succ d)\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| ∑ m in range (d + 1), y ^ m * 1 ^ (d - m) * ↑(Nat.choose d m)\n[PROOFSTEP]\n· congr\n ·skip\n · ext\n rw [one_pow, mul_one, mul_comm]\n[GOAL]\ncase a.a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| ∑ m in range (d + 1), y ^ m * 1 ^ (d - m) * ↑(Nat.choose d m)\n[PROOFSTEP]\n congr\n ·skip\n · ext\n rw [one_pow, mul_one, mul_comm]\n[GOAL]\ncase a.a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| ∑ m in range (d + 1), y ^ m * 1 ^ (d - m) * ↑(Nat.choose d m)\n[PROOFSTEP]\n congr\n ·skip\n · ext\n rw [one_pow, mul_one, mul_comm]\n[GOAL]\ncase a.a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| ∑ m in range (d + 1), y ^ m * 1 ^ (d - m) * ↑(Nat.choose d m)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a.a.s\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| range (d + 1)\ncase a.a.f\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| fun m => y ^ m * 1 ^ (d - m) * ↑(Nat.choose d m)\n[PROOFSTEP]\n·skip\n[GOAL]\ncase a.a.s\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| range (d + 1)\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.a.s\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| range (d + 1)\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.a.s\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| range (d + 1)\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.a.f\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| fun m => y ^ m * 1 ^ (d - m) * ↑(Nat.choose d m)\n[PROOFSTEP]\n· ext\n rw [one_pow, mul_one, mul_comm]\n[GOAL]\ncase a.a.f\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| fun m => y ^ m * 1 ^ (d - m) * ↑(Nat.choose d m)\n[PROOFSTEP]\n ext\n rw [one_pow, mul_one, mul_comm]\n[GOAL]\ncase a.a.f\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| fun m => y ^ m * 1 ^ (d - m) * ↑(Nat.choose d m)\n[PROOFSTEP]\n ext\n rw [one_pow, mul_one, mul_comm]\n[GOAL]\ncase a.a.f\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n| fun m => y ^ m * 1 ^ (d - m) * ↑(Nat.choose d m)\n[PROOFSTEP]\next\n[GOAL]\ncase a.a.f.h\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\nx✝ : ℕ\n| y ^ x✝ * 1 ^ (d - x✝) * ↑(Nat.choose d x✝)\n[PROOFSTEP]\nrw [one_pow, mul_one, mul_comm]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n⊢ ↑(Nat.succ d) * ∑ x in range (d + 1), ↑(Nat.choose d x) * y ^ x - ↑(Nat.succ d) * y ^ d =\n ∑ x_1 in range (d + 1), ↑(Nat.choose (d + 1) x_1) * (↑x_1 * y ^ (x_1 - 1))\n[PROOFSTEP]\nrw [sum_range_succ, mul_add, Nat.choose_self, Nat.cast_one, one_mul, add_sub_cancel, mul_sum, sum_range_succ',\n Nat.cast_zero, zero_mul, mul_zero, add_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\n⊢ ∑ x in range d, ↑(Nat.succ d) * (↑(Nat.choose d x) * y ^ x) =\n ∑ k in range d, ↑(Nat.choose (d + 1) (k + 1)) * (↑(k + 1) * y ^ (k + 1 - 1))\n[PROOFSTEP]\nrefine sum_congr rfl fun y _hy => ?_\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : CommRing S\nd : ℕ\ny✝ : S\ncast_succ : ↑d + 1 = ↑(Nat.succ d)\ny : ℕ\n_hy : y ∈ range d\n⊢ ↑(Nat.succ d) * (↑(Nat.choose d y) * y✝ ^ y) = ↑(Nat.choose (d + 1) (y + 1)) * (↑(y + 1) * y✝ ^ (y + 1 - 1))\n[PROOFSTEP]\nrw [← mul_assoc, ← mul_assoc, ← Nat.cast_mul, Nat.succ_mul_choose_eq, Nat.cast_mul, Nat.add_sub_cancel]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\nx : R\nn : ℕ\n⊢ eval x (↑n * p) = ↑n * eval x p\n[PROOFSTEP]\nrw [← C_eq_nat_cast, eval_C_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nx : R\n⊢ eval x (p * X) = eval x p * x\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_add p q ph qh => simp only [add_mul, eval_add, ph, qh]\n| h_monomial n a =>\n simp only [← monomial_one_one_eq_X, monomial_mul_monomial, eval_monomial, mul_one, pow_succ', mul_assoc]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nx : R\n⊢ eval x (p * X) = eval x p * x\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_add p q ph qh => simp only [add_mul, eval_add, ph, qh]\n| h_monomial n a =>\n simp only [← monomial_one_one_eq_X, monomial_mul_monomial, eval_monomial, mul_one, pow_succ', mul_assoc]\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q✝ r : R[X]\nx : R\np q : R[X]\nph : eval x (p * X) = eval x p * x\nqh : eval x (q * X) = eval x q * x\n⊢ eval x ((p + q) * X) = eval x (p + q) * x\n[PROOFSTEP]\n\n| h_add p q ph qh => simp only [add_mul, eval_add, ph, qh]\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q✝ r : R[X]\nx : R\np q : R[X]\nph : eval x (p * X) = eval x p * x\nqh : eval x (q * X) = eval x q * x\n⊢ eval x ((p + q) * X) = eval x (p + q) * x\n[PROOFSTEP]\nsimp only [add_mul, eval_add, ph, qh]\n[GOAL]\ncase h_monomial\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\nx : R\nn : ℕ\na : R\n⊢ eval x (↑(monomial n) a * X) = eval x (↑(monomial n) a) * x\n[PROOFSTEP]\n\n| h_monomial n a =>\n simp only [← monomial_one_one_eq_X, monomial_mul_monomial, eval_monomial, mul_one, pow_succ', mul_assoc]\n[GOAL]\ncase h_monomial\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\nx : R\nn : ℕ\na : R\n⊢ eval x (↑(monomial n) a * X) = eval x (↑(monomial n) a) * x\n[PROOFSTEP]\nsimp only [← monomial_one_one_eq_X, monomial_mul_monomial, eval_monomial, mul_one, pow_succ', mul_assoc]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nx : R\nk : ℕ\n⊢ eval x (p * X ^ k) = eval x p * x ^ k\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nx : R\n⊢ eval x (p * X ^ Nat.zero) = eval x p * x ^ Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nx : R\nk : ℕ\nih : eval x (p * X ^ k) = eval x p * x ^ k\n⊢ eval x (p * X ^ Nat.succ k) = eval x p * x ^ Nat.succ k\n[PROOFSTEP]\nsimp [pow_succ', ← mul_assoc, ih]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : DecidableEq R\n⊢ Decidable (IsRoot p a)\n[PROOFSTEP]\nunfold IsRoot\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nx : R\ninst✝ : DecidableEq R\n⊢ Decidable (eval a p = 0)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nx : R\np : R[X]\n⊢ coeff p 0 = coeff p 0 * 0 ^ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nx : R\np : R[X]\n⊢ coeff p 0 * 0 ^ 0 = eval 0 p\n[PROOFSTEP]\nsymm\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nx : R\np : R[X]\n⊢ eval 0 p = coeff p 0 * 0 ^ 0\n[PROOFSTEP]\nrw [eval_eq_sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nx : R\np : R[X]\n⊢ (sum p fun e a => a * 0 ^ e) = coeff p 0 * 0 ^ 0\n[PROOFSTEP]\nexact Finset.sum_eq_single _ (fun b _ hb => by simp [zero_pow (Nat.pos_of_ne_zero hb)]) (by simp)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b✝ : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nx : R\np : R[X]\nb : ℕ\nx✝ : b ∈ support p\nhb : b ≠ 0\n⊢ (fun e a => a * 0 ^ e) b (coeff p b) = 0\n[PROOFSTEP]\nsimp [zero_pow (Nat.pos_of_ne_zero hb)]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nx : R\np : R[X]\n⊢ ¬0 ∈ support p → (fun e a => a * 0 ^ e) 0 (coeff p 0) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q r : R[X]\nx : R\np : R[X]\nhp : coeff p 0 = 0\n⊢ IsRoot p 0\n[PROOFSTEP]\nrwa [coeff_zero_eq_eval_zero] at hp \n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R✝\nm n : ℕ\ninst✝¹ : Semiring R✝\np✝ q✝ r : R✝[X]\nx✝ : R✝\nR : Type u_1\ninst✝ : CommSemiring R\np q : R[X]\nx : R\nh : IsRoot p x\nhpq : p ∣ q\n⊢ IsRoot q x\n[PROOFSTEP]\nrwa [IsRoot, eval, eval₂_eq_zero_of_dvd_of_eval₂_eq_zero _ _ hpq]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na✝ b : R\nm n : ℕ\ninst✝ : Semiring R\np q r✝ : R[X]\nx r a : R\nhr : r ≠ 0\n⊢ ¬IsRoot (↑C r) a\n[PROOFSTEP]\nsimpa using hr\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ comp p q = sum p fun e a => ↑C a * q ^ e\n[PROOFSTEP]\nrw [comp, eval₂_eq_sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ comp p X = p\n[PROOFSTEP]\nsimp only [comp, eval₂_def, C_mul_X_pow_eq_monomial]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ (sum p fun e a => ↑(monomial e) a) = p\n[PROOFSTEP]\nexact sum_monomial_eq _\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ comp p (↑C a) = ↑C (eval a p)\n[PROOFSTEP]\nsimp [comp, (C : R →+* _).map_sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\n⊢ comp (↑n) p = ↑n\n[PROOFSTEP]\nrw [← C_eq_nat_cast, C_comp]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ comp p 0 = ↑C (eval 0 p)\n[PROOFSTEP]\nrw [← C_0, comp_C]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ comp 0 p = 0\n[PROOFSTEP]\nrw [← C_0, C_comp]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ comp p 1 = ↑C (eval 1 p)\n[PROOFSTEP]\nrw [← C_1, comp_C]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ comp 1 p = 1\n[PROOFSTEP]\nrw [← C_1, C_comp]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ comp (p * X) r = comp p r * r\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_add p q hp hq => simp only [hp, hq, add_mul, add_comp]\n| h_monomial n b => simp only [pow_succ', mul_assoc, monomial_mul_X, monomial_comp]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ comp (p * X) r = comp p r * r\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_add p q hp hq => simp only [hp, hq, add_mul, add_comp]\n| h_monomial n b => simp only [pow_succ', mul_assoc, monomial_mul_X, monomial_comp]\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q✝ r p q : R[X]\nhp : comp (p * X) r = comp p r * r\nhq : comp (q * X) r = comp q r * r\n⊢ comp ((p + q) * X) r = comp (p + q) r * r\n[PROOFSTEP]\n\n| h_add p q hp hq => simp only [hp, hq, add_mul, add_comp]\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q✝ r p q : R[X]\nhp : comp (p * X) r = comp p r * r\nhq : comp (q * X) r = comp q r * r\n⊢ comp ((p + q) * X) r = comp (p + q) r * r\n[PROOFSTEP]\nsimp only [hp, hq, add_mul, add_comp]\n[GOAL]\ncase h_monomial\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b✝ : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nb : R\n⊢ comp (↑(monomial n) b * X) r = comp (↑(monomial n) b) r * r\n[PROOFSTEP]\n\n| h_monomial n b => simp only [pow_succ', mul_assoc, monomial_mul_X, monomial_comp]\n[GOAL]\ncase h_monomial\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b✝ : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nb : R\n⊢ comp (↑(monomial n) b * X) r = comp (↑(monomial n) b) r * r\n[PROOFSTEP]\nsimp only [pow_succ', mul_assoc, monomial_mul_X, monomial_comp]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nk : ℕ\n⊢ comp (X ^ k) p = p ^ k\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ comp (X ^ Nat.zero) p = p ^ Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nk : ℕ\nih : comp (X ^ k) p = p ^ k\n⊢ comp (X ^ Nat.succ k) p = p ^ Nat.succ k\n[PROOFSTEP]\nsimp [pow_succ', mul_X_comp, ih]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nk : ℕ\n⊢ comp (p * X ^ k) r = comp p r * r ^ k\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ comp (p * X ^ Nat.zero) r = comp p r * r ^ Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nk : ℕ\nih : comp (p * X ^ k) r = comp p r * r ^ k\n⊢ comp (p * X ^ Nat.succ k) r = comp p r * r ^ Nat.succ k\n[PROOFSTEP]\nsimp [ih, pow_succ', ← mul_assoc, mul_X_comp]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ comp (↑C a * p) r = ↑C a * comp p r\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_add p q hp hq => simp [hp, hq, mul_add]\n| h_monomial n b => simp [mul_assoc]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ comp (↑C a * p) r = ↑C a * comp p r\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_add p q hp hq => simp [hp, hq, mul_add]\n| h_monomial n b => simp [mul_assoc]\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q✝ r p q : R[X]\nhp : comp (↑C a * p) r = ↑C a * comp p r\nhq : comp (↑C a * q) r = ↑C a * comp q r\n⊢ comp (↑C a * (p + q)) r = ↑C a * comp (p + q) r\n[PROOFSTEP]\n\n| h_add p q hp hq => simp [hp, hq, mul_add]\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q✝ r p q : R[X]\nhp : comp (↑C a * p) r = ↑C a * comp p r\nhq : comp (↑C a * q) r = ↑C a * comp q r\n⊢ comp (↑C a * (p + q)) r = ↑C a * comp (p + q) r\n[PROOFSTEP]\nsimp [hp, hq, mul_add]\n[GOAL]\ncase h_monomial\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b✝ : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nb : R\n⊢ comp (↑C a * ↑(monomial n) b) r = ↑C a * comp (↑(monomial n) b) r\n[PROOFSTEP]\n\n| h_monomial n b => simp [mul_assoc]\n[GOAL]\ncase h_monomial\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b✝ : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nb : R\n⊢ comp (↑C a * ↑(monomial n) b) r = ↑C a * comp (↑(monomial n) b) r\n[PROOFSTEP]\nsimp [mul_assoc]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\n⊢ comp (↑n * p) r = ↑n * comp p r\n[PROOFSTEP]\nrw [← C_eq_nat_cast, C_mul_comp, C_eq_nat_cast]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ comp (bit0 p) q = bit0 (comp p q)\n[PROOFSTEP]\nsimp only [bit0, add_comp]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ comp (bit1 p) q = bit1 (comp p q)\n[PROOFSTEP]\nsimp only [bit1, add_comp, bit0_comp, one_comp]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝³ : Semiring R\np✝ q✝ r : R[X]\ninst✝² : Monoid S\ninst✝¹ : DistribMulAction S R\ninst✝ : IsScalarTower S R R\ns : S\np q : R[X]\n⊢ comp (s • p) q = s • comp p q\n[PROOFSTEP]\nrw [← smul_one_smul R s p, comp, comp, eval₂_smul, ← smul_eq_C_mul, smul_assoc, one_smul]\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R✝\nm n : ℕ\ninst✝¹ : Semiring R✝\np q r : R✝[X]\nR : Type u_1\ninst✝ : CommSemiring R\nφ ψ χ : R[X]\n⊢ comp (comp φ ψ) χ = comp φ (comp ψ χ)\n[PROOFSTEP]\nrefine Polynomial.induction_on φ ?_ ?_ ?_\n[GOAL]\ncase refine_1\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R✝\nm n : ℕ\ninst✝¹ : Semiring R✝\np q r : R✝[X]\nR : Type u_1\ninst✝ : CommSemiring R\nφ ψ χ : R[X]\n⊢ ∀ (a : R), comp (comp (↑C a) ψ) χ = comp (↑C a) (comp ψ χ)\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine_1\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R✝\nm n : ℕ\ninst✝¹ : Semiring R✝\np q r : R✝[X]\nR : Type u_1\ninst✝ : CommSemiring R\nφ ψ χ : R[X]\na✝ : R\n⊢ comp (comp (↑C a✝) ψ) χ = comp (↑C a✝) (comp ψ χ)\n[PROOFSTEP]\nsimp_all only [add_comp, mul_comp, C_comp, X_comp, pow_succ', ← mul_assoc]\n[GOAL]\ncase refine_2\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R✝\nm n : ℕ\ninst✝¹ : Semiring R✝\np q r : R✝[X]\nR : Type u_1\ninst✝ : CommSemiring R\nφ ψ χ : R[X]\n⊢ ∀ (p q : R[X]),\n comp (comp p ψ) χ = comp p (comp ψ χ) →\n comp (comp q ψ) χ = comp q (comp ψ χ) → comp (comp (p + q) ψ) χ = comp (p + q) (comp ψ χ)\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine_2\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R✝\nm n : ℕ\ninst✝¹ : Semiring R✝\np q r : R✝[X]\nR : Type u_1\ninst✝ : CommSemiring R\nφ ψ χ p✝ q✝ : R[X]\na✝¹ : comp (comp p✝ ψ) χ = comp p✝ (comp ψ χ)\na✝ : comp (comp q✝ ψ) χ = comp q✝ (comp ψ χ)\n⊢ comp (comp (p✝ + q✝) ψ) χ = comp (p✝ + q✝) (comp ψ χ)\n[PROOFSTEP]\nsimp_all only [add_comp, mul_comp, C_comp, X_comp, pow_succ', ← mul_assoc]\n[GOAL]\ncase refine_3\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R✝\nm n : ℕ\ninst✝¹ : Semiring R✝\np q r : R✝[X]\nR : Type u_1\ninst✝ : CommSemiring R\nφ ψ χ : R[X]\n⊢ ∀ (n : ℕ) (a : R),\n comp (comp (↑C a * X ^ n) ψ) χ = comp (↑C a * X ^ n) (comp ψ χ) →\n comp (comp (↑C a * X ^ (n + 1)) ψ) χ = comp (↑C a * X ^ (n + 1)) (comp ψ χ)\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine_3\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R✝\nm n : ℕ\ninst✝¹ : Semiring R✝\np q r : R✝[X]\nR : Type u_1\ninst✝ : CommSemiring R\nφ ψ χ : R[X]\nn✝ : ℕ\na✝¹ : R\na✝ : comp (comp (↑C a✝¹ * X ^ n✝) ψ) χ = comp (↑C a✝¹ * X ^ n✝) (comp ψ χ)\n⊢ comp (comp (↑C a✝¹ * X ^ (n✝ + 1)) ψ) χ = comp (↑C a✝¹ * X ^ (n✝ + 1)) (comp ψ χ)\n[PROOFSTEP]\nsimp_all only [add_comp, mul_comp, C_comp, X_comp, pow_succ', ← mul_assoc]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhqd0 : natDegree q ≠ 0\n⊢ coeff (comp p q) (natDegree p * natDegree q) = leadingCoeff p * leadingCoeff q ^ natDegree p\n[PROOFSTEP]\nrw [comp, eval₂_def, coeff_sum]\n -- Porting note: `convert` → `refine`\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhqd0 : natDegree q ≠ 0\n⊢ (sum p fun a b => coeff (↑C b * q ^ a) (natDegree p * natDegree q)) = leadingCoeff p * leadingCoeff q ^ natDegree p\n[PROOFSTEP]\nrefine Eq.trans (Finset.sum_eq_single p.natDegree ?h₀ ?h₁) ?h₂\n[GOAL]\ncase h₀\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhqd0 : natDegree q ≠ 0\n⊢ ∀ (b : ℕ),\n b ∈ support p → b ≠ natDegree p → (fun a b => coeff (↑C b * q ^ a) (natDegree p * natDegree q)) b (coeff p b) = 0\ncase h₁\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhqd0 : natDegree q ≠ 0\n⊢ ¬natDegree p ∈ support p →\n (fun a b => coeff (↑C b * q ^ a) (natDegree p * natDegree q)) (natDegree p) (coeff p (natDegree p)) = 0\ncase h₂\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhqd0 : natDegree q ≠ 0\n⊢ (fun a b => coeff (↑C b * q ^ a) (natDegree p * natDegree q)) (natDegree p) (coeff p (natDegree p)) =\n leadingCoeff p * leadingCoeff q ^ natDegree p\n[PROOFSTEP]\ncase h₂ => simp only [coeff_natDegree, coeff_C_mul, coeff_pow_mul_natDegree]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhqd0 : natDegree q ≠ 0\n⊢ (fun a b => coeff (↑C b * q ^ a) (natDegree p * natDegree q)) (natDegree p) (coeff p (natDegree p)) =\n leadingCoeff p * leadingCoeff q ^ natDegree p\n[PROOFSTEP]\ncase h₂ => simp only [coeff_natDegree, coeff_C_mul, coeff_pow_mul_natDegree]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhqd0 : natDegree q ≠ 0\n⊢ (fun a b => coeff (↑C b * q ^ a) (natDegree p * natDegree q)) (natDegree p) (coeff p (natDegree p)) =\n leadingCoeff p * leadingCoeff q ^ natDegree p\n[PROOFSTEP]\nsimp only [coeff_natDegree, coeff_C_mul, coeff_pow_mul_natDegree]\n[GOAL]\ncase h₀\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhqd0 : natDegree q ≠ 0\n⊢ ∀ (b : ℕ),\n b ∈ support p → b ≠ natDegree p → (fun a b => coeff (↑C b * q ^ a) (natDegree p * natDegree q)) b (coeff p b) = 0\ncase h₁\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhqd0 : natDegree q ≠ 0\n⊢ ¬natDegree p ∈ support p →\n (fun a b => coeff (↑C b * q ^ a) (natDegree p * natDegree q)) (natDegree p) (coeff p (natDegree p)) = 0\n[PROOFSTEP]\ncase h₀ =>\n intro b hbs hbp\n refine' coeff_eq_zero_of_natDegree_lt (natDegree_mul_le.trans_lt _)\n rw [natDegree_C, zero_add]\n refine' natDegree_pow_le.trans_lt ((mul_lt_mul_right (pos_iff_ne_zero.mpr hqd0)).mpr _)\n exact lt_of_le_of_ne (le_natDegree_of_mem_supp _ hbs) hbp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhqd0 : natDegree q ≠ 0\n⊢ ∀ (b : ℕ),\n b ∈ support p → b ≠ natDegree p → (fun a b => coeff (↑C b * q ^ a) (natDegree p * natDegree q)) b (coeff p b) = 0\n[PROOFSTEP]\ncase h₀ =>\n intro b hbs hbp\n refine' coeff_eq_zero_of_natDegree_lt (natDegree_mul_le.trans_lt _)\n rw [natDegree_C, zero_add]\n refine' natDegree_pow_le.trans_lt ((mul_lt_mul_right (pos_iff_ne_zero.mpr hqd0)).mpr _)\n exact lt_of_le_of_ne (le_natDegree_of_mem_supp _ hbs) hbp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhqd0 : natDegree q ≠ 0\n⊢ ∀ (b : ℕ),\n b ∈ support p → b ≠ natDegree p → (fun a b => coeff (↑C b * q ^ a) (natDegree p * natDegree q)) b (coeff p b) = 0\n[PROOFSTEP]\nintro b hbs hbp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b✝ : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhqd0 : natDegree q ≠ 0\nb : ℕ\nhbs : b ∈ support p\nhbp : b ≠ natDegree p\n⊢ (fun a b => coeff (↑C b * q ^ a) (natDegree p * natDegree q)) b (coeff p b) = 0\n[PROOFSTEP]\nrefine' coeff_eq_zero_of_natDegree_lt (natDegree_mul_le.trans_lt _)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b✝ : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhqd0 : natDegree q ≠ 0\nb : ℕ\nhbs : b ∈ support p\nhbp : b ≠ natDegree p\n⊢ natDegree (↑C (coeff p b)) + natDegree (q ^ b) < natDegree p * natDegree q\n[PROOFSTEP]\nrw [natDegree_C, zero_add]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b✝ : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhqd0 : natDegree q ≠ 0\nb : ℕ\nhbs : b ∈ support p\nhbp : b ≠ natDegree p\n⊢ natDegree (q ^ b) < natDegree p * natDegree q\n[PROOFSTEP]\nrefine' natDegree_pow_le.trans_lt ((mul_lt_mul_right (pos_iff_ne_zero.mpr hqd0)).mpr _)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b✝ : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhqd0 : natDegree q ≠ 0\nb : ℕ\nhbs : b ∈ support p\nhbp : b ≠ natDegree p\n⊢ b < natDegree p\n[PROOFSTEP]\nexact lt_of_le_of_ne (le_natDegree_of_mem_supp _ hbs) hbp\n[GOAL]\ncase h₁\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhqd0 : natDegree q ≠ 0\n⊢ ¬natDegree p ∈ support p →\n (fun a b => coeff (↑C b * q ^ a) (natDegree p * natDegree q)) (natDegree p) (coeff p (natDegree p)) = 0\n[PROOFSTEP]\ncase h₁ => simp (config := { contextual := true })\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhqd0 : natDegree q ≠ 0\n⊢ ¬natDegree p ∈ support p →\n (fun a b => coeff (↑C b * q ^ a) (natDegree p * natDegree q)) (natDegree p) (coeff p (natDegree p)) = 0\n[PROOFSTEP]\ncase h₁ => simp (config := { contextual := true })\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhqd0 : natDegree q ≠ 0\n⊢ ¬natDegree p ∈ support p →\n (fun a b => coeff (↑C b * q ^ a) (natDegree p * natDegree q)) (natDegree p) (coeff p (natDegree p)) = 0\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na✝ b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nn : ℕ\na : R\n⊢ map f (↑(monomial n) a) = ↑(monomial n) (↑f a)\n[PROOFSTEP]\ndsimp only [map]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na✝ b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nn : ℕ\na : R\n⊢ eval₂ (RingHom.comp C f) X (↑(monomial n) a) = ↑(monomial n) (↑f a)\n[PROOFSTEP]\nrw [eval₂_monomial, ← C_mul_X_pow_eq_monomial]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na✝ b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nn : ℕ\na : R\n⊢ ↑(RingHom.comp C f) a * X ^ n = ↑C (↑f a) * X ^ n\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\n⊢ map f (p * q) = map f p * map f q\n[PROOFSTEP]\nrw [map, eval₂_mul_noncomm]\n[GOAL]\ncase hf\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\n⊢ ∀ (k : ℕ), Commute (↑(RingHom.comp C f) (coeff q k)) X\n[PROOFSTEP]\nexact fun k => (commute_X _).symm\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r✝ : R[X]\ninst✝ : Semiring S\nf : R →+* S\nr : R\n⊢ map f (r • p) = ↑f r • map f p\n[PROOFSTEP]\nrw [map, eval₂_smul, RingHom.comp_apply, C_mul']\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝² : Semiring R\np q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\nn : ℕ\ninst✝ : Nat.AtLeastTwo n\n⊢ map f ↑n = ↑n\n[PROOFSTEP]\nrw [Polynomial.map_nat_cast]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nn : ℕ\n⊢ coeff (map f p) n = ↑f (coeff p n)\n[PROOFSTEP]\nrw [map, eval₂_def, coeff_sum, sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nn : ℕ\n⊢ ∑ n_1 in support p, coeff (↑(RingHom.comp C f) (coeff p n_1) * X ^ n_1) n = ↑f (coeff p n)\n[PROOFSTEP]\nconv_rhs => rw [← sum_C_mul_X_pow_eq p, coeff_sum, sum, map_sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nn : ℕ\n| ↑f (coeff p n)\n[PROOFSTEP]\nrw [← sum_C_mul_X_pow_eq p, coeff_sum, sum, map_sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nn : ℕ\n| ↑f (coeff p n)\n[PROOFSTEP]\nrw [← sum_C_mul_X_pow_eq p, coeff_sum, sum, map_sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nn : ℕ\n| ↑f (coeff p n)\n[PROOFSTEP]\nrw [← sum_C_mul_X_pow_eq p, coeff_sum, sum, map_sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nn : ℕ\n⊢ ∑ n_1 in support p, coeff (↑(RingHom.comp C f) (coeff p n_1) * X ^ n_1) n =\n ∑ x in support p, ↑f (coeff (↑C (coeff p x) * X ^ x) n)\n[PROOFSTEP]\nrefine'\n Finset.sum_congr rfl fun x _hx =>\n _\n -- Porting note: Was `simp [Function.comp, coeff_C_mul_X_pow, f.map_mul]`.\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nn x : ℕ\n_hx : x ∈ support p\n⊢ coeff (↑(RingHom.comp C f) (coeff p x) * X ^ x) n = ↑f (coeff (↑C (coeff p x) * X ^ x) n)\n[PROOFSTEP]\nsimp [Function.comp, coeff_C_mul_X_pow, -map_mul, -coeff_C_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nn x : ℕ\n_hx : x ∈ support p\n⊢ (if n = x then ↑f (coeff p x) else 0) = ↑f (if n = x then coeff p x else 0)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nn x : ℕ\n_hx : x ∈ support p\nh✝ : n = x\n⊢ ↑f (coeff p x) = ↑f (coeff p x)\n[PROOFSTEP]\nsimp [f.map_zero]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nn x : ℕ\n_hx : x ∈ support p\nh✝ : ¬n = x\n⊢ 0 = ↑f 0\n[PROOFSTEP]\nsimp [f.map_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\ne : R ≃+* S\n⊢ RingHom.comp ↑(mapRingHom ↑(RingEquiv.symm e)) ↑(mapRingHom ↑e) = RingHom.id R[X]\n[PROOFSTEP]\next\n[GOAL]\ncase h₁.a.a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\ne : R ≃+* S\nx✝ : R\nn✝ : ℕ\n⊢ coeff (↑(RingHom.comp (RingHom.comp ↑(mapRingHom ↑(RingEquiv.symm e)) ↑(mapRingHom ↑e)) C) x✝) n✝ =\n coeff (↑(RingHom.comp (RingHom.id R[X]) C) x✝) n✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂.a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\ne : R ≃+* S\nn✝ : ℕ\n⊢ coeff (↑(RingHom.comp ↑(mapRingHom ↑(RingEquiv.symm e)) ↑(mapRingHom ↑e)) X) n✝ = coeff (↑(RingHom.id R[X]) X) n✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\ne : R ≃+* S\n⊢ RingHom.comp ↑(mapRingHom ↑e) ↑(mapRingHom ↑(RingEquiv.symm e)) = RingHom.id S[X]\n[PROOFSTEP]\next\n[GOAL]\ncase h₁.a.a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\ne : R ≃+* S\nx✝ : S\nn✝ : ℕ\n⊢ coeff (↑(RingHom.comp (RingHom.comp ↑(mapRingHom ↑e) ↑(mapRingHom ↑(RingEquiv.symm e))) C) x✝) n✝ =\n coeff (↑(RingHom.comp (RingHom.id S[X]) C) x✝) n✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂.a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\ne : R ≃+* S\nn✝ : ℕ\n⊢ coeff (↑(RingHom.comp ↑(mapRingHom ↑e) ↑(mapRingHom ↑(RingEquiv.symm e))) X) n✝ = coeff (↑(RingHom.id S[X]) X) n✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np✝ q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\ninst✝ : Semiring T\ng : S →+* T\np : R[X]\n⊢ ∀ (n : ℕ), coeff (map g (map f p)) n = coeff (map (RingHom.comp g f) p) n\n[PROOFSTEP]\nsimp [coeff_map]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\n⊢ map (RingHom.id R) p = p\n[PROOFSTEP]\nsimp [Polynomial.ext_iff, coeff_map]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\n⊢ eval₂ f x p = eval x (map f p)\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_add p q hp hq => simp [hp, hq]\n| h_monomial n r => simp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\n⊢ eval₂ f x p = eval x (map f p)\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_add p q hp hq => simp [hp, hq]\n| h_monomial n r => simp\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q✝ r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\np q : R[X]\nhp : eval₂ f x p = eval x (map f p)\nhq : eval₂ f x q = eval x (map f q)\n⊢ eval₂ f x (p + q) = eval x (map f (p + q))\n[PROOFSTEP]\n\n| h_add p q hp hq => simp [hp, hq]\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q✝ r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\np q : R[X]\nhp : eval₂ f x p = eval x (map f p)\nhq : eval₂ f x q = eval x (map f q)\n⊢ eval₂ f x (p + q) = eval x (map f (p + q))\n[PROOFSTEP]\nsimp [hp, hq]\n[GOAL]\ncase h_monomial\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r✝ : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\nn : ℕ\nr : R\n⊢ eval₂ f x (↑(monomial n) r) = eval x (map f (↑(monomial n) r))\n[PROOFSTEP]\n\n| h_monomial n r => simp\n[GOAL]\ncase h_monomial\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r✝ : R[X]\ninst✝ : Semiring S\nf : R →+* S\nx : S\nn : ℕ\nr : R\n⊢ eval₂ f x (↑(monomial n) r) = eval x (map f (↑(monomial n) r))\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm✝ n : ℕ\ninst✝¹ : Semiring R\np✝ q✝ r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nhf : Function.Injective ↑f\np q : R[X]\nh : map f p = map f q\nm : ℕ\n⊢ ↑f (coeff p m) = ↑f (coeff q m)\n[PROOFSTEP]\nrw [← coeff_map f, ← coeff_map f, h]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝¹ q✝ r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nhf : Function.Surjective ↑f\np✝ p q : S[X]\nhp : ∃ a, map f a = p\nhq : ∃ a, map f a = q\np' : R[X]\nhp' : map f p' = p\nq' : R[X]\nhq' : map f q' = q\n⊢ map f (p' + q') = p + q\n[PROOFSTEP]\nrw [Polynomial.map_add f, hp', hq']\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np✝ q r✝ : R[X]\ninst✝ : Semiring S\nf : R →+* S\nhf : Function.Surjective ↑f\np : S[X]\nn : ℕ\ns : S\nr : R\nhr : ↑f r = s\n⊢ map f (↑(monomial n) r) = ↑(monomial n) s\n[PROOFSTEP]\nrw [map_monomial f, hr]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\np : R[X]\n⊢ degree (map f p) ≤ degree p\n[PROOFSTEP]\nrefine (degree_le_iff_coeff_zero _ _).2 fun m hm => ?_\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm✝ n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\np : R[X]\nm : ℕ\nhm : degree p < ↑m\n⊢ coeff (map f p) m = 0\n[PROOFSTEP]\nrw [degree_lt_iff_coeff_zero] at hm \n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm✝ n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\np : R[X]\nm : ℕ\nhm : ∀ (m_1 : ℕ), m ≤ m_1 → coeff p m_1 = 0\n⊢ coeff (map f p) m = 0\n[PROOFSTEP]\nsimp [hm m le_rfl]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nhp : Monic p\nhfp : map f p = 0\nx : R\n⊢ ↑f x = ↑f x * ↑f (leadingCoeff p)\n[PROOFSTEP]\nsimp only [mul_one, hp.leadingCoeff, f.map_one]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nhp : Monic p\nhfp : map f p = 0\nx : R\n⊢ ↑f x * coeff (map f p) (natDegree p) = 0\n[PROOFSTEP]\nsimp only [hfp, mul_zero, coeff_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\nhp : Monic p\nh : ∀ (x : R), ↑f x = 0\nn : ℕ\n⊢ coeff (map f p) n = coeff 0 n\n[PROOFSTEP]\nsimp only [h, coeff_map, coeff_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\nhf : ↑f (leadingCoeff p) ≠ 0\n⊢ degree p ≤ degree (map f p)\n[PROOFSTEP]\nhave hp0 : p ≠ 0 := leadingCoeff_ne_zero.mp fun hp0 => hf (_root_.trans (congr_arg _ hp0) f.map_zero)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\nhf : ↑f (leadingCoeff p) ≠ 0\nhp0 : p ≠ 0\n⊢ degree p ≤ degree (map f p)\n[PROOFSTEP]\nrw [degree_eq_natDegree hp0]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\nhf : ↑f (leadingCoeff p) ≠ 0\nhp0 : p ≠ 0\n⊢ ↑(natDegree p) ≤ degree (map f p)\n[PROOFSTEP]\nrefine' le_degree_of_ne_zero _\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\nhf : ↑f (leadingCoeff p) ≠ 0\nhp0 : p ≠ 0\n⊢ coeff (map f p) (natDegree p) ≠ 0\n[PROOFSTEP]\nrw [coeff_map]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\nhf : ↑f (leadingCoeff p) ≠ 0\nhp0 : p ≠ 0\n⊢ ↑f (coeff p (natDegree p)) ≠ 0\n[PROOFSTEP]\nexact hf\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\nhf : ↑f (leadingCoeff p) ≠ 0\n⊢ leadingCoeff (map f p) = ↑f (leadingCoeff p)\n[PROOFSTEP]\nunfold leadingCoeff\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\nhf : ↑f (leadingCoeff p) ≠ 0\n⊢ coeff (map f p) (natDegree (map f p)) = ↑f (coeff p (natDegree p))\n[PROOFSTEP]\nrw [coeff_map, natDegree_map_of_leadingCoeff_ne_zero f hf]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\np : S[X]\n⊢ p ∈ RingHom.rangeS (mapRingHom f) ↔ ∀ (n : ℕ), coeff p n ∈ RingHom.rangeS f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\np : S[X]\n⊢ p ∈ RingHom.rangeS (mapRingHom f) → ∀ (n : ℕ), coeff p n ∈ RingHom.rangeS f\n[PROOFSTEP]\nrintro ⟨p, rfl⟩ n\n[GOAL]\ncase mp.intro\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\np : R[X]\nn : ℕ\n⊢ coeff (↑(mapRingHom f) p) n ∈ RingHom.rangeS f\n[PROOFSTEP]\nrw [coe_mapRingHom, coeff_map]\n[GOAL]\ncase mp.intro\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\np : R[X]\nn : ℕ\n⊢ ↑f (coeff p n) ∈ RingHom.rangeS f\n[PROOFSTEP]\nexact Set.mem_range_self _\n[GOAL]\ncase mpr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\np : S[X]\n⊢ (∀ (n : ℕ), coeff p n ∈ RingHom.rangeS f) → p ∈ RingHom.rangeS (mapRingHom f)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\np : S[X]\nh : ∀ (n : ℕ), coeff p n ∈ RingHom.rangeS f\n⊢ p ∈ RingHom.rangeS (mapRingHom f)\n[PROOFSTEP]\nrw [p.as_sum_range_C_mul_X_pow]\n[GOAL]\ncase mpr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\np : S[X]\nh : ∀ (n : ℕ), coeff p n ∈ RingHom.rangeS f\n⊢ ∑ i in range (natDegree p + 1), ↑C (coeff p i) * X ^ i ∈ RingHom.rangeS (mapRingHom f)\n[PROOFSTEP]\nrefine' (mapRingHom f).rangeS.sum_mem _\n[GOAL]\ncase mpr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\np : S[X]\nh : ∀ (n : ℕ), coeff p n ∈ RingHom.rangeS f\n⊢ ∀ (c : ℕ), c ∈ range (natDegree p + 1) → ↑C (coeff p c) * X ^ c ∈ RingHom.rangeS (mapRingHom f)\n[PROOFSTEP]\nintro i _hi\n[GOAL]\ncase mpr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\np : S[X]\nh : ∀ (n : ℕ), coeff p n ∈ RingHom.rangeS f\ni : ℕ\n_hi : i ∈ range (natDegree p + 1)\n⊢ ↑C (coeff p i) * X ^ i ∈ RingHom.rangeS (mapRingHom f)\n[PROOFSTEP]\nrcases h i with ⟨c, hc⟩\n[GOAL]\ncase mpr.intro\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\np : S[X]\nh : ∀ (n : ℕ), coeff p n ∈ RingHom.rangeS f\ni : ℕ\n_hi : i ∈ range (natDegree p + 1)\nc : R\nhc : ↑f c = coeff p i\n⊢ ↑C (coeff p i) * X ^ i ∈ RingHom.rangeS (mapRingHom f)\n[PROOFSTEP]\nuse C c * X ^ i\n[GOAL]\ncase h\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf : R →+* S\np : S[X]\nh : ∀ (n : ℕ), coeff p n ∈ RingHom.rangeS f\ni : ℕ\n_hi : i ∈ range (natDegree p + 1)\nc : R\nhc : ↑f c = coeff p i\n⊢ ↑(mapRingHom f) (↑C c * X ^ i) = ↑C (coeff p i) * X ^ i\n[PROOFSTEP]\nrw [coe_mapRingHom, Polynomial.map_mul, map_C, hc, Polynomial.map_pow, map_X]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np q r : R[X]\ninst✝¹ : Semiring S\nf : R →+* S\ninst✝ : Semiring T\ng : S →+* T\nx : T\n⊢ eval₂ g x (map f p) = eval₂ (RingHom.comp g f) x p\n[PROOFSTEP]\nrw [eval₂_eq_eval_map, eval₂_eq_eval_map, map_map]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q✝ r : R[X]\ninst✝ : Semiring S\nf : R →+* S\np q : R[X]\n⊢ ∀ (a : R), map f (comp (↑C a) q) = comp (map f (↑C a)) (map f q)\n[PROOFSTEP]\nsimp only [map_C, forall_const, C_comp, eq_self_iff_true]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q✝ r : R[X]\ninst✝ : Semiring S\nf : R →+* S\np q : R[X]\n⊢ ∀ (p q_1 : R[X]),\n map f (comp p q) = comp (map f p) (map f q) →\n map f (comp q_1 q) = comp (map f q_1) (map f q) → map f (comp (p + q_1) q) = comp (map f (p + q_1)) (map f q)\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [Polynomial.map_add, add_comp, forall_const, imp_true_iff,\n eq_self_iff_true]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q✝ r : R[X]\ninst✝ : Semiring S\nf : R →+* S\np q : R[X]\n⊢ ∀ (n : ℕ) (a : R),\n map f (comp (↑C a * X ^ n) q) = comp (map f (↑C a * X ^ n)) (map f q) →\n map f (comp (↑C a * X ^ (n + 1)) q) = comp (map f (↑C a * X ^ (n + 1))) (map f q)\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [pow_succ', ← mul_assoc, comp, forall_const, eval₂_mul_X, imp_true_iff,\n eq_self_iff_true, map_X, Polynomial.map_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\np : R[X]\n⊢ eval 0 (map f p) = ↑f (eval 0 p)\n[PROOFSTEP]\nsimp [← coeff_zero_eq_eval_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\np : R[X]\n⊢ eval 1 (map f p) = ↑f (eval 1 p)\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_add p q hp hq => simp only [hp, hq, Polynomial.map_add, RingHom.map_add, eval_add]\n| h_monomial n r => simp only [one_pow, mul_one, eval_monomial, map_monomial]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\np : R[X]\n⊢ eval 1 (map f p) = ↑f (eval 1 p)\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_add p q hp hq => simp only [hp, hq, Polynomial.map_add, RingHom.map_add, eval_add]\n| h_monomial n r => simp only [one_pow, mul_one, eval_monomial, map_monomial]\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q✝ r : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\np q : R[X]\nhp : eval 1 (map f p) = ↑f (eval 1 p)\nhq : eval 1 (map f q) = ↑f (eval 1 q)\n⊢ eval 1 (map f (p + q)) = ↑f (eval 1 (p + q))\n[PROOFSTEP]\n\n| h_add p q hp hq => simp only [hp, hq, Polynomial.map_add, RingHom.map_add, eval_add]\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q✝ r : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\np q : R[X]\nhp : eval 1 (map f p) = ↑f (eval 1 p)\nhq : eval 1 (map f q) = ↑f (eval 1 q)\n⊢ eval 1 (map f (p + q)) = ↑f (eval 1 (p + q))\n[PROOFSTEP]\nsimp only [hp, hq, Polynomial.map_add, RingHom.map_add, eval_add]\n[GOAL]\ncase h_monomial\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r✝ : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\nn : ℕ\nr : R\n⊢ eval 1 (map f (↑(monomial n) r)) = ↑f (eval 1 (↑(monomial n) r))\n[PROOFSTEP]\n\n| h_monomial n r => simp only [one_pow, mul_one, eval_monomial, map_monomial]\n[GOAL]\ncase h_monomial\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q r✝ : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\nn : ℕ\nr : R\n⊢ eval 1 (map f (↑(monomial n) r)) = ↑f (eval 1 (↑(monomial n) r))\n[PROOFSTEP]\nsimp only [one_pow, mul_one, eval_monomial, map_monomial]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\np : R[X]\nn : ℕ\n⊢ eval (↑n) (map f p) = ↑f (eval (↑n) p)\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_add p q hp hq => simp only [hp, hq, Polynomial.map_add, RingHom.map_add, eval_add]\n| h_monomial n r => simp only [map_natCast f, eval_monomial, map_monomial, f.map_pow, f.map_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\np : R[X]\nn : ℕ\n⊢ eval (↑n) (map f p) = ↑f (eval (↑n) p)\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_add p q hp hq => simp only [hp, hq, Polynomial.map_add, RingHom.map_add, eval_add]\n| h_monomial n r => simp only [map_natCast f, eval_monomial, map_monomial, f.map_pow, f.map_mul]\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np✝ q✝ r : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\nn : ℕ\np q : R[X]\nhp : eval (↑n) (map f p) = ↑f (eval (↑n) p)\nhq : eval (↑n) (map f q) = ↑f (eval (↑n) q)\n⊢ eval (↑n) (map f (p + q)) = ↑f (eval (↑n) (p + q))\n[PROOFSTEP]\n\n| h_add p q hp hq => simp only [hp, hq, Polynomial.map_add, RingHom.map_add, eval_add]\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np✝ q✝ r : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\nn : ℕ\np q : R[X]\nhp : eval (↑n) (map f p) = ↑f (eval (↑n) p)\nhq : eval (↑n) (map f q) = ↑f (eval (↑n) q)\n⊢ eval (↑n) (map f (p + q)) = ↑f (eval (↑n) (p + q))\n[PROOFSTEP]\nsimp only [hp, hq, Polynomial.map_add, RingHom.map_add, eval_add]\n[GOAL]\ncase h_monomial\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝¹ : ℕ\ninst✝¹ : Semiring R\np q r✝ : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\nn✝ n : ℕ\nr : R\n⊢ eval (↑n✝) (map f (↑(monomial n) r)) = ↑f (eval (↑n✝) (↑(monomial n) r))\n[PROOFSTEP]\n\n| h_monomial n r => simp only [map_natCast f, eval_monomial, map_monomial, f.map_pow, f.map_mul]\n[GOAL]\ncase h_monomial\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝¹ : ℕ\ninst✝¹ : Semiring R\np q r✝ : R[X]\ninst✝ : Semiring S\nf✝ f : R →+* S\nn✝ n : ℕ\nr : R\n⊢ eval (↑n✝) (map f (↑(monomial n) r)) = ↑f (eval (↑n✝) (↑(monomial n) r))\n[PROOFSTEP]\nsimp only [map_natCast f, eval_monomial, map_monomial, f.map_pow, f.map_mul]\n[GOAL]\nR✝ : Type u\nS✝ : Type v\nT : Type w\nι : Type y\na b : R✝\nm n : ℕ\ninst✝³ : Semiring R✝\np✝ q r : R✝[X]\ninst✝² : Semiring S✝\nf✝ : R✝ →+* S✝\nR : Type u_1\nS : Type u_2\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\np : R[X]\ni : ℤ\n⊢ eval (↑i) (map f p) = ↑f (eval (↑i) p)\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_add p q hp hq => simp only [hp, hq, Polynomial.map_add, RingHom.map_add, eval_add]\n| h_monomial n r => simp only [map_intCast, eval_monomial, map_monomial, map_pow, map_mul]\n[GOAL]\nR✝ : Type u\nS✝ : Type v\nT : Type w\nι : Type y\na b : R✝\nm n : ℕ\ninst✝³ : Semiring R✝\np✝ q r : R✝[X]\ninst✝² : Semiring S✝\nf✝ : R✝ →+* S✝\nR : Type u_1\nS : Type u_2\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\np : R[X]\ni : ℤ\n⊢ eval (↑i) (map f p) = ↑f (eval (↑i) p)\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_add p q hp hq => simp only [hp, hq, Polynomial.map_add, RingHom.map_add, eval_add]\n| h_monomial n r => simp only [map_intCast, eval_monomial, map_monomial, map_pow, map_mul]\n[GOAL]\ncase h_add\nR✝ : Type u\nS✝ : Type v\nT : Type w\nι : Type y\na b : R✝\nm n : ℕ\ninst✝³ : Semiring R✝\np✝ q✝ r : R✝[X]\ninst✝² : Semiring S✝\nf✝ : R✝ →+* S✝\nR : Type u_1\nS : Type u_2\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\ni : ℤ\np q : R[X]\nhp : eval (↑i) (map f p) = ↑f (eval (↑i) p)\nhq : eval (↑i) (map f q) = ↑f (eval (↑i) q)\n⊢ eval (↑i) (map f (p + q)) = ↑f (eval (↑i) (p + q))\n[PROOFSTEP]\n\n| h_add p q hp hq => simp only [hp, hq, Polynomial.map_add, RingHom.map_add, eval_add]\n[GOAL]\ncase h_add\nR✝ : Type u\nS✝ : Type v\nT : Type w\nι : Type y\na b : R✝\nm n : ℕ\ninst✝³ : Semiring R✝\np✝ q✝ r : R✝[X]\ninst✝² : Semiring S✝\nf✝ : R✝ →+* S✝\nR : Type u_1\nS : Type u_2\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\ni : ℤ\np q : R[X]\nhp : eval (↑i) (map f p) = ↑f (eval (↑i) p)\nhq : eval (↑i) (map f q) = ↑f (eval (↑i) q)\n⊢ eval (↑i) (map f (p + q)) = ↑f (eval (↑i) (p + q))\n[PROOFSTEP]\nsimp only [hp, hq, Polynomial.map_add, RingHom.map_add, eval_add]\n[GOAL]\ncase h_monomial\nR✝ : Type u\nS✝ : Type v\nT : Type w\nι : Type y\na b : R✝\nm n✝ : ℕ\ninst✝³ : Semiring R✝\np q r✝ : R✝[X]\ninst✝² : Semiring S✝\nf✝ : R✝ →+* S✝\nR : Type u_1\nS : Type u_2\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\ni : ℤ\nn : ℕ\nr : R\n⊢ eval (↑i) (map f (↑(monomial n) r)) = ↑f (eval (↑i) (↑(monomial n) r))\n[PROOFSTEP]\n\n| h_monomial n r => simp only [map_intCast, eval_monomial, map_monomial, map_pow, map_mul]\n[GOAL]\ncase h_monomial\nR✝ : Type u\nS✝ : Type v\nT : Type w\nι : Type y\na b : R✝\nm n✝ : ℕ\ninst✝³ : Semiring R✝\np q r✝ : R✝[X]\ninst✝² : Semiring S✝\nf✝ : R✝ →+* S✝\nR : Type u_1\nS : Type u_2\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\ni : ℤ\nn : ℕ\nr : R\n⊢ eval (↑i) (map f (↑(monomial n) r)) = ↑f (eval (↑i) (↑(monomial n) r))\n[PROOFSTEP]\nsimp only [map_intCast, eval_monomial, map_monomial, map_pow, map_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝² : Semiring R\np q r : R[X]\ninst✝¹ : Semiring S\ninst✝ : Semiring T\nf : R →+* S\ng : S →+* T\nx : S\n⊢ ↑g (eval₂ f x p) = eval₂ (RingHom.comp g f) (↑g x) p\n[PROOFSTEP]\nrw [← eval₂_map, eval₂_at_apply, eval_map]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q : R[X]\nx✝ : R\ninst✝ : CommSemiring S\nf : R →+* S\nx : S\n⊢ eval₂ f x (comp p q) = eval₂ f (eval₂ f x q) p\n[PROOFSTEP]\nrw [comp, p.as_sum_range]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q : R[X]\nx✝ : R\ninst✝ : CommSemiring S\nf : R →+* S\nx : S\n⊢ eval₂ f x (eval₂ C q (∑ i in range (natDegree p + 1), ↑(monomial i) (coeff p i))) =\n eval₂ f (eval₂ f x q) (∑ i in range (natDegree p + 1), ↑(monomial i) (coeff p i))\n[PROOFSTEP]\nsimp [eval₂_finset_sum, eval₂_pow]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q : R[X]\nx : R\ninst✝ : CommSemiring S\nf : R →+* S\nk : ℕ\nt : S\n⊢ eval₂ f t ((comp p)^[k] q) = (fun x => eval₂ f x p)^[k] (eval₂ f t q)\n[PROOFSTEP]\ninduction' k with k IH\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q : R[X]\nx : R\ninst✝ : CommSemiring S\nf : R →+* S\nt : S\n⊢ eval₂ f t ((comp p)^[Nat.zero] q) = (fun x => eval₂ f x p)^[Nat.zero] (eval₂ f t q)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q : R[X]\nx : R\ninst✝ : CommSemiring S\nf : R →+* S\nt : S\nk : ℕ\nIH : eval₂ f t ((comp p)^[k] q) = (fun x => eval₂ f x p)^[k] (eval₂ f t q)\n⊢ eval₂ f t ((comp p)^[Nat.succ k] q) = (fun x => eval₂ f x p)^[Nat.succ k] (eval₂ f t q)\n[PROOFSTEP]\nrw [Function.iterate_succ_apply', Function.iterate_succ_apply', eval₂_comp, IH]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : CommSemiring R\np q : R[X]\nx : R\ninst✝ : CommSemiring S\nf : R →+* S\n⊢ eval x (comp p q) = eval (eval x q) p\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_add r s hr hs => simp [add_comp, hr, hs]\n| h_monomial n a => simp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : CommSemiring R\np q : R[X]\nx : R\ninst✝ : CommSemiring S\nf : R →+* S\n⊢ eval x (comp p q) = eval (eval x q) p\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_add r s hr hs => simp [add_comp, hr, hs]\n| h_monomial n a => simp\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : CommSemiring R\np q : R[X]\nx : R\ninst✝ : CommSemiring S\nf : R →+* S\nr s : R[X]\nhr : eval x (comp r q) = eval (eval x q) r\nhs : eval x (comp s q) = eval (eval x q) s\n⊢ eval x (comp (r + s) q) = eval (eval x q) (r + s)\n[PROOFSTEP]\n\n| h_add r s hr hs => simp [add_comp, hr, hs]\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : CommSemiring R\np q : R[X]\nx : R\ninst✝ : CommSemiring S\nf : R →+* S\nr s : R[X]\nhr : eval x (comp r q) = eval (eval x q) r\nhs : eval x (comp s q) = eval (eval x q) s\n⊢ eval x (comp (r + s) q) = eval (eval x q) (r + s)\n[PROOFSTEP]\nsimp [add_comp, hr, hs]\n[GOAL]\ncase h_monomial\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na✝ b : R\nm n✝ : ℕ\ninst✝¹ : CommSemiring R\np q : R[X]\nx : R\ninst✝ : CommSemiring S\nf : R →+* S\nn : ℕ\na : R\n⊢ eval x (comp (↑(monomial n) a) q) = eval (eval x q) (↑(monomial n) a)\n[PROOFSTEP]\n\n| h_monomial n a => simp\n[GOAL]\ncase h_monomial\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na✝ b : R\nm n✝ : ℕ\ninst✝¹ : CommSemiring R\np q : R[X]\nx : R\ninst✝ : CommSemiring S\nf : R →+* S\nn : ℕ\na : R\n⊢ eval x (comp (↑(monomial n) a) q) = eval (eval x q) (↑(monomial n) a)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : CommSemiring R\np✝ q✝ : R[X]\nx : R\ninst✝ : CommSemiring S\nf : R →+* S\np q : R[X]\nH : IsRoot q a\n⊢ IsRoot (p * q) a\n[PROOFSTEP]\nrw [IsRoot, eval_mul, IsRoot.def.1 H, mul_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : CommSemiring R\np✝ q✝ : R[X]\nx : R\ninst✝ : CommSemiring S\nf : R →+* S\np q : R[X]\nH : IsRoot p a\n⊢ IsRoot (p * q) a\n[PROOFSTEP]\nrw [IsRoot, eval_mul, IsRoot.def.1 H, zero_mul]\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\nι✝ : Type y\na b : R✝\nm n : ℕ\ninst✝³ : CommSemiring R✝\np✝ q : R✝[X]\nx✝ : R✝\ninst✝² : CommSemiring S\nf : R✝ →+* S\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nι : Type u_1\ns : Finset ι\np : ι → R[X]\nx : R\n⊢ IsRoot (∏ j in s, p j) x ↔ ∃ i, i ∈ s ∧ IsRoot (p i) x\n[PROOFSTEP]\nsimp only [IsRoot, eval_prod, Finset.prod_eq_zero_iff]\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R✝\nm n✝ : ℕ\ninst✝² : CommSemiring R✝\np q : R✝[X]\nx✝ : R✝\ninst✝¹ : CommSemiring S\nf : R✝ →+* S\nR : Type u_1\ninst✝ : CommSemiring R\nn : ℕ\nx : R\n⊢ eval x (∑ i in range n, X ^ i) = ∑ i in range n, x ^ i\n[PROOFSTEP]\nsimp [eval_finset_sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nf : R →+* S\np : R[X]\n⊢ support (map f p) ⊆ support p\n[PROOFSTEP]\nintro x\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nf : R →+* S\np : R[X]\nx : ℕ\n⊢ x ∈ support (map f p) → x ∈ support p\n[PROOFSTEP]\ncontrapose!\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nf : R →+* S\np : R[X]\nx : ℕ\n⊢ ¬x ∈ support p → ¬x ∈ support (map f p)\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\np : R[X]\nf : R →+* S\nhf : Function.Injective ↑f\n⊢ support (map f p) = support p\n[PROOFSTEP]\nsimp_rw [Finset.ext_iff, mem_support_iff, coeff_map, ← map_zero f, hf.ne_iff, forall_const]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : CommSemiring S\nf✝ f : R →+* S\nx : R\np : R[X]\nh : IsRoot p x\n⊢ IsRoot (Polynomial.map f p) (↑f x)\n[PROOFSTEP]\nrw [IsRoot, eval_map, eval₂_hom, h.eq_zero, f.map_zero]\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R✝\nm n : ℕ\ninst✝² : CommSemiring R✝\ninst✝¹ : CommSemiring S\nf✝ : R✝ →+* S\nR : Type u_1\ninst✝ : CommRing R\nf : R →+* S\nx : R\np : R[X]\nh : IsRoot (Polynomial.map f p) (↑f x)\nhf : Function.Injective ↑f\n⊢ IsRoot p x\n[PROOFSTEP]\nrwa [IsRoot, ← (injective_iff_map_eq_zero' f).mp hf, ← eval₂_hom, ← eval_map]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n✝ : ℕ\ninst✝ : Ring R\np q r : R[X]\nn : ℤ\nx : R\n⊢ eval x ↑n = ↑n\n[PROOFSTEP]\nsimp only [← C_eq_int_cast, eval_C]\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Ring R\np q r : R[X]\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\nx : S\n⊢ eval₂ f x (-p) = -eval₂ f x p\n[PROOFSTEP]\nrw [eq_neg_iff_add_eq_zero, ← eval₂_add, add_left_neg, eval₂_zero]\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝¹ : Ring R\np q r : R[X]\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\nx : S\n⊢ eval₂ f x (p - q) = eval₂ f x p - eval₂ f x q\n[PROOFSTEP]\nrw [sub_eq_add_neg, eval₂_add, eval₂_neg, sub_eq_add_neg]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Ring R\np q r : R[X]\n⊢ IsRoot (X - ↑C a) b ↔ a = b\n[PROOFSTEP]\nrw [IsRoot.def, eval_sub, eval_X, eval_C, sub_eq_zero, eq_comm]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Ring R\np q r : R[X]\ni : ℤ\n⊢ comp (↑i) p = ↑i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase ofNat\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Ring R\np q r : R[X]\na✝ : ℕ\n⊢ comp (↑(Int.ofNat a✝)) p = ↑(Int.ofNat a✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase negSucc\nR : Type u\nS : Type v\nT : Type w\nι : Type y\na b : R\nm n : ℕ\ninst✝ : Ring R\np q r : R[X]\na✝ : ℕ\n⊢ comp (↑(Int.negSucc a✝)) p = ↑(Int.negSucc a✝)\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Data.Polynomial.Eval", "llama_tokens": 47739, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8031737963569016, "lm_q2_score": 0.7154240018510026, "lm_q1q2_score": 0.5746098115715168}} {"text": "[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nv : ℙ K V\n⊢ ∀ (a b : { v // v ≠ 0 }), Setoid.r a b → Submodule.span K {↑a} = Submodule.span K {↑b}\n[PROOFSTEP]\nrintro ⟨a, ha⟩ ⟨b, hb⟩ ⟨x, rfl : x • b = a⟩\n[GOAL]\ncase mk.mk.intro\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nv : ℙ K V\nb : V\nhb : b ≠ 0\nx : Kˣ\nha : x • b ≠ 0\n⊢ Submodule.span K {↑{ val := x • b, property := ha }} = Submodule.span K {↑{ val := b, property := hb }}\n[PROOFSTEP]\nexact Submodule.span_singleton_group_smul_eq _ x _\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nv w : V\nhv : v ≠ 0\nhw : w ≠ 0\n⊢ mk K v hv = mk K w hw ↔ ∃ a, a • w = v\n[PROOFSTEP]\nrw [mk_eq_mk_iff K v w hv hw]\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nv w : V\nhv : v ≠ 0\nhw : w ≠ 0\n⊢ (∃ a, a • w = v) ↔ ∃ a, a • w = v\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nv w : V\nhv : v ≠ 0\nhw : w ≠ 0\n⊢ (∃ a, a • w = v) → ∃ a, a • w = v\n[PROOFSTEP]\nrintro ⟨a, ha⟩\n[GOAL]\ncase mp.intro\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nv w : V\nhv : v ≠ 0\nhw : w ≠ 0\na : Kˣ\nha : a • w = v\n⊢ ∃ a, a • w = v\n[PROOFSTEP]\nexact ⟨a, ha⟩\n[GOAL]\ncase mpr\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nv w : V\nhv : v ≠ 0\nhw : w ≠ 0\n⊢ (∃ a, a • w = v) → ∃ a, a • w = v\n[PROOFSTEP]\nrintro ⟨a, ha⟩\n[GOAL]\ncase mpr.intro\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nv w : V\nhv : v ≠ 0\nhw : w ≠ 0\na : K\nha : a • w = v\n⊢ ∃ a, a • w = v\n[PROOFSTEP]\nrefine' ⟨Units.mk0 a fun c => hv.symm _, ha⟩\n[GOAL]\ncase mpr.intro\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nv w : V\nhv : v ≠ 0\nhw : w ≠ 0\na : K\nha : a • w = v\nc : a = 0\n⊢ 0 = v\n[PROOFSTEP]\nrwa [c, zero_smul] at ha \n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nv : ℙ K V\n⊢ Projectivization.submodule v = Submodule.span K {Projectivization.rep v}\n[PROOFSTEP]\nconv_lhs => rw [← v.mk_rep]\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nv : ℙ K V\n| Projectivization.submodule v\n[PROOFSTEP]\nrw [← v.mk_rep]\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nv : ℙ K V\n| Projectivization.submodule v\n[PROOFSTEP]\nrw [← v.mk_rep]\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nv : ℙ K V\n| Projectivization.submodule v\n[PROOFSTEP]\nrw [← v.mk_rep]\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nv : ℙ K V\n⊢ finrank K { x // x ∈ Projectivization.submodule v } = 1\n[PROOFSTEP]\nrw [submodule_eq]\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nv : ℙ K V\n⊢ finrank K { x // x ∈ Submodule.span K {Projectivization.rep v} } = 1\n[PROOFSTEP]\nexact finrank_span_singleton v.rep_nonzero\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nv : ℙ K V\n⊢ FiniteDimensional K { x // x ∈ Projectivization.submodule v }\n[PROOFSTEP]\nrw [← v.mk_rep]\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nv : ℙ K V\n⊢ FiniteDimensional K\n { x // x ∈ Projectivization.submodule (mk K (Projectivization.rep v) (_ : Projectivization.rep v ≠ 0)) }\n[PROOFSTEP]\nchange FiniteDimensional K (K ∙ v.rep)\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nv : ℙ K V\n⊢ FiniteDimensional K { x // x ∈ Submodule.span K {Projectivization.rep v} }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nu v : ℙ K V\nh : Projectivization.submodule u = Projectivization.submodule v\n⊢ u = v\n[PROOFSTEP]\ninduction' u using ind with u hu\n[GOAL]\ncase h\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nu✝ v : ℙ K V\nh✝ : Projectivization.submodule u✝ = Projectivization.submodule v\nu : V\nhu : u ≠ 0\nh : Projectivization.submodule (mk K u hu) = Projectivization.submodule v\n⊢ mk K u hu = v\n[PROOFSTEP]\ninduction' v using ind with v hv\n[GOAL]\ncase h.h\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nu✝ v✝ : ℙ K V\nh✝² : Projectivization.submodule u✝ = Projectivization.submodule v✝\nu : V\nhu : u ≠ 0\nh✝¹ : Projectivization.submodule (mk K u hu) = Projectivization.submodule v✝\nv : V\nhv : v ≠ 0\nh✝ : Projectivization.submodule u✝ = Projectivization.submodule (mk K v hv)\nh : Projectivization.submodule (mk K u hu) = Projectivization.submodule (mk K v hv)\n⊢ mk K u hu = mk K v hv\n[PROOFSTEP]\nrw [submodule_mk, submodule_mk, Submodule.span_singleton_eq_span_singleton] at h \n[GOAL]\ncase h.h\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nu✝ v✝ : ℙ K V\nh✝² : Projectivization.submodule u✝ = Projectivization.submodule v✝\nu : V\nhu : u ≠ 0\nh✝¹ : Projectivization.submodule (mk K u hu) = Projectivization.submodule v✝\nv : V\nhv : v ≠ 0\nh✝ : Projectivization.submodule u✝ = Projectivization.submodule (mk K v hv)\nh : ∃ z, z • u = v\n⊢ mk K u hu = mk K v hv\n[PROOFSTEP]\nexact ((mk_eq_mk_iff K v u hv hu).2 h).symm\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nH : Submodule K V\n⊢ H ∈ Set.range Projectivization.submodule ↔ finrank K { x // x ∈ ↑(Equiv.refl (Submodule K V)) H } = 1\n[PROOFSTEP]\nrefine ⟨fun ⟨v, hv⟩ ↦ hv ▸ v.finrank_submodule, fun h ↦ ?_⟩\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nH : Submodule K V\nh : finrank K { x // x ∈ ↑(Equiv.refl (Submodule K V)) H } = 1\n⊢ H ∈ Set.range Projectivization.submodule\n[PROOFSTEP]\nrcases finrank_eq_one_iff'.1 h with ⟨v : H, hv₀, hv : ∀ w : H, _⟩\n[GOAL]\ncase intro.intro\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nH : Submodule K V\nh : finrank K { x // x ∈ ↑(Equiv.refl (Submodule K V)) H } = 1\nv : { x // x ∈ H }\nhv₀ : v ≠ 0\nhv : ∀ (w : { x // x ∈ H }), ∃ c, c • v = w\n⊢ H ∈ Set.range Projectivization.submodule\n[PROOFSTEP]\nuse mk K (v : V) (Subtype.coe_injective.ne hv₀)\n[GOAL]\ncase h\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nH : Submodule K V\nh : finrank K { x // x ∈ ↑(Equiv.refl (Submodule K V)) H } = 1\nv : { x // x ∈ H }\nhv₀ : v ≠ 0\nhv : ∀ (w : { x // x ∈ H }), ∃ c, c • v = w\n⊢ Projectivization.submodule (mk K ↑v (_ : ↑v ≠ ↑0)) = H\n[PROOFSTEP]\nrw [submodule_mk, SetLike.ext'_iff, Submodule.span_singleton_eq_range]\n[GOAL]\ncase h\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nH : Submodule K V\nh : finrank K { x // x ∈ ↑(Equiv.refl (Submodule K V)) H } = 1\nv : { x // x ∈ H }\nhv₀ : v ≠ 0\nhv : ∀ (w : { x // x ∈ H }), ∃ c, c • v = w\n⊢ (Set.range fun x => x • ↑v) = ↑H\n[PROOFSTEP]\nrefine (Set.range_subset_iff.2 fun _ ↦ H.smul_mem _ v.2).antisymm fun x hx ↦ ?_\n[GOAL]\ncase h\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nH : Submodule K V\nh : finrank K { x // x ∈ ↑(Equiv.refl (Submodule K V)) H } = 1\nv : { x // x ∈ H }\nhv₀ : v ≠ 0\nhv : ∀ (w : { x // x ∈ H }), ∃ c, c • v = w\nx : V\nhx : x ∈ ↑H\n⊢ x ∈ Set.range fun x => x • ↑v\n[PROOFSTEP]\nrcases hv ⟨x, hx⟩ with ⟨c, hc⟩\n[GOAL]\ncase h.intro\nK : Type u_1\nV : Type u_2\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nH : Submodule K V\nh : finrank K { x // x ∈ ↑(Equiv.refl (Submodule K V)) H } = 1\nv : { x // x ∈ H }\nhv₀ : v ≠ 0\nhv : ∀ (w : { x // x ∈ H }), ∃ c, c • v = w\nx : V\nhx : x ∈ ↑H\nc : K\nhc : c • v = { val := x, property := hx }\n⊢ x ∈ Set.range fun x => x • ↑v\n[PROOFSTEP]\nexact ⟨c, congr_arg Subtype.val hc⟩\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝⁵ : DivisionRing K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nL : Type u_3\nW : Type u_4\ninst✝² : DivisionRing L\ninst✝¹ : AddCommGroup W\ninst✝ : Module L W\nσ : K →+* L\nf : V →ₛₗ[σ] W\nhf : Function.Injective ↑f\nv : { v // v ≠ 0 }\nc : ↑f ↑v = 0\n⊢ ↑f ↑v = ↑f 0\n[PROOFSTEP]\nsimp [c]\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝⁵ : DivisionRing K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nL : Type u_3\nW : Type u_4\ninst✝² : DivisionRing L\ninst✝¹ : AddCommGroup W\ninst✝ : Module L W\nσ : K →+* L\nf : V →ₛₗ[σ] W\nhf : Function.Injective ↑f\n⊢ (Setoid.r ⇒ Setoid.r) (fun v => { val := ↑f ↑v, property := (_ : ↑f ↑v = 0 → False) }) fun v =>\n { val := ↑f ↑v, property := (_ : ↑f ↑v = 0 → False) }\n[PROOFSTEP]\nrintro ⟨u, hu⟩ ⟨v, hv⟩ ⟨a, ha⟩\n[GOAL]\ncase mk.mk.intro\nK : Type u_1\nV : Type u_2\ninst✝⁵ : DivisionRing K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nL : Type u_3\nW : Type u_4\ninst✝² : DivisionRing L\ninst✝¹ : AddCommGroup W\ninst✝ : Module L W\nσ : K →+* L\nf : V →ₛₗ[σ] W\nhf : Function.Injective ↑f\nu : V\nhu : u ≠ 0\nv : V\nhv : v ≠ 0\na : Kˣ\nha : (fun m => m • ↑{ val := v, property := hv }) a = ↑{ val := u, property := hu }\n⊢ Setoid.r ((fun v => { val := ↑f ↑v, property := (_ : ↑f ↑v = 0 → False) }) { val := u, property := hu })\n ((fun v => { val := ↑f ↑v, property := (_ : ↑f ↑v = 0 → False) }) { val := v, property := hv })\n[PROOFSTEP]\nuse Units.map σ.toMonoidHom a\n[GOAL]\ncase h\nK : Type u_1\nV : Type u_2\ninst✝⁵ : DivisionRing K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nL : Type u_3\nW : Type u_4\ninst✝² : DivisionRing L\ninst✝¹ : AddCommGroup W\ninst✝ : Module L W\nσ : K →+* L\nf : V →ₛₗ[σ] W\nhf : Function.Injective ↑f\nu : V\nhu : u ≠ 0\nv : V\nhv : v ≠ 0\na : Kˣ\nha : (fun m => m • ↑{ val := v, property := hv }) a = ↑{ val := u, property := hu }\n⊢ (fun m => m • ↑((fun v => { val := ↑f ↑v, property := (_ : ↑f ↑v = 0 → False) }) { val := v, property := hv }))\n (↑(Units.map ↑σ) a) =\n ↑((fun v => { val := ↑f ↑v, property := (_ : ↑f ↑v = 0 → False) }) { val := u, property := hu })\n[PROOFSTEP]\ndsimp at ha ⊢\n[GOAL]\ncase h\nK : Type u_1\nV : Type u_2\ninst✝⁵ : DivisionRing K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nL : Type u_3\nW : Type u_4\ninst✝² : DivisionRing L\ninst✝¹ : AddCommGroup W\ninst✝ : Module L W\nσ : K →+* L\nf : V →ₛₗ[σ] W\nhf : Function.Injective ↑f\nu : V\nhu : u ≠ 0\nv : V\nhv : v ≠ 0\na : Kˣ\nha : a • v = u\n⊢ ↑(Units.map ↑σ) a • ↑f v = ↑f u\n[PROOFSTEP]\nerw [← f.map_smulₛₗ, ha]\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝⁶ : DivisionRing K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nL : Type u_3\nW : Type u_4\ninst✝³ : DivisionRing L\ninst✝² : AddCommGroup W\ninst✝¹ : Module L W\nσ : K →+* L\nτ : L →+* K\ninst✝ : RingHomInvPair σ τ\nf : V →ₛₗ[σ] W\nhf : Function.Injective ↑f\nu v : ℙ K V\nh : map f hf u = map f hf v\n⊢ u = v\n[PROOFSTEP]\ninduction' u using ind with u hu\n[GOAL]\ncase h\nK : Type u_1\nV : Type u_2\ninst✝⁶ : DivisionRing K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nL : Type u_3\nW : Type u_4\ninst✝³ : DivisionRing L\ninst✝² : AddCommGroup W\ninst✝¹ : Module L W\nσ : K →+* L\nτ : L →+* K\ninst✝ : RingHomInvPair σ τ\nf : V →ₛₗ[σ] W\nhf : Function.Injective ↑f\nu✝ v : ℙ K V\nh✝ : map f hf u✝ = map f hf v\nu : V\nhu : u ≠ 0\nh : map f hf (mk K u hu) = map f hf v\n⊢ mk K u hu = v\n[PROOFSTEP]\ninduction' v using ind with v hv\n[GOAL]\ncase h.h\nK : Type u_1\nV : Type u_2\ninst✝⁶ : DivisionRing K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nL : Type u_3\nW : Type u_4\ninst✝³ : DivisionRing L\ninst✝² : AddCommGroup W\ninst✝¹ : Module L W\nσ : K →+* L\nτ : L →+* K\ninst✝ : RingHomInvPair σ τ\nf : V →ₛₗ[σ] W\nhf : Function.Injective ↑f\nu✝ v✝ : ℙ K V\nh✝² : map f hf u✝ = map f hf v✝\nu : V\nhu : u ≠ 0\nh✝¹ : map f hf (mk K u hu) = map f hf v✝\nv : V\nhv : v ≠ 0\nh✝ : map f hf u✝ = map f hf (mk K v hv)\nh : map f hf (mk K u hu) = map f hf (mk K v hv)\n⊢ mk K u hu = mk K v hv\n[PROOFSTEP]\nsimp only [map_mk, mk_eq_mk_iff'] at h ⊢\n[GOAL]\ncase h.h\nK : Type u_1\nV : Type u_2\ninst✝⁶ : DivisionRing K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nL : Type u_3\nW : Type u_4\ninst✝³ : DivisionRing L\ninst✝² : AddCommGroup W\ninst✝¹ : Module L W\nσ : K →+* L\nτ : L →+* K\ninst✝ : RingHomInvPair σ τ\nf : V →ₛₗ[σ] W\nhf : Function.Injective ↑f\nu✝ v✝ : ℙ K V\nh✝² : map f hf u✝ = map f hf v✝\nu : V\nhu : u ≠ 0\nh✝¹ : map f hf (mk K u hu) = map f hf v✝\nv : V\nhv : v ≠ 0\nh✝ : map f hf u✝ = map f hf (mk K v hv)\nh : ∃ a, a • ↑f v = ↑f u\n⊢ ∃ a, a • v = u\n[PROOFSTEP]\nrcases h with ⟨a, ha⟩\n[GOAL]\ncase h.h.intro\nK : Type u_1\nV : Type u_2\ninst✝⁶ : DivisionRing K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nL : Type u_3\nW : Type u_4\ninst✝³ : DivisionRing L\ninst✝² : AddCommGroup W\ninst✝¹ : Module L W\nσ : K →+* L\nτ : L →+* K\ninst✝ : RingHomInvPair σ τ\nf : V →ₛₗ[σ] W\nhf : Function.Injective ↑f\nu✝ v✝ : ℙ K V\nh✝¹ : map f hf u✝ = map f hf v✝\nu : V\nhu : u ≠ 0\nh✝ : map f hf (mk K u hu) = map f hf v✝\nv : V\nhv : v ≠ 0\nh : map f hf u✝ = map f hf (mk K v hv)\na : L\nha : a • ↑f v = ↑f u\n⊢ ∃ a, a • v = u\n[PROOFSTEP]\nrefine ⟨τ a, hf ?_⟩\n[GOAL]\ncase h.h.intro\nK : Type u_1\nV : Type u_2\ninst✝⁶ : DivisionRing K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nL : Type u_3\nW : Type u_4\ninst✝³ : DivisionRing L\ninst✝² : AddCommGroup W\ninst✝¹ : Module L W\nσ : K →+* L\nτ : L →+* K\ninst✝ : RingHomInvPair σ τ\nf : V →ₛₗ[σ] W\nhf : Function.Injective ↑f\nu✝ v✝ : ℙ K V\nh✝¹ : map f hf u✝ = map f hf v✝\nu : V\nhu : u ≠ 0\nh✝ : map f hf (mk K u hu) = map f hf v✝\nv : V\nhv : v ≠ 0\nh : map f hf u✝ = map f hf (mk K v hv)\na : L\nha : a • ↑f v = ↑f u\n⊢ ↑f (↑τ a • v) = ↑f u\n[PROOFSTEP]\nrwa [f.map_smulₛₗ, RingHomInvPair.comp_apply_eq₂]\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝⁵ : DivisionRing K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nL : Type u_3\nW : Type u_4\ninst✝² : DivisionRing L\ninst✝¹ : AddCommGroup W\ninst✝ : Module L W\n⊢ map LinearMap.id (_ : Function.Injective ↑(LinearEquiv.refl K V)) = id\n[PROOFSTEP]\next ⟨v⟩\n[GOAL]\ncase h.mk\nK : Type u_1\nV : Type u_2\ninst✝⁵ : DivisionRing K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nL : Type u_3\nW : Type u_4\ninst✝² : DivisionRing L\ninst✝¹ : AddCommGroup W\ninst✝ : Module L W\nx✝ : ℙ K V\nv : { v // v ≠ 0 }\n⊢ map LinearMap.id (_ : Function.Injective ↑(LinearEquiv.refl K V)) (Quot.mk Setoid.r v) = id (Quot.mk Setoid.r v)\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝⁹ : DivisionRing K\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module K V\nL : Type u_3\nW : Type u_4\ninst✝⁶ : DivisionRing L\ninst✝⁵ : AddCommGroup W\ninst✝⁴ : Module L W\nF : Type u_5\nU : Type u_6\ninst✝³ : Field F\ninst✝² : AddCommGroup U\ninst✝¹ : Module F U\nσ : K →+* L\nτ : L →+* F\nγ : K →+* F\ninst✝ : RingHomCompTriple σ τ γ\nf : V →ₛₗ[σ] W\nhf : Function.Injective ↑f\ng : W →ₛₗ[τ] U\nhg : Function.Injective ↑g\n⊢ map (LinearMap.comp g f) (_ : Function.Injective (↑g ∘ fun x => ↑f x)) = map g hg ∘ map f hf\n[PROOFSTEP]\next ⟨v⟩\n[GOAL]\ncase h.mk\nK : Type u_1\nV : Type u_2\ninst✝⁹ : DivisionRing K\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module K V\nL : Type u_3\nW : Type u_4\ninst✝⁶ : DivisionRing L\ninst✝⁵ : AddCommGroup W\ninst✝⁴ : Module L W\nF : Type u_5\nU : Type u_6\ninst✝³ : Field F\ninst✝² : AddCommGroup U\ninst✝¹ : Module F U\nσ : K →+* L\nτ : L →+* F\nγ : K →+* F\ninst✝ : RingHomCompTriple σ τ γ\nf : V →ₛₗ[σ] W\nhf : Function.Injective ↑f\ng : W →ₛₗ[τ] U\nhg : Function.Injective ↑g\nx✝ : ℙ K V\nv : { v // v ≠ 0 }\n⊢ map (LinearMap.comp g f) (_ : Function.Injective (↑g ∘ fun x => ↑f x)) (Quot.mk Setoid.r v) =\n (map g hg ∘ map f hf) (Quot.mk Setoid.r v)\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.ProjectiveSpace.Basic", "llama_tokens": 8024, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8031737869342624, "lm_q2_score": 0.7154240079185319, "lm_q1q2_score": 0.574609809703615}} {"text": "[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ (fun p => sum p fun n a => ↑C (a * ↑n) * X ^ (n - 1)) (p + q) =\n (fun p => sum p fun n a => ↑C (a * ↑n) * X ^ (n - 1)) p + (fun p => sum p fun n a => ↑C (a * ↑n) * X ^ (n - 1)) q\n[PROOFSTEP]\ndsimp only\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ (sum (p + q) fun n a => ↑C (a * ↑n) * X ^ (n - 1)) =\n (sum p fun n a => ↑C (a * ↑n) * X ^ (n - 1)) + sum q fun n a => ↑C (a * ↑n) * X ^ (n - 1)\n[PROOFSTEP]\nrw [sum_add_index]\n[GOAL]\ncase hf\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ ∀ (i : ℕ), ↑C (0 * ↑i) * X ^ (i - 1) = 0\n[PROOFSTEP]\nsimp only [add_mul, forall_const, RingHom.map_add, eq_self_iff_true, zero_mul, RingHom.map_zero]\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ ∀ (a : ℕ) (b₁ b₂ : R), ↑C ((b₁ + b₂) * ↑a) * X ^ (a - 1) = ↑C (b₁ * ↑a) * X ^ (a - 1) + ↑C (b₂ * ↑a) * X ^ (a - 1)\n[PROOFSTEP]\nsimp only [add_mul, forall_const, RingHom.map_add, eq_self_iff_true, zero_mul, RingHom.map_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝ : Semiring R\na : R\np : R[X]\n⊢ AddHom.toFun\n { toFun := fun p => sum p fun n a => ↑C (a * ↑n) * X ^ (n - 1),\n map_add' :=\n (_ :\n ∀ (p q : R[X]),\n (fun p => sum p fun n a => ↑C (a * ↑n) * X ^ (n - 1)) (p + q) =\n (fun p => sum p fun n a => ↑C (a * ↑n) * X ^ (n - 1)) p +\n (fun p => sum p fun n a => ↑C (a * ↑n) * X ^ (n - 1)) q) }\n (a • p) =\n ↑(RingHom.id R) a •\n AddHom.toFun\n { toFun := fun p => sum p fun n a => ↑C (a * ↑n) * X ^ (n - 1),\n map_add' :=\n (_ :\n ∀ (p q : R[X]),\n (fun p => sum p fun n a => ↑C (a * ↑n) * X ^ (n - 1)) (p + q) =\n (fun p => sum p fun n a => ↑C (a * ↑n) * X ^ (n - 1)) p +\n (fun p => sum p fun n a => ↑C (a * ↑n) * X ^ (n - 1)) q) }\n p\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝ : Semiring R\na : R\np : R[X]\n⊢ (sum (a • p) fun n a => ↑C (a * ↑n) * X ^ (n - 1)) = a • sum p fun n a => ↑C (a * ↑n) * X ^ (n - 1)\n[PROOFSTEP]\nrw [sum_smul_index]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝ : Semiring R\na : R\np : R[X]\n⊢ (sum p fun n a_1 => ↑C (a * a_1 * ↑n) * X ^ (n - 1)) = a • sum p fun n a => ↑C (a * ↑n) * X ^ (n - 1)\n[PROOFSTEP]\nsimp only [mul_sum, ← C_mul', mul_assoc, coeff_C_mul, RingHom.map_mul, forall_const, zero_mul, RingHom.map_zero, sum]\n[GOAL]\ncase hf\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝ : Semiring R\na : R\np : R[X]\n⊢ ∀ (i : ℕ), ↑C (0 * ↑i) * X ^ (i - 1) = 0\n[PROOFSTEP]\nsimp only [mul_sum, ← C_mul', mul_assoc, coeff_C_mul, RingHom.map_mul, forall_const, zero_mul, RingHom.map_zero, sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np : R[X]\nn : ℕ\n⊢ coeff (↑derivative p) n = coeff p (n + 1) * (↑n + 1)\n[PROOFSTEP]\nrw [derivative_apply]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np : R[X]\nn : ℕ\n⊢ coeff (sum p fun n a => ↑C (a * ↑n) * X ^ (n - 1)) n = coeff p (n + 1) * (↑n + 1)\n[PROOFSTEP]\nsimp only [coeff_X_pow, coeff_sum, coeff_C_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np : R[X]\nn : ℕ\n⊢ (sum p fun a b => b * ↑a * if n = a - 1 then 1 else 0) = coeff p (n + 1) * (↑n + 1)\n[PROOFSTEP]\nrw [sum, Finset.sum_eq_single (n + 1)]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np : R[X]\nn : ℕ\n⊢ (coeff p (n + 1) * ↑(n + 1) * if n = n + 1 - 1 then 1 else 0) = coeff p (n + 1) * (↑n + 1)\ncase h₀\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np : R[X]\nn : ℕ\n⊢ ∀ (b : ℕ), b ∈ support p → b ≠ n + 1 → (coeff p b * ↑b * if n = b - 1 then 1 else 0) = 0\ncase h₁\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np : R[X]\nn : ℕ\n⊢ ¬n + 1 ∈ support p → (coeff p (n + 1) * ↑(n + 1) * if n = n + 1 - 1 then 1 else 0) = 0\n[PROOFSTEP]\nsimp only [Nat.add_succ_sub_one, add_zero, mul_one, if_true, eq_self_iff_true]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np : R[X]\nn : ℕ\n⊢ coeff p (n + 1) * ↑(n + 1) = coeff p (n + 1) * (↑n + 1)\ncase h₀\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np : R[X]\nn : ℕ\n⊢ ∀ (b : ℕ), b ∈ support p → b ≠ n + 1 → (coeff p b * ↑b * if n = b - 1 then 1 else 0) = 0\ncase h₁\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np : R[X]\nn : ℕ\n⊢ ¬n + 1 ∈ support p → (coeff p (n + 1) * ↑(n + 1) * if n = n + 1 - 1 then 1 else 0) = 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h₀\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np : R[X]\nn : ℕ\n⊢ ∀ (b : ℕ), b ∈ support p → b ≠ n + 1 → (coeff p b * ↑b * if n = b - 1 then 1 else 0) = 0\n[PROOFSTEP]\nintro b\n[GOAL]\ncase h₀\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b✝ : R\nn✝ : ℕ\ninst✝ : Semiring R\np : R[X]\nn b : ℕ\n⊢ b ∈ support p → b ≠ n + 1 → (coeff p b * ↑b * if n = b - 1 then 1 else 0) = 0\n[PROOFSTEP]\ncases b\n[GOAL]\ncase h₀.zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np : R[X]\nn : ℕ\n⊢ Nat.zero ∈ support p → Nat.zero ≠ n + 1 → (coeff p Nat.zero * ↑Nat.zero * if n = Nat.zero - 1 then 1 else 0) = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase h₀.zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np : R[X]\nn : ℕ\na✝¹ : Nat.zero ∈ support p\na✝ : Nat.zero ≠ n + 1\n⊢ (coeff p Nat.zero * ↑Nat.zero * if n = Nat.zero - 1 then 1 else 0) = 0\n[PROOFSTEP]\nrw [Nat.cast_zero, mul_zero, zero_mul]\n[GOAL]\ncase h₀.succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝¹ : ℕ\ninst✝ : Semiring R\np : R[X]\nn n✝ : ℕ\n⊢ Nat.succ n✝ ∈ support p →\n Nat.succ n✝ ≠ n + 1 → (coeff p (Nat.succ n✝) * ↑(Nat.succ n✝) * if n = Nat.succ n✝ - 1 then 1 else 0) = 0\n[PROOFSTEP]\nintro _ H\n[GOAL]\ncase h₀.succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝¹ : ℕ\ninst✝ : Semiring R\np : R[X]\nn n✝ : ℕ\na✝ : Nat.succ n✝ ∈ support p\nH : Nat.succ n✝ ≠ n + 1\n⊢ (coeff p (Nat.succ n✝) * ↑(Nat.succ n✝) * if n = Nat.succ n✝ - 1 then 1 else 0) = 0\n[PROOFSTEP]\nrw [Nat.succ_sub_one, if_neg (mt (congr_arg Nat.succ) H.symm), mul_zero]\n[GOAL]\ncase h₁\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np : R[X]\nn : ℕ\n⊢ ¬n + 1 ∈ support p → (coeff p (n + 1) * ↑(n + 1) * if n = n + 1 - 1 then 1 else 0) = 0\n[PROOFSTEP]\nrw [if_pos (add_tsub_cancel_right n 1).symm, mul_one, Nat.cast_add, Nat.cast_one, mem_support_iff]\n[GOAL]\ncase h₁\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np : R[X]\nn : ℕ\n⊢ ¬coeff p (n + 1) ≠ 0 → coeff p (n + 1) * (↑n + 1) = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h₁\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np : R[X]\nn : ℕ\nh : ¬coeff p (n + 1) ≠ 0\n⊢ coeff p (n + 1) * (↑n + 1) = 0\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase h₁\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np : R[X]\nn : ℕ\nh : coeff p (n + 1) = 0\n⊢ coeff p (n + 1) * (↑n + 1) = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nk : ℕ\n⊢ (↑derivative)^[k] 0 = 0\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\n⊢ (↑derivative)^[Nat.zero] 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nk : ℕ\nih : (↑derivative)^[k] 0 = 0\n⊢ (↑derivative)^[Nat.succ k] 0 = 0\n[PROOFSTEP]\nsimp [ih]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na✝ b : R\nn✝ : ℕ\ninst✝ : Semiring R\na : R\nn : ℕ\n⊢ ↑derivative (↑(monomial n) a) = ↑(monomial (n - 1)) (a * ↑n)\n[PROOFSTEP]\nrw [derivative_apply, sum_monomial_index, C_mul_X_pow_eq_monomial]\n[GOAL]\ncase hf\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na✝ b : R\nn✝ : ℕ\ninst✝ : Semiring R\na : R\nn : ℕ\n⊢ ↑C (0 * ↑n) * X ^ (n - 1) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝ : Semiring R\na : R\n⊢ ↑derivative (↑C a * X) = ↑C a\n[PROOFSTEP]\nsimp [C_mul_X_eq_monomial, derivative_monomial, Nat.cast_one, mul_one]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na✝ b : R\nn✝ : ℕ\ninst✝ : Semiring R\na : R\nn : ℕ\n⊢ ↑derivative (↑C a * X ^ n) = ↑C (a * ↑n) * X ^ (n - 1)\n[PROOFSTEP]\nrw [C_mul_X_pow_eq_monomial, C_mul_X_pow_eq_monomial, derivative_monomial]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝ : Semiring R\na : R\n⊢ ↑derivative (↑C a * X ^ 2) = ↑C (a * 2) * X\n[PROOFSTEP]\nrw [derivative_C_mul_X_pow, Nat.cast_two, pow_one]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\nn : ℕ\n⊢ ↑derivative (X ^ n) = ↑C ↑n * X ^ (n - 1)\n[PROOFSTEP]\nconvert derivative_C_mul_X_pow (1 : R) n\n[GOAL]\ncase h.e'_2.h.e'_6\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\nn : ℕ\n⊢ X ^ n = ↑C 1 * X ^ n\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3.h.e'_5.h.e'_6\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\nn : ℕ\n⊢ ↑n = 1 * ↑n\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\n⊢ ↑derivative (X ^ 2) = ↑C 2 * X\n[PROOFSTEP]\nrw [derivative_X_pow, Nat.cast_two, pow_one]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝ : Semiring R\na : R\n⊢ ↑derivative (↑C a) = 0\n[PROOFSTEP]\nsimp [derivative_apply]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nhp : natDegree p = 0\n⊢ ↑derivative p = 0\n[PROOFSTEP]\nrw [eq_C_of_natDegree_eq_zero hp, derivative_C]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\n⊢ ↑(monomial (1 - 1)) (1 * ↑1) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝ : Semiring R\na : R[X]\n⊢ ↑derivative (bit0 a) = bit0 (↑derivative a)\n[PROOFSTEP]\nsimp [bit0]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝ : Semiring R\na : R[X]\n⊢ ↑derivative (bit1 a) = bit0 (↑derivative a)\n[PROOFSTEP]\nsimp [bit1]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nc : R\n⊢ ↑derivative (X + ↑C c) = 1\n[PROOFSTEP]\nrw [derivative_add, derivative_X, derivative_C, add_zero]\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝³ : Semiring R\nS : Type u_1\ninst✝² : Monoid S\ninst✝¹ : DistribMulAction S R\ninst✝ : IsScalarTower S R R\ns : S\np : R[X]\nk : ℕ\n⊢ (↑derivative)^[k] (s • p) = s • (↑derivative)^[k] p\n[PROOFSTEP]\ninduction' k with k ih generalizing p\n[GOAL]\ncase zero\nR : Type u\nS✝ : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝³ : Semiring R\nS : Type u_1\ninst✝² : Monoid S\ninst✝¹ : DistribMulAction S R\ninst✝ : IsScalarTower S R R\ns : S\np✝ p : R[X]\n⊢ (↑derivative)^[Nat.zero] (s • p) = s • (↑derivative)^[Nat.zero] p\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u\nS✝ : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝³ : Semiring R\nS : Type u_1\ninst✝² : Monoid S\ninst✝¹ : DistribMulAction S R\ninst✝ : IsScalarTower S R R\ns : S\np✝ : R[X]\nk : ℕ\nih : ∀ (p : R[X]), (↑derivative)^[k] (s • p) = s • (↑derivative)^[k] p\np : R[X]\n⊢ (↑derivative)^[Nat.succ k] (s • p) = s • (↑derivative)^[Nat.succ k] p\n[PROOFSTEP]\nsimp [ih]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝ : Semiring R\na : R\np : R[X]\nk : ℕ\n⊢ (↑derivative)^[k] (↑C a * p) = ↑C a * (↑derivative)^[k] p\n[PROOFSTEP]\nsimp_rw [← smul_eq_C_mul, iterate_derivative_smul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np : R[X]\nn : ℕ\nh : n ∈ support (↑derivative p)\nh1 : coeff p (n + 1) = 0\n⊢ coeff (↑derivative p) n = 0\n[PROOFSTEP]\nrw [coeff_derivative, h1, zero_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nH : p = 0\n⊢ degree (↑derivative p) = degree p\n[PROOFSTEP]\nrw [H, derivative_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nhp : natDegree p ≠ 0\n⊢ natDegree (↑derivative p) < natDegree p\n[PROOFSTEP]\ncases' eq_or_ne (derivative p) 0 with hp' hp'\n[GOAL]\ncase inl\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nhp : natDegree p ≠ 0\nhp' : ↑derivative p = 0\n⊢ natDegree (↑derivative p) < natDegree p\n[PROOFSTEP]\nrw [hp', Polynomial.natDegree_zero]\n[GOAL]\ncase inl\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nhp : natDegree p ≠ 0\nhp' : ↑derivative p = 0\n⊢ 0 < natDegree p\n[PROOFSTEP]\nexact hp.bot_lt\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nhp : natDegree p ≠ 0\nhp' : ↑derivative p ≠ 0\n⊢ natDegree (↑derivative p) < natDegree p\n[PROOFSTEP]\nrw [natDegree_lt_natDegree_iff hp']\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nhp : natDegree p ≠ 0\nhp' : ↑derivative p ≠ 0\n⊢ degree (↑derivative p) < degree p\n[PROOFSTEP]\nexact degree_derivative_lt fun h => hp (h.symm ▸ natDegree_zero)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\n⊢ natDegree (↑derivative p) ≤ natDegree p - 1\n[PROOFSTEP]\nby_cases p0 : p.natDegree = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\np0 : natDegree p = 0\n⊢ natDegree (↑derivative p) ≤ natDegree p - 1\n[PROOFSTEP]\nsimp [p0, derivative_of_natDegree_zero]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\np0 : ¬natDegree p = 0\n⊢ natDegree (↑derivative p) ≤ natDegree p - 1\n[PROOFSTEP]\nexact Nat.le_pred_of_lt (natDegree_derivative_lt p0)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\nn : ℕ\n⊢ ↑derivative ↑n = 0\n[PROOFSTEP]\nrw [← map_natCast C n]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\nn : ℕ\n⊢ ↑derivative (↑C ↑n) = 0\n[PROOFSTEP]\nexact derivative_C\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nx : ℕ\nhx : natDegree p < x\n⊢ (↑derivative)^[x] p = 0\n[PROOFSTEP]\ninduction' h : p.natDegree using Nat.strong_induction_on with _ ih generalizing p x\n[GOAL]\ncase h\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np✝ : R[X]\nx✝¹ : ℕ\nhx✝ : natDegree p✝ < x✝¹\nx✝ : ℕ\nh✝ : natDegree p✝ = x✝\nn✝ : ℕ\nih : ∀ (m : ℕ), m < n✝ → ∀ {p : R[X]} {x : ℕ}, natDegree p < x → natDegree p = m → (↑derivative)^[x] p = 0\np : R[X]\nx : ℕ\nhx : natDegree p < x\nh : natDegree p = n✝\n⊢ (↑derivative)^[x] p = 0\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase h\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np✝ : R[X]\nx✝¹ : ℕ\nhx✝ : natDegree p✝ < x✝¹\nx✝ : ℕ\nh : natDegree p✝ = x✝\np : R[X]\nx : ℕ\nhx : natDegree p < x\nih : ∀ (m : ℕ), m < natDegree p → ∀ {p : R[X]} {x : ℕ}, natDegree p < x → natDegree p = m → (↑derivative)^[x] p = 0\n⊢ (↑derivative)^[x] p = 0\n[PROOFSTEP]\nobtain ⟨t, rfl⟩ := Nat.exists_eq_succ_of_ne_zero (pos_of_gt hx).ne'\n[GOAL]\ncase h.intro\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np✝ : R[X]\nx : ℕ\nhx✝ : natDegree p✝ < x\nx✝ : ℕ\nh : natDegree p✝ = x✝\np : R[X]\nih : ∀ (m : ℕ), m < natDegree p → ∀ {p : R[X]} {x : ℕ}, natDegree p < x → natDegree p = m → (↑derivative)^[x] p = 0\nt : ℕ\nhx : natDegree p < Nat.succ t\n⊢ (↑derivative)^[Nat.succ t] p = 0\n[PROOFSTEP]\nrw [Function.iterate_succ_apply]\n[GOAL]\ncase h.intro\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np✝ : R[X]\nx : ℕ\nhx✝ : natDegree p✝ < x\nx✝ : ℕ\nh : natDegree p✝ = x✝\np : R[X]\nih : ∀ (m : ℕ), m < natDegree p → ∀ {p : R[X]} {x : ℕ}, natDegree p < x → natDegree p = m → (↑derivative)^[x] p = 0\nt : ℕ\nhx : natDegree p < Nat.succ t\n⊢ (↑derivative)^[t] (↑derivative p) = 0\n[PROOFSTEP]\nby_cases hp : p.natDegree = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np✝ : R[X]\nx : ℕ\nhx✝ : natDegree p✝ < x\nx✝ : ℕ\nh : natDegree p✝ = x✝\np : R[X]\nih : ∀ (m : ℕ), m < natDegree p → ∀ {p : R[X]} {x : ℕ}, natDegree p < x → natDegree p = m → (↑derivative)^[x] p = 0\nt : ℕ\nhx : natDegree p < Nat.succ t\nhp : natDegree p = 0\n⊢ (↑derivative)^[t] (↑derivative p) = 0\n[PROOFSTEP]\nrw [derivative_of_natDegree_zero hp, iterate_derivative_zero]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np✝ : R[X]\nx : ℕ\nhx✝ : natDegree p✝ < x\nx✝ : ℕ\nh : natDegree p✝ = x✝\np : R[X]\nih : ∀ (m : ℕ), m < natDegree p → ∀ {p : R[X]} {x : ℕ}, natDegree p < x → natDegree p = m → (↑derivative)^[x] p = 0\nt : ℕ\nhx : natDegree p < Nat.succ t\nhp : ¬natDegree p = 0\n⊢ (↑derivative)^[t] (↑derivative p) = 0\n[PROOFSTEP]\nhave := natDegree_derivative_lt hp\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np✝ : R[X]\nx : ℕ\nhx✝ : natDegree p✝ < x\nx✝ : ℕ\nh : natDegree p✝ = x✝\np : R[X]\nih : ∀ (m : ℕ), m < natDegree p → ∀ {p : R[X]} {x : ℕ}, natDegree p < x → natDegree p = m → (↑derivative)^[x] p = 0\nt : ℕ\nhx : natDegree p < Nat.succ t\nhp : ¬natDegree p = 0\nthis : natDegree (↑derivative p) < natDegree p\n⊢ (↑derivative)^[t] (↑derivative p) = 0\n[PROOFSTEP]\nexact ih _ this (this.trans_le <| Nat.le_of_lt_succ hx) rfl\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\nf : R[X]\nh : ↑derivative f = 0\n⊢ natDegree f = 0\n[PROOFSTEP]\nrcases eq_or_ne f 0 with (rfl | hf)\n[GOAL]\ncase inl\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\nh : ↑derivative 0 = 0\n⊢ natDegree 0 = 0\n[PROOFSTEP]\nexact natDegree_zero\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\nf : R[X]\nh : ↑derivative f = 0\nhf : f ≠ 0\n⊢ natDegree f = 0\n[PROOFSTEP]\nrw [natDegree_eq_zero_iff_degree_le_zero]\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\nf : R[X]\nh : ↑derivative f = 0\nhf : f ≠ 0\n⊢ degree f ≤ 0\n[PROOFSTEP]\nby_contra' f_nat_degree_pos\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\nf : R[X]\nh : ↑derivative f = 0\nhf : f ≠ 0\nf_nat_degree_pos : 0 < degree f\n⊢ False\n[PROOFSTEP]\nrw [← natDegree_pos_iff_degree_pos] at f_nat_degree_pos \n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\nf : R[X]\nh : ↑derivative f = 0\nhf : f ≠ 0\nf_nat_degree_pos : 0 < natDegree f\n⊢ False\n[PROOFSTEP]\nlet m := f.natDegree - 1\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\nf : R[X]\nh : ↑derivative f = 0\nhf : f ≠ 0\nf_nat_degree_pos : 0 < natDegree f\nm : ℕ := natDegree f - 1\n⊢ False\n[PROOFSTEP]\nhave hm : m + 1 = f.natDegree := tsub_add_cancel_of_le f_nat_degree_pos\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\nf : R[X]\nh : ↑derivative f = 0\nhf : f ≠ 0\nf_nat_degree_pos : 0 < natDegree f\nm : ℕ := natDegree f - 1\nhm : m + 1 = natDegree f\n⊢ False\n[PROOFSTEP]\nhave h2 := coeff_derivative f m\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\nf : R[X]\nh : ↑derivative f = 0\nhf : f ≠ 0\nf_nat_degree_pos : 0 < natDegree f\nm : ℕ := natDegree f - 1\nhm : m + 1 = natDegree f\nh2 : coeff (↑derivative f) m = coeff f (m + 1) * (↑m + 1)\n⊢ False\n[PROOFSTEP]\nrw [Polynomial.ext_iff] at h \n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\nf : R[X]\nh : ∀ (n : ℕ), coeff (↑derivative f) n = coeff 0 n\nhf : f ≠ 0\nf_nat_degree_pos : 0 < natDegree f\nm : ℕ := natDegree f - 1\nhm : m + 1 = natDegree f\nh2 : coeff (↑derivative f) m = coeff f (m + 1) * (↑m + 1)\n⊢ False\n[PROOFSTEP]\nrw [h m, coeff_zero, ← Nat.cast_add_one, ← nsmul_eq_mul', eq_comm, smul_eq_zero] at h2 \n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\nf : R[X]\nh : ∀ (n : ℕ), coeff (↑derivative f) n = coeff 0 n\nhf : f ≠ 0\nf_nat_degree_pos : 0 < natDegree f\nm : ℕ := natDegree f - 1\nhm : m + 1 = natDegree f\nh2 : m + 1 = 0 ∨ coeff f (m + 1) = 0\n⊢ False\n[PROOFSTEP]\nreplace h2 := h2.resolve_left m.succ_ne_zero\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\nf : R[X]\nh : ∀ (n : ℕ), coeff (↑derivative f) n = coeff 0 n\nhf : f ≠ 0\nf_nat_degree_pos : 0 < natDegree f\nm : ℕ := natDegree f - 1\nhm : m + 1 = natDegree f\nh2 : coeff f (m + 1) = 0\n⊢ False\n[PROOFSTEP]\nrw [hm, ← leadingCoeff, leadingCoeff_eq_zero] at h2 \n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\nf : R[X]\nh : ∀ (n : ℕ), coeff (↑derivative f) n = coeff 0 n\nhf : f ≠ 0\nf_nat_degree_pos : 0 < natDegree f\nm : ℕ := natDegree f - 1\nhm : m + 1 = natDegree f\nh2 : f = 0\n⊢ False\n[PROOFSTEP]\nexact hf h2\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n⊢ ↑derivative (f * g) = sum f fun n a => sum g fun m b => (n + m) • (↑C (a * b) * X ^ (n + m - 1))\n[PROOFSTEP]\nrw [mul_eq_sum_sum, derivative_sum]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n⊢ ∑ b in support f, ↑derivative (sum g fun j a => ↑(monomial (b + j)) (coeff f b * a)) =\n sum f fun n a => sum g fun m b => (n + m) • (↑C (a * b) * X ^ (n + m - 1))\n[PROOFSTEP]\ntrans\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n⊢ ∑ b in support f, ↑derivative (sum g fun j a => ↑(monomial (b + j)) (coeff f b * a)) = ?m.380316\n[PROOFSTEP]\napply Finset.sum_congr rfl\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n⊢ ∀ (x : ℕ), x ∈ support f → ↑derivative (sum g fun j a => ↑(monomial (x + j)) (coeff f x * a)) = ?m.380366 x\nR : Type u S : Type v T : Type w ι : Type y A : Type z a b : R n : ℕ inst✝ : Semiring R f g : R[X] ⊢ ℕ → R[X]\n[PROOFSTEP]\nintro x _\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\nx : ℕ\na✝ : x ∈ support f\n⊢ ↑derivative (sum g fun j a => ↑(monomial (x + j)) (coeff f x * a)) = ?m.380366 x\nR : Type u S : Type v T : Type w ι : Type y A : Type z a b : R n : ℕ inst✝ : Semiring R f g : R[X] ⊢ ℕ → R[X]\n[PROOFSTEP]\nexact derivative_sum\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n⊢ ∑ x in support f, ∑ b in support g, ↑derivative ((fun j a => ↑(monomial (x + j)) (coeff f x * a)) b (coeff g b)) =\n sum f fun n a => sum g fun m b => (n + m) • (↑C (a * b) * X ^ (n + m - 1))\n[PROOFSTEP]\napply Finset.sum_congr rfl\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n⊢ ∀ (x : ℕ),\n x ∈ support f →\n ∑ b in support g, ↑derivative ((fun j a => ↑(monomial (x + j)) (coeff f x * a)) b (coeff g b)) =\n (fun n a => sum g fun m b => (n + m) • (↑C (a * b) * X ^ (n + m - 1))) x (coeff f x)\n[PROOFSTEP]\nintro n _\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\nf g : R[X]\nn : ℕ\na✝ : n ∈ support f\n⊢ ∑ b in support g, ↑derivative ((fun j a => ↑(monomial (n + j)) (coeff f n * a)) b (coeff g b)) =\n (fun n a => sum g fun m b => (n + m) • (↑C (a * b) * X ^ (n + m - 1))) n (coeff f n)\n[PROOFSTEP]\napply Finset.sum_congr rfl\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\nf g : R[X]\nn : ℕ\na✝ : n ∈ support f\n⊢ ∀ (x : ℕ),\n x ∈ support g →\n ↑derivative ((fun j a => ↑(monomial (n + j)) (coeff f n * a)) x (coeff g x)) =\n (fun m b => (n + m) • (↑C (coeff f n * b) * X ^ (n + m - 1))) x (coeff g x)\n[PROOFSTEP]\nintro m _\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\nf g : R[X]\nn : ℕ\na✝¹ : n ∈ support f\nm : ℕ\na✝ : m ∈ support g\n⊢ ↑derivative ((fun j a => ↑(monomial (n + j)) (coeff f n * a)) m (coeff g m)) =\n (fun m b => (n + m) • (↑C (coeff f n * b) * X ^ (n + m - 1))) m (coeff g m)\n[PROOFSTEP]\ntrans\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\nf g : R[X]\nn : ℕ\na✝¹ : n ∈ support f\nm : ℕ\na✝ : m ∈ support g\n⊢ ↑derivative ((fun j a => ↑(monomial (n + j)) (coeff f n * a)) m (coeff g m)) = ?m.380816\n[PROOFSTEP]\nexact congr_arg _ C_mul_X_pow_eq_monomial.symm\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\nf g : R[X]\nn : ℕ\na✝¹ : n ∈ support f\nm : ℕ\na✝ : m ∈ support g\n⊢ ↑derivative (↑C (coeff f n * coeff g m) * X ^ (n + m)) =\n (fun m b => (n + m) • (↑C (coeff f n * b) * X ^ (n + m - 1))) m (coeff g m)\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\nf g : R[X]\nn : ℕ\na✝¹ : n ∈ support f\nm : ℕ\na✝ : m ∈ support g\n⊢ ↑derivative (↑C (coeff f n * coeff g m) * X ^ (n + m)) = (n + m) • (↑C (coeff f n * coeff g m) * X ^ (n + m - 1))\n[PROOFSTEP]\nrw [← smul_mul_assoc, smul_C, nsmul_eq_mul']\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\nf g : R[X]\nn : ℕ\na✝¹ : n ∈ support f\nm : ℕ\na✝ : m ∈ support g\n⊢ ↑derivative (↑C (coeff f n * coeff g m) * X ^ (n + m)) = ↑C (coeff f n * coeff g m * ↑(n + m)) * X ^ (n + m - 1)\n[PROOFSTEP]\nexact derivative_C_mul_X_pow _ _\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\nf g : R[X]\nn : ℕ\nhn : n ∈ support f\nm : ℕ\nhm : m ∈ support g\n⊢ (fun m b => (n + m) • (↑C (coeff f n * b) * X ^ (n + m - 1))) m (coeff g m) =\n (fun m b => n • (↑C (coeff f n) * X ^ (n - 1)) * (↑C b * X ^ m) + ↑C (coeff f n) * X ^ n * m • (↑C b * X ^ (m - 1)))\n m (coeff g m)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\nm : ℕ\nhm : m ∈ support g\nhn : Nat.zero ∈ support f\n⊢ (fun m b => (Nat.zero + m) • (↑C (coeff f Nat.zero * b) * X ^ (Nat.zero + m - 1))) m (coeff g m) =\n (fun m b =>\n Nat.zero • (↑C (coeff f Nat.zero) * X ^ (Nat.zero - 1)) * (↑C b * X ^ m) +\n ↑C (coeff f Nat.zero) * X ^ Nat.zero * m • (↑C b * X ^ (m - 1)))\n m (coeff g m)\n[PROOFSTEP]\ncases m\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\nm : ℕ\nhm : m ∈ support g\nn✝ : ℕ\nhn : Nat.succ n✝ ∈ support f\n⊢ (fun m b => (Nat.succ n✝ + m) • (↑C (coeff f (Nat.succ n✝) * b) * X ^ (Nat.succ n✝ + m - 1))) m (coeff g m) =\n (fun m b =>\n Nat.succ n✝ • (↑C (coeff f (Nat.succ n✝)) * X ^ (Nat.succ n✝ - 1)) * (↑C b * X ^ m) +\n ↑C (coeff f (Nat.succ n✝)) * X ^ Nat.succ n✝ * m • (↑C b * X ^ (m - 1)))\n m (coeff g m)\n[PROOFSTEP]\ncases m\n[GOAL]\ncase zero.zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\nhn : Nat.zero ∈ support f\nhm : Nat.zero ∈ support g\n⊢ (fun m b => (Nat.zero + m) • (↑C (coeff f Nat.zero * b) * X ^ (Nat.zero + m - 1))) Nat.zero (coeff g Nat.zero) =\n (fun m b =>\n Nat.zero • (↑C (coeff f Nat.zero) * X ^ (Nat.zero - 1)) * (↑C b * X ^ m) +\n ↑C (coeff f Nat.zero) * X ^ Nat.zero * m • (↑C b * X ^ (m - 1)))\n Nat.zero (coeff g Nat.zero)\n[PROOFSTEP]\nsimp_rw [add_smul, mul_smul_comm, smul_mul_assoc, X_pow_mul_assoc, ← mul_assoc, ← C_mul, mul_assoc, ← pow_add]\n[GOAL]\ncase zero.succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\nhn : Nat.zero ∈ support f\nn✝ : ℕ\nhm : Nat.succ n✝ ∈ support g\n⊢ (fun m b => (Nat.zero + m) • (↑C (coeff f Nat.zero * b) * X ^ (Nat.zero + m - 1))) (Nat.succ n✝)\n (coeff g (Nat.succ n✝)) =\n (fun m b =>\n Nat.zero • (↑C (coeff f Nat.zero) * X ^ (Nat.zero - 1)) * (↑C b * X ^ m) +\n ↑C (coeff f Nat.zero) * X ^ Nat.zero * m • (↑C b * X ^ (m - 1)))\n (Nat.succ n✝) (coeff g (Nat.succ n✝))\n[PROOFSTEP]\nsimp_rw [add_smul, mul_smul_comm, smul_mul_assoc, X_pow_mul_assoc, ← mul_assoc, ← C_mul, mul_assoc, ← pow_add]\n[GOAL]\ncase succ.zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\nn✝ : ℕ\nhn : Nat.succ n✝ ∈ support f\nhm : Nat.zero ∈ support g\n⊢ (fun m b => (Nat.succ n✝ + m) • (↑C (coeff f (Nat.succ n✝) * b) * X ^ (Nat.succ n✝ + m - 1))) Nat.zero\n (coeff g Nat.zero) =\n (fun m b =>\n Nat.succ n✝ • (↑C (coeff f (Nat.succ n✝)) * X ^ (Nat.succ n✝ - 1)) * (↑C b * X ^ m) +\n ↑C (coeff f (Nat.succ n✝)) * X ^ Nat.succ n✝ * m • (↑C b * X ^ (m - 1)))\n Nat.zero (coeff g Nat.zero)\n[PROOFSTEP]\nsimp_rw [add_smul, mul_smul_comm, smul_mul_assoc, X_pow_mul_assoc, ← mul_assoc, ← C_mul, mul_assoc, ← pow_add]\n[GOAL]\ncase succ.succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\nn✝¹ : ℕ\nhn : Nat.succ n✝¹ ∈ support f\nn✝ : ℕ\nhm : Nat.succ n✝ ∈ support g\n⊢ (fun m b => (Nat.succ n✝¹ + m) • (↑C (coeff f (Nat.succ n✝¹) * b) * X ^ (Nat.succ n✝¹ + m - 1))) (Nat.succ n✝)\n (coeff g (Nat.succ n✝)) =\n (fun m b =>\n Nat.succ n✝¹ • (↑C (coeff f (Nat.succ n✝¹)) * X ^ (Nat.succ n✝¹ - 1)) * (↑C b * X ^ m) +\n ↑C (coeff f (Nat.succ n✝¹)) * X ^ Nat.succ n✝¹ * m • (↑C b * X ^ (m - 1)))\n (Nat.succ n✝) (coeff g (Nat.succ n✝))\n[PROOFSTEP]\nsimp_rw [add_smul, mul_smul_comm, smul_mul_assoc, X_pow_mul_assoc, ← mul_assoc, ← C_mul, mul_assoc, ← pow_add]\n[GOAL]\ncase zero.succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\nhn : Nat.zero ∈ support f\nn✝ : ℕ\nhm : Nat.succ n✝ ∈ support g\n⊢ Nat.zero • (↑C (coeff f Nat.zero * coeff g (Nat.succ n✝)) * X ^ (Nat.zero + Nat.succ n✝ - 1)) +\n Nat.succ n✝ • (↑C (coeff f Nat.zero * coeff g (Nat.succ n✝)) * X ^ (Nat.zero + Nat.succ n✝ - 1)) =\n Nat.zero • (↑C (coeff f Nat.zero * coeff g (Nat.succ n✝)) * X ^ (Nat.succ n✝ + (Nat.zero - 1))) +\n Nat.succ n✝ • (↑C (coeff f Nat.zero * coeff g (Nat.succ n✝)) * X ^ (Nat.succ n✝ - 1 + Nat.zero))\n[PROOFSTEP]\nsimp [Nat.add_succ, Nat.succ_add, Nat.succ_sub_one, zero_smul, add_comm]\n[GOAL]\ncase succ.zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\nn✝ : ℕ\nhn : Nat.succ n✝ ∈ support f\nhm : Nat.zero ∈ support g\n⊢ Nat.succ n✝ • (↑C (coeff f (Nat.succ n✝) * coeff g Nat.zero) * X ^ (Nat.succ n✝ + Nat.zero - 1)) +\n Nat.zero • (↑C (coeff f (Nat.succ n✝) * coeff g Nat.zero) * X ^ (Nat.succ n✝ + Nat.zero - 1)) =\n Nat.succ n✝ • (↑C (coeff f (Nat.succ n✝) * coeff g Nat.zero) * X ^ (Nat.zero + (Nat.succ n✝ - 1))) +\n Nat.zero • (↑C (coeff f (Nat.succ n✝) * coeff g Nat.zero) * X ^ (Nat.zero - 1 + Nat.succ n✝))\n[PROOFSTEP]\nsimp [Nat.add_succ, Nat.succ_add, Nat.succ_sub_one, zero_smul, add_comm]\n[GOAL]\ncase succ.succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\nn✝¹ : ℕ\nhn : Nat.succ n✝¹ ∈ support f\nn✝ : ℕ\nhm : Nat.succ n✝ ∈ support g\n⊢ Nat.succ n✝¹ • (↑C (coeff f (Nat.succ n✝¹) * coeff g (Nat.succ n✝)) * X ^ (Nat.succ n✝¹ + Nat.succ n✝ - 1)) +\n Nat.succ n✝ • (↑C (coeff f (Nat.succ n✝¹) * coeff g (Nat.succ n✝)) * X ^ (Nat.succ n✝¹ + Nat.succ n✝ - 1)) =\n Nat.succ n✝¹ • (↑C (coeff f (Nat.succ n✝¹) * coeff g (Nat.succ n✝)) * X ^ (Nat.succ n✝ + (Nat.succ n✝¹ - 1))) +\n Nat.succ n✝ • (↑C (coeff f (Nat.succ n✝¹) * coeff g (Nat.succ n✝)) * X ^ (Nat.succ n✝ - 1 + Nat.succ n✝¹))\n[PROOFSTEP]\nsimp [Nat.add_succ, Nat.succ_add, Nat.succ_sub_one, zero_smul, add_comm]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n⊢ (sum f fun n a =>\n sum g fun m b => n • (↑C a * X ^ (n - 1)) * (↑C b * X ^ m) + ↑C a * X ^ n * m • (↑C b * X ^ (m - 1))) =\n ↑derivative f * g + f * ↑derivative g\n[PROOFSTEP]\nconv =>\n rhs\n congr\n ·rw [← sum_C_mul_X_pow_eq g]\n ·rw [← sum_C_mul_X_pow_eq f]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n| (sum f fun n a =>\n sum g fun m b => n • (↑C a * X ^ (n - 1)) * (↑C b * X ^ m) + ↑C a * X ^ n * m • (↑C b * X ^ (m - 1))) =\n ↑derivative f * g + f * ↑derivative g\n[PROOFSTEP]\n rhs\n congr\n ·rw [← sum_C_mul_X_pow_eq g]\n ·rw [← sum_C_mul_X_pow_eq f]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n| (sum f fun n a =>\n sum g fun m b => n • (↑C a * X ^ (n - 1)) * (↑C b * X ^ m) + ↑C a * X ^ n * m • (↑C b * X ^ (m - 1))) =\n ↑derivative f * g + f * ↑derivative g\n[PROOFSTEP]\n rhs\n congr\n ·rw [← sum_C_mul_X_pow_eq g]\n ·rw [← sum_C_mul_X_pow_eq f]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n| (sum f fun n a =>\n sum g fun m b => n • (↑C a * X ^ (n - 1)) * (↑C b * X ^ m) + ↑C a * X ^ n * m • (↑C b * X ^ (m - 1))) =\n ↑derivative f * g + f * ↑derivative g\n[PROOFSTEP]\nrhs\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n| ↑derivative f * g + f * ↑derivative g\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n| ↑derivative f * g\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n| f * ↑derivative g\n[PROOFSTEP]\n·rw [← sum_C_mul_X_pow_eq g]\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n| ↑derivative f * g\n[PROOFSTEP]\nrw [← sum_C_mul_X_pow_eq g]\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n| ↑derivative f * g\n[PROOFSTEP]\nrw [← sum_C_mul_X_pow_eq g]\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n| ↑derivative f * g\n[PROOFSTEP]\nrw [← sum_C_mul_X_pow_eq g]\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n| f * ↑derivative g\n[PROOFSTEP]\n·rw [← sum_C_mul_X_pow_eq f]\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n| f * ↑derivative g\n[PROOFSTEP]\nrw [← sum_C_mul_X_pow_eq f]\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n| f * ↑derivative g\n[PROOFSTEP]\nrw [← sum_C_mul_X_pow_eq f]\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n| f * ↑derivative g\n[PROOFSTEP]\nrw [← sum_C_mul_X_pow_eq f]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n⊢ (sum f fun n a =>\n sum g fun m b => n • (↑C a * X ^ (n - 1)) * (↑C b * X ^ m) + ↑C a * X ^ n * m • (↑C b * X ^ (m - 1))) =\n (↑derivative f * sum g fun n a => ↑C a * X ^ n) + (sum f fun n a => ↑C a * X ^ n) * ↑derivative g\n[PROOFSTEP]\nsimp only [sum, sum_add_distrib, Finset.mul_sum, Finset.sum_mul, derivative_apply]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n⊢ ∑ x in support f, ∑ x_1 in support g, x • (↑C (coeff f x) * X ^ (x - 1)) * (↑C (coeff g x_1) * X ^ x_1) +\n ∑ x in support f, ∑ x_1 in support g, ↑C (coeff f x) * X ^ x * x_1 • (↑C (coeff g x_1) * X ^ (x_1 - 1)) =\n ∑ x in support g, ∑ x_1 in support f, ↑C (coeff f x_1 * ↑x_1) * X ^ (x_1 - 1) * (↑C (coeff g x) * X ^ x) +\n ∑ x in support g, ∑ x_1 in support f, ↑C (coeff f x_1) * X ^ x_1 * (↑C (coeff g x * ↑x) * X ^ (x - 1))\n[PROOFSTEP]\nsimp_rw [← smul_mul_assoc, smul_C, nsmul_eq_mul']\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n⊢ ∑ x in support f, ∑ x_1 in support g, ↑C (coeff f x * ↑x) * X ^ (x - 1) * (↑C (coeff g x_1) * X ^ x_1) +\n ∑ x in support f, ∑ x_1 in support g, ↑C (coeff f x) * X ^ x * (↑C (coeff g x_1 * ↑x_1) * X ^ (x_1 - 1)) =\n ∑ x in support g, ∑ x_1 in support f, ↑C (coeff f x_1 * ↑x_1) * X ^ (x_1 - 1) * (↑C (coeff g x) * X ^ x) +\n ∑ x in support g, ∑ x_1 in support f, ↑C (coeff f x_1) * X ^ x_1 * (↑C (coeff g x * ↑x) * X ^ (x - 1))\n[PROOFSTEP]\nrw [Finset.sum_comm]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n⊢ ∑ y in support g, ∑ x in support f, ↑C (coeff f x * ↑x) * X ^ (x - 1) * (↑C (coeff g y) * X ^ y) +\n ∑ x in support f, ∑ x_1 in support g, ↑C (coeff f x) * X ^ x * (↑C (coeff g x_1 * ↑x_1) * X ^ (x_1 - 1)) =\n ∑ x in support g, ∑ x_1 in support f, ↑C (coeff f x_1 * ↑x_1) * X ^ (x_1 - 1) * (↑C (coeff g x) * X ^ x) +\n ∑ x in support g, ∑ x_1 in support f, ↑C (coeff f x_1) * X ^ x_1 * (↑C (coeff g x * ↑x) * X ^ (x - 1))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nf g : R[X]\n⊢ ∑ x in support f, ∑ x_1 in support g, ↑C (coeff f x) * X ^ x * (↑C (coeff g x_1 * ↑x_1) * X ^ (x_1 - 1)) =\n ∑ x in support g, ∑ x_1 in support f, ↑C (coeff f x_1) * X ^ x_1 * (↑C (coeff g x * ↑x) * X ^ (x - 1))\n[PROOFSTEP]\nrw [Finset.sum_comm]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nx : R\n⊢ eval x (↑derivative p) = sum p fun n a => a * ↑n * x ^ (n - 1)\n[PROOFSTEP]\nsimp_rw [derivative_apply, eval_sum, eval_mul_X_pow, eval_C]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\np : R[X]\nf : R →+* S\n⊢ ↑derivative (map f p) = map f (↑derivative p)\n[PROOFSTEP]\nlet n := max p.natDegree (map f p).natDegree\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\np : R[X]\nf : R →+* S\nn : ℕ := max (natDegree p) (natDegree (map f p))\n⊢ ↑derivative (map f p) = map f (↑derivative p)\n[PROOFSTEP]\nrw [derivative_apply, derivative_apply]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\np : R[X]\nf : R →+* S\nn : ℕ := max (natDegree p) (natDegree (map f p))\n⊢ (sum (map f p) fun n a => ↑C (a * ↑n) * X ^ (n - 1)) = map f (sum p fun n a => ↑C (a * ↑n) * X ^ (n - 1))\n[PROOFSTEP]\nrw [sum_over_range' _ _ (n + 1) ((le_max_left _ _).trans_lt (lt_add_one _))]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\np : R[X]\nf : R →+* S\nn : ℕ := max (natDegree p) (natDegree (map f p))\n⊢ (sum (map f p) fun n a => ↑C (a * ↑n) * X ^ (n - 1)) = map f (∑ a in range (n + 1), ↑C (coeff p a * ↑a) * X ^ (a - 1))\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\np : R[X]\nf : R →+* S\nn : ℕ := max (natDegree p) (natDegree (map f p))\n⊢ ∀ (n : ℕ), ↑C (0 * ↑n) * X ^ (n - 1) = 0\n[PROOFSTEP]\nrw [sum_over_range' _ _ (n + 1) ((le_max_right _ _).trans_lt (lt_add_one _))]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\np : R[X]\nf : R →+* S\nn : ℕ := max (natDegree p) (natDegree (map f p))\n⊢ ∑ a in range (n + 1), ↑C (coeff (map f p) a * ↑a) * X ^ (a - 1) =\n map f (∑ a in range (n + 1), ↑C (coeff p a * ↑a) * X ^ (a - 1))\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\np : R[X]\nf : R →+* S\nn : ℕ := max (natDegree p) (natDegree (map f p))\n⊢ ∀ (n : ℕ), ↑C (0 * ↑n) * X ^ (n - 1) = 0\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\np : R[X]\nf : R →+* S\nn : ℕ := max (natDegree p) (natDegree (map f p))\n⊢ ∀ (n : ℕ), ↑C (0 * ↑n) * X ^ (n - 1) = 0\n[PROOFSTEP]\nsimp only [Polynomial.map_sum, Polynomial.map_mul, Polynomial.map_C, map_mul, coeff_map, map_natCast,\n Polynomial.map_nat_cast, Polynomial.map_pow, map_X]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\np : R[X]\nf : R →+* S\nn : ℕ := max (natDegree p) (natDegree (map f p))\n⊢ ∀ (n : ℕ), ↑C (0 * ↑n) * X ^ (n - 1) = 0\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\np : R[X]\nf : R →+* S\nn : ℕ := max (natDegree p) (natDegree (map f p))\n⊢ ∀ (n : ℕ), ↑C (0 * ↑n) * X ^ (n - 1) = 0\n[PROOFSTEP]\nall_goals intro n; rw [zero_mul, C_0, zero_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\np : R[X]\nf : R →+* S\nn : ℕ := max (natDegree p) (natDegree (map f p))\n⊢ ∀ (n : ℕ), ↑C (0 * ↑n) * X ^ (n - 1) = 0\n[PROOFSTEP]\nintro n\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝¹ : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\np : R[X]\nf : R →+* S\nn✝ : ℕ := max (natDegree p) (natDegree (map f p))\nn : ℕ\n⊢ ↑C (0 * ↑n) * X ^ (n - 1) = 0\n[PROOFSTEP]\nrw [zero_mul, C_0, zero_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\np : R[X]\nf : R →+* S\nn : ℕ := max (natDegree p) (natDegree (map f p))\n⊢ ∀ (n : ℕ), ↑C (0 * ↑n) * X ^ (n - 1) = 0\n[PROOFSTEP]\nintro n\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝¹ : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\np : R[X]\nf : R →+* S\nn✝ : ℕ := max (natDegree p) (natDegree (map f p))\nn : ℕ\n⊢ ↑C (0 * ↑n) * X ^ (n - 1) = 0\n[PROOFSTEP]\nrw [zero_mul, C_0, zero_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\np : R[X]\nf : R →+* S\nk : ℕ\n⊢ (↑derivative)^[k] (map f p) = map f ((↑derivative)^[k] p)\n[PROOFSTEP]\ninduction' k with k ih generalizing p\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\np✝ : R[X]\nf : R →+* S\np : R[X]\n⊢ (↑derivative)^[Nat.zero] (map f p) = map f ((↑derivative)^[Nat.zero] p)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\np✝ : R[X]\nf : R →+* S\nk : ℕ\nih : ∀ (p : R[X]), (↑derivative)^[k] (map f p) = map f ((↑derivative)^[k] p)\np : R[X]\n⊢ (↑derivative)^[Nat.succ k] (map f p) = map f ((↑derivative)^[Nat.succ k] p)\n[PROOFSTEP]\nsimp only [ih, Function.iterate_succ, Polynomial.derivative_map, Function.comp_apply]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\nn : ℕ\nf : R[X]\n⊢ ↑derivative (↑n * f) = ↑n * ↑derivative f\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\nn k : ℕ\nf : R[X]\n⊢ (↑derivative)^[k] (↑n * f) = ↑n * (↑derivative)^[k] f\n[PROOFSTEP]\ninduction' k with k ih generalizing f\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\nn : ℕ\nf✝ f : R[X]\n⊢ (↑derivative)^[Nat.zero] (↑n * f) = ↑n * (↑derivative)^[Nat.zero] f\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\nn : ℕ\nf✝ : R[X]\nk : ℕ\nih : ∀ {f : R[X]}, (↑derivative)^[k] (↑n * f) = ↑n * (↑derivative)^[k] f\nf : R[X]\n⊢ (↑derivative)^[Nat.succ k] (↑n * f) = ↑n * (↑derivative)^[Nat.succ k] f\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nn : ℕ\n⊢ n ∈ support (↑derivative p) ↔ n + 1 ∈ support p\n[PROOFSTEP]\nsuffices ¬p.coeff (n + 1) * (n + 1 : ℕ) = 0 ↔ coeff p (n + 1) ≠ 0 by\n simpa only [mem_support_iff, coeff_derivative, Ne.def, Nat.cast_succ]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nn : ℕ\nthis : ¬coeff p (n + 1) * ↑(n + 1) = 0 ↔ coeff p (n + 1) ≠ 0\n⊢ n ∈ support (↑derivative p) ↔ n + 1 ∈ support p\n[PROOFSTEP]\nsimpa only [mem_support_iff, coeff_derivative, Ne.def, Nat.cast_succ]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nn : ℕ\n⊢ ¬coeff p (n + 1) * ↑(n + 1) = 0 ↔ coeff p (n + 1) ≠ 0\n[PROOFSTEP]\nrw [← nsmul_eq_mul', smul_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nn : ℕ\n⊢ ¬(n + 1 = 0 ∨ coeff p (n + 1) = 0) ↔ coeff p (n + 1) ≠ 0\n[PROOFSTEP]\nsimp only [Nat.succ_ne_zero, false_or_iff]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nhp : 0 < natDegree p\n⊢ degree (↑derivative p) = ↑(natDegree p - 1)\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nhp : 0 < natDegree p\n⊢ degree (↑derivative p) ≤ ↑(natDegree p - 1)\n[PROOFSTEP]\nrw [derivative_apply]\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nhp : 0 < natDegree p\n⊢ degree (sum p fun n a => ↑C (a * ↑n) * X ^ (n - 1)) ≤ ↑(natDegree p - 1)\n[PROOFSTEP]\napply le_trans (degree_sum_le _ _) (Finset.sup_le _)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nhp : 0 < natDegree p\n⊢ ∀ (b : ℕ), b ∈ support p → degree ((fun n a => ↑C (a * ↑n) * X ^ (n - 1)) b (coeff p b)) ≤ ↑(natDegree p - 1)\n[PROOFSTEP]\nintro n hn\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nhp : 0 < natDegree p\nn : ℕ\nhn : n ∈ support p\n⊢ degree ((fun n a => ↑C (a * ↑n) * X ^ (n - 1)) n (coeff p n)) ≤ ↑(natDegree p - 1)\n[PROOFSTEP]\nsimp only [Nat.cast_withBot]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nhp : 0 < natDegree p\nn : ℕ\nhn : n ∈ support p\n⊢ degree (↑C (coeff p n * ↑n) * X ^ (n - 1)) ≤ ↑(natDegree p - 1)\n[PROOFSTEP]\napply le_trans (degree_C_mul_X_pow_le _ _) (WithBot.coe_le_coe.2 (tsub_le_tsub_right _ _))\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nhp : 0 < natDegree p\nn : ℕ\nhn : n ∈ support p\n⊢ n ≤ natDegree p\n[PROOFSTEP]\napply le_natDegree_of_mem_supp _ hn\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nhp : 0 < natDegree p\n⊢ ↑(natDegree p - 1) ≤ degree (↑derivative p)\n[PROOFSTEP]\nrefine' le_sup _\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nhp : 0 < natDegree p\n⊢ natDegree p - 1 ∈ support (↑derivative p)\n[PROOFSTEP]\nrw [mem_support_derivative, tsub_add_cancel_of_le, mem_support_iff]\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nhp : 0 < natDegree p\n⊢ coeff p (natDegree p) ≠ 0\n[PROOFSTEP]\nshow ¬leadingCoeff p = 0\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nhp : 0 < natDegree p\n⊢ ¬leadingCoeff p = 0\n[PROOFSTEP]\nrw [leadingCoeff_eq_zero]\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nhp : 0 < natDegree p\n⊢ ¬p = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nhp : 0 < natDegree p\nh : p = 0\n⊢ False\n[PROOFSTEP]\nrw [h, natDegree_zero] at hp \n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nhp : 0 < 0\nh : p = 0\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl 0 (lt_of_le_of_lt (zero_le _) hp)\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroSMulDivisors ℕ R\np : R[X]\nhp : 0 < natDegree p\n⊢ 1 ≤ natDegree p\n[PROOFSTEP]\nexact hp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nk : ℕ\np : R[X]\n⊢ ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in Ico (Nat.succ m) (m + Nat.succ k), i) • coeff p (m + k)\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\n⊢ ∀ (m : ℕ),\n coeff ((↑derivative)^[Nat.zero] p) m = (∏ i in Ico (Nat.succ m) (m + Nat.succ Nat.zero), i) • coeff p (m + Nat.zero)\n[PROOFSTEP]\nsimp [add_zero, forall_const, one_smul, Ico_self, eq_self_iff_true, Function.iterate_zero_apply, prod_empty]\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nk : ℕ\nih : ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in Ico (Nat.succ m) (m + Nat.succ k), i) • coeff p (m + k)\n⊢ ∀ (m : ℕ),\n coeff ((↑derivative)^[Nat.succ k] p) m =\n (∏ i in Ico (Nat.succ m) (m + Nat.succ (Nat.succ k)), i) • coeff p (m + Nat.succ k)\n[PROOFSTEP]\nintro m\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nk : ℕ\nih : ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in Ico (Nat.succ m) (m + Nat.succ k), i) • coeff p (m + k)\nm : ℕ\n⊢ coeff ((↑derivative)^[Nat.succ k] p) m =\n (∏ i in Ico (Nat.succ m) (m + Nat.succ (Nat.succ k)), i) • coeff p (m + Nat.succ k)\n[PROOFSTEP]\nrw [Function.iterate_succ_apply', coeff_derivative, ih (m + 1), ← Nat.cast_add_one, ← nsmul_eq_mul', smul_smul,\n mul_comm]\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nk : ℕ\nih : ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in Ico (Nat.succ m) (m + Nat.succ k), i) • coeff p (m + k)\nm : ℕ\n⊢ ((∏ i in Ico (Nat.succ (m + 1)) (m + 1 + Nat.succ k), i) * (m + 1)) • coeff p (m + 1 + k) =\n (∏ i in Ico (Nat.succ m) (m + Nat.succ (Nat.succ k)), i) • coeff p (m + Nat.succ k)\n[PROOFSTEP]\napply congr_arg₂\n[GOAL]\ncase succ.hx\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nk : ℕ\nih : ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in Ico (Nat.succ m) (m + Nat.succ k), i) • coeff p (m + k)\nm : ℕ\n⊢ (∏ i in Ico (Nat.succ (m + 1)) (m + 1 + Nat.succ k), i) * (m + 1) =\n ∏ i in Ico (Nat.succ m) (m + Nat.succ (Nat.succ k)), i\n[PROOFSTEP]\nhave set_eq : Ico m.succ (m + k.succ.succ) = Ico (m + 1).succ (m + 1 + k.succ) ∪ {m + 1} :=\n by\n simp_rw [← Nat.Ico_succ_singleton, union_comm, Nat.succ_eq_add_one, add_comm (k + 1), add_assoc]\n rw [Ico_union_Ico_eq_Ico] <;> simp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nk : ℕ\nih : ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in Ico (Nat.succ m) (m + Nat.succ k), i) • coeff p (m + k)\nm : ℕ\n⊢ Ico (Nat.succ m) (m + Nat.succ (Nat.succ k)) = Ico (Nat.succ (m + 1)) (m + 1 + Nat.succ k) ∪ {m + 1}\n[PROOFSTEP]\nsimp_rw [← Nat.Ico_succ_singleton, union_comm, Nat.succ_eq_add_one, add_comm (k + 1), add_assoc]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nk : ℕ\nih : ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in Ico (Nat.succ m) (m + Nat.succ k), i) • coeff p (m + k)\nm : ℕ\n⊢ Ico (m + 1) (m + (1 + (k + 1))) = Ico (m + 1) (m + (1 + 1)) ∪ Ico (m + (1 + 1)) (m + (1 + (k + 1)))\n[PROOFSTEP]\nrw [Ico_union_Ico_eq_Ico]\n[GOAL]\ncase hab\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nk : ℕ\nih : ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in Ico (Nat.succ m) (m + Nat.succ k), i) • coeff p (m + k)\nm : ℕ\n⊢ m + 1 ≤ m + (1 + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hbc\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nk : ℕ\nih : ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in Ico (Nat.succ m) (m + Nat.succ k), i) • coeff p (m + k)\nm : ℕ\n⊢ m + (1 + 1) ≤ m + (1 + (k + 1))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.hx\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nk : ℕ\nih : ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in Ico (Nat.succ m) (m + Nat.succ k), i) • coeff p (m + k)\nm : ℕ\nset_eq : Ico (Nat.succ m) (m + Nat.succ (Nat.succ k)) = Ico (Nat.succ (m + 1)) (m + 1 + Nat.succ k) ∪ {m + 1}\n⊢ (∏ i in Ico (Nat.succ (m + 1)) (m + 1 + Nat.succ k), i) * (m + 1) =\n ∏ i in Ico (Nat.succ m) (m + Nat.succ (Nat.succ k)), i\n[PROOFSTEP]\nrw [set_eq, prod_union, prod_singleton]\n[GOAL]\ncase succ.hx\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nk : ℕ\nih : ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in Ico (Nat.succ m) (m + Nat.succ k), i) • coeff p (m + k)\nm : ℕ\nset_eq : Ico (Nat.succ m) (m + Nat.succ (Nat.succ k)) = Ico (Nat.succ (m + 1)) (m + 1 + Nat.succ k) ∪ {m + 1}\n⊢ Disjoint (Ico (Nat.succ (m + 1)) (m + 1 + Nat.succ k)) {m + 1}\n[PROOFSTEP]\nrw [disjoint_singleton_right, mem_Ico]\n[GOAL]\ncase succ.hx\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nk : ℕ\nih : ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in Ico (Nat.succ m) (m + Nat.succ k), i) • coeff p (m + k)\nm : ℕ\nset_eq : Ico (Nat.succ m) (m + Nat.succ (Nat.succ k)) = Ico (Nat.succ (m + 1)) (m + 1 + Nat.succ k) ∪ {m + 1}\n⊢ ¬(Nat.succ (m + 1) ≤ m + 1 ∧ m + 1 < m + 1 + Nat.succ k)\n[PROOFSTEP]\nexact fun h => (Nat.lt_succ_self _).not_le h.1\n[GOAL]\ncase succ.hy\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nk : ℕ\nih : ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in Ico (Nat.succ m) (m + Nat.succ k), i) • coeff p (m + k)\nm : ℕ\n⊢ coeff p (m + 1 + k) = coeff p (m + Nat.succ k)\n[PROOFSTEP]\nexact congr_arg _ (Nat.succ_add m k)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\nk : ℕ\np : R[X]\n⊢ ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in range k, (m + k - i)) • coeff p (m + k)\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\n⊢ ∀ (m : ℕ), coeff ((↑derivative)^[Nat.zero] p) m = (∏ i in range Nat.zero, (m + Nat.zero - i)) • coeff p (m + Nat.zero)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nk : ℕ\nih : ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in range k, (m + k - i)) • coeff p (m + k)\n⊢ ∀ (m : ℕ),\n coeff ((↑derivative)^[Nat.succ k] p) m =\n (∏ i in range (Nat.succ k), (m + Nat.succ k - i)) • coeff p (m + Nat.succ k)\n[PROOFSTEP]\nintro m\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nk : ℕ\nih : ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in range k, (m + k - i)) • coeff p (m + k)\nm : ℕ\n⊢ coeff ((↑derivative)^[Nat.succ k] p) m = (∏ i in range (Nat.succ k), (m + Nat.succ k - i)) • coeff p (m + Nat.succ k)\n[PROOFSTEP]\ncalc\n (derivative^[k + 1] p).coeff m = (∏ i in range k, (m + k.succ - i)) • p.coeff (m + k.succ) * (m + 1) := by\n rw [Function.iterate_succ_apply', coeff_derivative, ih m.succ, Nat.succ_add, Nat.add_succ]\n _ = ((∏ i in range k, (m + k.succ - i)) * (m + 1)) • p.coeff (m + k.succ) := by\n rw [← Nat.cast_add_one, ← nsmul_eq_mul', smul_smul, mul_comm]\n _ = (∏ i in range k.succ, (m + k.succ - i)) • p.coeff (m + k.succ) := by\n rw [prod_range_succ, add_tsub_assoc_of_le k.le_succ, Nat.succ_sub le_rfl, tsub_self]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nk : ℕ\nih : ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in range k, (m + k - i)) • coeff p (m + k)\nm : ℕ\n⊢ coeff ((↑derivative)^[k + 1] p) m = (∏ i in range k, (m + Nat.succ k - i)) • coeff p (m + Nat.succ k) * (↑m + 1)\n[PROOFSTEP]\nrw [Function.iterate_succ_apply', coeff_derivative, ih m.succ, Nat.succ_add, Nat.add_succ]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nk : ℕ\nih : ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in range k, (m + k - i)) • coeff p (m + k)\nm : ℕ\n⊢ (∏ i in range k, (m + Nat.succ k - i)) • coeff p (m + Nat.succ k) * (↑m + 1) =\n ((∏ i in range k, (m + Nat.succ k - i)) * (m + 1)) • coeff p (m + Nat.succ k)\n[PROOFSTEP]\nrw [← Nat.cast_add_one, ← nsmul_eq_mul', smul_smul, mul_comm]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np : R[X]\nk : ℕ\nih : ∀ (m : ℕ), coeff ((↑derivative)^[k] p) m = (∏ i in range k, (m + k - i)) • coeff p (m + k)\nm : ℕ\n⊢ ((∏ i in range k, (m + Nat.succ k - i)) * (m + 1)) • coeff p (m + Nat.succ k) =\n (∏ i in range (Nat.succ k), (m + Nat.succ k - i)) • coeff p (m + Nat.succ k)\n[PROOFSTEP]\nrw [prod_range_succ, add_tsub_assoc_of_le k.le_succ, Nat.succ_sub le_rfl, tsub_self]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\nn : ℕ\np q : R[X]\n⊢ (↑derivative)^[n] (p * q) =\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k] q)\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ (↑derivative)^[Nat.zero] (p * q) =\n ∑ k in range (Nat.succ Nat.zero), Nat.choose Nat.zero k • ((↑derivative)^[Nat.zero - k] p * (↑derivative)^[k] q)\n[PROOFSTEP]\nsimp [Finset.range]\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nIH :\n (↑derivative)^[n] (p * q) =\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k] q)\n⊢ (↑derivative)^[Nat.succ n] (p * q) =\n ∑ k in range (Nat.succ (Nat.succ n)),\n Nat.choose (Nat.succ n) k • ((↑derivative)^[Nat.succ n - k] p * (↑derivative)^[k] q)\n[PROOFSTEP]\ncalc\n derivative^[n + 1] (p * q) =\n derivative (∑ k : ℕ in range n.succ, n.choose k • (derivative^[n - k] p * derivative^[k] q)) :=\n by rw [Function.iterate_succ_apply', IH]\n _ =\n (∑ k : ℕ in range n.succ, n.choose k • (derivative^[n - k + 1] p * derivative^[k] q)) +\n ∑ k : ℕ in range n.succ, n.choose k • (derivative^[n - k] p * derivative^[k + 1] q) :=\n by\n simp_rw [derivative_sum, derivative_smul, derivative_mul, Function.iterate_succ_apply', smul_add, sum_add_distrib]\n _ =\n (∑ k : ℕ in range n.succ, n.choose k.succ • (derivative^[n - k] p * derivative^[k + 1] q)) +\n 1 • (derivative^[n + 1] p * derivative^[0] q) +\n ∑ k : ℕ in range n.succ, n.choose k • (derivative^[n - k] p * derivative^[k + 1] q) :=\n ?_\n _ =\n ((∑ k : ℕ in range n.succ, n.choose k • (derivative^[n - k] p * derivative^[k + 1] q)) +\n ∑ k : ℕ in range n.succ, n.choose k.succ • (derivative^[n - k] p * derivative^[k + 1] q)) +\n 1 • (derivative^[n + 1] p * derivative^[0] q) :=\n by rw [add_comm, add_assoc]\n _ =\n (∑ i : ℕ in range n.succ, (n + 1).choose (i + 1) • (derivative^[n + 1 - (i + 1)] p * derivative^[i + 1] q)) +\n 1 • (derivative^[n + 1] p * derivative^[0] q) :=\n by simp_rw [Nat.choose_succ_succ, Nat.succ_sub_succ, add_smul, sum_add_distrib]\n _ = ∑ k : ℕ in range n.succ.succ, n.succ.choose k • (derivative^[n.succ - k] p * derivative^[k] q) := by\n rw [sum_range_succ' _ n.succ, Nat.choose_zero_right, tsub_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nIH :\n (↑derivative)^[n] (p * q) =\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k] q)\n⊢ (↑derivative)^[n + 1] (p * q) =\n ↑derivative (∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k] q))\n[PROOFSTEP]\nrw [Function.iterate_succ_apply', IH]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nIH :\n (↑derivative)^[n] (p * q) =\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k] q)\n⊢ ↑derivative (∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k] q)) =\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k + 1] p * (↑derivative)^[k] q) +\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k + 1] q)\n[PROOFSTEP]\nsimp_rw [derivative_sum, derivative_smul, derivative_mul, Function.iterate_succ_apply', smul_add, sum_add_distrib]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nIH :\n (↑derivative)^[n] (p * q) =\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k] q)\n⊢ ∑ k in range (Nat.succ n), Nat.choose n (Nat.succ k) • ((↑derivative)^[n - k] p * (↑derivative)^[k + 1] q) +\n 1 • ((↑derivative)^[n + 1] p * (↑derivative)^[0] q) +\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k + 1] q) =\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k + 1] q) +\n ∑ k in range (Nat.succ n), Nat.choose n (Nat.succ k) • ((↑derivative)^[n - k] p * (↑derivative)^[k + 1] q) +\n 1 • ((↑derivative)^[n + 1] p * (↑derivative)^[0] q)\n[PROOFSTEP]\nrw [add_comm, add_assoc]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nIH :\n (↑derivative)^[n] (p * q) =\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k] q)\n⊢ ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k + 1] q) +\n ∑ k in range (Nat.succ n), Nat.choose n (Nat.succ k) • ((↑derivative)^[n - k] p * (↑derivative)^[k + 1] q) +\n 1 • ((↑derivative)^[n + 1] p * (↑derivative)^[0] q) =\n ∑ i in range (Nat.succ n),\n Nat.choose (n + 1) (i + 1) • ((↑derivative)^[n + 1 - (i + 1)] p * (↑derivative)^[i + 1] q) +\n 1 • ((↑derivative)^[n + 1] p * (↑derivative)^[0] q)\n[PROOFSTEP]\nsimp_rw [Nat.choose_succ_succ, Nat.succ_sub_succ, add_smul, sum_add_distrib]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nIH :\n (↑derivative)^[n] (p * q) =\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k] q)\n⊢ ∑ i in range (Nat.succ n),\n Nat.choose (n + 1) (i + 1) • ((↑derivative)^[n + 1 - (i + 1)] p * (↑derivative)^[i + 1] q) +\n 1 • ((↑derivative)^[n + 1] p * (↑derivative)^[0] q) =\n ∑ k in range (Nat.succ (Nat.succ n)),\n Nat.choose (Nat.succ n) k • ((↑derivative)^[Nat.succ n - k] p * (↑derivative)^[k] q)\n[PROOFSTEP]\nrw [sum_range_succ' _ n.succ, Nat.choose_zero_right, tsub_zero]\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nIH :\n (↑derivative)^[n] (p * q) =\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k] q)\n⊢ ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k + 1] p * (↑derivative)^[k] q) +\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k + 1] q) =\n ∑ k in range (Nat.succ n), Nat.choose n (Nat.succ k) • ((↑derivative)^[n - k] p * (↑derivative)^[k + 1] q) +\n 1 • ((↑derivative)^[n + 1] p * (↑derivative)^[0] q) +\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k + 1] q)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase succ.e_a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nIH :\n (↑derivative)^[n] (p * q) =\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k] q)\n⊢ ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k + 1] p * (↑derivative)^[k] q) =\n ∑ k in range (Nat.succ n), Nat.choose n (Nat.succ k) • ((↑derivative)^[n - k] p * (↑derivative)^[k + 1] q) +\n 1 • ((↑derivative)^[n + 1] p * (↑derivative)^[0] q)\n[PROOFSTEP]\nrefine' (sum_range_succ' _ _).trans (congr_arg₂ (· + ·) _ _)\n[GOAL]\ncase succ.e_a.refine'_1\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nIH :\n (↑derivative)^[n] (p * q) =\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k] q)\n⊢ ∑ k in range n, Nat.choose n (k + 1) • ((↑derivative)^[n - (k + 1) + 1] p * (↑derivative)^[k + 1] q) =\n ∑ k in range (Nat.succ n), Nat.choose n (Nat.succ k) • ((↑derivative)^[n - k] p * (↑derivative)^[k + 1] q)\n[PROOFSTEP]\nrw [sum_range_succ, Nat.choose_succ_self, zero_smul, add_zero]\n[GOAL]\ncase succ.e_a.refine'_1\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nIH :\n (↑derivative)^[n] (p * q) =\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k] q)\n⊢ ∑ k in range n, Nat.choose n (k + 1) • ((↑derivative)^[n - (k + 1) + 1] p * (↑derivative)^[k + 1] q) =\n ∑ x in range n, Nat.choose n (Nat.succ x) • ((↑derivative)^[n - x] p * (↑derivative)^[x + 1] q)\n[PROOFSTEP]\nrefine' sum_congr rfl fun k hk => _\n[GOAL]\ncase succ.e_a.refine'_1\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nIH :\n (↑derivative)^[n] (p * q) =\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k] q)\nk : ℕ\nhk : k ∈ range n\n⊢ Nat.choose n (k + 1) • ((↑derivative)^[n - (k + 1) + 1] p * (↑derivative)^[k + 1] q) =\n Nat.choose n (Nat.succ k) • ((↑derivative)^[n - k] p * (↑derivative)^[k + 1] q)\n[PROOFSTEP]\nrw [mem_range] at hk \n[GOAL]\ncase succ.e_a.refine'_1\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nIH :\n (↑derivative)^[n] (p * q) =\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k] q)\nk : ℕ\nhk : k < n\n⊢ Nat.choose n (k + 1) • ((↑derivative)^[n - (k + 1) + 1] p * (↑derivative)^[k + 1] q) =\n Nat.choose n (Nat.succ k) • ((↑derivative)^[n - k] p * (↑derivative)^[k + 1] q)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase succ.e_a.refine'_1.e_a.e_a.e_a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nIH :\n (↑derivative)^[n] (p * q) =\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k] q)\nk : ℕ\nhk : k < n\n⊢ n - (k + 1) + 1 = n - k\n[PROOFSTEP]\nrw [tsub_add_eq_add_tsub (Nat.succ_le_of_lt hk), Nat.succ_sub_succ]\n[GOAL]\ncase succ.e_a.refine'_2\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nIH :\n (↑derivative)^[n] (p * q) =\n ∑ k in range (Nat.succ n), Nat.choose n k • ((↑derivative)^[n - k] p * (↑derivative)^[k] q)\n⊢ Nat.choose n 0 • ((↑derivative)^[n - 0 + 1] p * (↑derivative)^[0] q) =\n 1 • ((↑derivative)^[n + 1] p * (↑derivative)^[0] q)\n[PROOFSTEP]\nrw [Nat.choose_zero_right, tsub_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : CommSemiring R\np : R[X]\nn : ℕ\n⊢ ↑derivative (p ^ (Nat.zero + 1)) = ↑C (↑Nat.zero + 1) * p ^ Nat.zero * ↑derivative p\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝¹ : ℕ\ninst✝ : CommSemiring R\np : R[X]\nn✝ n : ℕ\nih : ↑derivative (p ^ (n + 1)) = ↑C (↑n + 1) * p ^ n * ↑derivative p\n⊢ ↑derivative (p ^ (Nat.succ n + 1)) = ↑C (↑(Nat.succ n) + 1) * p ^ Nat.succ n * ↑derivative p\n[PROOFSTEP]\nrw [pow_succ', derivative_mul, ih, Nat.add_one, mul_right_comm, C_add, add_mul, add_mul, pow_succ', ← mul_assoc, C_1,\n one_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝¹ : ℕ\ninst✝ : CommSemiring R\np : R[X]\nn✝ n : ℕ\nih : ↑derivative (p ^ (n + 1)) = ↑C (↑n + 1) * p ^ n * ↑derivative p\n⊢ (↑C ↑n * p ^ n * p + p ^ n * p) * ↑derivative p + p ^ n * p * ↑derivative p =\n ↑C (↑(Nat.succ n) + 1) * p ^ n * p * ↑derivative p\n[PROOFSTEP]\nsimp [add_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : CommSemiring R\np : R[X]\nn : ℕ\n⊢ ↑derivative (p ^ Nat.zero) = ↑C ↑Nat.zero * p ^ (Nat.zero - 1) * ↑derivative p\n[PROOFSTEP]\nrw [pow_zero, derivative_one, Nat.cast_zero, C_0, zero_mul, zero_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝¹ : ℕ\ninst✝ : CommSemiring R\np : R[X]\nn✝ n : ℕ\n⊢ ↑derivative (p ^ Nat.succ n) = ↑C ↑(Nat.succ n) * p ^ (Nat.succ n - 1) * ↑derivative p\n[PROOFSTEP]\nrw [p.derivative_pow_succ n, n.succ_sub_one, n.cast_succ]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\np : R[X]\n⊢ ↑derivative (p ^ 2) = ↑C 2 * p * ↑derivative p\n[PROOFSTEP]\nrw [derivative_pow_succ, Nat.cast_one, one_add_one_eq_two, pow_one]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : CommSemiring R\nf : R[X]\nn m : ℕ\nc : R\nhm : m ≠ 0\n⊢ ↑n ∣ eval c ((↑derivative)^[m] (f ^ n))\n[PROOFSTEP]\nobtain ⟨m, rfl⟩ := Nat.exists_eq_succ_of_ne_zero hm\n[GOAL]\ncase intro\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : CommSemiring R\nf : R[X]\nn : ℕ\nc : R\nm : ℕ\nhm : Nat.succ m ≠ 0\n⊢ ↑n ∣ eval c ((↑derivative)^[Nat.succ m] (f ^ n))\n[PROOFSTEP]\nrw [Function.iterate_succ_apply, derivative_pow, mul_assoc, C_eq_nat_cast, iterate_derivative_nat_cast_mul, eval_mul,\n eval_nat_cast]\n[GOAL]\ncase intro\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : CommSemiring R\nf : R[X]\nn : ℕ\nc : R\nm : ℕ\nhm : Nat.succ m ≠ 0\n⊢ ↑n ∣ ↑n * eval c ((↑derivative)^[m] (f ^ (n - 1) * ↑derivative f))\n[PROOFSTEP]\nexact dvd_mul_right _ _\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : CommSemiring R\nn k : ℕ\n⊢ (↑derivative)^[k] (X ^ n) = ↑(Nat.descFactorial n k) * X ^ (n - k)\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : CommSemiring R\nn : ℕ\n⊢ (↑derivative)^[Nat.zero] (X ^ n) = ↑(Nat.descFactorial n Nat.zero) * X ^ (n - Nat.zero)\n[PROOFSTEP]\nerw [Function.iterate_zero_apply, tsub_zero, Nat.descFactorial_zero, Nat.cast_one, one_mul]\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : CommSemiring R\nn k : ℕ\nih : (↑derivative)^[k] (X ^ n) = ↑(Nat.descFactorial n k) * X ^ (n - k)\n⊢ (↑derivative)^[Nat.succ k] (X ^ n) = ↑(Nat.descFactorial n (Nat.succ k)) * X ^ (n - Nat.succ k)\n[PROOFSTEP]\nrw [Function.iterate_succ_apply', ih, derivative_nat_cast_mul, derivative_X_pow, C_eq_nat_cast, Nat.succ_eq_add_one,\n Nat.descFactorial_succ, Nat.sub_sub, Nat.cast_mul]\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : CommSemiring R\nn k : ℕ\nih : (↑derivative)^[k] (X ^ n) = ↑(Nat.descFactorial n k) * X ^ (n - k)\n⊢ ↑(Nat.descFactorial n k) * (↑(n - k) * X ^ (n - (k + 1))) = ↑(n - k) * ↑(Nat.descFactorial n k) * X ^ (n - (k + 1))\n[PROOFSTEP]\nsimp [mul_comm, mul_assoc, mul_left_comm]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : CommSemiring R\nn k : ℕ\n⊢ (↑derivative)^[k] (X ^ n) = ↑C ↑(Nat.descFactorial n k) * X ^ (n - k)\n[PROOFSTEP]\nrw [iterate_derivative_X_pow_eq_nat_cast_mul n k, C_eq_nat_cast]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : CommSemiring R\nn k : ℕ\n⊢ (↑derivative)^[k] (X ^ n) = ↑(Nat.descFactorial n k) • X ^ (n - k)\n[PROOFSTEP]\nrw [iterate_derivative_X_pow_eq_C_mul n k, smul_eq_C_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\nc : R\nm : ℕ\n⊢ ↑derivative ((X + ↑C c) ^ m) = ↑C ↑m * (X + ↑C c) ^ (m - 1)\n[PROOFSTEP]\nrw [derivative_pow, derivative_X_add_C, mul_one]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\nc : R\n⊢ ↑derivative ((X + ↑C c) ^ 2) = ↑C 2 * (X + ↑C c)\n[PROOFSTEP]\nrw [derivative_sq, derivative_X_add_C, mul_one]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : CommSemiring R\nn k : ℕ\nc : R\n⊢ (↑derivative)^[k] ((X + ↑C c) ^ n) = ↑(∏ i in range k, (n - i)) * (X + ↑C c) ^ (n - k)\n[PROOFSTEP]\ninduction' k with k IH\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : CommSemiring R\nn : ℕ\nc : R\n⊢ (↑derivative)^[Nat.zero] ((X + ↑C c) ^ n) = ↑(∏ i in range Nat.zero, (n - i)) * (X + ↑C c) ^ (n - Nat.zero)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : CommSemiring R\nn : ℕ\nc : R\nk : ℕ\nIH : (↑derivative)^[k] ((X + ↑C c) ^ n) = ↑(∏ i in range k, (n - i)) * (X + ↑C c) ^ (n - k)\n⊢ (↑derivative)^[Nat.succ k] ((X + ↑C c) ^ n) = ↑(∏ i in range (Nat.succ k), (n - i)) * (X + ↑C c) ^ (n - Nat.succ k)\n[PROOFSTEP]\nsimp only [Function.iterate_succ_apply', IH, derivative_mul, zero_mul, derivative_nat_cast, zero_add,\n Finset.prod_range_succ, C_eq_nat_cast, Nat.sub_sub, ← mul_assoc, derivative_X_add_C_pow, Nat.succ_eq_add_one,\n Nat.cast_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\np q : R[X]\n⊢ ↑derivative (comp p q) = ↑derivative q * comp (↑derivative p) q\n[PROOFSTEP]\ninduction p using Polynomial.induction_on'\n[GOAL]\ncase h_add\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\nq p✝ q✝ : R[X]\na✝¹ : ↑derivative (comp p✝ q) = ↑derivative q * comp (↑derivative p✝) q\na✝ : ↑derivative (comp q✝ q) = ↑derivative q * comp (↑derivative q✝) q\n⊢ ↑derivative (comp (p✝ + q✝) q) = ↑derivative q * comp (↑derivative (p✝ + q✝)) q\n[PROOFSTEP]\nsimp [*, mul_add]\n[GOAL]\ncase h_monomial\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\nq : R[X]\nn✝ : ℕ\na✝ : R\n⊢ ↑derivative (comp (↑(monomial n✝) a✝) q) = ↑derivative q * comp (↑derivative (↑(monomial n✝) a✝)) q\n[PROOFSTEP]\nsimp only [derivative_pow, derivative_mul, monomial_comp, derivative_monomial, derivative_C, zero_mul, C_eq_nat_cast,\n zero_add, RingHom.map_mul]\n[GOAL]\ncase h_monomial\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\nq : R[X]\nn✝ : ℕ\na✝ : R\n⊢ ↑C a✝ * (↑n✝ * q ^ (n✝ - 1) * ↑derivative q) = ↑derivative q * (↑C a✝ * ↑n✝ * q ^ (n✝ - 1))\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\np q : R[X]\nr : R\n⊢ ↑derivative (eval₂ C q (↑C r)) = eval₂ C q (↑derivative (↑C r)) * ↑derivative q\n[PROOFSTEP]\nrw [eval₂_C, derivative_C, eval₂_zero, zero_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\np q p₁ p₂ : R[X]\nih₁ : ↑derivative (eval₂ C q p₁) = eval₂ C q (↑derivative p₁) * ↑derivative q\nih₂ : ↑derivative (eval₂ C q p₂) = eval₂ C q (↑derivative p₂) * ↑derivative q\n⊢ ↑derivative (eval₂ C q (p₁ + p₂)) = eval₂ C q (↑derivative (p₁ + p₂)) * ↑derivative q\n[PROOFSTEP]\nrw [eval₂_add, derivative_add, ih₁, ih₂, derivative_add, eval₂_add, add_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : CommSemiring R\np q : R[X]\nn : ℕ\nr : R\nih : ↑derivative (eval₂ C q (↑C r * X ^ n)) = eval₂ C q (↑derivative (↑C r * X ^ n)) * ↑derivative q\n⊢ ↑derivative (eval₂ C q (↑C r * X ^ (n + 1))) = eval₂ C q (↑derivative (↑C r * X ^ (n + 1))) * ↑derivative q\n[PROOFSTEP]\nrw [pow_succ', ← mul_assoc, eval₂_mul, eval₂_X, derivative_mul, ih, @derivative_mul _ _ _ X, derivative_X, mul_one,\n eval₂_add, @eval₂_mul _ _ _ _ X, eval₂_X, add_mul, mul_right_comm]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\ns : Multiset ι\nf : ι → R[X]\n⊢ ↑derivative (Multiset.prod (Multiset.map f s)) =\n Multiset.sum (Multiset.map (fun i => Multiset.prod (Multiset.map f (Multiset.erase s i)) * ↑derivative (f i)) s)\n[PROOFSTEP]\nrefine' Multiset.induction_on s (by simp) fun i s h => _\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\ns : Multiset ι\nf : ι → R[X]\n⊢ ↑derivative (Multiset.prod (Multiset.map f 0)) =\n Multiset.sum (Multiset.map (fun i => Multiset.prod (Multiset.map f (Multiset.erase 0 i)) * ↑derivative (f i)) 0)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\ns✝ : Multiset ι\nf : ι → R[X]\ni : ι\ns : Multiset ι\nh :\n ↑derivative (Multiset.prod (Multiset.map f s)) =\n Multiset.sum (Multiset.map (fun i => Multiset.prod (Multiset.map f (Multiset.erase s i)) * ↑derivative (f i)) s)\n⊢ ↑derivative (Multiset.prod (Multiset.map f (i ::ₘ s))) =\n Multiset.sum\n (Multiset.map (fun i_1 => Multiset.prod (Multiset.map f (Multiset.erase (i ::ₘ s) i_1)) * ↑derivative (f i_1))\n (i ::ₘ s))\n[PROOFSTEP]\nrw [Multiset.map_cons, Multiset.prod_cons, derivative_mul, Multiset.map_cons _ i s, Multiset.sum_cons,\n Multiset.erase_cons_head, mul_comm (derivative (f i))]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\ns✝ : Multiset ι\nf : ι → R[X]\ni : ι\ns : Multiset ι\nh :\n ↑derivative (Multiset.prod (Multiset.map f s)) =\n Multiset.sum (Multiset.map (fun i => Multiset.prod (Multiset.map f (Multiset.erase s i)) * ↑derivative (f i)) s)\n⊢ Multiset.prod (Multiset.map f s) * ↑derivative (f i) + f i * ↑derivative (Multiset.prod (Multiset.map f s)) =\n Multiset.prod (Multiset.map f s) * ↑derivative (f i) +\n Multiset.sum\n (Multiset.map (fun i_1 => Multiset.prod (Multiset.map f (Multiset.erase (i ::ₘ s) i_1)) * ↑derivative (f i_1))\n s)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\ns✝ : Multiset ι\nf : ι → R[X]\ni : ι\ns : Multiset ι\nh :\n ↑derivative (Multiset.prod (Multiset.map f s)) =\n Multiset.sum (Multiset.map (fun i => Multiset.prod (Multiset.map f (Multiset.erase s i)) * ↑derivative (f i)) s)\n⊢ f i * ↑derivative (Multiset.prod (Multiset.map f s)) =\n Multiset.sum\n (Multiset.map (fun i_1 => Multiset.prod (Multiset.map f (Multiset.erase (i ::ₘ s) i_1)) * ↑derivative (f i_1)) s)\n[PROOFSTEP]\nrw [h, ← AddMonoidHom.coe_mulLeft, (AddMonoidHom.mulLeft (f i)).map_multiset_sum _, AddMonoidHom.coe_mulLeft]\n[GOAL]\ncase e_a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\ns✝ : Multiset ι\nf : ι → R[X]\ni : ι\ns : Multiset ι\nh :\n ↑derivative (Multiset.prod (Multiset.map f s)) =\n Multiset.sum (Multiset.map (fun i => Multiset.prod (Multiset.map f (Multiset.erase s i)) * ↑derivative (f i)) s)\n⊢ Multiset.sum\n (Multiset.map (HMul.hMul (f i))\n (Multiset.map (fun i => Multiset.prod (Multiset.map f (Multiset.erase s i)) * ↑derivative (f i)) s)) =\n Multiset.sum\n (Multiset.map (fun i_1 => Multiset.prod (Multiset.map f (Multiset.erase (i ::ₘ s) i_1)) * ↑derivative (f i_1)) s)\n[PROOFSTEP]\nsimp only [Function.comp_apply, Multiset.map_map]\n[GOAL]\ncase e_a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\ns✝ : Multiset ι\nf : ι → R[X]\ni : ι\ns : Multiset ι\nh :\n ↑derivative (Multiset.prod (Multiset.map f s)) =\n Multiset.sum (Multiset.map (fun i => Multiset.prod (Multiset.map f (Multiset.erase s i)) * ↑derivative (f i)) s)\n⊢ Multiset.sum\n (Multiset.map (fun x => f i * (Multiset.prod (Multiset.map f (Multiset.erase s x)) * ↑derivative (f x))) s) =\n Multiset.sum\n (Multiset.map (fun x => Multiset.prod (Multiset.map f (Multiset.erase (i ::ₘ s) x)) * ↑derivative (f x)) s)\n[PROOFSTEP]\nrefine' congr_arg _ (Multiset.map_congr rfl fun j hj => _)\n[GOAL]\ncase e_a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\ns✝ : Multiset ι\nf : ι → R[X]\ni : ι\ns : Multiset ι\nh :\n ↑derivative (Multiset.prod (Multiset.map f s)) =\n Multiset.sum (Multiset.map (fun i => Multiset.prod (Multiset.map f (Multiset.erase s i)) * ↑derivative (f i)) s)\nj : ι\nhj : j ∈ s\n⊢ f i * (Multiset.prod (Multiset.map f (Multiset.erase s j)) * ↑derivative (f j)) =\n Multiset.prod (Multiset.map f (Multiset.erase (i ::ₘ s) j)) * ↑derivative (f j)\n[PROOFSTEP]\nrw [← mul_assoc, ← Multiset.prod_cons, ← Multiset.map_cons]\n[GOAL]\ncase e_a\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\ns✝ : Multiset ι\nf : ι → R[X]\ni : ι\ns : Multiset ι\nh :\n ↑derivative (Multiset.prod (Multiset.map f s)) =\n Multiset.sum (Multiset.map (fun i => Multiset.prod (Multiset.map f (Multiset.erase s i)) * ↑derivative (f i)) s)\nj : ι\nhj : j ∈ s\n⊢ Multiset.prod (Multiset.map f (i ::ₘ Multiset.erase s j)) * ↑derivative (f j) =\n Multiset.prod (Multiset.map f (Multiset.erase (i ::ₘ s) j)) * ↑derivative (f j)\n[PROOFSTEP]\nby_cases hij : i = j\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\ns✝ : Multiset ι\nf : ι → R[X]\ni : ι\ns : Multiset ι\nh :\n ↑derivative (Multiset.prod (Multiset.map f s)) =\n Multiset.sum (Multiset.map (fun i => Multiset.prod (Multiset.map f (Multiset.erase s i)) * ↑derivative (f i)) s)\nj : ι\nhj : j ∈ s\nhij : i = j\n⊢ Multiset.prod (Multiset.map f (i ::ₘ Multiset.erase s j)) * ↑derivative (f j) =\n Multiset.prod (Multiset.map f (Multiset.erase (i ::ₘ s) j)) * ↑derivative (f j)\n[PROOFSTEP]\nsimp [hij, ← Multiset.prod_cons, ← Multiset.map_cons, Multiset.cons_erase hj]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommSemiring R\ns✝ : Multiset ι\nf : ι → R[X]\ni : ι\ns : Multiset ι\nh :\n ↑derivative (Multiset.prod (Multiset.map f s)) =\n Multiset.sum (Multiset.map (fun i => Multiset.prod (Multiset.map f (Multiset.erase s i)) * ↑derivative (f i)) s)\nj : ι\nhj : j ∈ s\nhij : ¬i = j\n⊢ Multiset.prod (Multiset.map f (i ::ₘ Multiset.erase s j)) * ↑derivative (f j) =\n Multiset.prod (Multiset.map f (Multiset.erase (i ::ₘ s) j)) * ↑derivative (f j)\n[PROOFSTEP]\nsimp [hij]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Ring R\nc : R\n⊢ ↑derivative (X - ↑C c) = 1\n[PROOFSTEP]\nrw [derivative_sub, derivative_X, derivative_C, sub_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Ring R\nk : ℕ\nf g : R[X]\n⊢ (↑derivative)^[k] (f - g) = (↑derivative)^[k] f - (↑derivative)^[k] g\n[PROOFSTEP]\ninduction' k with k ih generalizing f g\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Ring R\nf✝ g✝ f g : R[X]\n⊢ (↑derivative)^[Nat.zero] (f - g) = (↑derivative)^[Nat.zero] f - (↑derivative)^[Nat.zero] g\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Ring R\nf✝ g✝ : R[X]\nk : ℕ\nih : ∀ {f g : R[X]}, (↑derivative)^[k] (f - g) = (↑derivative)^[k] f - (↑derivative)^[k] g\nf g : R[X]\n⊢ (↑derivative)^[Nat.succ k] (f - g) = (↑derivative)^[Nat.succ k] f - (↑derivative)^[Nat.succ k] g\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Ring R\nn : ℤ\n⊢ ↑derivative ↑n = 0\n[PROOFSTEP]\nrw [← C_eq_int_cast n]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Ring R\nn : ℤ\n⊢ ↑derivative (↑C ↑n) = 0\n[PROOFSTEP]\nexact derivative_C\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Ring R\nn : ℤ\nf : R[X]\n⊢ ↑derivative (↑n * f) = ↑n * ↑derivative f\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Ring R\nn : ℤ\nk : ℕ\nf : R[X]\n⊢ (↑derivative)^[k] (↑n * f) = ↑n * (↑derivative)^[k] f\n[PROOFSTEP]\ninduction' k with k ih generalizing f\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Ring R\nn : ℤ\nf✝ f : R[X]\n⊢ (↑derivative)^[Nat.zero] (↑n * f) = ↑n * (↑derivative)^[Nat.zero] f\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Ring R\nn : ℤ\nf✝ : R[X]\nk : ℕ\nih : ∀ {f : R[X]}, (↑derivative)^[k] (↑n * f) = ↑n * (↑derivative)^[k] f\nf : R[X]\n⊢ (↑derivative)^[Nat.succ k] (↑n * f) = ↑n * (↑derivative)^[Nat.succ k] f\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommRing R\np : R[X]\n⊢ ↑derivative (comp p (1 - X)) = -comp (↑derivative p) (1 - X)\n[PROOFSTEP]\nsimp [derivative_comp]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommRing R\np : R[X]\nk : ℕ\n⊢ (↑derivative)^[k] (comp p (1 - X)) = (-1) ^ k * comp ((↑derivative)^[k] p) (1 - X)\n[PROOFSTEP]\ninduction' k with k ih generalizing p\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommRing R\np✝ p : R[X]\n⊢ (↑derivative)^[Nat.zero] (comp p (1 - X)) = (-1) ^ Nat.zero * comp ((↑derivative)^[Nat.zero] p) (1 - X)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommRing R\np✝ : R[X]\nk : ℕ\nih : ∀ (p : R[X]), (↑derivative)^[k] (comp p (1 - X)) = (-1) ^ k * comp ((↑derivative)^[k] p) (1 - X)\np : R[X]\n⊢ (↑derivative)^[Nat.succ k] (comp p (1 - X)) = (-1) ^ Nat.succ k * comp ((↑derivative)^[Nat.succ k] p) (1 - X)\n[PROOFSTEP]\nsimp [ih (derivative p), iterate_derivative_neg, derivative_comp, pow_succ]\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommRing R\nS : Multiset R\nr : R\nhr : r ∈ S\n⊢ eval r (↑derivative (Multiset.prod (Multiset.map (fun a => X - ↑C a) S))) =\n Multiset.prod (Multiset.map (fun a => r - a) (Multiset.erase S r))\n[PROOFSTEP]\nnth_rw 1 [← Multiset.cons_erase hr]\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommRing R\nS : Multiset R\nr : R\nhr : r ∈ S\n⊢ eval r (↑derivative (Multiset.prod (Multiset.map (fun a => X - ↑C a) (r ::ₘ Multiset.erase S r)))) =\n Multiset.prod (Multiset.map (fun a => r - a) (Multiset.erase S r))\n[PROOFSTEP]\nhave := (evalRingHom r).map_multiset_prod (Multiset.map (fun a => X - C a) (S.erase r))\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommRing R\nS : Multiset R\nr : R\nhr : r ∈ S\nthis :\n ↑(evalRingHom r) (Multiset.prod (Multiset.map (fun a => X - ↑C a) (Multiset.erase S r))) =\n Multiset.prod (Multiset.map (↑(evalRingHom r)) (Multiset.map (fun a => X - ↑C a) (Multiset.erase S r)))\n⊢ eval r (↑derivative (Multiset.prod (Multiset.map (fun a => X - ↑C a) (r ::ₘ Multiset.erase S r)))) =\n Multiset.prod (Multiset.map (fun a => r - a) (Multiset.erase S r))\n[PROOFSTEP]\nsimpa using this\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommRing R\nc : R\nm : ℕ\n⊢ ↑derivative ((X - ↑C c) ^ m) = ↑C ↑m * (X - ↑C c) ^ (m - 1)\n[PROOFSTEP]\nrw [derivative_pow, derivative_X_sub_C, mul_one]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : CommRing R\nc : R\n⊢ ↑derivative ((X - ↑C c) ^ 2) = ↑C 2 * (X - ↑C c)\n[PROOFSTEP]\nrw [derivative_sq, derivative_X_sub_C, mul_one]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nι : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : CommRing R\nn k : ℕ\nc : R\n⊢ (↑derivative)^[k] ((X - ↑C c) ^ n) = ↑(∏ i in range k, (n - i)) * (X - ↑C c) ^ (n - k)\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← C_neg, iterate_derivative_X_add_pow]\n", "meta": {"mathlib_filename": "Mathlib.Data.Polynomial.Derivative", "llama_tokens": 47078, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8723473779969194, "lm_q2_score": 0.6584175072643413, "lm_q1q2_score": 0.5743687860893159}} {"text": "[GOAL]\n𝕜 : Type u\ninst✝² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf : 𝕜 → E\n⊢ support (deriv f) ⊆ tsupport f\n[PROOFSTEP]\nintro x\n[GOAL]\n𝕜 : Type u\ninst✝² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf : 𝕜 → E\nx : 𝕜\n⊢ x ∈ support (deriv f) → x ∈ tsupport f\n[PROOFSTEP]\nrw [← not_imp_not]\n[GOAL]\n𝕜 : Type u\ninst✝² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf : 𝕜 → E\nx : 𝕜\n⊢ ¬x ∈ tsupport f → ¬x ∈ support (deriv f)\n[PROOFSTEP]\nintro h2x\n[GOAL]\n𝕜 : Type u\ninst✝² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf : 𝕜 → E\nx : 𝕜\nh2x : ¬x ∈ tsupport f\n⊢ ¬x ∈ support (deriv f)\n[PROOFSTEP]\nrw [not_mem_tsupport_iff_eventuallyEq] at h2x \n[GOAL]\n𝕜 : Type u\ninst✝² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf : 𝕜 → E\nx : 𝕜\nh2x : f =ᶠ[nhds x] 0\n⊢ ¬x ∈ support (deriv f)\n[PROOFSTEP]\nexact nmem_support.mpr (h2x.deriv_eq.trans (deriv_const x 0))\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.Deriv.Support", "llama_tokens": 555, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8289388083214155, "lm_q2_score": 0.6926419767901475, "lm_q1q2_score": 0.5741578148338145}} {"text": "[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝¹ : DecidableEq l\ninst✝ : CommRing R\n⊢ (J l R)ᵀ = -J l R\n[PROOFSTEP]\nrw [J, fromBlocks_transpose, ← neg_one_smul R (fromBlocks _ _ _ _ : Matrix (l ⊕ l) (l ⊕ l) R), fromBlocks_smul,\n Matrix.transpose_zero, Matrix.transpose_one, transpose_neg]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝¹ : DecidableEq l\ninst✝ : CommRing R\n⊢ fromBlocks 0 1 (-1ᵀ) 0 = fromBlocks (-1 • 0) (-1 • -1) (-1 • 1) (-1 • 0)\n[PROOFSTEP]\nsimp [fromBlocks]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : CommRing R\ninst✝ : Fintype l\n⊢ J l R * J l R = -1\n[PROOFSTEP]\nrw [J, fromBlocks_multiply]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : CommRing R\ninst✝ : Fintype l\n⊢ fromBlocks (0 * 0 + -1 * 1) (0 * -1 + -1 * 0) (1 * 0 + 0 * 1) (1 * -1 + 0 * 0) = -1\n[PROOFSTEP]\nsimp only [Matrix.zero_mul, Matrix.neg_mul, zero_add, neg_zero, Matrix.one_mul, add_zero]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : CommRing R\ninst✝ : Fintype l\n⊢ fromBlocks (-1) 0 0 (-1) = -1\n[PROOFSTEP]\nrw [← neg_zero, ← Matrix.fromBlocks_neg, ← fromBlocks_one]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : CommRing R\ninst✝ : Fintype l\n⊢ (J l R)⁻¹ = -J l R\n[PROOFSTEP]\nrefine' Matrix.inv_eq_right_inv _\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : CommRing R\ninst✝ : Fintype l\n⊢ J l R * -J l R = 1\n[PROOFSTEP]\nrw [Matrix.mul_neg, J_squared]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : CommRing R\ninst✝ : Fintype l\n⊢ - -1 = 1\n[PROOFSTEP]\nexact neg_neg 1\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : CommRing R\ninst✝ : Fintype l\n⊢ det (J l R) * det (J l R) = 1\n[PROOFSTEP]\nrw [← det_mul, J_squared, ← one_smul R (-1 : Matrix _ _ R), smul_neg, ← neg_smul, det_smul, Fintype.card_sum, det_one,\n mul_one]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : CommRing R\ninst✝ : Fintype l\n⊢ (-1) ^ (Fintype.card l + Fintype.card l) = 1\n[PROOFSTEP]\napply Even.neg_one_pow\n[GOAL]\ncase h\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : CommRing R\ninst✝ : Fintype l\n⊢ Even (Fintype.card l + Fintype.card l)\n[PROOFSTEP]\nexact even_add_self _\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : CommRing R\ninst✝ : Fintype l\na b : Matrix (l ⊕ l) (l ⊕ l) R\nha : a ∈ {A | A * J l R * Aᵀ = J l R}\nhb : b ∈ {A | A * J l R * Aᵀ = J l R}\n⊢ a * b ∈ {A | A * J l R * Aᵀ = J l R}\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, transpose_mul] at *\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : CommRing R\ninst✝ : Fintype l\na b : Matrix (l ⊕ l) (l ⊕ l) R\nha : a * J l R * aᵀ = J l R\nhb : b * J l R * bᵀ = J l R\n⊢ a * b * J l R * (bᵀ * aᵀ) = J l R\n[PROOFSTEP]\nrw [← Matrix.mul_assoc, a.mul_assoc, a.mul_assoc, hb]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : CommRing R\ninst✝ : Fintype l\na b : Matrix (l ⊕ l) (l ⊕ l) R\nha : a * J l R * aᵀ = J l R\nhb : b * J l R * bᵀ = J l R\n⊢ a * J l R * aᵀ = J l R\n[PROOFSTEP]\nexact ha\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : CommRing R\ninst✝ : Fintype l\n⊢ 1 ∈\n { carrier := {A | A * J l R * Aᵀ = J l R},\n mul_mem' :=\n (_ :\n ∀ {a b : Matrix (l ⊕ l) (l ⊕ l) R},\n a ∈ {A | A * J l R * Aᵀ = J l R} →\n b ∈ {A | A * J l R * Aᵀ = J l R} → a * b ∈ {A | A * J l R * Aᵀ = J l R}) }.carrier\n[PROOFSTEP]\nsimp\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\n⊢ A ∈ symplecticGroup l R ↔ A * J l R * Aᵀ = J l R\n[PROOFSTEP]\nsimp [symplecticGroup]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\n⊢ J l R ∈ symplecticGroup l R\n[PROOFSTEP]\nrw [mem_iff, J, fromBlocks_multiply, fromBlocks_transpose, fromBlocks_multiply]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\n⊢ fromBlocks ((0 * 0 + -1 * 1) * 0ᵀ + (0 * -1 + -1 * 0) * (-1)ᵀ) ((0 * 0 + -1 * 1) * 1ᵀ + (0 * -1 + -1 * 0) * 0ᵀ)\n ((1 * 0 + 0 * 1) * 0ᵀ + (1 * -1 + 0 * 0) * (-1)ᵀ) ((1 * 0 + 0 * 1) * 1ᵀ + (1 * -1 + 0 * 0) * 0ᵀ) =\n fromBlocks 0 (-1) 1 0\n[PROOFSTEP]\nsimp\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nh : A ∈ symplecticGroup l R\n⊢ -A ∈ symplecticGroup l R\n[PROOFSTEP]\nrw [mem_iff] at h ⊢\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nh : A * J l R * Aᵀ = J l R\n⊢ -A * J l R * (-A)ᵀ = J l R\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A ∈ symplecticGroup l R\n⊢ IsUnit (det A)\n[PROOFSTEP]\nrw [isUnit_iff_exists_inv]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A ∈ symplecticGroup l R\n⊢ ∃ b, det A * b = 1\n[PROOFSTEP]\nuse A.det\n[GOAL]\ncase h\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A ∈ symplecticGroup l R\n⊢ det A * det A = 1\n[PROOFSTEP]\nrefine' (isUnit_det_J l R).mul_left_cancel _\n[GOAL]\ncase h\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A ∈ symplecticGroup l R\n⊢ det (J l R) * (det A * det A) = det (J l R) * 1\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\ncase h\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A ∈ symplecticGroup l R\n⊢ det (J l R) * (det A * det A) = det (J l R)\n[PROOFSTEP]\nrw [mem_iff] at hA \n[GOAL]\ncase h\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A * J l R * Aᵀ = J l R\n⊢ det (J l R) * (det A * det A) = det (J l R)\n[PROOFSTEP]\napply_fun det at hA \n[GOAL]\ncase h\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : det (A * J l R * Aᵀ) = det (J l R)\n⊢ det (J l R) * (det A * det A) = det (J l R)\n[PROOFSTEP]\nsimp only [det_mul, det_transpose] at hA \n[GOAL]\ncase h\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : det A * det (J l R) * det A = det (J l R)\n⊢ det (J l R) * (det A * det A) = det (J l R)\n[PROOFSTEP]\nrw [mul_comm A.det, mul_assoc] at hA \n[GOAL]\ncase h\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : det (J l R) * (det A * det A) = det (J l R)\n⊢ det (J l R) * (det A * det A) = det (J l R)\n[PROOFSTEP]\nexact hA\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A ∈ symplecticGroup l R\n⊢ Aᵀ ∈ symplecticGroup l R\n[PROOFSTEP]\nrw [mem_iff] at hA ⊢\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A * J l R * Aᵀ = J l R\n⊢ Aᵀ * J l R * Aᵀᵀ = J l R\n[PROOFSTEP]\nrw [transpose_transpose]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A * J l R * Aᵀ = J l R\n⊢ Aᵀ * J l R * A = J l R\n[PROOFSTEP]\nhave huA := symplectic_det hA\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A * J l R * Aᵀ = J l R\nhuA : IsUnit (det A)\n⊢ Aᵀ * J l R * A = J l R\n[PROOFSTEP]\nhave huAT : IsUnit Aᵀ.det := by\n rw [Matrix.det_transpose]\n exact huA\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A * J l R * Aᵀ = J l R\nhuA : IsUnit (det A)\n⊢ IsUnit (det Aᵀ)\n[PROOFSTEP]\nrw [Matrix.det_transpose]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A * J l R * Aᵀ = J l R\nhuA : IsUnit (det A)\n⊢ IsUnit (det A)\n[PROOFSTEP]\nexact huA\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A * J l R * Aᵀ = J l R\nhuA : IsUnit (det A)\nhuAT : IsUnit (det Aᵀ)\n⊢ Aᵀ * J l R * A = J l R\n[PROOFSTEP]\ncalc\n Aᵀ * J l R * A = (-Aᵀ) * (J l R)⁻¹ * A := by\n rw [J_inv]\n simp\n _ = (-Aᵀ) * (A * J l R * Aᵀ)⁻¹ * A := by rw [hA]\n _ = -(Aᵀ * (Aᵀ⁻¹ * (J l R)⁻¹)) * A⁻¹ * A := by simp only [Matrix.mul_inv_rev, Matrix.mul_assoc, Matrix.neg_mul]\n _ = -(J l R)⁻¹ := by rw [mul_nonsing_inv_cancel_left _ _ huAT, nonsing_inv_mul_cancel_right _ _ huA]\n _ = J l R := by simp [J_inv]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A * J l R * Aᵀ = J l R\nhuA : IsUnit (det A)\nhuAT : IsUnit (det Aᵀ)\n⊢ Aᵀ * J l R * A = -Aᵀ * (J l R)⁻¹ * A\n[PROOFSTEP]\nrw [J_inv]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A * J l R * Aᵀ = J l R\nhuA : IsUnit (det A)\nhuAT : IsUnit (det Aᵀ)\n⊢ Aᵀ * J l R * A = -Aᵀ * -J l R * A\n[PROOFSTEP]\nsimp\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A * J l R * Aᵀ = J l R\nhuA : IsUnit (det A)\nhuAT : IsUnit (det Aᵀ)\n⊢ -Aᵀ * (J l R)⁻¹ * A = -Aᵀ * (A * J l R * Aᵀ)⁻¹ * A\n[PROOFSTEP]\nrw [hA]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A * J l R * Aᵀ = J l R\nhuA : IsUnit (det A)\nhuAT : IsUnit (det Aᵀ)\n⊢ -Aᵀ * (A * J l R * Aᵀ)⁻¹ * A = -(Aᵀ * (Aᵀ⁻¹ * (J l R)⁻¹)) * A⁻¹ * A\n[PROOFSTEP]\nsimp only [Matrix.mul_inv_rev, Matrix.mul_assoc, Matrix.neg_mul]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A * J l R * Aᵀ = J l R\nhuA : IsUnit (det A)\nhuAT : IsUnit (det Aᵀ)\n⊢ -(Aᵀ * (Aᵀ⁻¹ * (J l R)⁻¹)) * A⁻¹ * A = -(J l R)⁻¹\n[PROOFSTEP]\nrw [mul_nonsing_inv_cancel_left _ _ huAT, nonsing_inv_mul_cancel_right _ _ huA]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A * J l R * Aᵀ = J l R\nhuA : IsUnit (det A)\nhuAT : IsUnit (det Aᵀ)\n⊢ -(J l R)⁻¹ = J l R\n[PROOFSTEP]\nsimp [J_inv]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : Aᵀ ∈ symplecticGroup l R\n⊢ A ∈ symplecticGroup l R\n[PROOFSTEP]\nsimpa using transpose_mem hA\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\n⊢ A ∈ symplecticGroup l R ↔ Aᵀ * J l R * A = J l R\n[PROOFSTEP]\nrw [← transpose_mem_iff, mem_iff, transpose_transpose]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A ∈ symplecticGroup l R\n⊢ -(J l R * Aᵀ * J l R * A) = -J l R * (Aᵀ * J l R * A)\n[PROOFSTEP]\nsimp only [Matrix.mul_assoc, Matrix.neg_mul]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A ∈ symplecticGroup l R\n⊢ -J l R * (Aᵀ * J l R * A) = -J l R * J l R\n[PROOFSTEP]\nrw [mem_iff'] at hA \n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : Aᵀ * J l R * A = J l R\n⊢ -J l R * (Aᵀ * J l R * A) = -J l R * J l R\n[PROOFSTEP]\nrw [hA]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A ∈ symplecticGroup l R\n⊢ -J l R * J l R = -1 • (J l R * J l R)\n[PROOFSTEP]\nsimp only [Matrix.neg_mul, neg_smul, one_smul]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A ∈ symplecticGroup l R\n⊢ -1 • (J l R * J l R) = -1 • -1\n[PROOFSTEP]\nrw [J_squared]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A ∈ symplecticGroup l R\n⊢ -1 • -1 = 1\n[PROOFSTEP]\nsimp only [neg_smul_neg, one_smul]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA✝ : Matrix (l ⊕ l) (l ⊕ l) R\nA : { x // x ∈ symplecticGroup l R }\n⊢ ↑A⁻¹ = (↑A)⁻¹\n[PROOFSTEP]\nrefine' (coe_inv A).trans (inv_eq_left_inv _).symm\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA✝ : Matrix (l ⊕ l) (l ⊕ l) R\nA : { x // x ∈ symplecticGroup l R }\n⊢ -J l R * (↑A)ᵀ * J l R * ↑A = 1\n[PROOFSTEP]\nsimp [inv_left_mul_aux, coe_inv]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA✝ A : Matrix (l ⊕ l) (l ⊕ l) R\nhA : A ∈ symplecticGroup l R\n⊢ -J l R * Aᵀ * J l R * A = 1\n[PROOFSTEP]\nsimp only [Matrix.neg_mul, inv_left_mul_aux hA]\n[GOAL]\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA✝ : Matrix (l ⊕ l) (l ⊕ l) R\nsrc✝¹ : Inv { x // x ∈ symplecticGroup l R } := hasInv\nsrc✝ : Monoid { x // x ∈ symplecticGroup l R } := Submonoid.toMonoid (symplecticGroup l R)\nA : { x // x ∈ symplecticGroup l R }\n⊢ A⁻¹ * A = 1\n[PROOFSTEP]\napply Subtype.ext\n[GOAL]\ncase a\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA✝ : Matrix (l ⊕ l) (l ⊕ l) R\nsrc✝¹ : Inv { x // x ∈ symplecticGroup l R } := hasInv\nsrc✝ : Monoid { x // x ∈ symplecticGroup l R } := Submonoid.toMonoid (symplecticGroup l R)\nA : { x // x ∈ symplecticGroup l R }\n⊢ ↑(A⁻¹ * A) = ↑1\n[PROOFSTEP]\nsimp only [Submonoid.coe_one, Submonoid.coe_mul, Matrix.neg_mul, coe_inv]\n[GOAL]\ncase a\nl : Type u_1\nR : Type u_2\ninst✝² : DecidableEq l\ninst✝¹ : Fintype l\ninst✝ : CommRing R\nA✝ : Matrix (l ⊕ l) (l ⊕ l) R\nsrc✝¹ : Inv { x // x ∈ symplecticGroup l R } := hasInv\nsrc✝ : Monoid { x // x ∈ symplecticGroup l R } := Submonoid.toMonoid (symplecticGroup l R)\nA : { x // x ∈ symplecticGroup l R }\n⊢ -(J l R * (↑A)ᵀ * J l R * ↑A) = 1\n[PROOFSTEP]\nexact inv_left_mul_aux A.2\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.SymplecticGroup", "llama_tokens": 7672, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8311430353105598, "lm_q2_score": 0.689305616785446, "lm_q1q2_score": 0.5729115625916731}} {"text": "[GOAL]\nx : ℂ\nh : cos x ≠ 0\n⊢ HasStrictDerivAt tan (↑1 / cos x ^ 2) x\n[PROOFSTEP]\nconvert (hasStrictDerivAt_sin x).div (hasStrictDerivAt_cos x) h using 1\n[GOAL]\ncase h.e'_7\nx : ℂ\nh : cos x ≠ 0\n⊢ ↑1 / cos x ^ 2 = (cos x * cos x - sin x * -sin x) / cos x ^ 2\n[PROOFSTEP]\nrw_mod_cast [← sin_sq_add_cos_sq x]\n[GOAL]\ncase h.e'_7\nx : ℂ\nh : ¬cos x = 0\n⊢ (sin x ^ 2 + cos x ^ 2) / cos x ^ 2 = (cos x * cos x - sin x * -sin x) / cos x ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nx : ℂ\nhx : cos x = 0\n⊢ Tendsto (fun x => ↑abs (tan x)) (𝓝[{x}ᶜ] x) atTop\n[PROOFSTEP]\nsimp only [tan_eq_sin_div_cos, ← norm_eq_abs, norm_div]\n[GOAL]\nx : ℂ\nhx : cos x = 0\n⊢ Tendsto (fun x => ‖sin x‖ / ‖cos x‖) (𝓝[{x}ᶜ] x) atTop\n[PROOFSTEP]\nhave A : sin x ≠ 0 := fun h => by simpa [*, sq] using sin_sq_add_cos_sq x\n[GOAL]\nx : ℂ\nhx : cos x = 0\nh : sin x = 0\n⊢ False\n[PROOFSTEP]\nsimpa [*, sq] using sin_sq_add_cos_sq x\n[GOAL]\nx : ℂ\nhx : cos x = 0\nA : sin x ≠ 0\n⊢ Tendsto (fun x => ‖sin x‖ / ‖cos x‖) (𝓝[{x}ᶜ] x) atTop\n[PROOFSTEP]\nhave B : Tendsto cos (𝓝[≠] x) (𝓝[≠] 0) := hx ▸ (hasDerivAt_cos x).tendsto_punctured_nhds (neg_ne_zero.2 A)\n[GOAL]\nx : ℂ\nhx : cos x = 0\nA : sin x ≠ 0\nB : Tendsto cos (𝓝[{x}ᶜ] x) (𝓝[{0}ᶜ] 0)\n⊢ Tendsto (fun x => ‖sin x‖ / ‖cos x‖) (𝓝[{x}ᶜ] x) atTop\n[PROOFSTEP]\nexact\n continuous_sin.continuousWithinAt.norm.mul_atTop (norm_pos_iff.2 A)\n (tendsto_norm_nhdsWithin_zero.comp B).inv_tendsto_zero\n[GOAL]\nx : ℂ\n⊢ ContinuousAt tan x ↔ cos x ≠ 0\n[PROOFSTEP]\nrefine' ⟨fun hc h₀ => _, fun h => (hasDerivAt_tan h).continuousAt⟩\n[GOAL]\nx : ℂ\nhc : ContinuousAt tan x\nh₀ : cos x = 0\n⊢ False\n[PROOFSTEP]\nexact not_tendsto_nhds_of_tendsto_atTop (tendsto_abs_tan_of_cos_eq_zero h₀) _ (hc.norm.tendsto.mono_left inf_le_left)\n[GOAL]\nx : ℂ\nh : cos x = 0\n⊢ deriv tan x = ↑1 / cos x ^ 2\n[PROOFSTEP]\nhave : ¬DifferentiableAt ℂ tan x := mt differentiableAt_tan.1 (Classical.not_not.2 h)\n[GOAL]\nx : ℂ\nh : cos x = 0\nthis : ¬DifferentiableAt ℂ tan x\n⊢ deriv tan x = ↑1 / cos x ^ 2\n[PROOFSTEP]\nsimp [deriv_zero_of_not_differentiableAt this, h, sq]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Trigonometric.ComplexDeriv", "llama_tokens": 1063, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8152324713956856, "lm_q2_score": 0.7025300698514778, "lm_q1q2_score": 0.5727253250748039}} {"text": "[GOAL]\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedSemifield α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c : α\n⊢ (a - b) / c = a / c - b / c\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv, tsub_mul]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Field.Canonical.Basic", "llama_tokens": 96, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8558511396138365, "lm_q2_score": 0.668880247169804, "lm_q1q2_score": 0.5724619218054614}} {"text": "[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns✝ t s : Set H\nc : ℝ\nhc : 0 < c\ny : H\nhy : y ∈ {y | ∀ (x : H), x ∈ s → 0 ≤ inner x y}\nx : H\nhx : x ∈ s\n⊢ 0 ≤ inner x (c • y)\n[PROOFSTEP]\nrw [real_inner_smul_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns✝ t s : Set H\nc : ℝ\nhc : 0 < c\ny : H\nhy : y ∈ {y | ∀ (x : H), x ∈ s → 0 ≤ inner x y}\nx : H\nhx : x ∈ s\n⊢ 0 ≤ c * inner x y\n[PROOFSTEP]\nexact mul_nonneg hc.le (hy x hx)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns✝ t s : Set H\nu : H\nhu : u ∈ {y | ∀ (x : H), x ∈ s → 0 ≤ inner x y}\nv : H\nhv : v ∈ {y | ∀ (x : H), x ∈ s → 0 ≤ inner x y}\nx : H\nhx : x ∈ s\n⊢ 0 ≤ inner x (u + v)\n[PROOFSTEP]\nrw [inner_add_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns✝ t s : Set H\nu : H\nhu : u ∈ {y | ∀ (x : H), x ∈ s → 0 ≤ inner x y}\nv : H\nhv : v ∈ {y | ∀ (x : H), x ∈ s → 0 ≤ inner x y}\nx : H\nhx : x ∈ s\n⊢ 0 ≤ inner x u + inner x v\n[PROOFSTEP]\nexact add_nonneg (hu x hx) (hv x hx)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\n⊢ innerDualCone univ = 0\n[PROOFSTEP]\nsuffices ∀ x : H, x ∈ (univ : Set H).innerDualCone → x = 0\n by\n apply SetLike.coe_injective\n exact eq_singleton_iff_unique_mem.mpr ⟨fun x _ => (inner_zero_right _).ge, this⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nthis : ∀ (x : H), x ∈ innerDualCone univ → x = 0\n⊢ innerDualCone univ = 0\n[PROOFSTEP]\napply SetLike.coe_injective\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nthis : ∀ (x : H), x ∈ innerDualCone univ → x = 0\n⊢ ↑(innerDualCone univ) = ↑0\n[PROOFSTEP]\nexact eq_singleton_iff_unique_mem.mpr ⟨fun x _ => (inner_zero_right _).ge, this⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\n⊢ ∀ (x : H), x ∈ innerDualCone univ → x = 0\n[PROOFSTEP]\nexact fun x hx => by simpa [← real_inner_self_nonpos] using hx (-x) (mem_univ _)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nx : H\nhx : x ∈ innerDualCone univ\n⊢ x = 0\n[PROOFSTEP]\nsimpa [← real_inner_self_nonpos] using hx (-x) (mem_univ _)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nx : H\nx✝ : x ∈ s\n⊢ 0 ≤ inner x 0\n[PROOFSTEP]\nrw [inner_zero_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns✝ t : Set H\nx : H\ns : Set H\n⊢ innerDualCone (insert x s) = innerDualCone {x} ⊓ innerDualCone s\n[PROOFSTEP]\nrw [insert_eq, innerDualCone_union]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nι : Sort u_6\nf : ι → Set H\n⊢ innerDualCone (⋃ (i : ι), f i) = ⨅ (i : ι), innerDualCone (f i)\n[PROOFSTEP]\nrefine' le_antisymm (le_iInf fun i x hx y hy => hx _ <| mem_iUnion_of_mem _ hy) _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nι : Sort u_6\nf : ι → Set H\n⊢ ⨅ (i : ι), innerDualCone (f i) ≤ innerDualCone (⋃ (i : ι), f i)\n[PROOFSTEP]\nintro x hx y hy\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nι : Sort u_6\nf : ι → Set H\nx : H\nhx : x ∈ ⨅ (i : ι), innerDualCone (f i)\ny : H\nhy : y ∈ ⋃ (i : ι), f i\n⊢ 0 ≤ inner y x\n[PROOFSTEP]\nrw [ConvexCone.mem_iInf] at hx \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nι : Sort u_6\nf : ι → Set H\nx : H\nhx : ∀ (i : ι), x ∈ innerDualCone (f i)\ny : H\nhy : y ∈ ⋃ (i : ι), f i\n⊢ 0 ≤ inner y x\n[PROOFSTEP]\nobtain ⟨j, hj⟩ := mem_iUnion.mp hy\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nι : Sort u_6\nf : ι → Set H\nx : H\nhx : ∀ (i : ι), x ∈ innerDualCone (f i)\ny : H\nhy : y ∈ ⋃ (i : ι), f i\nj : ι\nhj : y ∈ f j\n⊢ 0 ≤ inner y x\n[PROOFSTEP]\nexact hx _ _ hj\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nS : Set (Set H)\n⊢ innerDualCone (⋃₀ S) = sInf (innerDualCone '' S)\n[PROOFSTEP]\nsimp_rw [sInf_image, sUnion_eq_biUnion, innerDualCone_iUnion]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\n⊢ ↑(innerDualCone s) = ⋂ (i : ↑s), ↑(innerDualCone {↑i})\n[PROOFSTEP]\nrw [← ConvexCone.coe_iInf, ← innerDualCone_iUnion, iUnion_of_singleton_coe]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\n⊢ IsClosed ↑(innerDualCone s)\n[PROOFSTEP]\nrw [innerDualCone_eq_iInter_innerDualCone_singleton]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\n⊢ IsClosed (⋂ (i : ↑s), ↑(innerDualCone {↑i}))\n[PROOFSTEP]\napply isClosed_iInter\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\n⊢ ∀ (i : ↑s), IsClosed ↑(innerDualCone {↑i})\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nx : ↑s\n⊢ IsClosed ↑(innerDualCone {↑x})\n[PROOFSTEP]\nhave h : ({↑x} : Set H).innerDualCone = (inner x : H → ℝ) ⁻¹' Set.Ici 0 := by\n rw [innerDualCone_singleton, ConvexCone.coe_comap, ConvexCone.coe_positive, innerₛₗ_apply_coe]\n -- the preimage is closed as `inner x` is continuous and `[0, ∞)` is closed\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nx : ↑s\n⊢ ↑(innerDualCone {↑x}) = inner ↑x ⁻¹' Ici 0\n[PROOFSTEP]\nrw [innerDualCone_singleton, ConvexCone.coe_comap, ConvexCone.coe_positive, innerₛₗ_apply_coe]\n -- the preimage is closed as `inner x` is continuous and `[0, ∞)` is closed\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nx : ↑s\nh : ↑(innerDualCone {↑x}) = inner ↑x ⁻¹' Ici 0\n⊢ IsClosed ↑(innerDualCone {↑x})\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nx : ↑s\nh : ↑(innerDualCone {↑x}) = inner ↑x ⁻¹' Ici 0\n⊢ IsClosed (inner ↑x ⁻¹' Ici 0)\n[PROOFSTEP]\nexact isClosed_Ici.preimage (continuous_const.inner continuous_id')\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\n⊢ Pointed K\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := ne\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nK : ConvexCone ℝ H\nhc : IsClosed ↑K\nx : H\nhx : x ∈ ↑K\n⊢ Pointed K\n[PROOFSTEP]\nlet f : ℝ → H :=\n (· • x)\n -- f (0, ∞) is a subset of K\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nK : ConvexCone ℝ H\nhc : IsClosed ↑K\nx : H\nhx : x ∈ ↑K\nf : ℝ → H := fun x_1 => x_1 • x\n⊢ Pointed K\n[PROOFSTEP]\nhave fI : f '' Set.Ioi 0 ⊆ (K : Set H) := by\n rintro _ ⟨_, h, rfl⟩\n exact K.smul_mem (Set.mem_Ioi.1 h) hx\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nK : ConvexCone ℝ H\nhc : IsClosed ↑K\nx : H\nhx : x ∈ ↑K\nf : ℝ → H := fun x_1 => x_1 • x\n⊢ f '' Ioi 0 ⊆ ↑K\n[PROOFSTEP]\nrintro _ ⟨_, h, rfl⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nK : ConvexCone ℝ H\nhc : IsClosed ↑K\nx : H\nhx : x ∈ ↑K\nf : ℝ → H := fun x_1 => x_1 • x\nw✝ : ℝ\nh : w✝ ∈ Ioi 0\n⊢ f w✝ ∈ ↑K\n[PROOFSTEP]\nexact K.smul_mem (Set.mem_Ioi.1 h) hx\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nK : ConvexCone ℝ H\nhc : IsClosed ↑K\nx : H\nhx : x ∈ ↑K\nf : ℝ → H := fun x_1 => x_1 • x\nfI : f '' Ioi 0 ⊆ ↑K\n⊢ Pointed K\n[PROOFSTEP]\nhave clf : closure (f '' Set.Ioi 0) ⊆ (K : Set H) := hc.closure_subset_iff.2 fI\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nK : ConvexCone ℝ H\nhc : IsClosed ↑K\nx : H\nhx : x ∈ ↑K\nf : ℝ → H := fun x_1 => x_1 • x\nfI : f '' Ioi 0 ⊆ ↑K\nclf : closure (f '' Ioi 0) ⊆ ↑K\n⊢ Pointed K\n[PROOFSTEP]\nhave fc : ContinuousWithinAt f (Set.Ioi (0 : ℝ)) 0 := (continuous_id.smul continuous_const).continuousWithinAt\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nK : ConvexCone ℝ H\nhc : IsClosed ↑K\nx : H\nhx : x ∈ ↑K\nf : ℝ → H := fun x_1 => x_1 • x\nfI : f '' Ioi 0 ⊆ ↑K\nclf : closure (f '' Ioi 0) ⊆ ↑K\nfc : ContinuousWithinAt f (Ioi 0) 0\n⊢ Pointed K\n[PROOFSTEP]\nhave mem₀ :=\n fc.mem_closure_image\n (by rw [closure_Ioi (0 : ℝ), mem_Ici])\n -- as 0 ∈ closure f (0, ∞) and closure f (0, ∞) ⊆ K, 0 ∈ K.\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nK : ConvexCone ℝ H\nhc : IsClosed ↑K\nx : H\nhx : x ∈ ↑K\nf : ℝ → H := fun x_1 => x_1 • x\nfI : f '' Ioi 0 ⊆ ↑K\nclf : closure (f '' Ioi 0) ⊆ ↑K\nfc : ContinuousWithinAt f (Ioi 0) 0\n⊢ 0 ∈ closure (Ioi 0)\n[PROOFSTEP]\nrw [closure_Ioi (0 : ℝ), mem_Ici]\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nK : ConvexCone ℝ H\nhc : IsClosed ↑K\nx : H\nhx : x ∈ ↑K\nf : ℝ → H := fun x_1 => x_1 • x\nfI : f '' Ioi 0 ⊆ ↑K\nclf : closure (f '' Ioi 0) ⊆ ↑K\nfc : ContinuousWithinAt f (Ioi 0) 0\nmem₀ : f 0 ∈ closure (f '' Ioi 0)\n⊢ Pointed K\n[PROOFSTEP]\nhave f₀ : f 0 = 0 := zero_smul ℝ x\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : InnerProductSpace ℝ H\ns t : Set H\nK : ConvexCone ℝ H\nhc : IsClosed ↑K\nx : H\nhx : x ∈ ↑K\nf : ℝ → H := fun x_1 => x_1 • x\nfI : f '' Ioi 0 ⊆ ↑K\nclf : closure (f '' Ioi 0) ⊆ ↑K\nfc : ContinuousWithinAt f (Ioi 0) 0\nmem₀ : f 0 ∈ closure (f '' Ioi 0)\nf₀ : f 0 = 0\n⊢ Pointed K\n[PROOFSTEP]\nsimpa only [f₀, ConvexCone.Pointed, ← SetLike.mem_coe] using mem_of_subset_of_mem clf mem₀\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nb : H\ndisj : ¬b ∈ K\n⊢ ∃ y, (∀ (x : H), x ∈ K → 0 ≤ inner x y) ∧ inner y b < 0\n[PROOFSTEP]\nobtain ⟨z, hzK, infi⟩ := exists_norm_eq_iInf_of_complete_convex ne hc.isComplete K.convex b\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nb : H\ndisj : ¬b ∈ K\nz : H\nhzK : z ∈ ↑K\ninfi : ‖b - z‖ = ⨅ (w : ↑↑K), ‖b - ↑w‖\n⊢ ∃ y, (∀ (x : H), x ∈ K → 0 ≤ inner x y) ∧ inner y b < 0\n[PROOFSTEP]\nhave hinner := (norm_eq_iInf_iff_real_inner_le_zero K.convex hzK).1 infi\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nb : H\ndisj : ¬b ∈ K\nz : H\nhzK : z ∈ ↑K\ninfi : ‖b - z‖ = ⨅ (w : ↑↑K), ‖b - ↑w‖\nhinner : ∀ (w : H), w ∈ ↑K → inner (b - z) (w - z) ≤ 0\n⊢ ∃ y, (∀ (x : H), x ∈ K → 0 ≤ inner x y) ∧ inner y b < 0\n[PROOFSTEP]\nuse z - b\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nb : H\ndisj : ¬b ∈ K\nz : H\nhzK : z ∈ ↑K\ninfi : ‖b - z‖ = ⨅ (w : ↑↑K), ‖b - ↑w‖\nhinner : ∀ (w : H), w ∈ ↑K → inner (b - z) (w - z) ≤ 0\n⊢ (∀ (x : H), x ∈ K → 0 ≤ inner x (z - b)) ∧ inner (z - b) b < 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nb : H\ndisj : ¬b ∈ K\nz : H\nhzK : z ∈ ↑K\ninfi : ‖b - z‖ = ⨅ (w : ↑↑K), ‖b - ↑w‖\nhinner : ∀ (w : H), w ∈ ↑K → inner (b - z) (w - z) ≤ 0\n⊢ ∀ (x : H), x ∈ K → 0 ≤ inner x (z - b)\n[PROOFSTEP]\nrintro x hxK\n[GOAL]\ncase h.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nb : H\ndisj : ¬b ∈ K\nz : H\nhzK : z ∈ ↑K\ninfi : ‖b - z‖ = ⨅ (w : ↑↑K), ‖b - ↑w‖\nhinner : ∀ (w : H), w ∈ ↑K → inner (b - z) (w - z) ≤ 0\nx : H\nhxK : x ∈ K\n⊢ 0 ≤ inner x (z - b)\n[PROOFSTEP]\nspecialize hinner _ (K.add_mem hxK hzK)\n[GOAL]\ncase h.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nb : H\ndisj : ¬b ∈ K\nz : H\nhzK : z ∈ ↑K\ninfi : ‖b - z‖ = ⨅ (w : ↑↑K), ‖b - ↑w‖\nx : H\nhxK : x ∈ K\nhinner : inner (b - z) (x + z - z) ≤ 0\n⊢ 0 ≤ inner x (z - b)\n[PROOFSTEP]\nrwa [add_sub_cancel, real_inner_comm, ← neg_nonneg, neg_eq_neg_one_mul, ← real_inner_smul_right, neg_smul, one_smul,\n neg_sub] at hinner \n[GOAL]\ncase h.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nb : H\ndisj : ¬b ∈ K\nz : H\nhzK : z ∈ ↑K\ninfi : ‖b - z‖ = ⨅ (w : ↑↑K), ‖b - ↑w‖\nhinner : ∀ (w : H), w ∈ ↑K → inner (b - z) (w - z) ≤ 0\n⊢ inner (z - b) b < 0\n[PROOFSTEP]\nhave hinner₀ :=\n hinner 0\n (K.pointed_of_nonempty_of_isClosed ne hc)\n -- the rest of the proof is a straightforward calculation\n[GOAL]\ncase h.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nb : H\ndisj : ¬b ∈ K\nz : H\nhzK : z ∈ ↑K\ninfi : ‖b - z‖ = ⨅ (w : ↑↑K), ‖b - ↑w‖\nhinner : ∀ (w : H), w ∈ ↑K → inner (b - z) (w - z) ≤ 0\nhinner₀ : inner (b - z) (0 - z) ≤ 0\n⊢ inner (z - b) b < 0\n[PROOFSTEP]\nrw [zero_sub, inner_neg_right, Right.neg_nonpos_iff] at hinner₀ \n[GOAL]\ncase h.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nb : H\ndisj : ¬b ∈ K\nz : H\nhzK : z ∈ ↑K\ninfi : ‖b - z‖ = ⨅ (w : ↑↑K), ‖b - ↑w‖\nhinner : ∀ (w : H), w ∈ ↑K → inner (b - z) (w - z) ≤ 0\nhinner₀ : 0 ≤ inner (b - z) z\n⊢ inner (z - b) b < 0\n[PROOFSTEP]\nhave hbz : b - z ≠ 0 := by\n rw [sub_ne_zero]\n contrapose! hzK\n rwa [← hzK]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nb : H\ndisj : ¬b ∈ K\nz : H\nhzK : z ∈ ↑K\ninfi : ‖b - z‖ = ⨅ (w : ↑↑K), ‖b - ↑w‖\nhinner : ∀ (w : H), w ∈ ↑K → inner (b - z) (w - z) ≤ 0\nhinner₀ : 0 ≤ inner (b - z) z\n⊢ b - z ≠ 0\n[PROOFSTEP]\nrw [sub_ne_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nb : H\ndisj : ¬b ∈ K\nz : H\nhzK : z ∈ ↑K\ninfi : ‖b - z‖ = ⨅ (w : ↑↑K), ‖b - ↑w‖\nhinner : ∀ (w : H), w ∈ ↑K → inner (b - z) (w - z) ≤ 0\nhinner₀ : 0 ≤ inner (b - z) z\n⊢ b ≠ z\n[PROOFSTEP]\ncontrapose! hzK\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nb : H\ndisj : ¬b ∈ K\nz : H\ninfi : ‖b - z‖ = ⨅ (w : ↑↑K), ‖b - ↑w‖\nhinner : ∀ (w : H), w ∈ ↑K → inner (b - z) (w - z) ≤ 0\nhinner₀ : 0 ≤ inner (b - z) z\nhzK : b = z\n⊢ ¬z ∈ ↑K\n[PROOFSTEP]\nrwa [← hzK]\n[GOAL]\ncase h.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nb : H\ndisj : ¬b ∈ K\nz : H\nhzK : z ∈ ↑K\ninfi : ‖b - z‖ = ⨅ (w : ↑↑K), ‖b - ↑w‖\nhinner : ∀ (w : H), w ∈ ↑K → inner (b - z) (w - z) ≤ 0\nhinner₀ : 0 ≤ inner (b - z) z\nhbz : b - z ≠ 0\n⊢ inner (z - b) b < 0\n[PROOFSTEP]\nrw [← neg_zero, lt_neg, ← neg_one_mul, ← real_inner_smul_left, smul_sub, neg_smul, one_smul, neg_smul, neg_sub_neg,\n one_smul]\n[GOAL]\ncase h.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nb : H\ndisj : ¬b ∈ K\nz : H\nhzK : z ∈ ↑K\ninfi : ‖b - z‖ = ⨅ (w : ↑↑K), ‖b - ↑w‖\nhinner : ∀ (w : H), w ∈ ↑K → inner (b - z) (w - z) ≤ 0\nhinner₀ : 0 ≤ inner (b - z) z\nhbz : b - z ≠ 0\n⊢ 0 < inner (b - z) b\n[PROOFSTEP]\ncalc\n 0 < ⟪b - z, b - z⟫_ℝ := lt_of_not_le ((Iff.not real_inner_self_nonpos).2 hbz)\n _ = ⟪b - z, b - z⟫_ℝ + 0 := (add_zero _).symm\n _ ≤ ⟪b - z, b - z⟫_ℝ + ⟪b - z, z⟫_ℝ := (add_le_add rfl.ge hinner₀)\n _ = ⟪b - z, b - z + z⟫_ℝ := (inner_add_right _ _ _).symm\n _ = ⟪b - z, b⟫_ℝ := by rw [sub_add_cancel]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nb : H\ndisj : ¬b ∈ K\nz : H\nhzK : z ∈ ↑K\ninfi : ‖b - z‖ = ⨅ (w : ↑↑K), ‖b - ↑w‖\nhinner : ∀ (w : H), w ∈ ↑K → inner (b - z) (w - z) ≤ 0\nhinner₀ : 0 ≤ inner (b - z) z\nhbz : b - z ≠ 0\n⊢ inner (b - z) (b - z + z) = inner (b - z) b\n[PROOFSTEP]\nrw [sub_add_cancel]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\n⊢ innerDualCone ↑(innerDualCone ↑K) = K\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nx : H\n⊢ x ∈ innerDualCone ↑(innerDualCone ↑K) ↔ x ∈ K\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nx : H\n⊢ x ∈ innerDualCone ↑(innerDualCone ↑K) → x ∈ K\n[PROOFSTEP]\nrw [mem_innerDualCone, ← SetLike.mem_coe]\n[GOAL]\ncase h.mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nx : H\n⊢ (∀ (x_1 : H), x_1 ∈ ↑(innerDualCone ↑K) → 0 ≤ inner x_1 x) → x ∈ ↑K\n[PROOFSTEP]\ncontrapose!\n[GOAL]\ncase h.mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nx : H\n⊢ ¬x ∈ ↑K → ∃ x_1, x_1 ∈ ↑(innerDualCone ↑K) ∧ inner x_1 x < 0\n[PROOFSTEP]\nexact K.hyperplane_separation_of_nonempty_of_isClosed_of_nmem ne hc\n[GOAL]\ncase h.mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nx : H\n⊢ x ∈ K → x ∈ innerDualCone ↑(innerDualCone ↑K)\n[PROOFSTEP]\nrintro hxK y h\n[GOAL]\ncase h.mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nx : H\nhxK : x ∈ K\ny : H\nh : y ∈ ↑(innerDualCone ↑K)\n⊢ 0 ≤ inner y x\n[PROOFSTEP]\nspecialize h x hxK\n[GOAL]\ncase h.mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝² : NormedAddCommGroup H\ninst✝¹ : InnerProductSpace ℝ H\ns t : Set H\ninst✝ : CompleteSpace H\nK : ConvexCone ℝ H\nne : Set.Nonempty ↑K\nhc : IsClosed ↑K\nx : H\nhxK : x ∈ K\ny : H\nh : 0 ≤ inner x y\n⊢ 0 ≤ inner y x\n[PROOFSTEP]\nrwa [real_inner_comm]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.Cone.Dual", "llama_tokens": 11741, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8740772384450967, "lm_q2_score": 0.6548947425132314, "lm_q1q2_score": 0.572428588008178}} {"text": "[GOAL]\na b : ℤ\n⊢ a = b ↔ ↑a = ↑b\n[PROOFSTEP]\nsimp only [Int.cast_inj]\n[GOAL]\na b : ℤ\n⊢ a ≠ b ↔ ↑a ≠ ↑b\n[PROOFSTEP]\nsimp only [ne_eq, Int.cast_inj]\n", "meta": {"mathlib_filename": "Mathlib.Tactic.Qify", "llama_tokens": 92, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.793105951184112, "lm_q2_score": 0.7217432182679956, "lm_q1q2_score": 0.5724188416351208}} {"text": "[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\n⊢ ∀ (i j : ℕ), ∃ k, I ^ k • ⊤ ≤ I ^ i • ⊤ ⊓ I ^ j • ⊤\n[PROOFSTEP]\nsuffices ∀ i j : ℕ, ∃ k, I ^ k ≤ I ^ i ∧ I ^ k ≤ I ^ j by\n simpa only [smul_eq_mul, mul_top, Algebra.id.map_eq_id, map_id, le_inf_iff] using this\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nthis : ∀ (i j : ℕ), ∃ k, I ^ k ≤ I ^ i ∧ I ^ k ≤ I ^ j\n⊢ ∀ (i j : ℕ), ∃ k, I ^ k • ⊤ ≤ I ^ i • ⊤ ⊓ I ^ j • ⊤\n[PROOFSTEP]\nsimpa only [smul_eq_mul, mul_top, Algebra.id.map_eq_id, map_id, le_inf_iff] using this\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\n⊢ ∀ (i j : ℕ), ∃ k, I ^ k ≤ I ^ i ∧ I ^ k ≤ I ^ j\n[PROOFSTEP]\nintro i j\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\ni j : ℕ\n⊢ ∃ k, I ^ k ≤ I ^ i ∧ I ^ k ≤ I ^ j\n[PROOFSTEP]\nexact ⟨max i j, pow_le_pow (le_max_left i j), pow_le_pow (le_max_right i j)⟩\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\n⊢ ∀ (a : R) (i : ℕ), ∃ j, a • I ^ j • ⊤ ≤ I ^ i • ⊤\n[PROOFSTEP]\nsuffices ∀ (a : R) (i : ℕ), ∃ j : ℕ, a • I ^ j ≤ I ^ i by\n simpa only [smul_top_eq_map, Algebra.id.map_eq_id, map_id] using this\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nthis : ∀ (a : R) (i : ℕ), ∃ j, a • I ^ j ≤ I ^ i\n⊢ ∀ (a : R) (i : ℕ), ∃ j, a • I ^ j • ⊤ ≤ I ^ i • ⊤\n[PROOFSTEP]\nsimpa only [smul_top_eq_map, Algebra.id.map_eq_id, map_id] using this\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\n⊢ ∀ (a : R) (i : ℕ), ∃ j, a • I ^ j ≤ I ^ i\n[PROOFSTEP]\nintro r n\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nr : R\nn : ℕ\n⊢ ∃ j, r • I ^ j ≤ I ^ n\n[PROOFSTEP]\nuse n\n[GOAL]\ncase h\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nr : R\nn : ℕ\n⊢ r • I ^ n ≤ I ^ n\n[PROOFSTEP]\nrintro a ⟨x, hx, rfl⟩\n[GOAL]\ncase h.intro.intro\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nr : R\nn : ℕ\nx : R\nhx : x ∈ ↑(I ^ n)\n⊢ ↑(DistribMulAction.toLinearMap R R r) x ∈ I ^ n\n[PROOFSTEP]\nexact (I ^ n).smul_mem r hx\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\n⊢ ∀ (i : ℕ), ∃ j, ↑(I ^ j • ⊤) * ↑(I ^ j • ⊤) ⊆ ↑(I ^ i • ⊤)\n[PROOFSTEP]\nsuffices ∀ i : ℕ, ∃ j : ℕ, (I ^ j : Set R) * (I ^ j : Set R) ⊆ (I ^ i : Set R) by\n simpa only [smul_top_eq_map, Algebra.id.map_eq_id, map_id] using this\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nthis : ∀ (i : ℕ), ∃ j, ↑(I ^ j) * ↑(I ^ j) ⊆ ↑(I ^ i)\n⊢ ∀ (i : ℕ), ∃ j, ↑(I ^ j • ⊤) * ↑(I ^ j • ⊤) ⊆ ↑(I ^ i • ⊤)\n[PROOFSTEP]\nsimpa only [smul_top_eq_map, Algebra.id.map_eq_id, map_id] using this\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\n⊢ ∀ (i : ℕ), ∃ j, ↑(I ^ j) * ↑(I ^ j) ⊆ ↑(I ^ i)\n[PROOFSTEP]\nintro n\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nn : ℕ\n⊢ ∃ j, ↑(I ^ j) * ↑(I ^ j) ⊆ ↑(I ^ n)\n[PROOFSTEP]\nuse n\n[GOAL]\ncase h\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nn : ℕ\n⊢ ↑(I ^ n) * ↑(I ^ n) ⊆ ↑(I ^ n)\n[PROOFSTEP]\nrintro a ⟨x, b, _hx, hb, rfl⟩\n[GOAL]\ncase h.intro.intro.intro.intro\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nn : ℕ\nx b : R\n_hx : x ∈ ↑(I ^ n)\nhb : b ∈ ↑(I ^ n)\n⊢ (fun x x_1 => x * x_1) x b ∈ ↑(I ^ n)\n[PROOFSTEP]\nexact (I ^ n).smul_mem x hb\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\n⊢ ∀ (t : Set R), t ∈ 𝓝 0 ↔ ∃ i, True ∧ ↑(I ^ i) ⊆ t\n[PROOFSTEP]\nintro U\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nU : Set R\n⊢ U ∈ 𝓝 0 ↔ ∃ i, True ∧ ↑(I ^ i) ⊆ U\n[PROOFSTEP]\nrw [I.ringFilterBasis.toAddGroupFilterBasis.nhds_zero_hasBasis.mem_iff]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nU : Set R\n⊢ (∃ i, i ∈ RingFilterBasis.toAddGroupFilterBasis ∧ id i ⊆ U) ↔ ∃ i, True ∧ ↑(I ^ i) ⊆ U\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nU : Set R\n⊢ (∃ i, i ∈ RingFilterBasis.toAddGroupFilterBasis ∧ id i ⊆ U) → ∃ i, True ∧ ↑(I ^ i) ⊆ U\n[PROOFSTEP]\nrintro ⟨-, ⟨i, rfl⟩, h⟩\n[GOAL]\ncase mp.intro.intro.intro\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nU : Set R\ni : ℕ\nh : id ↑((fun i => toAddSubgroup (I ^ i • ⊤)) i) ⊆ U\n⊢ ∃ i, True ∧ ↑(I ^ i) ⊆ U\n[PROOFSTEP]\nreplace h : ↑(I ^ i) ⊆ U := by simpa using h\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nU : Set R\ni : ℕ\nh : id ↑((fun i => toAddSubgroup (I ^ i • ⊤)) i) ⊆ U\n⊢ ↑(I ^ i) ⊆ U\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase mp.intro.intro.intro\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nU : Set R\ni : ℕ\nh : ↑(I ^ i) ⊆ U\n⊢ ∃ i, True ∧ ↑(I ^ i) ⊆ U\n[PROOFSTEP]\nexact ⟨i, trivial, h⟩\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nU : Set R\n⊢ (∃ i, True ∧ ↑(I ^ i) ⊆ U) → ∃ i, i ∈ RingFilterBasis.toAddGroupFilterBasis ∧ id i ⊆ U\n[PROOFSTEP]\nrintro ⟨i, -, h⟩\n[GOAL]\ncase mpr.intro.intro\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nU : Set R\ni : ℕ\nh : ↑(I ^ i) ⊆ U\n⊢ ∃ i, i ∈ RingFilterBasis.toAddGroupFilterBasis ∧ id i ⊆ U\n[PROOFSTEP]\nexact ⟨(I ^ i : Ideal R), ⟨i, by simp⟩, h⟩\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nU : Set R\ni : ℕ\nh : ↑(I ^ i) ⊆ U\n⊢ ↑(I ^ i) = ↑((fun i => toAddSubgroup (I ^ i • ⊤)) i)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nx : R\n⊢ HasBasis (𝓝 x) (fun _n => True) fun n => (fun y => x + y) '' ↑(I ^ n)\n[PROOFSTEP]\nletI := I.adicTopology\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nx : R\nthis : TopologicalSpace R := adicTopology I\n⊢ HasBasis (𝓝 x) (fun _n => True) fun n => (fun y => x + y) '' ↑(I ^ n)\n[PROOFSTEP]\nhave := I.hasBasis_nhds_zero_adic.map fun y => x + y\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nx : R\nthis✝ : TopologicalSpace R := adicTopology I\nthis : HasBasis (Filter.map (fun y => x + y) (𝓝 0)) (fun _n => True) fun i => (fun y => x + y) '' ↑(I ^ i)\n⊢ HasBasis (𝓝 x) (fun _n => True) fun n => (fun y => x + y) '' ↑(I ^ n)\n[PROOFSTEP]\nrwa [map_add_left_nhds_zero x] at this \n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nI : Ideal R\nM : Type u_2\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nm : M\ni : ℕ\n⊢ ↑(I ^ i • ⊤) = ↑((fun i => toAddSubgroup (I ^ i • ⊤)) i)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nI : Ideal R\nM : Type u_2\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nm : M\ni : ℕ\na : R\na_in : a ∈ ↑(I ^ i • ⊤)\n⊢ a ∈ (fun x => x • m) ⁻¹' ↑(I ^ i • ⊤)\n[PROOFSTEP]\nreplace a_in : a ∈ I ^ i := by simpa [(I ^ i).mul_top] using a_in\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nI : Ideal R\nM : Type u_2\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nm : M\ni : ℕ\na : R\na_in : a ∈ ↑(I ^ i • ⊤)\n⊢ a ∈ I ^ i\n[PROOFSTEP]\nsimpa [(I ^ i).mul_top] using a_in\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nI : Ideal R\nM : Type u_2\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nm : M\ni : ℕ\na : R\na_in : a ∈ I ^ i\n⊢ a ∈ (fun x => x • m) ⁻¹' ↑(I ^ i • ⊤)\n[PROOFSTEP]\nexact smul_mem_smul a_in mem_top\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nI : Ideal R\nM : Type u_2\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nn : ℕ\n⊢ OpenAddSubgroup R\n[PROOFSTEP]\nletI := I.adicTopology\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nI : Ideal R\nM : Type u_2\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nn : ℕ\nthis : TopologicalSpace R := adicTopology I\n⊢ OpenAddSubgroup R\n[PROOFSTEP]\nrefine ⟨(I ^ n).toAddSubgroup, ?_⟩\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nI : Ideal R\nM : Type u_2\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nn : ℕ\nthis : TopologicalSpace R := adicTopology I\n⊢ IsOpen (toAddSubgroup (I ^ n)).toAddSubmonoid.toAddSubsemigroup.carrier\n[PROOFSTEP]\nconvert (I.adic_basis.toRing_subgroups_basis.openAddSubgroup n).isOpen\n[GOAL]\ncase h.e'_3\nR : Type u_1\ninst✝² : CommRing R\nI : Ideal R\nM : Type u_2\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nn : ℕ\nthis : TopologicalSpace R := adicTopology I\n⊢ (toAddSubgroup (I ^ n)).toAddSubmonoid.toAddSubsemigroup.carrier =\n ↑(RingSubgroupsBasis.openAddSubgroup (_ : RingSubgroupsBasis fun i => toAddSubgroup (I ^ i • ⊤)) n)\n[PROOFSTEP]\nchange (I ^ n : Set R) = (I ^ n • (⊤ : Ideal R) : Set R)\n[GOAL]\ncase h.e'_3\nR : Type u_1\ninst✝² : CommRing R\nI : Ideal R\nM : Type u_2\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nn : ℕ\nthis : TopologicalSpace R := adicTopology I\n⊢ ↑(I ^ n) = ↑(I ^ n • ⊤)\n[PROOFSTEP]\nsimp [smul_top_eq_map, Algebra.id.map_eq_id, map_id, restrictScalars_self]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\n⊢ IsAdic J ↔ (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\n⊢ IsAdic J → (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH : IsAdic J\n⊢ (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\n[PROOFSTEP]\nchange _ = _ at H \n[GOAL]\ncase mp\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH : top = Ideal.adicTopology J\n⊢ (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\n[PROOFSTEP]\nrw [H]\n[GOAL]\ncase mp\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH : top = Ideal.adicTopology J\n⊢ (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\n[PROOFSTEP]\nletI := J.adicTopology\n[GOAL]\ncase mp\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH : top = Ideal.adicTopology J\nthis : TopologicalSpace R := Ideal.adicTopology J\n⊢ (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.left\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH : top = Ideal.adicTopology J\nthis : TopologicalSpace R := Ideal.adicTopology J\n⊢ ∀ (n : ℕ), IsOpen ↑(J ^ n)\n[PROOFSTEP]\nintro n\n[GOAL]\ncase mp.left\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH : top = Ideal.adicTopology J\nthis : TopologicalSpace R := Ideal.adicTopology J\nn : ℕ\n⊢ IsOpen ↑(J ^ n)\n[PROOFSTEP]\nexact (J.openAddSubgroup n).isOpen'\n[GOAL]\ncase mp.right\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH : top = Ideal.adicTopology J\nthis : TopologicalSpace R := Ideal.adicTopology J\n⊢ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\n[PROOFSTEP]\nintro s hs\n[GOAL]\ncase mp.right\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH : top = Ideal.adicTopology J\nthis : TopologicalSpace R := Ideal.adicTopology J\ns : Set R\nhs : s ∈ 𝓝 0\n⊢ ∃ n, ↑(J ^ n) ⊆ s\n[PROOFSTEP]\nsimpa using J.hasBasis_nhds_zero_adic.mem_iff.mp hs\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\n⊢ ((∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s) → IsAdic J\n[PROOFSTEP]\nrintro ⟨H₁, H₂⟩\n[GOAL]\ncase mpr.intro\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH₁ : ∀ (n : ℕ), IsOpen ↑(J ^ n)\nH₂ : ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\n⊢ IsAdic J\n[PROOFSTEP]\napply TopologicalAddGroup.ext\n[GOAL]\ncase mpr.intro.tg\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH₁ : ∀ (n : ℕ), IsOpen ↑(J ^ n)\nH₂ : ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\n⊢ TopologicalAddGroup R\n[PROOFSTEP]\napply @TopologicalRing.to_topologicalAddGroup\n[GOAL]\ncase mpr.intro.tg'\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH₁ : ∀ (n : ℕ), IsOpen ↑(J ^ n)\nH₂ : ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\n⊢ TopologicalAddGroup R\n[PROOFSTEP]\napply (RingSubgroupsBasis.toRingFilterBasis _).toAddGroupFilterBasis.isTopologicalAddGroup\n[GOAL]\ncase mpr.intro.h\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH₁ : ∀ (n : ℕ), IsOpen ↑(J ^ n)\nH₂ : ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\n⊢ 𝓝 0 = 𝓝 0\n[PROOFSTEP]\next s\n[GOAL]\ncase mpr.intro.h.a\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH₁ : ∀ (n : ℕ), IsOpen ↑(J ^ n)\nH₂ : ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\ns : Set R\n⊢ s ∈ 𝓝 0 ↔ s ∈ 𝓝 0\n[PROOFSTEP]\nletI := Ideal.adic_basis J\n[GOAL]\ncase mpr.intro.h.a\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH₁ : ∀ (n : ℕ), IsOpen ↑(J ^ n)\nH₂ : ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\ns : Set R\nthis : SubmodulesRingBasis fun n => J ^ n • ⊤ := Ideal.adic_basis J\n⊢ s ∈ 𝓝 0 ↔ s ∈ 𝓝 0\n[PROOFSTEP]\nrw [J.hasBasis_nhds_zero_adic.mem_iff]\n[GOAL]\ncase mpr.intro.h.a\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH₁ : ∀ (n : ℕ), IsOpen ↑(J ^ n)\nH₂ : ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\ns : Set R\nthis : SubmodulesRingBasis fun n => J ^ n • ⊤ := Ideal.adic_basis J\n⊢ s ∈ 𝓝 0 ↔ ∃ i, True ∧ ↑(J ^ i) ⊆ s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.intro.h.a.mp\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH₁ : ∀ (n : ℕ), IsOpen ↑(J ^ n)\nH₂ : ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\ns : Set R\nthis : SubmodulesRingBasis fun n => J ^ n • ⊤ := Ideal.adic_basis J\n⊢ s ∈ 𝓝 0 → ∃ i, True ∧ ↑(J ^ i) ⊆ s\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr.intro.h.a.mpr\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH₁ : ∀ (n : ℕ), IsOpen ↑(J ^ n)\nH₂ : ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\ns : Set R\nthis : SubmodulesRingBasis fun n => J ^ n • ⊤ := Ideal.adic_basis J\n⊢ (∃ i, True ∧ ↑(J ^ i) ⊆ s) → s ∈ 𝓝 0\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr.intro.h.a.mp\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH₁ : ∀ (n : ℕ), IsOpen ↑(J ^ n)\nH₂ : ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\ns : Set R\nthis : SubmodulesRingBasis fun n => J ^ n • ⊤ := Ideal.adic_basis J\nH : s ∈ 𝓝 0\n⊢ ∃ i, True ∧ ↑(J ^ i) ⊆ s\n[PROOFSTEP]\nrcases H₂ s H with ⟨n, h⟩\n[GOAL]\ncase mpr.intro.h.a.mp.intro\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH₁ : ∀ (n : ℕ), IsOpen ↑(J ^ n)\nH₂ : ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\ns : Set R\nthis : SubmodulesRingBasis fun n => J ^ n • ⊤ := Ideal.adic_basis J\nH : s ∈ 𝓝 0\nn : ℕ\nh : ↑(J ^ n) ⊆ s\n⊢ ∃ i, True ∧ ↑(J ^ i) ⊆ s\n[PROOFSTEP]\nexact ⟨n, trivial, h⟩\n[GOAL]\ncase mpr.intro.h.a.mpr\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH₁ : ∀ (n : ℕ), IsOpen ↑(J ^ n)\nH₂ : ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\ns : Set R\nthis : SubmodulesRingBasis fun n => J ^ n • ⊤ := Ideal.adic_basis J\nH : ∃ i, True ∧ ↑(J ^ i) ⊆ s\n⊢ s ∈ 𝓝 0\n[PROOFSTEP]\nrcases H with ⟨n, -, hn⟩\n[GOAL]\ncase mpr.intro.h.a.mpr.intro.intro\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH₁ : ∀ (n : ℕ), IsOpen ↑(J ^ n)\nH₂ : ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\ns : Set R\nthis : SubmodulesRingBasis fun n => J ^ n • ⊤ := Ideal.adic_basis J\nn : ℕ\nhn : ↑(J ^ n) ⊆ s\n⊢ s ∈ 𝓝 0\n[PROOFSTEP]\nrw [mem_nhds_iff]\n[GOAL]\ncase mpr.intro.h.a.mpr.intro.intro\nR : Type u_1\ninst✝¹ : CommRing R\ntop : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nH₁ : ∀ (n : ℕ), IsOpen ↑(J ^ n)\nH₂ : ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\ns : Set R\nthis : SubmodulesRingBasis fun n => J ^ n • ⊤ := Ideal.adic_basis J\nn : ℕ\nhn : ↑(J ^ n) ⊆ s\n⊢ ∃ t, t ⊆ s ∧ IsOpen t ∧ 0 ∈ t\n[PROOFSTEP]\nrefine' ⟨_, hn, H₁ n, (J ^ n).zero_mem⟩\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nh : IsAdic J\nn : ℕ\nhn : 0 < n\n⊢ IsAdic (J ^ n)\n[PROOFSTEP]\nrw [isAdic_iff] at h ⊢\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nh : (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\nn : ℕ\nhn : 0 < n\n⊢ (∀ (n_1 : ℕ), IsOpen ↑((J ^ n) ^ n_1)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n_1, ↑((J ^ n) ^ n_1) ⊆ s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nh : (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\nn : ℕ\nhn : 0 < n\n⊢ ∀ (n_1 : ℕ), IsOpen ↑((J ^ n) ^ n_1)\n[PROOFSTEP]\nintro m\n[GOAL]\ncase left\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nh : (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\nn : ℕ\nhn : 0 < n\nm : ℕ\n⊢ IsOpen ↑((J ^ n) ^ m)\n[PROOFSTEP]\nrw [← pow_mul]\n[GOAL]\ncase left\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nh : (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\nn : ℕ\nhn : 0 < n\nm : ℕ\n⊢ IsOpen ↑(J ^ (n * m))\n[PROOFSTEP]\napply h.left\n[GOAL]\ncase right\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nh : (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\nn : ℕ\nhn : 0 < n\n⊢ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n_1, ↑((J ^ n) ^ n_1) ⊆ s\n[PROOFSTEP]\nintro V hV\n[GOAL]\ncase right\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nh : (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\nn : ℕ\nhn : 0 < n\nV : Set R\nhV : V ∈ 𝓝 0\n⊢ ∃ n_1, ↑((J ^ n) ^ n_1) ⊆ V\n[PROOFSTEP]\ncases' h.right V hV with m hm\n[GOAL]\ncase right.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nh : (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\nn : ℕ\nhn : 0 < n\nV : Set R\nhV : V ∈ 𝓝 0\nm : ℕ\nhm : ↑(J ^ m) ⊆ V\n⊢ ∃ n_1, ↑((J ^ n) ^ n_1) ⊆ V\n[PROOFSTEP]\nuse m\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nh : (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\nn : ℕ\nhn : 0 < n\nV : Set R\nhV : V ∈ 𝓝 0\nm : ℕ\nhm : ↑(J ^ m) ⊆ V\n⊢ ↑((J ^ n) ^ m) ⊆ V\n[PROOFSTEP]\nrefine' Set.Subset.trans _ hm\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nh : (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\nn : ℕ\nhn : 0 < n\nV : Set R\nhV : V ∈ 𝓝 0\nm : ℕ\nhm : ↑(J ^ m) ⊆ V\n⊢ ↑((J ^ n) ^ m) ⊆ ↑(J ^ m)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase h.zero\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nh : (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\nV : Set R\nhV : V ∈ 𝓝 0\nm : ℕ\nhm : ↑(J ^ m) ⊆ V\nhn : 0 < Nat.zero\n⊢ ↑((J ^ Nat.zero) ^ m) ⊆ ↑(J ^ m)\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase h.zero.h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nh : (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\nV : Set R\nhV : V ∈ 𝓝 0\nm : ℕ\nhm : ↑(J ^ m) ⊆ V\nhn : 0 < Nat.zero\n⊢ False\n[PROOFSTEP]\nexact Nat.not_succ_le_zero 0 hn\n[GOAL]\ncase h.succ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nh : (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\nV : Set R\nhV : V ∈ 𝓝 0\nm : ℕ\nhm : ↑(J ^ m) ⊆ V\nn✝ : ℕ\nhn : 0 < Nat.succ n✝\n⊢ ↑((J ^ Nat.succ n✝) ^ m) ⊆ ↑(J ^ m)\n[PROOFSTEP]\nrw [← pow_mul, Nat.succ_mul]\n[GOAL]\ncase h.succ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nh : (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\nV : Set R\nhV : V ∈ 𝓝 0\nm : ℕ\nhm : ↑(J ^ m) ⊆ V\nn✝ : ℕ\nhn : 0 < Nat.succ n✝\n⊢ ↑(J ^ (n✝ * m + m)) ⊆ ↑(J ^ m)\n[PROOFSTEP]\napply Ideal.pow_le_pow\n[GOAL]\ncase h.succ.h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalRing R\nJ : Ideal R\nh : (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ (s : Set R), s ∈ 𝓝 0 → ∃ n, ↑(J ^ n) ⊆ s\nV : Set R\nhV : V ∈ 𝓝 0\nm : ℕ\nhm : ↑(J ^ m) ⊆ V\nn✝ : ℕ\nhn : 0 < Nat.succ n✝\n⊢ m ≤ n✝ * m + m\n[PROOFSTEP]\napply Nat.le_add_left\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\ninst✝⁴ : TopologicalSpace R\ninst✝³ : TopologicalRing R\nA : Type u_2\ninst✝² : CommRing A\ninst✝¹ : TopologicalSpace A\ninst✝ : TopologicalRing A\n⊢ IsAdic ⊥ ↔ DiscreteTopology A\n[PROOFSTEP]\nrw [isAdic_iff]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\ninst✝⁴ : TopologicalSpace R\ninst✝³ : TopologicalRing R\nA : Type u_2\ninst✝² : CommRing A\ninst✝¹ : TopologicalSpace A\ninst✝ : TopologicalRing A\n⊢ ((∀ (n : ℕ), IsOpen ↑(⊥ ^ n)) ∧ ∀ (s : Set A), s ∈ 𝓝 0 → ∃ n, ↑(⊥ ^ n) ⊆ s) ↔ DiscreteTopology A\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁵ : CommRing R\ninst✝⁴ : TopologicalSpace R\ninst✝³ : TopologicalRing R\nA : Type u_2\ninst✝² : CommRing A\ninst✝¹ : TopologicalSpace A\ninst✝ : TopologicalRing A\n⊢ ((∀ (n : ℕ), IsOpen ↑(⊥ ^ n)) ∧ ∀ (s : Set A), s ∈ 𝓝 0 → ∃ n, ↑(⊥ ^ n) ⊆ s) → DiscreteTopology A\n[PROOFSTEP]\nrintro ⟨h, _h'⟩\n[GOAL]\ncase mp.intro\nR : Type u_1\ninst✝⁵ : CommRing R\ninst✝⁴ : TopologicalSpace R\ninst✝³ : TopologicalRing R\nA : Type u_2\ninst✝² : CommRing A\ninst✝¹ : TopologicalSpace A\ninst✝ : TopologicalRing A\nh : ∀ (n : ℕ), IsOpen ↑(⊥ ^ n)\n_h' : ∀ (s : Set A), s ∈ 𝓝 0 → ∃ n, ↑(⊥ ^ n) ⊆ s\n⊢ DiscreteTopology A\n[PROOFSTEP]\nrw [discreteTopology_iff_open_singleton_zero]\n[GOAL]\ncase mp.intro\nR : Type u_1\ninst✝⁵ : CommRing R\ninst✝⁴ : TopologicalSpace R\ninst✝³ : TopologicalRing R\nA : Type u_2\ninst✝² : CommRing A\ninst✝¹ : TopologicalSpace A\ninst✝ : TopologicalRing A\nh : ∀ (n : ℕ), IsOpen ↑(⊥ ^ n)\n_h' : ∀ (s : Set A), s ∈ 𝓝 0 → ∃ n, ↑(⊥ ^ n) ⊆ s\n⊢ IsOpen {0}\n[PROOFSTEP]\nsimpa using h 1\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁵ : CommRing R\ninst✝⁴ : TopologicalSpace R\ninst✝³ : TopologicalRing R\nA : Type u_2\ninst✝² : CommRing A\ninst✝¹ : TopologicalSpace A\ninst✝ : TopologicalRing A\n⊢ DiscreteTopology A → (∀ (n : ℕ), IsOpen ↑(⊥ ^ n)) ∧ ∀ (s : Set A), s ∈ 𝓝 0 → ∃ n, ↑(⊥ ^ n) ⊆ s\n[PROOFSTEP]\nintros\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁵ : CommRing R\ninst✝⁴ : TopologicalSpace R\ninst✝³ : TopologicalRing R\nA : Type u_2\ninst✝² : CommRing A\ninst✝¹ : TopologicalSpace A\ninst✝ : TopologicalRing A\na✝ : DiscreteTopology A\n⊢ (∀ (n : ℕ), IsOpen ↑(⊥ ^ n)) ∧ ∀ (s : Set A), s ∈ 𝓝 0 → ∃ n, ↑(⊥ ^ n) ⊆ s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.left\nR : Type u_1\ninst✝⁵ : CommRing R\ninst✝⁴ : TopologicalSpace R\ninst✝³ : TopologicalRing R\nA : Type u_2\ninst✝² : CommRing A\ninst✝¹ : TopologicalSpace A\ninst✝ : TopologicalRing A\na✝ : DiscreteTopology A\n⊢ ∀ (n : ℕ), IsOpen ↑(⊥ ^ n)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr.right\nR : Type u_1\ninst✝⁵ : CommRing R\ninst✝⁴ : TopologicalSpace R\ninst✝³ : TopologicalRing R\nA : Type u_2\ninst✝² : CommRing A\ninst✝¹ : TopologicalSpace A\ninst✝ : TopologicalRing A\na✝ : DiscreteTopology A\n⊢ ∀ (s : Set A), s ∈ 𝓝 0 → ∃ n, ↑(⊥ ^ n) ⊆ s\n[PROOFSTEP]\nintro U U_nhds\n[GOAL]\ncase mpr.right\nR : Type u_1\ninst✝⁵ : CommRing R\ninst✝⁴ : TopologicalSpace R\ninst✝³ : TopologicalRing R\nA : Type u_2\ninst✝² : CommRing A\ninst✝¹ : TopologicalSpace A\ninst✝ : TopologicalRing A\na✝ : DiscreteTopology A\nU : Set A\nU_nhds : U ∈ 𝓝 0\n⊢ ∃ n, ↑(⊥ ^ n) ⊆ U\n[PROOFSTEP]\nuse 1\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁵ : CommRing R\ninst✝⁴ : TopologicalSpace R\ninst✝³ : TopologicalRing R\nA : Type u_2\ninst✝² : CommRing A\ninst✝¹ : TopologicalSpace A\ninst✝ : TopologicalRing A\na✝ : DiscreteTopology A\nU : Set A\nU_nhds : U ∈ 𝓝 0\n⊢ ↑(⊥ ^ 1) ⊆ U\n[PROOFSTEP]\nsimp [mem_of_mem_nhds U_nhds]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : WithIdeal R\n⊢ NonarchimedeanRing R\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : WithIdeal R\n⊢ TopologicalRing (UniformSpace.Completion R)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\ninst✝³ : CommRing R\ninst✝² : WithIdeal R\nM : Type u_2\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\n⊢ TopologicalAddGroup M\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\ninst✝³ : CommRing R\ninst✝² : WithIdeal R\nM : Type u_2\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\n⊢ ContinuousSMul R M\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Nonarchimedean.AdicTopology", "llama_tokens": 12644, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8221891305219504, "lm_q2_score": 0.695958331339634, "lm_q1q2_score": 0.5722093753236411}} {"text": "[GOAL]\nf : Type u₀ → Type u₁\ninst✝ : EquivFunctor f\nα β : Type u₀\ne : α ≃ β\nx : f α\n⊢ map e.symm (map e x) = x\n[PROOFSTEP]\nconvert (congr_fun (EquivFunctor.map_trans' e e.symm) x).symm\n[GOAL]\ncase h.e'_3\nf : Type u₀ → Type u₁\ninst✝ : EquivFunctor f\nα β : Type u₀\ne : α ≃ β\nx : f α\n⊢ x = map (e.trans e.symm) x\n[PROOFSTEP]\nsimp\n[GOAL]\nf : Type u₀ → Type u₁\ninst✝ : EquivFunctor f\nα β : Type u₀\ne : α ≃ β\ny : f β\n⊢ map e (map e.symm y) = y\n[PROOFSTEP]\nconvert (congr_fun (EquivFunctor.map_trans' e.symm e) y).symm\n[GOAL]\ncase h.e'_3\nf : Type u₀ → Type u₁\ninst✝ : EquivFunctor f\nα β : Type u₀\ne : α ≃ β\ny : f β\n⊢ y = map (e.symm.trans e) y\n[PROOFSTEP]\nsimp\n[GOAL]\nf : Type u₀ → Type u₁\ninst✝ : EquivFunctor f\nα✝ β : Type u₀\ne : α✝ ≃ β\nα : Type u₀\n⊢ mapEquiv f (Equiv.refl α) = Equiv.refl (f α)\n[PROOFSTEP]\nsimp [EquivFunctor.mapEquiv]\n[GOAL]\nf : Type u₀ → Type u₁\ninst✝ : EquivFunctor f\nα✝ β : Type u₀\ne : α✝ ≃ β\nα : Type u₀\n⊢ { toFun := id, invFun := id, left_inv := (_ : LeftInverse id id), right_inv := (_ : Function.RightInverse id id) } =\n Equiv.refl (f α)\n[PROOFSTEP]\nrfl\n[GOAL]\nf : Type u₀ → Type u₁\ninst✝ : EquivFunctor f\nα β : Type u₀\ne : α ≃ β\nγ : Type u₀\nab : α ≃ β\nbc : β ≃ γ\nx : f α\n⊢ ↑((mapEquiv f ab).trans (mapEquiv f bc)) x = ↑(mapEquiv f (ab.trans bc)) x\n[PROOFSTEP]\nsimp [mapEquiv, map_trans']\n[GOAL]\nf : Type u₀ → Type u₁\ninst✝¹ : Functor f\ninst✝ : LawfulFunctor f\nα : Type u₀\n⊢ (fun {α β} e => Functor.map ↑e) (Equiv.refl α) = id\n[PROOFSTEP]\next\n[GOAL]\ncase h\nf : Type u₀ → Type u₁\ninst✝¹ : Functor f\ninst✝ : LawfulFunctor f\nα : Type u₀\nx✝ : f α\n⊢ (fun {α β} e => Functor.map ↑e) (Equiv.refl α) x✝ = id x✝\n[PROOFSTEP]\napply LawfulFunctor.id_map\n[GOAL]\nf : Type u₀ → Type u₁\ninst✝¹ : Functor f\ninst✝ : LawfulFunctor f\nα β γ : Type u₀\nk : α ≃ β\nh : β ≃ γ\n⊢ (fun {α β} e => Functor.map ↑e) (k.trans h) = (fun {α β} e => Functor.map ↑e) h ∘ (fun {α β} e => Functor.map ↑e) k\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nf : Type u₀ → Type u₁\ninst✝¹ : Functor f\ninst✝ : LawfulFunctor f\nα β γ : Type u₀\nk : α ≃ β\nh : β ≃ γ\nx : f α\n⊢ (fun {α β} e => Functor.map ↑e) (k.trans h) x =\n ((fun {α β} e => Functor.map ↑e) h ∘ (fun {α β} e => Functor.map ↑e) k) x\n[PROOFSTEP]\napply LawfulFunctor.comp_map k h x\n[GOAL]\nf : Type u₀ → Type u₁\ninst✝¹ : Applicative f\ninst✝ : LawfulApplicative f\nα β : Type u₀\nh : ∀ (γ : Type u₀), Injective pure\ne₁ e₂ : α ≃ β\nH : mapEquiv f e₁ = mapEquiv f e₂\nx : α\n⊢ pure (↑e₁ x) = pure (↑e₂ x)\n[PROOFSTEP]\nsimpa [EquivFunctor.map] using Equiv.congr_fun H (pure x)\n", "meta": {"mathlib_filename": "Mathlib.Control.EquivFunctor", "llama_tokens": 1311, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.782662489091802, "lm_q2_score": 0.7310585727705126, "lm_q1q2_score": 0.5721721222364696}} {"text": "[GOAL]\nι : Type u_1\nM : Type u_2\nN : Type u_3\nα : ι → Type u_4\ninst✝³ : (i : ι) → SMul M (α i)\ninst✝² : (i : ι) → SMul N (α i)\na✝ : M\ni : ι\nb✝ : α i\nx✝ : (i : ι) × α i\ninst✝¹ : SMul M N\ninst✝ : ∀ (i : ι), IsScalarTower M N (α i)\na : M\nb : N\nx : (i : ι) × α i\n⊢ (a • b) • x = a • b • x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nι : Type u_1\nM : Type u_2\nN : Type u_3\nα : ι → Type u_4\ninst✝³ : (i : ι) → SMul M (α i)\ninst✝² : (i : ι) → SMul N (α i)\na✝ : M\ni : ι\nb✝ : α i\nx : (i : ι) × α i\ninst✝¹ : SMul M N\ninst✝ : ∀ (i : ι), IsScalarTower M N (α i)\na : M\nb : N\nfst✝ : ι\nsnd✝ : α fst✝\n⊢ (a • b) • { fst := fst✝, snd := snd✝ } = a • b • { fst := fst✝, snd := snd✝ }\n[PROOFSTEP]\nrw [smul_mk, smul_mk, smul_mk, smul_assoc]\n[GOAL]\nι : Type u_1\nM : Type u_2\nN : Type u_3\nα : ι → Type u_4\ninst✝² : (i : ι) → SMul M (α i)\ninst✝¹ : (i : ι) → SMul N (α i)\na✝ : M\ni : ι\nb✝ : α i\nx✝ : (i : ι) × α i\ninst✝ : ∀ (i : ι), SMulCommClass M N (α i)\na : M\nb : N\nx : (i : ι) × α i\n⊢ a • b • x = b • a • x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nι : Type u_1\nM : Type u_2\nN : Type u_3\nα : ι → Type u_4\ninst✝² : (i : ι) → SMul M (α i)\ninst✝¹ : (i : ι) → SMul N (α i)\na✝ : M\ni : ι\nb✝ : α i\nx : (i : ι) × α i\ninst✝ : ∀ (i : ι), SMulCommClass M N (α i)\na : M\nb : N\nfst✝ : ι\nsnd✝ : α fst✝\n⊢ a • b • { fst := fst✝, snd := snd✝ } = b • a • { fst := fst✝, snd := snd✝ }\n[PROOFSTEP]\nrw [smul_mk, smul_mk, smul_mk, smul_mk, smul_comm]\n[GOAL]\nι : Type u_1\nM : Type u_2\nN : Type u_3\nα : ι → Type u_4\ninst✝³ : (i : ι) → SMul M (α i)\ninst✝² : (i : ι) → SMul N (α i)\na✝ : M\ni : ι\nb : α i\nx✝ : (i : ι) × α i\ninst✝¹ : (i : ι) → SMul Mᵐᵒᵖ (α i)\ninst✝ : ∀ (i : ι), IsCentralScalar M (α i)\na : M\nx : (i : ι) × α i\n⊢ MulOpposite.op a • x = a • x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nι : Type u_1\nM : Type u_2\nN : Type u_3\nα : ι → Type u_4\ninst✝³ : (i : ι) → SMul M (α i)\ninst✝² : (i : ι) → SMul N (α i)\na✝ : M\ni : ι\nb : α i\nx : (i : ι) × α i\ninst✝¹ : (i : ι) → SMul Mᵐᵒᵖ (α i)\ninst✝ : ∀ (i : ι), IsCentralScalar M (α i)\na : M\nfst✝ : ι\nsnd✝ : α fst✝\n⊢ MulOpposite.op a • { fst := fst✝, snd := snd✝ } = a • { fst := fst✝, snd := snd✝ }\n[PROOFSTEP]\nrw [smul_mk, smul_mk, op_smul_eq_smul]\n[GOAL]\nι : Type u_1\nM : Type u_2\nN : Type u_3\nα : ι → Type u_4\nm : Monoid M\ninst✝ : (i : ι) → MulAction M (α i)\nx : (i : ι) × α i\n⊢ 1 • x = x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nι : Type u_1\nM : Type u_2\nN : Type u_3\nα : ι → Type u_4\nm : Monoid M\ninst✝ : (i : ι) → MulAction M (α i)\nfst✝ : ι\nsnd✝ : α fst✝\n⊢ 1 • { fst := fst✝, snd := snd✝ } = { fst := fst✝, snd := snd✝ }\n[PROOFSTEP]\nrw [smul_mk, one_smul]\n[GOAL]\nι : Type u_1\nM : Type u_2\nN : Type u_3\nα : ι → Type u_4\nm : Monoid M\ninst✝ : (i : ι) → MulAction M (α i)\na b : M\nx : (i : ι) × α i\n⊢ (a * b) • x = a • b • x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nι : Type u_1\nM : Type u_2\nN : Type u_3\nα : ι → Type u_4\nm : Monoid M\ninst✝ : (i : ι) → MulAction M (α i)\na b : M\nfst✝ : ι\nsnd✝ : α fst✝\n⊢ (a * b) • { fst := fst✝, snd := snd✝ } = a • b • { fst := fst✝, snd := snd✝ }\n[PROOFSTEP]\nrw [smul_mk, smul_mk, smul_mk, mul_smul]\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.GroupAction.Sigma", "llama_tokens": 1883, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8688267694452331, "lm_q2_score": 0.6584174938590246, "lm_q1q2_score": 0.572050744135763}} {"text": "[GOAL]\nn : ℕ\nx : ℕ × ℕ\n⊢ x ∈ antidiagonal n ↔ x.fst + x.snd = n\n[PROOFSTEP]\nrw [antidiagonal, mem_map]\n[GOAL]\nn : ℕ\nx : ℕ × ℕ\n⊢ (∃ a, a ∈ range (n + 1) ∧ (a, n - a) = x) ↔ x.fst + x.snd = n\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn : ℕ\nx : ℕ × ℕ\n⊢ (∃ a, a ∈ range (n + 1) ∧ (a, n - a) = x) → x.fst + x.snd = n\n[PROOFSTEP]\nrintro ⟨i, hi, rfl⟩\n[GOAL]\ncase mp.intro.intro\nn i : ℕ\nhi : i ∈ range (n + 1)\n⊢ (i, n - i).fst + (i, n - i).snd = n\n[PROOFSTEP]\nrw [mem_range, lt_succ_iff] at hi \n[GOAL]\ncase mp.intro.intro\nn i : ℕ\nhi : i ≤ n\n⊢ (i, n - i).fst + (i, n - i).snd = n\n[PROOFSTEP]\nexact add_tsub_cancel_of_le hi\n[GOAL]\ncase mpr\nn : ℕ\nx : ℕ × ℕ\n⊢ x.fst + x.snd = n → ∃ a, a ∈ range (n + 1) ∧ (a, n - a) = x\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nx : ℕ × ℕ\n⊢ ∃ a, a ∈ range (x.fst + x.snd + 1) ∧ (a, x.fst + x.snd - a) = x\n[PROOFSTEP]\nrefine' ⟨x.fst, _, _⟩\n[GOAL]\ncase mpr.refine'_1\nx : ℕ × ℕ\n⊢ x.fst ∈ range (x.fst + x.snd + 1)\n[PROOFSTEP]\nrw [mem_range, add_assoc, lt_add_iff_pos_right]\n[GOAL]\ncase mpr.refine'_1\nx : ℕ × ℕ\n⊢ 0 < x.snd + 1\n[PROOFSTEP]\nexact zero_lt_succ _\n[GOAL]\ncase mpr.refine'_2\nx : ℕ × ℕ\n⊢ (x.fst, x.fst + x.snd - x.fst) = x\n[PROOFSTEP]\nexact Prod.ext rfl (by simp only [add_tsub_cancel_left])\n[GOAL]\nx : ℕ × ℕ\n⊢ (x.fst, x.fst + x.snd - x.fst).snd = x.snd\n[PROOFSTEP]\nsimp only [add_tsub_cancel_left]\n[GOAL]\nn : ℕ\n⊢ length (antidiagonal n) = n + 1\n[PROOFSTEP]\nrw [antidiagonal, length_map, length_range]\n[GOAL]\nn : ℕ\n⊢ antidiagonal (n + 1) = (0, n + 1) :: map (Prod.map succ id) (antidiagonal n)\n[PROOFSTEP]\nsimp only [antidiagonal, range_succ_eq_map, map_cons, true_and_iff, Nat.add_succ_sub_one, add_zero, id.def,\n eq_self_iff_true, tsub_zero, map_map, Prod.map_mk]\n[GOAL]\nn : ℕ\n⊢ (0, n + 1) :: (succ 0, n) :: map ((fun i => (i, n + 1 - i)) ∘ succ ∘ succ) (range n) =\n (0, n + 1) :: (succ 0, n) :: map (Prod.map succ id ∘ (fun i => (i, n - i)) ∘ succ) (range n)\n[PROOFSTEP]\napply congr rfl (congr rfl _)\n[GOAL]\nn : ℕ\n⊢ map ((fun i => (i, n + 1 - i)) ∘ succ ∘ succ) (range n) =\n map (Prod.map succ id ∘ (fun i => (i, n - i)) ∘ succ) (range n)\n[PROOFSTEP]\next\n[GOAL]\ncase a.a\nn n✝ : ℕ\na✝ : ℕ × ℕ\n⊢ a✝ ∈ get? (map ((fun i => (i, n + 1 - i)) ∘ succ ∘ succ) (range n)) n✝ ↔\n a✝ ∈ get? (map (Prod.map succ id ∘ (fun i => (i, n - i)) ∘ succ) (range n)) n✝\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ antidiagonal (n + 1) = map (Prod.map id succ) (antidiagonal n) ++ [(n + 1, 0)]\n[PROOFSTEP]\nsimp only [antidiagonal, range_succ, add_tsub_cancel_left, map_append, append_assoc, tsub_self, singleton_append,\n map_map, map]\n[GOAL]\nn : ℕ\n⊢ map (fun i => (i, n + 1 - i)) (range n) ++ [(n, 1), (n + 1, 0)] =\n map (Prod.map id succ ∘ fun i => (i, n - i)) (range n) ++ [Prod.map id succ (n, 0), (n + 1, 0)]\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nn : ℕ\n⊢ map (fun i => (i, n + 1 - i)) (range n) = map (Prod.map id succ ∘ fun i => (i, n - i)) (range n)\n[PROOFSTEP]\napply map_congr\n[GOAL]\ncase e_a.a\nn : ℕ\n⊢ ∀ (x : ℕ), x ∈ range n → (x, n + 1 - x) = (Prod.map id succ ∘ fun i => (i, n - i)) x\n[PROOFSTEP]\nsimp (config := { contextual := true }) [le_of_lt, Nat.succ_eq_add_one, Nat.sub_add_comm]\n[GOAL]\nn : ℕ\n⊢ antidiagonal (n + 2) = (0, n + 2) :: map (Prod.map succ succ) (antidiagonal n) ++ [(n + 2, 0)]\n[PROOFSTEP]\nrw [antidiagonal_succ']\n[GOAL]\nn : ℕ\n⊢ map (Prod.map id succ) (antidiagonal (n + 1)) ++ [(n + 1 + 1, 0)] =\n (0, n + 2) :: map (Prod.map succ succ) (antidiagonal n) ++ [(n + 2, 0)]\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ map (Prod.map id succ ∘ Prod.map succ id) (antidiagonal n) = map (Prod.map succ succ) (antidiagonal n)\n[PROOFSTEP]\next\n[GOAL]\ncase a.a\nn n✝ : ℕ\na✝ : ℕ × ℕ\n⊢ a✝ ∈ get? (map (Prod.map id succ ∘ Prod.map succ id) (antidiagonal n)) n✝ ↔\n a✝ ∈ get? (map (Prod.map succ succ) (antidiagonal n)) n✝\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ map Prod.swap (antidiagonal n) = reverse (antidiagonal n)\n[PROOFSTEP]\nrw [antidiagonal, map_map, ← List.map_reverse, range_eq_range', reverse_range', ← range_eq_range', map_map]\n[GOAL]\nn : ℕ\n⊢ map (Prod.swap ∘ fun i => (i, n - i)) (range (n + 1)) =\n map ((fun i => (i, n - i)) ∘ fun x => 0 + (n + 1) - 1 - x) (range (n + 1))\n[PROOFSTEP]\napply map_congr\n[GOAL]\ncase a\nn : ℕ\n⊢ ∀ (x : ℕ),\n x ∈ range (n + 1) → (Prod.swap ∘ fun i => (i, n - i)) x = ((fun i => (i, n - i)) ∘ fun x => 0 + (n + 1) - 1 - x) x\n[PROOFSTEP]\nsimp (config := { contextual := true }) [Nat.sub_sub_self, lt_succ_iff]\n", "meta": {"mathlib_filename": "Mathlib.Data.List.NatAntidiagonal", "llama_tokens": 2316, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8031737963569016, "lm_q2_score": 0.7122321903471563, "lm_q1q2_score": 0.5720462322087169}} {"text": "[GOAL]\nG : Type u_1\nS : Type u_2\ninst✝ : Semigroup S\na✝ b c : S\nh : Commute b c\na : S\n⊢ a * b * c = a * c * b\n[PROOFSTEP]\nsimp only [mul_assoc, h.eq]\n[GOAL]\nG : Type u_1\nS : Type u_2\ninst✝ : Semigroup S\na b c✝ : S\nh : Commute a b\nc : S\n⊢ a * (b * c) = b * (a * c)\n[PROOFSTEP]\nsimp only [← mul_assoc, h.eq]\n[GOAL]\nG : Type u_1\nS : Type u_2\ninst✝ : Semigroup S\na✝ b c : S\nhbc : Commute b c\na d : S\n⊢ a * b * (c * d) = a * c * (b * d)\n[PROOFSTEP]\nsimp only [hbc.left_comm, mul_assoc]\n[GOAL]\nG : Type u_1\nM : Type u_2\ninst✝ : Monoid M\na✝ b✝ : M\nu✝ u₁ u₂ u : Mˣ\na b : M\nhu : a * b = ↑u\nhc : Commute a b\n⊢ a * (b * ↑u⁻¹) = 1\n[PROOFSTEP]\nrw [← mul_assoc, hu, u.mul_inv]\n[GOAL]\nG : Type u_1\nM : Type u_2\ninst✝ : Monoid M\na✝ b✝ : M\nu✝ u₁ u₂ u : Mˣ\na b : M\nhu : a * b = ↑u\nhc : Commute a b\n⊢ b * ↑u⁻¹ * a = 1\n[PROOFSTEP]\nhave : Commute a u := hu ▸ (Commute.refl _).mul_right hc\n[GOAL]\nG : Type u_1\nM : Type u_2\ninst✝ : Monoid M\na✝ b✝ : M\nu✝ u₁ u₂ u : Mˣ\na b : M\nhu : a * b = ↑u\nhc : Commute a b\nthis : Commute a ↑u\n⊢ b * ↑u⁻¹ * a = 1\n[PROOFSTEP]\nrw [← this.units_inv_right.right_comm, ← hc.eq, hu, u.mul_inv]\n[GOAL]\nG : Type u_1\ninst✝ : DivisionMonoid G\na b c d : G\nhab : Commute a b\n⊢ (a * b)⁻¹ = a⁻¹ * b⁻¹\n[PROOFSTEP]\nrw [hab.eq, mul_inv_rev]\n[GOAL]\nG : Type u_1\ninst✝ : DivisionMonoid G\na b c d : G\nhab : Commute a b\n⊢ (a * b)⁻¹ = a⁻¹ * b⁻¹\n[PROOFSTEP]\nrw [hab.eq, mul_inv_rev]\n[GOAL]\nG : Type u_1\ninst✝ : DivisionMonoid G\na b c d : G\nhbd : Commute b d\nhbc : Commute b⁻¹ c\n⊢ a / b * (c / d) = a * c / (b * d)\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv, mul_inv_rev, hbd.inv_inv.symm.eq, hbc.mul_mul_mul_comm]\n[GOAL]\nG : Type u_1\ninst✝ : DivisionMonoid G\na b c d : G\nhbc : Commute b c\nhbd : Commute b⁻¹ d\nhcd : Commute c⁻¹ d\n⊢ a / b / (c / d) = a / c / (b / d)\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv, mul_inv_rev, inv_inv, hbd.symm.eq, hcd.symm.eq, hbc.inv_inv.mul_mul_mul_comm]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\na b : G\nh : Commute a b\n⊢ a⁻¹ * b * a = b\n[PROOFSTEP]\nrw [h.inv_left.eq, inv_mul_cancel_right]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\na b : G\nh : Commute a b\n⊢ a⁻¹ * (b * a) = b\n[PROOFSTEP]\nrw [← mul_assoc, h.inv_mul_cancel]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\na b : G\nh : Commute a b\n⊢ a * b * a⁻¹ = b\n[PROOFSTEP]\nrw [h.eq, mul_inv_cancel_right]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\na b : G\nh : Commute a b\n⊢ a * (b * a⁻¹) = b\n[PROOFSTEP]\nrw [← mul_assoc, h.mul_inv_cancel]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Group.Commute", "llama_tokens": 1311, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7401743735019595, "lm_q2_score": 0.7718434978390747, "lm_q1q2_score": 0.5712987774545981}} {"text": "[GOAL]\nx y z✝ : ZFSet\nhx : IsTransitive x\nhy : IsTransitive y\nz : ZFSet\nhz : z ∈ x ∩ y\nw : ZFSet\nhw : w ∈ z\n⊢ w ∈ x ∩ y\n[PROOFSTEP]\nrw [mem_inter] at hz ⊢\n[GOAL]\nx y z✝ : ZFSet\nhx : IsTransitive x\nhy : IsTransitive y\nz : ZFSet\nhz : z ∈ x ∧ z ∈ y\nw : ZFSet\nhw : w ∈ z\n⊢ w ∈ x ∧ w ∈ y\n[PROOFSTEP]\nexact ⟨hx.mem_trans hw hz.1, hy.mem_trans hw hz.2⟩\n[GOAL]\nx y✝ z✝ : ZFSet\nh : IsTransitive x\ny : ZFSet\nhy : y ∈ ⋃₀ x\nz : ZFSet\nhz : z ∈ y\n⊢ z ∈ ⋃₀ x\n[PROOFSTEP]\nrcases mem_sUnion.1 hy with ⟨w, hw, hw'⟩\n[GOAL]\ncase intro.intro\nx y✝ z✝ : ZFSet\nh : IsTransitive x\ny : ZFSet\nhy : y ∈ ⋃₀ x\nz : ZFSet\nhz : z ∈ y\nw : ZFSet\nhw : w ∈ x\nhw' : y ∈ w\n⊢ z ∈ ⋃₀ x\n[PROOFSTEP]\nexact mem_sUnion_of_mem hz (h.mem_trans hw' hw)\n[GOAL]\nx y✝ z✝ : ZFSet\nH : ∀ (y : ZFSet), y ∈ x → IsTransitive y\ny : ZFSet\nhy : y ∈ ⋃₀ x\nz : ZFSet\nhz : z ∈ y\n⊢ z ∈ ⋃₀ x\n[PROOFSTEP]\nrcases mem_sUnion.1 hy with ⟨w, hw, hw'⟩\n[GOAL]\ncase intro.intro\nx y✝ z✝ : ZFSet\nH : ∀ (y : ZFSet), y ∈ x → IsTransitive y\ny : ZFSet\nhy : y ∈ ⋃₀ x\nz : ZFSet\nhz : z ∈ y\nw : ZFSet\nhw : w ∈ x\nhw' : y ∈ w\n⊢ z ∈ ⋃₀ x\n[PROOFSTEP]\nexact mem_sUnion_of_mem ((H w hw).mem_trans hz hw') hw\n[GOAL]\nx y z : ZFSet\nhx : IsTransitive x\nhy : IsTransitive y\n⊢ IsTransitive (x ∪ y)\n[PROOFSTEP]\nrw [← sUnion_pair]\n[GOAL]\nx y z : ZFSet\nhx : IsTransitive x\nhy : IsTransitive y\n⊢ IsTransitive (⋃₀ {x, y})\n[PROOFSTEP]\napply IsTransitive.sUnion' fun z => _\n[GOAL]\nx y z : ZFSet\nhx : IsTransitive x\nhy : IsTransitive y\n⊢ ∀ (z : ZFSet), z ∈ {x, y} → IsTransitive z\n[PROOFSTEP]\nintro\n[GOAL]\nx y z : ZFSet\nhx : IsTransitive x\nhy : IsTransitive y\nz✝ : ZFSet\n⊢ z✝ ∈ {x, y} → IsTransitive z✝\n[PROOFSTEP]\nrw [mem_pair]\n[GOAL]\nx y z : ZFSet\nhx : IsTransitive x\nhy : IsTransitive y\nz✝ : ZFSet\n⊢ z✝ = x ∨ z✝ = y → IsTransitive z✝\n[PROOFSTEP]\nrintro (rfl | rfl)\n[GOAL]\ncase inl\ny z : ZFSet\nhy : IsTransitive y\nz✝ : ZFSet\nhx : IsTransitive z✝\n⊢ IsTransitive z✝\ncase inr x z : ZFSet hx : IsTransitive x z✝ : ZFSet hy : IsTransitive z✝ ⊢ IsTransitive z✝\n[PROOFSTEP]\nassumption'\n[GOAL]\nx y✝ z✝ : ZFSet\nh : IsTransitive x\ny : ZFSet\nhy : y ∈ powerset x\nz : ZFSet\nhz : z ∈ y\n⊢ z ∈ powerset x\n[PROOFSTEP]\nrw [mem_powerset] at hy ⊢\n[GOAL]\nx y✝ z✝ : ZFSet\nh : IsTransitive x\ny : ZFSet\nhy : y ⊆ x\nz : ZFSet\nhz : z ∈ y\n⊢ z ⊆ x\n[PROOFSTEP]\nexact h.subset_of_mem (hy hz)\n[GOAL]\nx y✝ z : ZFSet\nh : IsTransitive x\ny : ZFSet\nhy : y ∈ ⋃₀ x\n⊢ y ∈ x\n[PROOFSTEP]\nrcases mem_sUnion.1 hy with ⟨z, hz, hz'⟩\n[GOAL]\ncase intro.intro\nx y✝ z✝ : ZFSet\nh : IsTransitive x\ny : ZFSet\nhy : y ∈ ⋃₀ x\nz : ZFSet\nhz : z ∈ x\nhz' : y ∈ z\n⊢ y ∈ x\n[PROOFSTEP]\nexact h.mem_trans hz' hz\n", "meta": {"mathlib_filename": "Mathlib.SetTheory.ZFC.Ordinal", "llama_tokens": 1454, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7718434978390746, "lm_q2_score": 0.7401743505760728, "lm_q1q2_score": 0.5712987597594015}} {"text": "[GOAL]\nα : Type u_1\ninst✝² : Group α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ max a 1 / max a⁻¹ 1 = a\n[PROOFSTEP]\nrcases le_total a 1 with (h | h)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : Group α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\nh : a ≤ 1\n⊢ max a 1 / max a⁻¹ 1 = a\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝² : Group α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\nh : 1 ≤ a\n⊢ max a 1 / max a⁻¹ 1 = a\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedCommGroup α\na✝ b✝ c✝ a b c : α\n⊢ min (a / c) (b / c) = min a b / c\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using min_mul_mul_right a b c⁻¹\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedCommGroup α\na✝ b✝ c✝ a b c : α\n⊢ max (a / c) (b / c) = max a b / c\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using max_mul_mul_right a b c⁻¹\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedCommGroup α\na✝ b✝ c✝ a b c : α\n⊢ min (a / b) (a / c) = a / max b c\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, min_mul_mul_left, min_inv_inv']\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedCommGroup α\na✝ b✝ c✝ a b c : α\n⊢ max (a / b) (a / c) = a / min b c\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, max_mul_mul_left, max_inv_inv']\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na✝ b✝ c✝ a b c d : α\n⊢ max a b - max c d ≤ max (a - c) (b - d)\n[PROOFSTEP]\nsimp only [sub_le_iff_le_add, max_le_iff]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na✝ b✝ c✝ a b c d : α\n⊢ a ≤ max (a - c) (b - d) + max c d ∧ b ≤ max (a - c) (b - d) + max c d\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na✝ b✝ c✝ a b c d : α\n⊢ a ≤ max (a - c) (b - d) + max c d\ncase right α : Type u_1 inst✝ : LinearOrderedAddCommGroup α a✝ b✝ c✝ a b c d : α ⊢ b ≤ max (a - c) (b - d) + max c d\n[PROOFSTEP]\ncalc\n a = a - c + c := (sub_add_cancel a c).symm\n _ ≤ max (a - c) (b - d) + max c d := add_le_add (le_max_left _ _) (le_max_left _ _)\n[GOAL]\ncase right\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na✝ b✝ c✝ a b c d : α\n⊢ b ≤ max (a - c) (b - d) + max c d\n[PROOFSTEP]\ncalc\n b = b - d + d := (sub_add_cancel b d).symm\n _ ≤ max (a - c) (b - d) + max c d := add_le_add (le_max_right _ _) (le_max_right _ _)\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na✝ b✝ c✝ a b c d : α\n⊢ |max a b - max c d| ≤ max |a - c| |b - d|\n[PROOFSTEP]\nrefine' abs_sub_le_iff.2 ⟨_, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na✝ b✝ c✝ a b c d : α\n⊢ max a b - max c d ≤ max |a - c| |b - d|\n[PROOFSTEP]\nexact (max_sub_max_le_max _ _ _ _).trans (max_le_max (le_abs_self _) (le_abs_self _))\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na✝ b✝ c✝ a b c d : α\n⊢ max c d - max a b ≤ max |a - c| |b - d|\n[PROOFSTEP]\nrw [abs_sub_comm a c, abs_sub_comm b d]\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na✝ b✝ c✝ a b c d : α\n⊢ max c d - max a b ≤ max |c - a| |d - b|\n[PROOFSTEP]\nexact (max_sub_max_le_max _ _ _ _).trans (max_le_max (le_abs_self _) (le_abs_self _))\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na✝ b✝ c✝ a b c d : α\n⊢ |min a b - min c d| ≤ max |a - c| |b - d|\n[PROOFSTEP]\nsimpa only [max_neg_neg, neg_sub_neg, abs_sub_comm] using abs_max_sub_max_le_max (-a) (-b) (-c) (-d)\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na✝ b✝ c✝ a b c : α\n⊢ |max a c - max b c| ≤ |a - b|\n[PROOFSTEP]\nsimpa only [sub_self, abs_zero, max_eq_left (abs_nonneg (a - b))] using abs_max_sub_max_le_max a c b c\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Group.MinMax", "llama_tokens": 1894, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8056322076481139, "lm_q2_score": 0.7090191460821871, "lm_q1q2_score": 0.571208659922973}} {"text": "[GOAL]\nn : ℕ\n⊢ Ico 0 n = range n\n[PROOFSTEP]\nrw [Ico, tsub_zero, range_eq_range']\n[GOAL]\nn m : ℕ\n⊢ List.length (Ico n m) = m - n\n[PROOFSTEP]\ndsimp [Ico]\n[GOAL]\nn m : ℕ\n⊢ List.length (range' n (m - n)) = m - n\n[PROOFSTEP]\nsimp only [length_range']\n[GOAL]\nn m : ℕ\n⊢ Pairwise (fun x x_1 => x < x_1) (Ico n m)\n[PROOFSTEP]\ndsimp [Ico]\n[GOAL]\nn m : ℕ\n⊢ Pairwise (fun x x_1 => x < x_1) (range' n (m - n))\n[PROOFSTEP]\nsimp only [pairwise_lt_range']\n[GOAL]\nn m : ℕ\n⊢ Nodup (Ico n m)\n[PROOFSTEP]\ndsimp [Ico]\n[GOAL]\nn m : ℕ\n⊢ Nodup (range' n (m - n))\n[PROOFSTEP]\nsimp only [nodup_range']\n[GOAL]\nn m l : ℕ\n⊢ l ∈ Ico n m ↔ n ≤ l ∧ l < m\n[PROOFSTEP]\nsuffices n ≤ l ∧ l < n + (m - n) ↔ n ≤ l ∧ l < m by simp [Ico, this]\n[GOAL]\nn m l : ℕ\nthis : n ≤ l ∧ l < n + (m - n) ↔ n ≤ l ∧ l < m\n⊢ l ∈ Ico n m ↔ n ≤ l ∧ l < m\n[PROOFSTEP]\nsimp [Ico, this]\n[GOAL]\nn m l : ℕ\n⊢ n ≤ l ∧ l < n + (m - n) ↔ n ≤ l ∧ l < m\n[PROOFSTEP]\ncases' le_total n m with hnm hmn\n[GOAL]\ncase inl\nn m l : ℕ\nhnm : n ≤ m\n⊢ n ≤ l ∧ l < n + (m - n) ↔ n ≤ l ∧ l < m\n[PROOFSTEP]\nrw [add_tsub_cancel_of_le hnm]\n[GOAL]\ncase inr\nn m l : ℕ\nhmn : m ≤ n\n⊢ n ≤ l ∧ l < n + (m - n) ↔ n ≤ l ∧ l < m\n[PROOFSTEP]\nrw [tsub_eq_zero_iff_le.mpr hmn, add_zero]\n[GOAL]\ncase inr\nn m l : ℕ\nhmn : m ≤ n\n⊢ n ≤ l ∧ l < n ↔ n ≤ l ∧ l < m\n[PROOFSTEP]\nexact and_congr_right fun hnl => Iff.intro (fun hln => (not_le_of_gt hln hnl).elim) fun hlm => lt_of_lt_of_le hlm hmn\n[GOAL]\nn m : ℕ\nh : m ≤ n\n⊢ Ico n m = []\n[PROOFSTEP]\nsimp [Ico, tsub_eq_zero_iff_le.mpr h]\n[GOAL]\nn m k : ℕ\n⊢ map ((fun x x_1 => x + x_1) k) (Ico n m) = Ico (n + k) (m + k)\n[PROOFSTEP]\nrw [Ico, Ico, map_add_range', add_tsub_add_eq_tsub_right m k, add_comm n k]\n[GOAL]\nn m k : ℕ\nh₁ : k ≤ n\n⊢ map (fun x => x - k) (Ico n m) = Ico (n - k) (m - k)\n[PROOFSTEP]\nrw [Ico, Ico, tsub_tsub_tsub_cancel_right h₁, map_sub_range' _ _ _ h₁]\n[GOAL]\nn m : ℕ\nh : Ico n m = []\n⊢ m - n = 0\n[PROOFSTEP]\nrw [← length, h, List.length]\n[GOAL]\nn m l : ℕ\nhnm : n ≤ m\nhml : m ≤ l\n⊢ Ico n m ++ Ico m l = Ico n l\n[PROOFSTEP]\ndsimp only [Ico]\n[GOAL]\nn m l : ℕ\nhnm : n ≤ m\nhml : m ≤ l\n⊢ range' n (m - n) ++ range' m (l - m) = range' n (l - n)\n[PROOFSTEP]\nconvert range'_append n (m - n) (l - m) 1 using 2\n[GOAL]\ncase h.e'_2.h.e'_6\nn m l : ℕ\nhnm : n ≤ m\nhml : m ≤ l\n⊢ range' m (l - m) = range' (n + 1 * (m - n)) (l - m)\n[PROOFSTEP]\nrw [one_mul, add_tsub_cancel_of_le hnm]\n[GOAL]\ncase h.e'_3.h.e'_2\nn m l : ℕ\nhnm : n ≤ m\nhml : m ≤ l\n⊢ l - n = l - m + (m - n)\n[PROOFSTEP]\nrw [tsub_add_tsub_cancel hml hnm]\n[GOAL]\nn m l : ℕ\n⊢ Ico n m ∩ Ico m l = []\n[PROOFSTEP]\napply eq_nil_iff_forall_not_mem.2\n[GOAL]\nn m l : ℕ\n⊢ ∀ (a : ℕ), ¬a ∈ Ico n m ∩ Ico m l\n[PROOFSTEP]\nintro a\n[GOAL]\nn m l a : ℕ\n⊢ ¬a ∈ Ico n m ∩ Ico m l\n[PROOFSTEP]\nsimp only [and_imp, not_and, not_lt, List.mem_inter_iff, List.Ico.mem]\n[GOAL]\nn m l a : ℕ\n⊢ n ≤ a → a < m → m ≤ a → l ≤ a\n[PROOFSTEP]\nintro _ h₂ h₃\n[GOAL]\nn m l a : ℕ\na✝ : n ≤ a\nh₂ : a < m\nh₃ : m ≤ a\n⊢ l ≤ a\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase h\nn m l a : ℕ\na✝ : n ≤ a\nh₂ : a < m\nh₃ : m ≤ a\n⊢ False\n[PROOFSTEP]\nexact not_lt_of_ge h₃ h₂\n[GOAL]\nn : ℕ\n⊢ Ico n (n + 1) = [n]\n[PROOFSTEP]\ndsimp [Ico]\n[GOAL]\nn : ℕ\n⊢ range' n (n + 1 - n) = [n]\n[PROOFSTEP]\nsimp [range', add_tsub_cancel_left]\n[GOAL]\nn m : ℕ\nh : n ≤ m\n⊢ Ico n (m + 1) = Ico n m ++ [m]\n[PROOFSTEP]\nrwa [← succ_singleton, append_consecutive]\n[GOAL]\ncase hml\nn m : ℕ\nh : n ≤ m\n⊢ m ≤ m + 1\n[PROOFSTEP]\nexact Nat.le_succ _\n[GOAL]\nn m : ℕ\nh : n < m\n⊢ Ico n m = n :: Ico (n + 1) m\n[PROOFSTEP]\nrw [← append_consecutive (Nat.le_succ n) h, succ_singleton]\n[GOAL]\nn m : ℕ\nh : n < m\n⊢ [n] ++ Ico (succ n) m = n :: Ico (n + 1) m\n[PROOFSTEP]\nrfl\n[GOAL]\nm : ℕ\nh : 0 < m\n⊢ Ico (m - 1) m = [m - 1]\n[PROOFSTEP]\ndsimp [Ico]\n[GOAL]\nm : ℕ\nh : 0 < m\n⊢ range' (m - 1) (m - (m - 1)) = [m - 1]\n[PROOFSTEP]\nrw [tsub_tsub_cancel_of_le (succ_le_of_lt h)]\n[GOAL]\nm : ℕ\nh : 0 < m\n⊢ range' (m - 1) (succ 0) = [m - 1]\n[PROOFSTEP]\nsimp [← Nat.one_eq_succ_zero]\n[GOAL]\nn m : ℕ\n⊢ Chain' (fun a b => b = succ a) (Ico n m)\n[PROOFSTEP]\nby_cases n < m\n[GOAL]\nn m : ℕ\n⊢ Chain' (fun a b => b = succ a) (Ico n m)\n[PROOFSTEP]\nby_cases n < m\n[GOAL]\ncase pos\nn m : ℕ\nh : n < m\n⊢ Chain' (fun a b => b = succ a) (Ico n m)\n[PROOFSTEP]\nrw [eq_cons h]\n[GOAL]\ncase pos\nn m : ℕ\nh : n < m\n⊢ Chain' (fun a b => b = succ a) (n :: Ico (n + 1) m)\n[PROOFSTEP]\nexact chain_succ_range' _ _ 1\n[GOAL]\ncase neg\nn m : ℕ\nh : ¬n < m\n⊢ Chain' (fun a b => b = succ a) (Ico n m)\n[PROOFSTEP]\nrw [eq_nil_of_le (le_of_not_gt h)]\n[GOAL]\ncase neg\nn m : ℕ\nh : ¬n < m\n⊢ Chain' (fun a b => b = succ a) []\n[PROOFSTEP]\ntrivial\n[GOAL]\nn m : ℕ\n⊢ ¬m ∈ Ico n m\n[PROOFSTEP]\nsimp\n[GOAL]\nn m l : ℕ\nhml : m ≤ l\nk : ℕ\nhk : k ∈ Ico n m\n⊢ decide (k < l) = true\n[PROOFSTEP]\nsimp only [(lt_of_lt_of_le (mem.1 hk).2 hml), decide_True]\n[GOAL]\nn m l : ℕ\nhln : l ≤ n\nk : ℕ\nhk : k ∈ Ico n m\n⊢ ¬decide (k < l) = true\n[PROOFSTEP]\nsimp only [decide_eq_true_eq, not_lt]\n[GOAL]\nn m l : ℕ\nhln : l ≤ n\nk : ℕ\nhk : k ∈ Ico n m\n⊢ l ≤ k\n[PROOFSTEP]\napply le_trans hln\n[GOAL]\nn m l : ℕ\nhln : l ≤ n\nk : ℕ\nhk : k ∈ Ico n m\n⊢ n ≤ k\n[PROOFSTEP]\nexact (mem.1 hk).1\n[GOAL]\nn m l : ℕ\nhlm : l ≤ m\n⊢ filter (fun x => decide (x < l)) (Ico n m) = Ico n l\n[PROOFSTEP]\ncases' le_total n l with hnl hln\n[GOAL]\ncase inl\nn m l : ℕ\nhlm : l ≤ m\nhnl : n ≤ l\n⊢ filter (fun x => decide (x < l)) (Ico n m) = Ico n l\n[PROOFSTEP]\nrw [← append_consecutive hnl hlm, filter_append, filter_lt_of_top_le (le_refl l), filter_lt_of_le_bot (le_refl l),\n append_nil]\n[GOAL]\ncase inr\nn m l : ℕ\nhlm : l ≤ m\nhln : l ≤ n\n⊢ filter (fun x => decide (x < l)) (Ico n m) = Ico n l\n[PROOFSTEP]\nrw [eq_nil_of_le hln, filter_lt_of_le_bot hln]\n[GOAL]\nn m l : ℕ\n⊢ filter (fun x => decide (x < l)) (Ico n m) = Ico n (min m l)\n[PROOFSTEP]\ncases' le_total m l with hml hlm\n[GOAL]\ncase inl\nn m l : ℕ\nhml : m ≤ l\n⊢ filter (fun x => decide (x < l)) (Ico n m) = Ico n (min m l)\n[PROOFSTEP]\nrw [min_eq_left hml, filter_lt_of_top_le hml]\n[GOAL]\ncase inr\nn m l : ℕ\nhlm : l ≤ m\n⊢ filter (fun x => decide (x < l)) (Ico n m) = Ico n (min m l)\n[PROOFSTEP]\nrw [min_eq_right hlm, filter_lt_of_ge hlm]\n[GOAL]\nn m l : ℕ\nhln : l ≤ n\nk : ℕ\nhk : k ∈ Ico n m\n⊢ decide (l ≤ k) = true\n[PROOFSTEP]\nrw [decide_eq_true_eq]\n[GOAL]\nn m l : ℕ\nhln : l ≤ n\nk : ℕ\nhk : k ∈ Ico n m\n⊢ l ≤ k\n[PROOFSTEP]\nexact le_trans hln (mem.1 hk).1\n[GOAL]\nn m l : ℕ\nhml : m ≤ l\nk : ℕ\nhk : k ∈ Ico n m\n⊢ ¬decide (l ≤ k) = true\n[PROOFSTEP]\nrw [decide_eq_true_eq]\n[GOAL]\nn m l : ℕ\nhml : m ≤ l\nk : ℕ\nhk : k ∈ Ico n m\n⊢ ¬l ≤ k\n[PROOFSTEP]\nexact not_le_of_gt (lt_of_lt_of_le (mem.1 hk).2 hml)\n[GOAL]\nn m l : ℕ\nhnl : n ≤ l\n⊢ filter (fun x => decide (l ≤ x)) (Ico n m) = Ico l m\n[PROOFSTEP]\ncases' le_total l m with hlm hml\n[GOAL]\ncase inl\nn m l : ℕ\nhnl : n ≤ l\nhlm : l ≤ m\n⊢ filter (fun x => decide (l ≤ x)) (Ico n m) = Ico l m\n[PROOFSTEP]\nrw [← append_consecutive hnl hlm, filter_append, filter_le_of_top_le (le_refl l), filter_le_of_le_bot (le_refl l),\n nil_append]\n[GOAL]\ncase inr\nn m l : ℕ\nhnl : n ≤ l\nhml : m ≤ l\n⊢ filter (fun x => decide (l ≤ x)) (Ico n m) = Ico l m\n[PROOFSTEP]\nrw [eq_nil_of_le hml, filter_le_of_top_le hml]\n[GOAL]\nn m l : ℕ\n⊢ filter (fun x => decide (l ≤ x)) (Ico n m) = Ico (max n l) m\n[PROOFSTEP]\ncases' le_total n l with hnl hln\n[GOAL]\ncase inl\nn m l : ℕ\nhnl : n ≤ l\n⊢ filter (fun x => decide (l ≤ x)) (Ico n m) = Ico (max n l) m\n[PROOFSTEP]\nrw [max_eq_right hnl, filter_le_of_le hnl]\n[GOAL]\ncase inr\nn m l : ℕ\nhln : l ≤ n\n⊢ filter (fun x => decide (l ≤ x)) (Ico n m) = Ico (max n l) m\n[PROOFSTEP]\nrw [max_eq_left hln, filter_le_of_le_bot hln]\n[GOAL]\nn m : ℕ\nhnm : n < m\n⊢ filter (fun x => decide (x < n + 1)) (Ico n m) = [n]\n[PROOFSTEP]\nhave r : min m (n + 1) = n + 1 := (@inf_eq_right _ _ m (n + 1)).mpr hnm\n[GOAL]\nn m : ℕ\nhnm : n < m\nr : min m (n + 1) = n + 1\n⊢ filter (fun x => decide (x < n + 1)) (Ico n m) = [n]\n[PROOFSTEP]\nsimp [filter_lt n m (n + 1), r]\n[GOAL]\nn m : ℕ\nhnm : n < m\n⊢ filter (fun x => decide (x ≤ n)) (Ico n m) = [n]\n[PROOFSTEP]\nrw [← filter_lt_of_succ_bot hnm]\n[GOAL]\nn m : ℕ\nhnm : n < m\n⊢ filter (fun x => decide (x ≤ n)) (Ico n m) = filter (fun x => decide (x < n + 1)) (Ico n m)\n[PROOFSTEP]\nexact\n filter_congr' fun _ _ => by\n rw [decide_eq_true_eq, decide_eq_true_eq]\n exact lt_succ_iff.symm\n[GOAL]\nn m : ℕ\nhnm : n < m\nx✝¹ : ℕ\nx✝ : x✝¹ ∈ Ico n m\n⊢ decide (x✝¹ ≤ n) = true ↔ decide (x✝¹ < n + 1) = true\n[PROOFSTEP]\nrw [decide_eq_true_eq, decide_eq_true_eq]\n[GOAL]\nn m : ℕ\nhnm : n < m\nx✝¹ : ℕ\nx✝ : x✝¹ ∈ Ico n m\n⊢ x✝¹ ≤ n ↔ x✝¹ < n + 1\n[PROOFSTEP]\nexact lt_succ_iff.symm\n[GOAL]\nn a b : ℕ\n⊢ n < a ∨ b ≤ n ∨ n ∈ Ico a b\n[PROOFSTEP]\nby_cases h₁ : n < a\n[GOAL]\ncase pos\nn a b : ℕ\nh₁ : n < a\n⊢ n < a ∨ b ≤ n ∨ n ∈ Ico a b\n[PROOFSTEP]\nleft\n[GOAL]\ncase pos.h\nn a b : ℕ\nh₁ : n < a\n⊢ n < a\n[PROOFSTEP]\nexact h₁\n[GOAL]\ncase neg\nn a b : ℕ\nh₁ : ¬n < a\n⊢ n < a ∨ b ≤ n ∨ n ∈ Ico a b\n[PROOFSTEP]\nright\n[GOAL]\ncase neg.h\nn a b : ℕ\nh₁ : ¬n < a\n⊢ b ≤ n ∨ n ∈ Ico a b\n[PROOFSTEP]\nby_cases h₂ : n ∈ Ico a b\n[GOAL]\ncase pos\nn a b : ℕ\nh₁ : ¬n < a\nh₂ : n ∈ Ico a b\n⊢ b ≤ n ∨ n ∈ Ico a b\n[PROOFSTEP]\nright\n[GOAL]\ncase pos.h\nn a b : ℕ\nh₁ : ¬n < a\nh₂ : n ∈ Ico a b\n⊢ n ∈ Ico a b\n[PROOFSTEP]\nexact h₂\n[GOAL]\ncase neg\nn a b : ℕ\nh₁ : ¬n < a\nh₂ : ¬n ∈ Ico a b\n⊢ b ≤ n ∨ n ∈ Ico a b\n[PROOFSTEP]\nleft\n[GOAL]\ncase neg.h\nn a b : ℕ\nh₁ : ¬n < a\nh₂ : ¬n ∈ Ico a b\n⊢ b ≤ n\n[PROOFSTEP]\nsimp only [Ico.mem, not_and, not_lt] at *\n[GOAL]\ncase neg.h\nn a b : ℕ\nh₁ : a ≤ n\nh₂ : a ≤ n → b ≤ n\n⊢ b ≤ n\n[PROOFSTEP]\nexact h₂ h₁\n", "meta": {"mathlib_filename": "Mathlib.Data.List.Intervals", "llama_tokens": 5245, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8198933183101078, "lm_q2_score": 0.6959583313396339, "lm_q1q2_score": 0.5706115856876179}} {"text": "[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝² : LinearOrderedSemifield α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : Finite ι\nx y : ι → α\nh : ∀ (i : ι), x i < y i\n⊢ ∃ ε, 0 < ε ∧ ∀ (i : ι), x i + ε < y i\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nα : Type u_1\nι : Type u_2\ninst✝² : LinearOrderedSemifield α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : Finite ι\nx y : ι → α\nh : ∀ (i : ι), x i < y i\nval✝ : Fintype ι\n⊢ ∃ ε, 0 < ε ∧ ∀ (i : ι), x i + ε < y i\n[PROOFSTEP]\ncases isEmpty_or_nonempty ι\n[GOAL]\ncase intro.inl\nα : Type u_1\nι : Type u_2\ninst✝² : LinearOrderedSemifield α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : Finite ι\nx y : ι → α\nh : ∀ (i : ι), x i < y i\nval✝ : Fintype ι\nh✝ : IsEmpty ι\n⊢ ∃ ε, 0 < ε ∧ ∀ (i : ι), x i + ε < y i\n[PROOFSTEP]\nexact ⟨1, zero_lt_one, isEmptyElim⟩\n[GOAL]\ncase intro.inr\nα : Type u_1\nι : Type u_2\ninst✝² : LinearOrderedSemifield α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : Finite ι\nx y : ι → α\nh : ∀ (i : ι), x i < y i\nval✝ : Fintype ι\nh✝ : Nonempty ι\n⊢ ∃ ε, 0 < ε ∧ ∀ (i : ι), x i + ε < y i\n[PROOFSTEP]\nchoose ε hε hxε using fun i => exists_pos_add_of_lt' (h i)\n[GOAL]\ncase intro.inr\nα : Type u_1\nι : Type u_2\ninst✝² : LinearOrderedSemifield α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : Finite ι\nx y : ι → α\nh : ∀ (i : ι), x i < y i\nval✝ : Fintype ι\nh✝ : Nonempty ι\nε : ι → α\nhε : ∀ (i : ι), 0 < ε i\nhxε : ∀ (i : ι), x i + ε i = y i\n⊢ ∃ ε, 0 < ε ∧ ∀ (i : ι), x i + ε < y i\n[PROOFSTEP]\nobtain rfl : x + ε = y := funext hxε\n[GOAL]\ncase intro.inr\nα : Type u_1\nι : Type u_2\ninst✝² : LinearOrderedSemifield α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : Finite ι\nx : ι → α\nval✝ : Fintype ι\nh✝ : Nonempty ι\nε : ι → α\nhε : ∀ (i : ι), 0 < ε i\nh : ∀ (i : ι), x i < (x + ε) i\nhxε : ∀ (i : ι), x i + ε i = (x + ε) i\n⊢ ∃ ε_1, 0 < ε_1 ∧ ∀ (i : ι), x i + ε_1 < (x + ε) i\n[PROOFSTEP]\nhave hε : 0 < Finset.univ.inf' Finset.univ_nonempty ε := (Finset.lt_inf'_iff _).2 fun i _ => hε _\n[GOAL]\ncase intro.inr\nα : Type u_1\nι : Type u_2\ninst✝² : LinearOrderedSemifield α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : Finite ι\nx : ι → α\nval✝ : Fintype ι\nh✝ : Nonempty ι\nε : ι → α\nhε✝ : ∀ (i : ι), 0 < ε i\nh : ∀ (i : ι), x i < (x + ε) i\nhxε : ∀ (i : ι), x i + ε i = (x + ε) i\nhε : 0 < Finset.inf' Finset.univ (_ : Finset.Nonempty Finset.univ) ε\n⊢ ∃ ε_1, 0 < ε_1 ∧ ∀ (i : ι), x i + ε_1 < (x + ε) i\n[PROOFSTEP]\nexact ⟨_, half_pos hε, fun i => add_lt_add_left ((half_lt_self hε).trans_le <| Finset.inf'_le _ <| Finset.mem_univ _) _⟩\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Field.Pi", "llama_tokens": 1369, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7905303236047049, "lm_q2_score": 0.7217432122827968, "lm_q1q2_score": 0.5705598951654186}} {"text": "[GOAL]\nG₀ : Type u\nM₀ : Type u_1\nM₀' : Type u_2\nG₀' : Type u_3\nR : Type u_4\ninst✝ : AddGroup R\na b : R\nh : a - b = 0\n⊢ a + -b = b + -b\n[PROOFSTEP]\nrw [← sub_eq_add_neg, h, add_neg_self]\n -- Porting note:\n -- This theorem was introduced during ad-hoc porting\n -- and hopefully can be removed again after `Mathlib.Algebra.Ring.Basic` is fully ported.\n[GOAL]\nG₀ : Type u\nM₀ : Type u_1\nM₀' : Type u_2\nG₀' : Type u_3\ninst✝¹ : MulZeroOneClass M₀\ninst✝ : Nontrivial M₀\na b : M₀\n⊢ 1 ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\nG₀ : Type u\nM₀ : Type u_1\nM₀' : Type u_2\nG₀' : Type u_3\ninst✝¹ : MulZeroOneClass M₀\ninst✝ : Nontrivial M₀\na b : M₀\nh : 1 = 0\n⊢ False\n[PROOFSTEP]\nrcases exists_pair_ne M₀ with ⟨x, y, hx⟩\n[GOAL]\ncase intro.intro\nG₀ : Type u\nM₀ : Type u_1\nM₀' : Type u_2\nG₀' : Type u_3\ninst✝¹ : MulZeroOneClass M₀\ninst✝ : Nontrivial M₀\na b : M₀\nh : 1 = 0\nx y : M₀\nhx : x ≠ y\n⊢ False\n[PROOFSTEP]\napply hx\n[GOAL]\ncase intro.intro\nG₀ : Type u\nM₀ : Type u_1\nM₀' : Type u_2\nG₀' : Type u_3\ninst✝¹ : MulZeroOneClass M₀\ninst✝ : Nontrivial M₀\na b : M₀\nh : 1 = 0\nx y : M₀\nhx : x ≠ y\n⊢ x = y\n[PROOFSTEP]\ncalc\n x = 1 * x := by rw [one_mul]\n _ = 0 := by rw [h, zero_mul]\n _ = 1 * y := by rw [h, zero_mul]\n _ = y := by rw [one_mul]\n[GOAL]\nG₀ : Type u\nM₀ : Type u_1\nM₀' : Type u_2\nG₀' : Type u_3\ninst✝¹ : MulZeroOneClass M₀\ninst✝ : Nontrivial M₀\na b : M₀\nh : 1 = 0\nx y : M₀\nhx : x ≠ y\n⊢ x = 1 * x\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\nG₀ : Type u\nM₀ : Type u_1\nM₀' : Type u_2\nG₀' : Type u_3\ninst✝¹ : MulZeroOneClass M₀\ninst✝ : Nontrivial M₀\na b : M₀\nh : 1 = 0\nx y : M₀\nhx : x ≠ y\n⊢ 1 * x = 0\n[PROOFSTEP]\nrw [h, zero_mul]\n[GOAL]\nG₀ : Type u\nM₀ : Type u_1\nM₀' : Type u_2\nG₀' : Type u_3\ninst✝¹ : MulZeroOneClass M₀\ninst✝ : Nontrivial M₀\na b : M₀\nh : 1 = 0\nx y : M₀\nhx : x ≠ y\n⊢ 0 = 1 * y\n[PROOFSTEP]\nrw [h, zero_mul]\n[GOAL]\nG₀ : Type u\nM₀ : Type u_1\nM₀' : Type u_2\nG₀' : Type u_3\ninst✝¹ : MulZeroOneClass M₀\ninst✝ : Nontrivial M₀\na b : M₀\nh : 1 = 0\nx y : M₀\nhx : x ≠ y\n⊢ 1 * y = y\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\nG₀ : Type u\nM₀ : Type u_1\nM₀' : Type u_2\nG₀' : Type u_3\ninst✝³ : MulZeroOneClass M₀\ninst✝² : Nontrivial M₀\na b : M₀\ninst✝¹ : Zero M₀'\ninst✝ : One M₀'\nf : M₀' → M₀\nzero : f 0 = 0\none : f 1 = 1\n⊢ ¬f 0 = f 1\n[PROOFSTEP]\nrw [zero, one]\n[GOAL]\nG₀ : Type u\nM₀ : Type u_1\nM₀' : Type u_2\nG₀' : Type u_3\ninst✝³ : MulZeroOneClass M₀\ninst✝² : Nontrivial M₀\na b : M₀\ninst✝¹ : Zero M₀'\ninst✝ : One M₀'\nf : M₀' → M₀\nzero : f 0 = 0\none : f 1 = 1\n⊢ ¬0 = 1\n[PROOFSTEP]\nexact zero_ne_one\n[GOAL]\nG₀ : Type u\nM₀ : Type u_1\nM₀' : Type u_2\nG₀' : Type u_3\ninst✝¹ : MulZeroClass M₀\ninst✝ : NoZeroDivisors M₀\na b : M₀\n⊢ 0 = a * b ↔ a = 0 ∨ b = 0\n[PROOFSTEP]\nrw [eq_comm, mul_eq_zero]\n[GOAL]\nG₀ : Type u\nM₀ : Type u_1\nM₀' : Type u_2\nG₀' : Type u_3\ninst✝¹ : MulZeroClass M₀\ninst✝ : NoZeroDivisors M₀\na b : M₀\n⊢ a * a = 0 ↔ a = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nG₀ : Type u\nM₀ : Type u_1\nM₀' : Type u_2\nG₀' : Type u_3\ninst✝¹ : MulZeroClass M₀\ninst✝ : NoZeroDivisors M₀\na b : M₀\n⊢ 0 = a * a ↔ a = 0\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Algebra.GroupWithZero.Defs", "llama_tokens": 1646, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8080672135527631, "lm_q2_score": 0.7057850154599562, "lm_q1q2_score": 0.5703217308100207}} {"text": "[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\n⊢ q = 0 ∨ IsPrimePow q\n[PROOFSTEP]\napply or_iff_not_imp_left.2\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\n⊢ ¬q = 0 → IsPrimePow q\n[PROOFSTEP]\nintro q_pos\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\n⊢ IsPrimePow q\n[PROOFSTEP]\nlet K := LocalRing.ResidueField R\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\n⊢ IsPrimePow q\n[PROOFSTEP]\nhaveI RM_char := ringChar.charP K\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\n⊢ IsPrimePow q\n[PROOFSTEP]\nlet r := ringChar K\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\n⊢ IsPrimePow q\n[PROOFSTEP]\nlet n := q.factorization r\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\n⊢ IsPrimePow q\n[PROOFSTEP]\ncases' CharP.char_is_prime_or_zero K r with r_prime r_zero\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\n⊢ IsPrimePow q\n[PROOFSTEP]\nlet a := q / r ^ n\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\n⊢ IsPrimePow q\n[PROOFSTEP]\nhave q_eq_a_mul_rn : q = r ^ n * a := by rw [Nat.mul_div_cancel' (Nat.ord_proj_dvd q r)]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\n⊢ q = r ^ n * a\n[PROOFSTEP]\nrw [Nat.mul_div_cancel' (Nat.ord_proj_dvd q r)]\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = r ^ n * a\n⊢ IsPrimePow q\n[PROOFSTEP]\nhave r_ne_dvd_a := Nat.not_dvd_ord_compl r_prime q_pos\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = r ^ n * a\nr_ne_dvd_a : ¬r ∣ q / r ^ ↑(Nat.factorization q) r\n⊢ IsPrimePow q\n[PROOFSTEP]\nhave rn_dvd_q : r ^ n ∣ q := ⟨a, q_eq_a_mul_rn⟩\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = r ^ n * a\nr_ne_dvd_a : ¬r ∣ q / r ^ ↑(Nat.factorization q) r\nrn_dvd_q : r ^ n ∣ q\n⊢ IsPrimePow q\n[PROOFSTEP]\nrw [mul_comm] at q_eq_a_mul_rn \n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = a * r ^ n\nr_ne_dvd_a : ¬r ∣ q / r ^ ↑(Nat.factorization q) r\nrn_dvd_q : r ^ n ∣ q\n⊢ IsPrimePow q\n[PROOFSTEP]\nhave a_unit : IsUnit (a : R) := by\n by_contra g\n rw [← mem_nonunits_iff] at g \n rw [← LocalRing.mem_maximalIdeal] at g \n have a_cast_zero := Ideal.Quotient.eq_zero_iff_mem.2 g\n rw [map_natCast] at a_cast_zero \n have r_dvd_a := (ringChar.spec K a).1 a_cast_zero\n exact absurd r_dvd_a r_ne_dvd_a\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = a * r ^ n\nr_ne_dvd_a : ¬r ∣ q / r ^ ↑(Nat.factorization q) r\nrn_dvd_q : r ^ n ∣ q\n⊢ IsUnit ↑a\n[PROOFSTEP]\nby_contra g\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = a * r ^ n\nr_ne_dvd_a : ¬r ∣ q / r ^ ↑(Nat.factorization q) r\nrn_dvd_q : r ^ n ∣ q\ng : ¬IsUnit ↑a\n⊢ False\n[PROOFSTEP]\nrw [← mem_nonunits_iff] at g \n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = a * r ^ n\nr_ne_dvd_a : ¬r ∣ q / r ^ ↑(Nat.factorization q) r\nrn_dvd_q : r ^ n ∣ q\ng : ↑a ∈ nonunits R\n⊢ False\n[PROOFSTEP]\nrw [← LocalRing.mem_maximalIdeal] at g \n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = a * r ^ n\nr_ne_dvd_a : ¬r ∣ q / r ^ ↑(Nat.factorization q) r\nrn_dvd_q : r ^ n ∣ q\ng✝ : ↑a ∈ nonunits R\ng : ↑a ∈ LocalRing.maximalIdeal R\n⊢ False\n[PROOFSTEP]\nhave a_cast_zero := Ideal.Quotient.eq_zero_iff_mem.2 g\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = a * r ^ n\nr_ne_dvd_a : ¬r ∣ q / r ^ ↑(Nat.factorization q) r\nrn_dvd_q : r ^ n ∣ q\ng✝ : ↑a ∈ nonunits R\ng : ↑a ∈ LocalRing.maximalIdeal R\na_cast_zero : ↑(Ideal.Quotient.mk (LocalRing.maximalIdeal R)) ↑a = 0\n⊢ False\n[PROOFSTEP]\nrw [map_natCast] at a_cast_zero \n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = a * r ^ n\nr_ne_dvd_a : ¬r ∣ q / r ^ ↑(Nat.factorization q) r\nrn_dvd_q : r ^ n ∣ q\ng✝ : ↑a ∈ nonunits R\ng : ↑a ∈ LocalRing.maximalIdeal R\na_cast_zero : ↑a = 0\n⊢ False\n[PROOFSTEP]\nhave r_dvd_a := (ringChar.spec K a).1 a_cast_zero\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = a * r ^ n\nr_ne_dvd_a : ¬r ∣ q / r ^ ↑(Nat.factorization q) r\nrn_dvd_q : r ^ n ∣ q\ng✝ : ↑a ∈ nonunits R\ng : ↑a ∈ LocalRing.maximalIdeal R\na_cast_zero : ↑a = 0\nr_dvd_a : ringChar K ∣ a\n⊢ False\n[PROOFSTEP]\nexact absurd r_dvd_a r_ne_dvd_a\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = a * r ^ n\nr_ne_dvd_a : ¬r ∣ q / r ^ ↑(Nat.factorization q) r\nrn_dvd_q : r ^ n ∣ q\na_unit : IsUnit ↑a\n⊢ IsPrimePow q\n[PROOFSTEP]\ncases' a_unit.exists_left_inv with a_inv h_inv_mul_a\n[GOAL]\ncase inl.intro\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = a * r ^ n\nr_ne_dvd_a : ¬r ∣ q / r ^ ↑(Nat.factorization q) r\nrn_dvd_q : r ^ n ∣ q\na_unit : IsUnit ↑a\na_inv : R\nh_inv_mul_a : a_inv * ↑a = 1\n⊢ IsPrimePow q\n[PROOFSTEP]\nhave rn_cast_zero : ↑(r ^ n) = (0 : R) :=\n by\n rw [← @mul_one R _ (r ^ n), mul_comm, ← Classical.choose_spec a_unit.exists_left_inv, mul_assoc, ← Nat.cast_mul, ←\n q_eq_a_mul_rn, CharP.cast_eq_zero R q]\n simp\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = a * r ^ n\nr_ne_dvd_a : ¬r ∣ q / r ^ ↑(Nat.factorization q) r\nrn_dvd_q : r ^ n ∣ q\na_unit : IsUnit ↑a\na_inv : R\nh_inv_mul_a : a_inv * ↑a = 1\n⊢ ↑(r ^ n) = 0\n[PROOFSTEP]\nrw [← @mul_one R _ (r ^ n), mul_comm, ← Classical.choose_spec a_unit.exists_left_inv, mul_assoc, ← Nat.cast_mul, ←\n q_eq_a_mul_rn, CharP.cast_eq_zero R q]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = a * r ^ n\nr_ne_dvd_a : ¬r ∣ q / r ^ ↑(Nat.factorization q) r\nrn_dvd_q : r ^ n ∣ q\na_unit : IsUnit ↑a\na_inv : R\nh_inv_mul_a : a_inv * ↑a = 1\n⊢ Classical.choose (_ : ∃ b, b * ↑a = 1) * 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl.intro\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = a * r ^ n\nr_ne_dvd_a : ¬r ∣ q / r ^ ↑(Nat.factorization q) r\nrn_dvd_q : r ^ n ∣ q\na_unit : IsUnit ↑a\na_inv : R\nh_inv_mul_a : a_inv * ↑a = 1\nrn_cast_zero : ↑(r ^ n) = 0\n⊢ IsPrimePow q\n[PROOFSTEP]\nhave q_eq_rn := Nat.dvd_antisymm ((CharP.cast_eq_zero_iff R q (r ^ n)).mp rn_cast_zero) rn_dvd_q\n[GOAL]\ncase inl.intro\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = a * r ^ n\nr_ne_dvd_a : ¬r ∣ q / r ^ ↑(Nat.factorization q) r\nrn_dvd_q : r ^ n ∣ q\na_unit : IsUnit ↑a\na_inv : R\nh_inv_mul_a : a_inv * ↑a = 1\nrn_cast_zero : ↑(r ^ n) = 0\nq_eq_rn : q = r ^ n\n⊢ IsPrimePow q\n[PROOFSTEP]\nhave n_pos : n ≠ 0 := fun n_zero =>\n absurd (by simpa [n_zero] using q_eq_rn)\n (CharP.char_ne_one R q)\n -- Definition of prime power: `∃ r n, Prime r ∧ 0 < n ∧ r ^ n = q`.\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = a * r ^ n\nr_ne_dvd_a : ¬r ∣ q / r ^ ↑(Nat.factorization q) r\nrn_dvd_q : r ^ n ∣ q\na_unit : IsUnit ↑a\na_inv : R\nh_inv_mul_a : a_inv * ↑a = 1\nrn_cast_zero : ↑(r ^ n) = 0\nq_eq_rn : q = r ^ n\nn_zero : n = 0\n⊢ q = 1\n[PROOFSTEP]\nsimpa [n_zero] using q_eq_rn\n[GOAL]\ncase inl.intro\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_prime : Nat.Prime r\na : ℕ := q / r ^ n\nq_eq_a_mul_rn : q = a * r ^ n\nr_ne_dvd_a : ¬r ∣ q / r ^ ↑(Nat.factorization q) r\nrn_dvd_q : r ^ n ∣ q\na_unit : IsUnit ↑a\na_inv : R\nh_inv_mul_a : a_inv * ↑a = 1\nrn_cast_zero : ↑(r ^ n) = 0\nq_eq_rn : q = r ^ n\nn_pos : n ≠ 0\n⊢ IsPrimePow q\n[PROOFSTEP]\nexact ⟨r, ⟨n, ⟨r_prime.prime, ⟨pos_iff_ne_zero.mpr n_pos, q_eq_rn.symm⟩⟩⟩⟩\n[GOAL]\ncase inr\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_zero : r = 0\n⊢ IsPrimePow q\n[PROOFSTEP]\nhaveI K_char_p_0 := ringChar.of_eq r_zero\n[GOAL]\ncase inr\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_zero : r = 0\nK_char_p_0 : CharP K 0\n⊢ IsPrimePow q\n[PROOFSTEP]\nhaveI K_char_zero : CharZero K := CharP.charP_to_charZero K\n[GOAL]\ncase inr\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_zero : r = 0\nK_char_p_0 : CharP K 0\nK_char_zero : CharZero K\n⊢ IsPrimePow q\n[PROOFSTEP]\nhaveI R_char_zero :=\n RingHom.charZero\n (LocalRing.residue R)\n -- Finally, `r = 0` would lead to a contradiction:\n[GOAL]\ncase inr\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_zero : r = 0\nK_char_p_0 : CharP K 0\nK_char_zero : CharZero K\nR_char_zero : CharZero R\n⊢ IsPrimePow q\n[PROOFSTEP]\nhave q_zero := CharP.eq R char_R_q (CharP.ofCharZero R)\n[GOAL]\ncase inr\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : LocalRing R\nq : ℕ\nchar_R_q : CharP R q\nq_pos : ¬q = 0\nK : Type u_1 := LocalRing.ResidueField R\nRM_char : CharP K (ringChar K)\nr : ℕ := ringChar K\nn : (fun x => ℕ) r := ↑(Nat.factorization q) r\nr_zero : r = 0\nK_char_p_0 : CharP K 0\nK_char_zero : CharZero K\nR_char_zero : CharZero R\nq_zero : q = 0\n⊢ IsPrimePow q\n[PROOFSTEP]\nexact absurd q_zero q_pos\n", "meta": {"mathlib_filename": "Mathlib.Algebra.CharP.LocalRing", "llama_tokens": 7824, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8354835452961425, "lm_q2_score": 0.6825737214979746, "lm_q1q2_score": 0.5702791127631096}} {"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : LinearOrder α\ninst✝³ : TopologicalSpace γ\na b c : α\nh : a ≤ b\ninst✝² : TopologicalSpace α\ninst✝¹ : OrderTopology α\ninst✝ : TopologicalSpace β\ns : Set ↑(Icc a b)\nhs : IsOpen (projIcc a b h ⁻¹' s)\n⊢ Subtype.val ⁻¹' (projIcc a b h ⁻¹' s) = s\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : LinearOrder α\ninst✝³ : TopologicalSpace γ\na b c : α\nh : a ≤ b\ninst✝² : TopologicalSpace α\ninst✝¹ : OrderTopology α\ninst✝ : TopologicalSpace β\ns : Set ↑(Icc a b)\nhs : IsOpen (projIcc a b h ⁻¹' s)\nx✝ : { x // x ∈ Icc a b }\n⊢ x✝ ∈ Subtype.val ⁻¹' (projIcc a b h ⁻¹' s) ↔ x✝ ∈ s\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Order.ProjIcc", "llama_tokens": 349, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8354835330070839, "lm_q2_score": 0.6825737279551494, "lm_q1q2_score": 0.5702791097697844}} {"text": "[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y : V\n⊢ affineSegment R x y = segment R x y\n[PROOFSTEP]\nrw [segment_eq_image_lineMap, affineSegment]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y : P\n⊢ affineSegment R x y = affineSegment R y x\n[PROOFSTEP]\nrefine' Set.ext fun z => _\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\n⊢ z ∈ affineSegment R x y ↔ z ∈ affineSegment R y x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\n⊢ z ∈ affineSegment R x y → z ∈ affineSegment R y x\n[PROOFSTEP]\nrintro ⟨t, ht, hxy⟩\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nt : R\nht : t ∈ Set.Icc 0 1\nhxy : ↑(lineMap x y) t = z\n⊢ z ∈ affineSegment R y x\n[PROOFSTEP]\nrefine' ⟨1 - t, _, _⟩\n[GOAL]\ncase mp.intro.intro.refine'_1\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nt : R\nht : t ∈ Set.Icc 0 1\nhxy : ↑(lineMap x y) t = z\n⊢ 1 - t ∈ Set.Icc 0 1\n[PROOFSTEP]\nrwa [Set.sub_mem_Icc_iff_right, sub_self, sub_zero]\n[GOAL]\ncase mp.intro.intro.refine'_2\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nt : R\nht : t ∈ Set.Icc 0 1\nhxy : ↑(lineMap x y) t = z\n⊢ ↑(lineMap y x) (1 - t) = z\n[PROOFSTEP]\nrwa [lineMap_apply_one_sub]\n[GOAL]\ncase mpr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\n⊢ z ∈ affineSegment R y x → z ∈ affineSegment R x y\n[PROOFSTEP]\nrintro ⟨t, ht, hxy⟩\n[GOAL]\ncase mpr.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nt : R\nht : t ∈ Set.Icc 0 1\nhxy : ↑(lineMap y x) t = z\n⊢ z ∈ affineSegment R x y\n[PROOFSTEP]\nrefine' ⟨1 - t, _, _⟩\n[GOAL]\ncase mpr.intro.intro.refine'_1\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nt : R\nht : t ∈ Set.Icc 0 1\nhxy : ↑(lineMap y x) t = z\n⊢ 1 - t ∈ Set.Icc 0 1\n[PROOFSTEP]\nrwa [Set.sub_mem_Icc_iff_right, sub_self, sub_zero]\n[GOAL]\ncase mpr.intro.intro.refine'_2\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nt : R\nht : t ∈ Set.Icc 0 1\nhxy : ↑(lineMap y x) t = z\n⊢ ↑(lineMap x y) (1 - t) = z\n[PROOFSTEP]\nrwa [lineMap_apply_one_sub]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx : P\n⊢ affineSegment R x x = {x}\n[PROOFSTEP]\nrw [affineSegment]\n -- Note: when adding \"simp made no progress\" in lean4#2336,\n -- had to change `lineMap_same` to `lineMap_same _`. Not sure why?\n -- porting note: added `_ _` and `Function.const`\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx : P\n⊢ ↑(lineMap x x) '' Set.Icc 0 1 = {x}\n[PROOFSTEP]\nsimp_rw [lineMap_same _, AffineMap.coe_const _ _, Function.const, (Set.nonempty_Icc.mpr zero_le_one).image_const]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nf : P →ᵃ[R] P'\nx y : P\n⊢ ↑f '' affineSegment R x y = affineSegment R (↑f x) (↑f y)\n[PROOFSTEP]\nrw [affineSegment, affineSegment, Set.image_image, ← comp_lineMap]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nf : P →ᵃ[R] P'\nx y : P\n⊢ (fun x_1 => ↑f (↑(lineMap x y) x_1)) '' Set.Icc 0 1 = ↑(comp f (lineMap x y)) '' Set.Icc 0 1\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nv : V\n⊢ v +ᵥ z ∈ affineSegment R (v +ᵥ x) (v +ᵥ y) ↔ z ∈ affineSegment R x y\n[PROOFSTEP]\nrw [← affineSegment_const_vadd_image, (AddAction.injective v).mem_set_image]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : V\np : P\n⊢ z +ᵥ p ∈ affineSegment R (x +ᵥ p) (y +ᵥ p) ↔ z ∈ affineSegment R x y\n[PROOFSTEP]\nrw [← affineSegment_vadd_const_image, (vadd_right_injective p).mem_set_image]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z p : P\n⊢ p -ᵥ z ∈ affineSegment R (p -ᵥ x) (p -ᵥ y) ↔ z ∈ affineSegment R x y\n[PROOFSTEP]\nrw [← affineSegment_const_vsub_image, (vsub_right_injective p).mem_set_image]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z p : P\n⊢ z -ᵥ p ∈ affineSegment R (x -ᵥ p) (y -ᵥ p) ↔ z ∈ affineSegment R x y\n[PROOFSTEP]\nrw [← affineSegment_vsub_const_image, (vsub_left_injective p).mem_set_image]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nh : Wbtw R x y z\nf : P →ᵃ[R] P'\n⊢ Wbtw R (↑f x) (↑f y) (↑f z)\n[PROOFSTEP]\nrw [Wbtw, ← affineSegment_image]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nh : Wbtw R x y z\nf : P →ᵃ[R] P'\n⊢ ↑f y ∈ ↑f '' affineSegment R x z\n[PROOFSTEP]\nexact Set.mem_image_of_mem _ h\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nf : P →ᵃ[R] P'\nhf : Injective ↑f\n⊢ Wbtw R (↑f x) (↑f y) (↑f z) ↔ Wbtw R x y z\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => h.map _⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nf : P →ᵃ[R] P'\nhf : Injective ↑f\nh : Wbtw R (↑f x) (↑f y) (↑f z)\n⊢ Wbtw R x y z\n[PROOFSTEP]\nrwa [Wbtw, ← affineSegment_image, hf.mem_set_image] at h \n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nf : P →ᵃ[R] P'\nhf : Injective ↑f\n⊢ Sbtw R (↑f x) (↑f y) (↑f z) ↔ Sbtw R x y z\n[PROOFSTEP]\nsimp_rw [Sbtw, hf.wbtw_map_iff, hf.ne_iff]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nf : P ≃ᵃ[R] P'\n⊢ Wbtw R (↑f x) (↑f y) (↑f z) ↔ Wbtw R x y z\n[PROOFSTEP]\nrefine' Function.Injective.wbtw_map_iff (_ : Function.Injective f.toAffineMap)\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nf : P ≃ᵃ[R] P'\n⊢ Function.Injective ↑↑f\n[PROOFSTEP]\nexact f.injective\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nf : P ≃ᵃ[R] P'\n⊢ Sbtw R (↑f x) (↑f y) (↑f z) ↔ Sbtw R x y z\n[PROOFSTEP]\nrefine' Function.Injective.sbtw_map_iff (_ : Function.Injective f.toAffineMap)\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nf : P ≃ᵃ[R] P'\n⊢ Function.Injective ↑↑f\n[PROOFSTEP]\nexact f.injective\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nv : V\n⊢ Sbtw R (v +ᵥ x) (v +ᵥ y) (v +ᵥ z) ↔ Sbtw R x y z\n[PROOFSTEP]\nrw [Sbtw, Sbtw, wbtw_const_vadd_iff, (AddAction.injective v).ne_iff, (AddAction.injective v).ne_iff]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : V\np : P\n⊢ Sbtw R (x +ᵥ p) (y +ᵥ p) (z +ᵥ p) ↔ Sbtw R x y z\n[PROOFSTEP]\nrw [Sbtw, Sbtw, wbtw_vadd_const_iff, (vadd_right_injective p).ne_iff, (vadd_right_injective p).ne_iff]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z p : P\n⊢ Sbtw R (p -ᵥ x) (p -ᵥ y) (p -ᵥ z) ↔ Sbtw R x y z\n[PROOFSTEP]\nrw [Sbtw, Sbtw, wbtw_const_vsub_iff, (vsub_right_injective p).ne_iff, (vsub_right_injective p).ne_iff]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z p : P\n⊢ Sbtw R (x -ᵥ p) (y -ᵥ p) (z -ᵥ p) ↔ Sbtw R x y z\n[PROOFSTEP]\nrw [Sbtw, Sbtw, wbtw_vsub_const_iff, (vsub_left_injective p).ne_iff, (vsub_left_injective p).ne_iff]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nh : Sbtw R x y z\n⊢ y ∈ ↑(lineMap x z) '' Set.Ioo 0 1\n[PROOFSTEP]\nrcases h with ⟨⟨t, ht, rfl⟩, hyx, hyz⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx z : P\nt : R\nht : t ∈ Set.Icc 0 1\nhyx : ↑(lineMap x z) t ≠ x\nhyz : ↑(lineMap x z) t ≠ z\n⊢ ↑(lineMap x z) t ∈ ↑(lineMap x z) '' Set.Ioo 0 1\n[PROOFSTEP]\nrcases Set.eq_endpoints_or_mem_Ioo_of_mem_Icc ht with (rfl | rfl | ho)\n[GOAL]\ncase intro.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx z : P\nht : 0 ∈ Set.Icc 0 1\nhyx : ↑(lineMap x z) 0 ≠ x\nhyz : ↑(lineMap x z) 0 ≠ z\n⊢ ↑(lineMap x z) 0 ∈ ↑(lineMap x z) '' Set.Ioo 0 1\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase intro.intro.intro.intro.inl.h\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx z : P\nht : 0 ∈ Set.Icc 0 1\nhyx : ↑(lineMap x z) 0 ≠ x\nhyz : ↑(lineMap x z) 0 ≠ z\n⊢ False\n[PROOFSTEP]\nexact hyx (lineMap_apply_zero _ _)\n[GOAL]\ncase intro.intro.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx z : P\nht : 1 ∈ Set.Icc 0 1\nhyx : ↑(lineMap x z) 1 ≠ x\nhyz : ↑(lineMap x z) 1 ≠ z\n⊢ ↑(lineMap x z) 1 ∈ ↑(lineMap x z) '' Set.Ioo 0 1\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase intro.intro.intro.intro.inr.inl.h\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx z : P\nht : 1 ∈ Set.Icc 0 1\nhyx : ↑(lineMap x z) 1 ≠ x\nhyz : ↑(lineMap x z) 1 ≠ z\n⊢ False\n[PROOFSTEP]\nexact hyz (lineMap_apply_one _ _)\n[GOAL]\ncase intro.intro.intro.intro.inr.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx z : P\nt : R\nht : t ∈ Set.Icc 0 1\nhyx : ↑(lineMap x z) t ≠ x\nhyz : ↑(lineMap x z) t ≠ z\nho : t ∈ Set.Ioo 0 1\n⊢ ↑(lineMap x z) t ∈ ↑(lineMap x z) '' Set.Ioo 0 1\n[PROOFSTEP]\nexact ⟨t, ho, rfl⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nh : Wbtw R x y z\n⊢ y ∈ affineSpan R {x, z}\n[PROOFSTEP]\nrcases h with ⟨r, ⟨-, rfl⟩⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx z : P\nr : R\n⊢ ↑(lineMap x z) r ∈ affineSpan R {x, z}\n[PROOFSTEP]\nexact lineMap_mem_affineSpan_pair _ _ _\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\n⊢ Wbtw R x y z ↔ Wbtw R z y x\n[PROOFSTEP]\nrw [Wbtw, Wbtw, affineSegment_comm]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\n⊢ Sbtw R x y z ↔ Sbtw R z y x\n[PROOFSTEP]\nrw [Sbtw, Sbtw, wbtw_comm, ← and_assoc, ← and_assoc, and_right_comm]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y : P\n⊢ Wbtw R x y x ↔ y = x\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y : P\nh : Wbtw R x y x\n⊢ y = x\n[PROOFSTEP]\nhave ⟨_, _, h₂⟩ := h\n[GOAL]\ncase refine'_1\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y : P\nh : Wbtw R x y x\nw✝ : R\nleft✝ : w✝ ∈ Set.Icc 0 1\nh₂ : ↑(lineMap x x) w✝ = y\n⊢ y = x\n[PROOFSTEP]\nrw [h₂.symm, lineMap_same_apply]\n[GOAL]\ncase refine'_2\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y : P\nh : y = x\n⊢ Wbtw R x y x\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase refine'_2\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y : P\nh : y = x\n⊢ Wbtw R x x x\n[PROOFSTEP]\nexact wbtw_self_left R x x\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nh : Wbtw R x y z\nhne : y ≠ x\n⊢ x ≠ z\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y : P\nhne : y ≠ x\nh : Wbtw R x y x\n⊢ False\n[PROOFSTEP]\nrw [wbtw_self_iff] at h \n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y : P\nhne : y ≠ x\nh : y = x\n⊢ False\n[PROOFSTEP]\nexact hne h\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z : P\nh : Wbtw R x y z\nhne : y ≠ z\n⊢ x ≠ z\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y : P\nh : Wbtw R x y x\nhne : y ≠ x\n⊢ False\n[PROOFSTEP]\nrw [wbtw_self_iff] at h \n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y : P\nh : y = x\nhne : y ≠ x\n⊢ False\n[PROOFSTEP]\nexact hne h\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y z : P\n⊢ Sbtw R x y z ↔ y ∈ ↑(lineMap x z) '' Set.Ioo 0 1 ∧ x ≠ z\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨h.mem_image_Ioo, h.left_ne_right⟩, fun h => _⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y z : P\nh : y ∈ ↑(lineMap x z) '' Set.Ioo 0 1 ∧ x ≠ z\n⊢ Sbtw R x y z\n[PROOFSTEP]\nrcases h with ⟨⟨t, ht, rfl⟩, hxz⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx z : P\nhxz : x ≠ z\nt : R\nht : t ∈ Set.Ioo 0 1\n⊢ Sbtw R x (↑(lineMap x z) t) z\n[PROOFSTEP]\nrefine' ⟨⟨t, Set.mem_Icc_of_Ioo ht, rfl⟩, _⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx z : P\nhxz : x ≠ z\nt : R\nht : t ∈ Set.Ioo 0 1\n⊢ ↑(lineMap x z) t ≠ x ∧ ↑(lineMap x z) t ≠ z\n[PROOFSTEP]\nrw [lineMap_apply, ← @vsub_ne_zero V, ← @vsub_ne_zero V _ _ _ _ z, vadd_vsub_assoc, vsub_self, vadd_vsub_assoc, ←\n neg_vsub_eq_vsub_rev z x, ← @neg_one_smul R, ← add_smul, ← sub_eq_add_neg]\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx z : P\nhxz : x ≠ z\nt : R\nht : t ∈ Set.Ioo 0 1\n⊢ t • (z -ᵥ x) + 0 ≠ 0 ∧ (t - 1) • (z -ᵥ x) ≠ 0\n[PROOFSTEP]\nsimp [smul_ne_zero, sub_eq_zero, ht.1.ne.symm, ht.2.ne, hxz.symm]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y z : P\n⊢ Wbtw R x y z ∧ Wbtw R y x z ↔ x = y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y z : P\n⊢ Wbtw R x y z ∧ Wbtw R y x z → x = y\n[PROOFSTEP]\nrintro ⟨hxyz, hyxz⟩\n[GOAL]\ncase mp.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y z : P\nhxyz : Wbtw R x y z\nhyxz : Wbtw R y x z\n⊢ x = y\n[PROOFSTEP]\nrcases hxyz with ⟨ty, hty, rfl⟩\n[GOAL]\ncase mp.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx z : P\nty : R\nhty : ty ∈ Set.Icc 0 1\nhyxz : Wbtw R (↑(lineMap x z) ty) x z\n⊢ x = ↑(lineMap x z) ty\n[PROOFSTEP]\nrcases hyxz with ⟨tx, htx, hx⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx z : P\nty : R\nhty : ty ∈ Set.Icc 0 1\ntx : R\nhtx : tx ∈ Set.Icc 0 1\nhx : ↑(lineMap (↑(lineMap x z) ty) z) tx = x\n⊢ x = ↑(lineMap x z) ty\n[PROOFSTEP]\nrw [lineMap_apply, lineMap_apply, ← add_vadd] at hx \n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx z : P\nty : R\nhty : ty ∈ Set.Icc 0 1\ntx : R\nhtx : tx ∈ Set.Icc 0 1\nhx : tx • (z -ᵥ (ty • (z -ᵥ x) +ᵥ x)) + ty • (z -ᵥ x) +ᵥ x = x\n⊢ x = ↑(lineMap x z) ty\n[PROOFSTEP]\nrw [← @vsub_eq_zero_iff_eq V, vadd_vsub, vsub_vadd_eq_vsub_sub, smul_sub, smul_smul, ← sub_smul, ← add_smul,\n smul_eq_zero] at hx \n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx z : P\nty : R\nhty : ty ∈ Set.Icc 0 1\ntx : R\nhtx : tx ∈ Set.Icc 0 1\nhx : tx - tx * ty + ty = 0 ∨ z -ᵥ x = 0\n⊢ x = ↑(lineMap x z) ty\n[PROOFSTEP]\nrcases hx with (h | h)\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx z : P\nty : R\nhty : ty ∈ Set.Icc 0 1\ntx : R\nhtx : tx ∈ Set.Icc 0 1\nh : tx - tx * ty + ty = 0\n⊢ x = ↑(lineMap x z) ty\n[PROOFSTEP]\nnth_rw 1 [← mul_one tx] at h \n[GOAL]\ncase mp.intro.intro.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx z : P\nty : R\nhty : ty ∈ Set.Icc 0 1\ntx : R\nhtx : tx ∈ Set.Icc 0 1\nh : tx * 1 - tx * ty + ty = 0\n⊢ x = ↑(lineMap x z) ty\n[PROOFSTEP]\nrw [← mul_sub, add_eq_zero_iff_neg_eq] at h \n[GOAL]\ncase mp.intro.intro.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx z : P\nty : R\nhty : ty ∈ Set.Icc 0 1\ntx : R\nhtx : tx ∈ Set.Icc 0 1\nh : -(tx * (1 - ty)) = ty\n⊢ x = ↑(lineMap x z) ty\n[PROOFSTEP]\nhave h' : ty = 0 := by\n refine' le_antisymm _ hty.1\n rw [← h, Left.neg_nonpos_iff]\n exact mul_nonneg htx.1 (sub_nonneg.2 hty.2)\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx z : P\nty : R\nhty : ty ∈ Set.Icc 0 1\ntx : R\nhtx : tx ∈ Set.Icc 0 1\nh : -(tx * (1 - ty)) = ty\n⊢ ty = 0\n[PROOFSTEP]\nrefine' le_antisymm _ hty.1\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx z : P\nty : R\nhty : ty ∈ Set.Icc 0 1\ntx : R\nhtx : tx ∈ Set.Icc 0 1\nh : -(tx * (1 - ty)) = ty\n⊢ ty ≤ 0\n[PROOFSTEP]\nrw [← h, Left.neg_nonpos_iff]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx z : P\nty : R\nhty : ty ∈ Set.Icc 0 1\ntx : R\nhtx : tx ∈ Set.Icc 0 1\nh : -(tx * (1 - ty)) = ty\n⊢ 0 ≤ tx * (1 - ty)\n[PROOFSTEP]\nexact mul_nonneg htx.1 (sub_nonneg.2 hty.2)\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx z : P\nty : R\nhty : ty ∈ Set.Icc 0 1\ntx : R\nhtx : tx ∈ Set.Icc 0 1\nh : -(tx * (1 - ty)) = ty\nh' : ty = 0\n⊢ x = ↑(lineMap x z) ty\n[PROOFSTEP]\nsimp [h']\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx z : P\nty : R\nhty : ty ∈ Set.Icc 0 1\ntx : R\nhtx : tx ∈ Set.Icc 0 1\nh : z -ᵥ x = 0\n⊢ x = ↑(lineMap x z) ty\n[PROOFSTEP]\nrw [vsub_eq_zero_iff_eq] at h \n[GOAL]\ncase mp.intro.intro.intro.intro.intro.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx z : P\nty : R\nhty : ty ∈ Set.Icc 0 1\ntx : R\nhtx : tx ∈ Set.Icc 0 1\nh : z = x\n⊢ x = ↑(lineMap x z) ty\n[PROOFSTEP]\nrw [h, lineMap_same_apply]\n[GOAL]\ncase mpr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y z : P\n⊢ x = y → Wbtw R x y z ∧ Wbtw R y x z\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx z : P\n⊢ Wbtw R x x z ∧ Wbtw R x x z\n[PROOFSTEP]\nexact ⟨wbtw_self_left _ _ _, wbtw_self_left _ _ _⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y z : P\n⊢ Wbtw R x y z ∧ Wbtw R x z y ↔ y = z\n[PROOFSTEP]\nrw [wbtw_comm, wbtw_comm (z := y), eq_comm]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y z : P\n⊢ Wbtw R z y x ∧ Wbtw R y z x ↔ z = y\n[PROOFSTEP]\nexact wbtw_swap_left_iff R x\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y z : P\n⊢ Wbtw R x y z ∧ Wbtw R z x y ↔ x = y\n[PROOFSTEP]\nrw [wbtw_comm, wbtw_swap_right_iff, eq_comm]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y z : P\nh : Wbtw R x y z\n⊢ Wbtw R y x z ↔ x = y\n[PROOFSTEP]\nrw [← wbtw_swap_left_iff R z, and_iff_right h]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y z : P\nh : Wbtw R x y z\n⊢ Wbtw R x z y ↔ y = z\n[PROOFSTEP]\nrw [← wbtw_swap_right_iff R x, and_iff_right h]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y z : P\nh : Wbtw R x y z\n⊢ Wbtw R z x y ↔ x = y\n[PROOFSTEP]\nrw [← wbtw_rotate_iff R x, and_iff_right h]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y : P\nr : R\n⊢ Wbtw R x (↑(lineMap x y) r) y ↔ x = y ∨ r ∈ Set.Icc 0 1\n[PROOFSTEP]\nby_cases hxy : x = y\n[GOAL]\ncase pos\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y : P\nr : R\nhxy : x = y\n⊢ Wbtw R x (↑(lineMap x y) r) y ↔ x = y ∨ r ∈ Set.Icc 0 1\n[PROOFSTEP]\nrw [hxy, lineMap_same_apply]\n[GOAL]\ncase pos\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y : P\nr : R\nhxy : x = y\n⊢ Wbtw R y y y ↔ y = y ∨ r ∈ Set.Icc 0 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y : P\nr : R\nhxy : ¬x = y\n⊢ Wbtw R x (↑(lineMap x y) r) y ↔ x = y ∨ r ∈ Set.Icc 0 1\n[PROOFSTEP]\nrw [or_iff_right hxy, Wbtw, affineSegment, (lineMap_injective R hxy).mem_set_image]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y : P\nr : R\n⊢ Sbtw R x (↑(lineMap x y) r) y ↔ x ≠ y ∧ r ∈ Set.Ioo 0 1\n[PROOFSTEP]\nrw [sbtw_iff_mem_image_Ioo_and_ne, and_comm, and_congr_right]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y : P\nr : R\n⊢ x ≠ y → (↑(lineMap x y) r ∈ ↑(lineMap x y) '' Set.Ioo 0 1 ↔ r ∈ Set.Ioo 0 1)\n[PROOFSTEP]\nintro hxy\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nx y : P\nr : R\nhxy : x ≠ y\n⊢ ↑(lineMap x y) r ∈ ↑(lineMap x y) '' Set.Ioo 0 1 ↔ r ∈ Set.Ioo 0 1\n[PROOFSTEP]\nrw [(lineMap_injective R hxy).mem_set_image]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx : R\n⊢ Wbtw R 0 x 1 ↔ x ∈ Set.Icc 0 1\n[PROOFSTEP]\nrw [Wbtw, affineSegment, Set.mem_image]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx : R\n⊢ (∃ x_1, x_1 ∈ Set.Icc 0 1 ∧ ↑(lineMap 0 1) x_1 = x) ↔ x ∈ Set.Icc 0 1\n[PROOFSTEP]\nsimp_rw [lineMap_apply_ring]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx : R\n⊢ (∃ x_1, x_1 ∈ Set.Icc 0 1 ∧ (1 - x_1) * 0 + x_1 * 1 = x) ↔ x ∈ Set.Icc 0 1\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx : R\n⊢ Wbtw R 1 x 0 ↔ x ∈ Set.Icc 0 1\n[PROOFSTEP]\nrw [wbtw_comm, wbtw_zero_one_iff]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx : R\n⊢ Sbtw R 0 x 1 ↔ x ∈ Set.Ioo 0 1\n[PROOFSTEP]\nrw [Sbtw, wbtw_zero_one_iff, Set.mem_Icc, Set.mem_Ioo]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx : R\n⊢ (0 ≤ x ∧ x ≤ 1) ∧ x ≠ 0 ∧ x ≠ 1 ↔ 0 < x ∧ x < 1\n[PROOFSTEP]\nexact ⟨fun h => ⟨h.1.1.lt_of_ne (Ne.symm h.2.1), h.1.2.lt_of_ne h.2.2⟩, fun h => ⟨⟨h.1.le, h.2.le⟩, h.1.ne', h.2.ne⟩⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx : R\n⊢ Sbtw R 1 x 0 ↔ x ∈ Set.Ioo 0 1\n[PROOFSTEP]\nrw [sbtw_comm, sbtw_zero_one_iff]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nw x y z : P\nh₁ : Wbtw R w y z\nh₂ : Wbtw R w x y\n⊢ Wbtw R w x z\n[PROOFSTEP]\nrcases h₁ with ⟨t₁, ht₁, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nw x z : P\nt₁ : R\nht₁ : t₁ ∈ Set.Icc 0 1\nh₂ : Wbtw R w x (↑(lineMap w z) t₁)\n⊢ Wbtw R w x z\n[PROOFSTEP]\nrcases h₂ with ⟨t₂, ht₂, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nw z : P\nt₁ : R\nht₁ : t₁ ∈ Set.Icc 0 1\nt₂ : R\nht₂ : t₂ ∈ Set.Icc 0 1\n⊢ Wbtw R w (↑(lineMap w (↑(lineMap w z) t₁)) t₂) z\n[PROOFSTEP]\nrefine' ⟨t₂ * t₁, ⟨mul_nonneg ht₂.1 ht₁.1, mul_le_one ht₂.2 ht₁.1 ht₁.2⟩, _⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nw z : P\nt₁ : R\nht₁ : t₁ ∈ Set.Icc 0 1\nt₂ : R\nht₂ : t₂ ∈ Set.Icc 0 1\n⊢ ↑(lineMap w z) (t₂ * t₁) = ↑(lineMap w (↑(lineMap w z) t₁)) t₂\n[PROOFSTEP]\nrw [lineMap_apply, lineMap_apply, lineMap_vsub_left, smul_smul]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nw x y z : P\nh₁ : Wbtw R w x z\nh₂ : Wbtw R x y z\n⊢ Wbtw R w y z\n[PROOFSTEP]\nrw [wbtw_comm] at *\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : OrderedRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nw x y z : P\nh₁ : Wbtw R z x w\nh₂ : Wbtw R z y x\n⊢ Wbtw R z y w\n[PROOFSTEP]\nexact h₁.trans_left h₂\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nw x y z : P\nh₁ : Wbtw R w y z\nh₂ : Sbtw R w x y\n⊢ Sbtw R w x z\n[PROOFSTEP]\nrefine' ⟨h₁.trans_left h₂.wbtw, h₂.ne_left, _⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nw x y z : P\nh₁ : Wbtw R w y z\nh₂ : Sbtw R w x y\n⊢ x ≠ z\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nw x y : P\nh₂ : Sbtw R w x y\nh₁ : Wbtw R w y x\n⊢ False\n[PROOFSTEP]\nexact h₂.right_ne ((wbtw_swap_right_iff R w).1 ⟨h₁, h₂.wbtw⟩)\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nw x y z : P\nh₁ : Wbtw R w x z\nh₂ : Sbtw R x y z\n⊢ Sbtw R w y z\n[PROOFSTEP]\nrw [wbtw_comm] at *\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nw x y z : P\nh₁ : Wbtw R z x w\nh₂ : Sbtw R x y z\n⊢ Sbtw R w y z\n[PROOFSTEP]\nrw [sbtw_comm] at *\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nw x y z : P\nh₁ : Wbtw R z x w\nh₂ : Sbtw R z y x\n⊢ Sbtw R z y w\n[PROOFSTEP]\nexact h₁.trans_sbtw_left h₂\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nw x y z : P\nh₁ : Wbtw R w y z\nh₂ : Wbtw R w x y\nh : y ≠ z\n⊢ x ≠ z\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nw x y : P\nh₂ : Wbtw R w x y\nh₁ : Wbtw R w y x\nh : y ≠ x\n⊢ False\n[PROOFSTEP]\nexact h (h₁.swap_right_iff.1 h₂)\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nw x y z : P\nh₁ : Wbtw R w x z\nh₂ : Wbtw R x y z\nh : w ≠ x\n⊢ w ≠ y\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : OrderedRing R\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module R V\ninst✝⁴ : AddTorsor V P\ninst✝³ : AddCommGroup V'\ninst✝² : Module R V'\ninst✝¹ : AddTorsor V' P'\ninst✝ : NoZeroSMulDivisors R V\nw x z : P\nh₁ : Wbtw R w x z\nh : w ≠ x\nh₂ : Wbtw R x w z\n⊢ False\n[PROOFSTEP]\nexact h (h₁.swap_left_iff.1 h₂)\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁸ : OrderedRing R\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module R V\ninst✝⁵ : AddTorsor V P\ninst✝⁴ : AddCommGroup V'\ninst✝³ : Module R V'\ninst✝² : AddTorsor V' P'\ninst✝¹ : NoZeroDivisors R\ninst✝ : NoZeroSMulDivisors R V\nι : Type u_6\np : ι → P\nha : AffineIndependent R p\nw w₁ w₂ : ι → R\ns : Finset ι\nhw : ∑ i in s, w i = 1\nhw₁ : ∑ i in s, w₁ i = 1\nhw₂ : ∑ i in s, w₂ i = 1\nh :\n ↑(Finset.affineCombination R s p) w ∈\n affineSpan R {↑(Finset.affineCombination R s p) w₁, ↑(Finset.affineCombination R s p) w₂}\ni : ι\nhis : i ∈ s\nhs : Sbtw R (w₁ i) (w i) (w₂ i)\n⊢ Sbtw R (↑(Finset.affineCombination R s p) w₁) (↑(Finset.affineCombination R s p) w)\n (↑(Finset.affineCombination R s p) w₂)\n[PROOFSTEP]\nrw [affineCombination_mem_affineSpan_pair ha hw hw₁ hw₂] at h \n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁸ : OrderedRing R\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module R V\ninst✝⁵ : AddTorsor V P\ninst✝⁴ : AddCommGroup V'\ninst✝³ : Module R V'\ninst✝² : AddTorsor V' P'\ninst✝¹ : NoZeroDivisors R\ninst✝ : NoZeroSMulDivisors R V\nι : Type u_6\np : ι → P\nha : AffineIndependent R p\nw w₁ w₂ : ι → R\ns : Finset ι\nhw : ∑ i in s, w i = 1\nhw₁ : ∑ i in s, w₁ i = 1\nhw₂ : ∑ i in s, w₂ i = 1\nh : ∃ r, ∀ (i : ι), i ∈ s → w i = r * (w₂ i - w₁ i) + w₁ i\ni : ι\nhis : i ∈ s\nhs : Sbtw R (w₁ i) (w i) (w₂ i)\n⊢ Sbtw R (↑(Finset.affineCombination R s p) w₁) (↑(Finset.affineCombination R s p) w)\n (↑(Finset.affineCombination R s p) w₂)\n[PROOFSTEP]\nrcases h with ⟨r, hr⟩\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁸ : OrderedRing R\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module R V\ninst✝⁵ : AddTorsor V P\ninst✝⁴ : AddCommGroup V'\ninst✝³ : Module R V'\ninst✝² : AddTorsor V' P'\ninst✝¹ : NoZeroDivisors R\ninst✝ : NoZeroSMulDivisors R V\nι : Type u_6\np : ι → P\nha : AffineIndependent R p\nw w₁ w₂ : ι → R\ns : Finset ι\nhw : ∑ i in s, w i = 1\nhw₁ : ∑ i in s, w₁ i = 1\nhw₂ : ∑ i in s, w₂ i = 1\ni : ι\nhis : i ∈ s\nhs : Sbtw R (w₁ i) (w i) (w₂ i)\nr : R\nhr : ∀ (i : ι), i ∈ s → w i = r * (w₂ i - w₁ i) + w₁ i\n⊢ Sbtw R (↑(Finset.affineCombination R s p) w₁) (↑(Finset.affineCombination R s p) w)\n (↑(Finset.affineCombination R s p) w₂)\n[PROOFSTEP]\nrw [hr i his, sbtw_mul_sub_add_iff] at hs \n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁸ : OrderedRing R\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module R V\ninst✝⁵ : AddTorsor V P\ninst✝⁴ : AddCommGroup V'\ninst✝³ : Module R V'\ninst✝² : AddTorsor V' P'\ninst✝¹ : NoZeroDivisors R\ninst✝ : NoZeroSMulDivisors R V\nι : Type u_6\np : ι → P\nha : AffineIndependent R p\nw w₁ w₂ : ι → R\ns : Finset ι\nhw : ∑ i in s, w i = 1\nhw₁ : ∑ i in s, w₁ i = 1\nhw₂ : ∑ i in s, w₂ i = 1\ni : ι\nhis : i ∈ s\nr : R\nhs : w₁ i ≠ w₂ i ∧ r ∈ Set.Ioo 0 1\nhr : ∀ (i : ι), i ∈ s → w i = r * (w₂ i - w₁ i) + w₁ i\n⊢ Sbtw R (↑(Finset.affineCombination R s p) w₁) (↑(Finset.affineCombination R s p) w)\n (↑(Finset.affineCombination R s p) w₂)\n[PROOFSTEP]\nchange ∀ i ∈ s, w i = (r • (w₂ - w₁) + w₁) i at hr \n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁸ : OrderedRing R\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module R V\ninst✝⁵ : AddTorsor V P\ninst✝⁴ : AddCommGroup V'\ninst✝³ : Module R V'\ninst✝² : AddTorsor V' P'\ninst✝¹ : NoZeroDivisors R\ninst✝ : NoZeroSMulDivisors R V\nι : Type u_6\np : ι → P\nha : AffineIndependent R p\nw w₁ w₂ : ι → R\ns : Finset ι\nhw : ∑ i in s, w i = 1\nhw₁ : ∑ i in s, w₁ i = 1\nhw₂ : ∑ i in s, w₂ i = 1\ni : ι\nhis : i ∈ s\nr : R\nhs : w₁ i ≠ w₂ i ∧ r ∈ Set.Ioo 0 1\nhr : ∀ (i : ι), i ∈ s → w i = (r • (w₂ - w₁) + w₁) i\n⊢ Sbtw R (↑(Finset.affineCombination R s p) w₁) (↑(Finset.affineCombination R s p) w)\n (↑(Finset.affineCombination R s p) w₂)\n[PROOFSTEP]\nrw [s.affineCombination_congr hr fun _ _ => rfl]\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁸ : OrderedRing R\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module R V\ninst✝⁵ : AddTorsor V P\ninst✝⁴ : AddCommGroup V'\ninst✝³ : Module R V'\ninst✝² : AddTorsor V' P'\ninst✝¹ : NoZeroDivisors R\ninst✝ : NoZeroSMulDivisors R V\nι : Type u_6\np : ι → P\nha : AffineIndependent R p\nw w₁ w₂ : ι → R\ns : Finset ι\nhw : ∑ i in s, w i = 1\nhw₁ : ∑ i in s, w₁ i = 1\nhw₂ : ∑ i in s, w₂ i = 1\ni : ι\nhis : i ∈ s\nr : R\nhs : w₁ i ≠ w₂ i ∧ r ∈ Set.Ioo 0 1\nhr : ∀ (i : ι), i ∈ s → w i = (r • (w₂ - w₁) + w₁) i\n⊢ Sbtw R (↑(Finset.affineCombination R s p) w₁)\n (↑(Finset.affineCombination R s fun x => p x) fun i => (r • (w₂ - w₁) + w₁) i)\n (↑(Finset.affineCombination R s p) w₂)\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁸ : OrderedRing R\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module R V\ninst✝⁵ : AddTorsor V P\ninst✝⁴ : AddCommGroup V'\ninst✝³ : Module R V'\ninst✝² : AddTorsor V' P'\ninst✝¹ : NoZeroDivisors R\ninst✝ : NoZeroSMulDivisors R V\nι : Type u_6\np : ι → P\nha : AffineIndependent R p\nw w₁ w₂ : ι → R\ns : Finset ι\nhw : ∑ i in s, w i = 1\nhw₁ : ∑ i in s, w₁ i = 1\nhw₂ : ∑ i in s, w₂ i = 1\ni : ι\nhis : i ∈ s\nr : R\nhs : w₁ i ≠ w₂ i ∧ r ∈ Set.Ioo 0 1\nhr : ∀ (i : ι), i ∈ s → w i = (r • (w₂ - w₁) + w₁) i\n⊢ Sbtw R (↑(Finset.affineCombination R s p) w₁)\n (↑(Finset.affineCombination R s fun x => p x) fun i => (r • (w₂ - w₁) + w₁) i)\n (↑(Finset.affineCombination R s p) w₂)\n[PROOFSTEP]\nrw [← s.weightedVSub_vadd_affineCombination, s.weightedVSub_const_smul, ← s.affineCombination_vsub, ← lineMap_apply,\n sbtw_lineMap_iff, and_iff_left hs.2, ← @vsub_ne_zero V, s.affineCombination_vsub]\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁸ : OrderedRing R\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module R V\ninst✝⁵ : AddTorsor V P\ninst✝⁴ : AddCommGroup V'\ninst✝³ : Module R V'\ninst✝² : AddTorsor V' P'\ninst✝¹ : NoZeroDivisors R\ninst✝ : NoZeroSMulDivisors R V\nι : Type u_6\np : ι → P\nha : AffineIndependent R p\nw w₁ w₂ : ι → R\ns : Finset ι\nhw : ∑ i in s, w i = 1\nhw₁ : ∑ i in s, w₁ i = 1\nhw₂ : ∑ i in s, w₂ i = 1\ni : ι\nhis : i ∈ s\nr : R\nhs : w₁ i ≠ w₂ i ∧ r ∈ Set.Ioo 0 1\nhr : ∀ (i : ι), i ∈ s → w i = (r • (w₂ - w₁) + w₁) i\n⊢ ↑(Finset.weightedVSub s p) (w₁ - w₂) ≠ 0\n[PROOFSTEP]\nintro hz\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁸ : OrderedRing R\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module R V\ninst✝⁵ : AddTorsor V P\ninst✝⁴ : AddCommGroup V'\ninst✝³ : Module R V'\ninst✝² : AddTorsor V' P'\ninst✝¹ : NoZeroDivisors R\ninst✝ : NoZeroSMulDivisors R V\nι : Type u_6\np : ι → P\nha : AffineIndependent R p\nw w₁ w₂ : ι → R\ns : Finset ι\nhw : ∑ i in s, w i = 1\nhw₁ : ∑ i in s, w₁ i = 1\nhw₂ : ∑ i in s, w₂ i = 1\ni : ι\nhis : i ∈ s\nr : R\nhs : w₁ i ≠ w₂ i ∧ r ∈ Set.Ioo 0 1\nhr : ∀ (i : ι), i ∈ s → w i = (r • (w₂ - w₁) + w₁) i\nhz : ↑(Finset.weightedVSub s p) (w₁ - w₂) = 0\n⊢ False\n[PROOFSTEP]\nhave hw₁w₂ : (∑ i in s, (w₁ - w₂) i) = 0 := by simp_rw [Pi.sub_apply, Finset.sum_sub_distrib, hw₁, hw₂, sub_self]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁸ : OrderedRing R\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module R V\ninst✝⁵ : AddTorsor V P\ninst✝⁴ : AddCommGroup V'\ninst✝³ : Module R V'\ninst✝² : AddTorsor V' P'\ninst✝¹ : NoZeroDivisors R\ninst✝ : NoZeroSMulDivisors R V\nι : Type u_6\np : ι → P\nha : AffineIndependent R p\nw w₁ w₂ : ι → R\ns : Finset ι\nhw : ∑ i in s, w i = 1\nhw₁ : ∑ i in s, w₁ i = 1\nhw₂ : ∑ i in s, w₂ i = 1\ni : ι\nhis : i ∈ s\nr : R\nhs : w₁ i ≠ w₂ i ∧ r ∈ Set.Ioo 0 1\nhr : ∀ (i : ι), i ∈ s → w i = (r • (w₂ - w₁) + w₁) i\nhz : ↑(Finset.weightedVSub s p) (w₁ - w₂) = 0\n⊢ ∑ i in s, (w₁ - w₂) i = 0\n[PROOFSTEP]\nsimp_rw [Pi.sub_apply, Finset.sum_sub_distrib, hw₁, hw₂, sub_self]\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁸ : OrderedRing R\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module R V\ninst✝⁵ : AddTorsor V P\ninst✝⁴ : AddCommGroup V'\ninst✝³ : Module R V'\ninst✝² : AddTorsor V' P'\ninst✝¹ : NoZeroDivisors R\ninst✝ : NoZeroSMulDivisors R V\nι : Type u_6\np : ι → P\nha : AffineIndependent R p\nw w₁ w₂ : ι → R\ns : Finset ι\nhw : ∑ i in s, w i = 1\nhw₁ : ∑ i in s, w₁ i = 1\nhw₂ : ∑ i in s, w₂ i = 1\ni : ι\nhis : i ∈ s\nr : R\nhs : w₁ i ≠ w₂ i ∧ r ∈ Set.Ioo 0 1\nhr : ∀ (i : ι), i ∈ s → w i = (r • (w₂ - w₁) + w₁) i\nhz : ↑(Finset.weightedVSub s p) (w₁ - w₂) = 0\nhw₁w₂ : ∑ i in s, (w₁ - w₂) i = 0\n⊢ False\n[PROOFSTEP]\nrefine' hs.1 _\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁸ : OrderedRing R\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module R V\ninst✝⁵ : AddTorsor V P\ninst✝⁴ : AddCommGroup V'\ninst✝³ : Module R V'\ninst✝² : AddTorsor V' P'\ninst✝¹ : NoZeroDivisors R\ninst✝ : NoZeroSMulDivisors R V\nι : Type u_6\np : ι → P\nha : AffineIndependent R p\nw w₁ w₂ : ι → R\ns : Finset ι\nhw : ∑ i in s, w i = 1\nhw₁ : ∑ i in s, w₁ i = 1\nhw₂ : ∑ i in s, w₂ i = 1\ni : ι\nhis : i ∈ s\nr : R\nhs : w₁ i ≠ w₂ i ∧ r ∈ Set.Ioo 0 1\nhr : ∀ (i : ι), i ∈ s → w i = (r • (w₂ - w₁) + w₁) i\nhz : ↑(Finset.weightedVSub s p) (w₁ - w₂) = 0\nhw₁w₂ : ∑ i in s, (w₁ - w₂) i = 0\n⊢ w₁ i = w₂ i\n[PROOFSTEP]\nhave ha' := ha s (w₁ - w₂) hw₁w₂ hz i his\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁸ : OrderedRing R\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module R V\ninst✝⁵ : AddTorsor V P\ninst✝⁴ : AddCommGroup V'\ninst✝³ : Module R V'\ninst✝² : AddTorsor V' P'\ninst✝¹ : NoZeroDivisors R\ninst✝ : NoZeroSMulDivisors R V\nι : Type u_6\np : ι → P\nha : AffineIndependent R p\nw w₁ w₂ : ι → R\ns : Finset ι\nhw : ∑ i in s, w i = 1\nhw₁ : ∑ i in s, w₁ i = 1\nhw₂ : ∑ i in s, w₂ i = 1\ni : ι\nhis : i ∈ s\nr : R\nhs : w₁ i ≠ w₂ i ∧ r ∈ Set.Ioo 0 1\nhr : ∀ (i : ι), i ∈ s → w i = (r • (w₂ - w₁) + w₁) i\nhz : ↑(Finset.weightedVSub s p) (w₁ - w₂) = 0\nhw₁w₂ : ∑ i in s, (w₁ - w₂) i = 0\nha' : (w₁ - w₂) i = 0\n⊢ w₁ i = w₂ i\n[PROOFSTEP]\nrwa [Pi.sub_apply, sub_eq_zero] at ha' \n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : StrictOrderedCommRing R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : Wbtw R x y z\n⊢ SameRay R (y -ᵥ x) (z -ᵥ y)\n[PROOFSTEP]\nrcases h with ⟨t, ⟨ht0, ht1⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : StrictOrderedCommRing R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\n⊢ SameRay R (↑(lineMap x z) t -ᵥ x) (z -ᵥ ↑(lineMap x z) t)\n[PROOFSTEP]\nsimp_rw [lineMap_apply]\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : StrictOrderedCommRing R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\n⊢ SameRay R (t • (z -ᵥ x) +ᵥ x -ᵥ x) (z -ᵥ (t • (z -ᵥ x) +ᵥ x))\n[PROOFSTEP]\nrcases ht0.lt_or_eq with (ht0' | rfl)\n[GOAL]\ncase intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : StrictOrderedCommRing R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nht0' : 0 < t\n⊢ SameRay R (t • (z -ᵥ x) +ᵥ x -ᵥ x) (z -ᵥ (t • (z -ᵥ x) +ᵥ x))\ncase intro.intro.intro.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : StrictOrderedCommRing R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nht0 : 0 ≤ 0\nht1 : 0 ≤ 1\n⊢ SameRay R (0 • (z -ᵥ x) +ᵥ x -ᵥ x) (z -ᵥ (0 • (z -ᵥ x) +ᵥ x))\n[PROOFSTEP]\nswap\n[GOAL]\ncase intro.intro.intro.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : StrictOrderedCommRing R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nht0 : 0 ≤ 0\nht1 : 0 ≤ 1\n⊢ SameRay R (0 • (z -ᵥ x) +ᵥ x -ᵥ x) (z -ᵥ (0 • (z -ᵥ x) +ᵥ x))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : StrictOrderedCommRing R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nht0' : 0 < t\n⊢ SameRay R (t • (z -ᵥ x) +ᵥ x -ᵥ x) (z -ᵥ (t • (z -ᵥ x) +ᵥ x))\n[PROOFSTEP]\nrcases ht1.lt_or_eq with (ht1' | rfl)\n[GOAL]\ncase intro.intro.intro.inl.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : StrictOrderedCommRing R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nht0' : 0 < t\nht1' : t < 1\n⊢ SameRay R (t • (z -ᵥ x) +ᵥ x -ᵥ x) (z -ᵥ (t • (z -ᵥ x) +ᵥ x))\ncase intro.intro.intro.inl.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : StrictOrderedCommRing R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nht0 : 0 ≤ 1\nht1 : 1 ≤ 1\nht0' : 0 < 1\n⊢ SameRay R (1 • (z -ᵥ x) +ᵥ x -ᵥ x) (z -ᵥ (1 • (z -ᵥ x) +ᵥ x))\n[PROOFSTEP]\nswap\n[GOAL]\ncase intro.intro.intro.inl.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : StrictOrderedCommRing R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nht0 : 0 ≤ 1\nht1 : 1 ≤ 1\nht0' : 0 < 1\n⊢ SameRay R (1 • (z -ᵥ x) +ᵥ x -ᵥ x) (z -ᵥ (1 • (z -ᵥ x) +ᵥ x))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.inl.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : StrictOrderedCommRing R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nht0' : 0 < t\nht1' : t < 1\n⊢ SameRay R (t • (z -ᵥ x) +ᵥ x -ᵥ x) (z -ᵥ (t • (z -ᵥ x) +ᵥ x))\n[PROOFSTEP]\nrefine' Or.inr (Or.inr ⟨1 - t, t, sub_pos.2 ht1', ht0', _⟩)\n[GOAL]\ncase intro.intro.intro.inl.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : StrictOrderedCommRing R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nht0' : 0 < t\nht1' : t < 1\n⊢ (1 - t) • (t • (z -ᵥ x) +ᵥ x -ᵥ x) = t • (z -ᵥ (t • (z -ᵥ x) +ᵥ x))\n[PROOFSTEP]\nsimp [vsub_vadd_eq_vsub_sub, smul_sub, smul_smul, ← sub_smul]\n[GOAL]\ncase intro.intro.intro.inl.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : StrictOrderedCommRing R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nht0' : 0 < t\nht1' : t < 1\n⊢ ((1 - t) * t) • (z -ᵥ x) = (t - t * t) • (z -ᵥ x)\n[PROOFSTEP]\nring_nf\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : StrictOrderedCommRing R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : Wbtw R x y z\n⊢ SameRay R (y -ᵥ x) (z -ᵥ x)\n[PROOFSTEP]\nrcases h with ⟨t, ⟨ht0, _⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : StrictOrderedCommRing R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nt : R\nht0 : 0 ≤ t\nright✝ : t ≤ 1\n⊢ SameRay R (↑(lineMap x z) t -ᵥ x) (z -ᵥ x)\n[PROOFSTEP]\nsimpa [lineMap_apply] using SameRay.sameRay_nonneg_smul_left (z -ᵥ x) ht0\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : StrictOrderedCommRing R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : Wbtw R x y z\n⊢ SameRay R (z -ᵥ x) (z -ᵥ y)\n[PROOFSTEP]\nrcases h with ⟨t, ⟨_, ht1⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : StrictOrderedCommRing R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nt : R\nleft✝ : 0 ≤ t\nht1 : t ≤ 1\n⊢ SameRay R (z -ᵥ x) (z -ᵥ ↑(lineMap x z) t)\n[PROOFSTEP]\nsimpa [lineMap_apply, vsub_vadd_eq_vsub_sub, sub_smul] using\n SameRay.sameRay_nonneg_smul_right (z -ᵥ x) (sub_nonneg.2 ht1)\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\n⊢ Sbtw R (Affine.Simplex.points t i₁) p p₁\n[PROOFSTEP]\nletI : DecidableRel ((· < ·) : R → R → Prop) := LinearOrderedRing.decidableLT\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\n⊢ Sbtw R (Affine.Simplex.points t i₁) p p₁\n[PROOFSTEP]\nhave h₁₃ : i₁ ≠ i₃ := by\n rintro rfl\n simp at h₂ \n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\n⊢ i₁ ≠ i₃\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₁)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₁)\n⊢ False\n[PROOFSTEP]\nsimp at h₂ \n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\n⊢ Sbtw R (Affine.Simplex.points t i₁) p p₁\n[PROOFSTEP]\nhave h₂₃ : i₂ ≠ i₃ := by\n rintro rfl\n simp at h₁ \n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\n⊢ i₂ ≠ i₃\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₂)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₂)\nh₁₃ : i₁ ≠ i₂\n⊢ False\n[PROOFSTEP]\nsimp at h₁ \n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\n⊢ Sbtw R (Affine.Simplex.points t i₁) p p₁\n[PROOFSTEP]\nhave h3 : ∀ i : Fin 3, i = i₁ ∨ i = i₂ ∨ i = i₃ :=\n by\n clear h₁ h₂ h₁' h₂'\n intro i\n fin_cases i <;> fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃ <;> simp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\n⊢ ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\n[PROOFSTEP]\nclear h₁ h₂ h₁' h₂'\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\n⊢ ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\n[PROOFSTEP]\nintro i\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\ni : Fin 3\n⊢ i = i₁ ∨ i = i₂ ∨ i = i₃\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\n⊢ { val := 0, isLt := (_ : 0 < 3) } = i₁ ∨\n { val := 0, isLt := (_ : 0 < 3) } = i₂ ∨ { val := 0, isLt := (_ : 0 < 3) } = i₃\n[PROOFSTEP]\nfin_cases i₁\n[GOAL]\ncase tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = i₁ ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = i₂ ∨ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = i₃\n[PROOFSTEP]\nfin_cases i₁\n[GOAL]\ncase tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = i₁ ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = i₂ ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = i₃\n[PROOFSTEP]\nfin_cases i₁\n[GOAL]\ncase head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₂ i₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₂₃ : i₂ ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₂\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = i₂ ∨ { val := 0, isLt := (_ : 0 < 3) } = i₃\n[PROOFSTEP]\nfin_cases i₂\n[GOAL]\ncase head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₂ i₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₂₃ : i₂ ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₂\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = i₂ ∨ { val := 0, isLt := (_ : 0 < 3) } = i₃\n[PROOFSTEP]\nfin_cases i₂\n[GOAL]\ncase head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₂ i₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₂₃ : i₂ ≠ i₃\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₂\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = i₂ ∨ { val := 0, isLt := (_ : 0 < 3) } = i₃\n[PROOFSTEP]\nfin_cases i₂\n[GOAL]\ncase tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₂ i₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₂₃ : i₂ ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₂\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = i₂ ∨ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = i₃\n[PROOFSTEP]\nfin_cases i₂\n[GOAL]\ncase tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₂ i₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₂₃ : i₂ ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₂\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = i₂ ∨ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = i₃\n[PROOFSTEP]\nfin_cases i₂\n[GOAL]\ncase tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₂ i₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₂₃ : i₂ ≠ i₃\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₂\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = i₂ ∨ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = i₃\n[PROOFSTEP]\nfin_cases i₂\n[GOAL]\ncase tail.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₂ i₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₂₃ : i₂ ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₂\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = i₂ ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = i₃\n[PROOFSTEP]\nfin_cases i₂\n[GOAL]\ncase tail.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₂ i₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₂₃ : i₂ ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₂\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = i₂ ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = i₃\n[PROOFSTEP]\nfin_cases i₂\n[GOAL]\ncase tail.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₂ i₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₂₃ : i₂ ≠ i₃\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₂\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = i₂ ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = i₃\n[PROOFSTEP]\nfin_cases i₂\n[GOAL]\ncase head.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨ { val := 0, isLt := (_ : 0 < 3) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase head.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase head.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase head.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨ { val := 0, isLt := (_ : 0 < 3) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase head.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase head.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase head.tail.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨ { val := 0, isLt := (_ : 0 < 3) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase head.tail.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase head.tail.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ h₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₁₂ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.head.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.head.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.head.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.head.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.head.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.head.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.head.tail.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.head.tail.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.head.tail.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ h₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₁₂ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.tail.head.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.tail.head.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.tail.head.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.tail.head.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.tail.head.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.tail.head.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.tail.head.tail.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.tail.head.tail.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.tail.head.tail.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ h₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₁₂ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = i₃\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase head.head.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.head.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.head.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.head.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.head.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.head.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.head.tail.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.head.tail.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.head.tail.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.head.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.head.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.head.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.head.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.head.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.head.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.head.tail.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.head.tail.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.head.tail.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.tail.head.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.tail.head.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.tail.head.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.tail.head.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.tail.head.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.tail.head.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.tail.head.tail.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ h₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.tail.head.tail.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ h₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.tail.head.tail.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ h₂₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 0, isLt := (_ : 0 < 3) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.head.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.head.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.head.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.head.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.head.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.head.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.head.tail.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.head.tail.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.head.tail.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.head.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.head.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.head.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.head.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.head.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.head.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.head.tail.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.head.tail.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.head.tail.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.tail.head.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.tail.head.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.tail.head.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.tail.head.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.tail.head.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.tail.head.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.tail.head.tail.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ h₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.tail.head.tail.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ h₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.tail.head.tail.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ h₂₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 1, isLt := (_ : (fun a => a < 3) 1) } = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.head.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.head.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.head.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.head.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.head.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.head.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.head.tail.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.head.tail.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.head.tail.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.head.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.head.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.head.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.head.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.head.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.head.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.head.tail.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.head.tail.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.head.tail.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.tail.head.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.tail.head.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.tail.head.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.tail.head.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.tail.head.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.tail.head.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.tail.head.tail.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ h₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 0, isLt := (_ : 0 < 3) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.tail.head.tail.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ h₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.tail.head.tail.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ h₂₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } =\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\n⊢ Sbtw R (Affine.Simplex.points t i₁) p p₁\n[PROOFSTEP]\nhave hu : (Finset.univ : Finset (Fin 3)) = { i₁, i₂, i₃ } :=\n by\n clear h₁ h₂ h₁' h₂'\n fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃ <;> simp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\n⊢ Finset.univ = {i₁, i₂, i₃}\n[PROOFSTEP]\nclear h₁ h₂ h₁' h₂'\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\n⊢ Finset.univ = {i₁, i₂, i₃}\n[PROOFSTEP]\nfin_cases i₁\n[GOAL]\ncase head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₂ i₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₂₃ : i₂ ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₂\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh3 : ∀ (i : Fin 3), i = { val := 0, isLt := (_ : 0 < 3) } ∨ i = i₂ ∨ i = i₃\n⊢ Finset.univ = {{ val := 0, isLt := (_ : 0 < 3) }, i₂, i₃}\n[PROOFSTEP]\nfin_cases i₂\n[GOAL]\ncase tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₂ i₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₂₃ : i₂ ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₂\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh3 : ∀ (i : Fin 3), i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨ i = i₂ ∨ i = i₃\n⊢ Finset.univ = {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, i₂, i₃}\n[PROOFSTEP]\nfin_cases i₂\n[GOAL]\ncase tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₂ i₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₂₃ : i₂ ≠ i₃\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₂\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh3 : ∀ (i : Fin 3), i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨ i = i₂ ∨ i = i₃\n⊢ Finset.univ = {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, i₂, i₃}\n[PROOFSTEP]\nfin_cases i₂\n[GOAL]\ncase head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh3 : ∀ (i : Fin 3), i = { val := 0, isLt := (_ : 0 < 3) } ∨ i = { val := 0, isLt := (_ : 0 < 3) } ∨ i = i₃\n⊢ Finset.univ = {{ val := 0, isLt := (_ : 0 < 3) }, { val := 0, isLt := (_ : 0 < 3) }, i₃}\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh3 : ∀ (i : Fin 3), i = { val := 0, isLt := (_ : 0 < 3) } ∨ i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨ i = i₃\n⊢ Finset.univ = {{ val := 0, isLt := (_ : 0 < 3) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) }, i₃}\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 0, isLt := (_ : 0 < 3) } ∨ i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨ i = i₃\n⊢ Finset.univ = {{ val := 0, isLt := (_ : 0 < 3) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, i₃}\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh3 : ∀ (i : Fin 3), i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨ i = { val := 0, isLt := (_ : 0 < 3) } ∨ i = i₃\n⊢ Finset.univ = {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 0, isLt := (_ : 0 < 3) }, i₃}\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨ i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨ i = i₃\n⊢ Finset.univ = {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) }, i₃}\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨ i = i₃\n⊢ Finset.univ =\n {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, i₃}\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨ i = { val := 0, isLt := (_ : 0 < 3) } ∨ i = i₃\n⊢ Finset.univ = {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 0, isLt := (_ : 0 < 3) }, i₃}\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨ i = i₃\n⊢ Finset.univ =\n {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) }, i₃}\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₃ : Fin 3\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ h₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₁₂ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨ i = i₃\n⊢ Finset.univ =\n {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, i₃}\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase head.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 0, isLt := (_ : 0 < 3) } ∨\n i = { val := 0, isLt := (_ : 0 < 3) } ∨ i = { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ =\n {{ val := 0, isLt := (_ : 0 < 3) }, { val := 0, isLt := (_ : 0 < 3) }, { val := 0, isLt := (_ : 0 < 3) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 0, isLt := (_ : 0 < 3) } ∨\n i = { val := 0, isLt := (_ : 0 < 3) } ∨ i = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n {{ val := 0, isLt := (_ : 0 < 3) }, { val := 0, isLt := (_ : 0 < 3) },\n { val := 1, isLt := (_ : (fun a => a < 3) 1) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 0, isLt := (_ : 0 < 3) } ∨\n i = { val := 0, isLt := (_ : 0 < 3) } ∨ i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n {{ val := 0, isLt := (_ : 0 < 3) }, { val := 0, isLt := (_ : 0 < 3) },\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 0, isLt := (_ : 0 < 3) } ∨\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨ i = { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ =\n {{ val := 0, isLt := (_ : 0 < 3) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) },\n { val := 0, isLt := (_ : 0 < 3) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 0, isLt := (_ : 0 < 3) } ∨\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨ i = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n {{ val := 0, isLt := (_ : 0 < 3) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) },\n { val := 1, isLt := (_ : (fun a => a < 3) 1) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 0, isLt := (_ : 0 < 3) } ∨\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n {{ val := 0, isLt := (_ : 0 < 3) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) },\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 0, isLt := (_ : 0 < 3) } ∨\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨ i = { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ =\n {{ val := 0, isLt := (_ : 0 < 3) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n { val := 0, isLt := (_ : 0 < 3) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 0, isLt := (_ : 0 < 3) } ∨\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n {{ val := 0, isLt := (_ : 0 < 3) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n { val := 1, isLt := (_ : (fun a => a < 3) 1) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 0, isLt := (_ : 0 < 3) } ∨\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n {{ val := 0, isLt := (_ : 0 < 3) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n i = { val := 0, isLt := (_ : 0 < 3) } ∨ i = { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ =\n {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 0, isLt := (_ : 0 < 3) },\n { val := 0, isLt := (_ : 0 < 3) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n i = { val := 0, isLt := (_ : 0 < 3) } ∨ i = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 0, isLt := (_ : 0 < 3) },\n { val := 1, isLt := (_ : (fun a => a < 3) 1) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n i = { val := 0, isLt := (_ : 0 < 3) } ∨ i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 0, isLt := (_ : 0 < 3) },\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨ i = { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ =\n {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) },\n { val := 0, isLt := (_ : 0 < 3) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨ i = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) },\n { val := 1, isLt := (_ : (fun a => a < 3) 1) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) },\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨ i = { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ =\n {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n { val := 0, isLt := (_ : 0 < 3) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n { val := 1, isLt := (_ : (fun a => a < 3) 1) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n i = { val := 0, isLt := (_ : 0 < 3) } ∨ i = { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ =\n {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 0, isLt := (_ : 0 < 3) },\n { val := 0, isLt := (_ : 0 < 3) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n i = { val := 0, isLt := (_ : 0 < 3) } ∨ i = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 0, isLt := (_ : 0 < 3) },\n { val := 1, isLt := (_ : (fun a => a < 3) 1) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n i = { val := 0, isLt := (_ : 0 < 3) } ∨ i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 0, isLt := (_ : 0 < 3) },\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨ i = { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ =\n {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) },\n { val := 0, isLt := (_ : 0 < 3) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨ i = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) },\n { val := 1, isLt := (_ : (fun a => a < 3) 1) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) } ∨\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) },\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.tail.head.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ h₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨ i = { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ =\n {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 0, isLt := (_ : 0 < 3) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.tail.head.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ h₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n i = { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.tail.head.tail.tail.head\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\np₁ p₂ p : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₂ h₁₃ h₂₃ :\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh3 :\n ∀ (i : Fin 3),\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ∨\n i = { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}\n[PROOFSTEP]\nsimp at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\n⊢ Sbtw R (Affine.Simplex.points t i₁) p p₁\n[PROOFSTEP]\nhave hp : p ∈ affineSpan R (Set.range t.points) :=\n by\n have hle : line[R, t.points i₁, p₁] ≤ affineSpan R (Set.range t.points) :=\n by\n refine' affineSpan_pair_le_of_mem_of_mem (mem_affineSpan R (Set.mem_range_self _)) _\n have hle : line[R, t.points i₂, t.points i₃] ≤ affineSpan R (Set.range t.points) :=\n by\n refine' affineSpan_mono R _\n simp [Set.insert_subset_iff]\n rw [AffineSubspace.le_def'] at hle \n exact hle _ h₁.wbtw.mem_affineSpan\n rw [AffineSubspace.le_def'] at hle \n exact hle _ h₁'\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\n⊢ p ∈ affineSpan R (Set.range t.points)\n[PROOFSTEP]\nhave hle : line[R, t.points i₁, p₁] ≤ affineSpan R (Set.range t.points) :=\n by\n refine' affineSpan_pair_le_of_mem_of_mem (mem_affineSpan R (Set.mem_range_self _)) _\n have hle : line[R, t.points i₂, t.points i₃] ≤ affineSpan R (Set.range t.points) :=\n by\n refine' affineSpan_mono R _\n simp [Set.insert_subset_iff]\n rw [AffineSubspace.le_def'] at hle \n exact hle _ h₁.wbtw.mem_affineSpan\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\n⊢ affineSpan R {Affine.Simplex.points t i₁, p₁} ≤ affineSpan R (Set.range t.points)\n[PROOFSTEP]\nrefine' affineSpan_pair_le_of_mem_of_mem (mem_affineSpan R (Set.mem_range_self _)) _\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\n⊢ p₁ ∈ affineSpan R (Set.range t.points)\n[PROOFSTEP]\nhave hle : line[R, t.points i₂, t.points i₃] ≤ affineSpan R (Set.range t.points) :=\n by\n refine' affineSpan_mono R _\n simp [Set.insert_subset_iff]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\n⊢ affineSpan R {Affine.Simplex.points t i₂, Affine.Simplex.points t i₃} ≤ affineSpan R (Set.range t.points)\n[PROOFSTEP]\nrefine' affineSpan_mono R _\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\n⊢ {Affine.Simplex.points t i₂, Affine.Simplex.points t i₃} ⊆ Set.range t.points\n[PROOFSTEP]\nsimp [Set.insert_subset_iff]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nhle : affineSpan R {Affine.Simplex.points t i₂, Affine.Simplex.points t i₃} ≤ affineSpan R (Set.range t.points)\n⊢ p₁ ∈ affineSpan R (Set.range t.points)\n[PROOFSTEP]\nrw [AffineSubspace.le_def'] at hle \n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nhle :\n ∀ (p : P),\n p ∈ affineSpan R {Affine.Simplex.points t i₂, Affine.Simplex.points t i₃} → p ∈ affineSpan R (Set.range t.points)\n⊢ p₁ ∈ affineSpan R (Set.range t.points)\n[PROOFSTEP]\nexact hle _ h₁.wbtw.mem_affineSpan\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nhle : affineSpan R {Affine.Simplex.points t i₁, p₁} ≤ affineSpan R (Set.range t.points)\n⊢ p ∈ affineSpan R (Set.range t.points)\n[PROOFSTEP]\nrw [AffineSubspace.le_def'] at hle \n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nhle : ∀ (p : P), p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁} → p ∈ affineSpan R (Set.range t.points)\n⊢ p ∈ affineSpan R (Set.range t.points)\n[PROOFSTEP]\nexact hle _ h₁'\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nhp : p ∈ affineSpan R (Set.range t.points)\n⊢ Sbtw R (Affine.Simplex.points t i₁) p p₁\n[PROOFSTEP]\nhave h₁i := h₁.mem_image_Ioo\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nhp : p ∈ affineSpan R (Set.range t.points)\nh₁i : p₁ ∈ ↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) '' Set.Ioo 0 1\n⊢ Sbtw R (Affine.Simplex.points t i₁) p p₁\n[PROOFSTEP]\nhave h₂i := h₂.mem_image_Ioo\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nhp : p ∈ affineSpan R (Set.range t.points)\nh₁i : p₁ ∈ ↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) '' Set.Ioo 0 1\nh₂i : p₂ ∈ ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) '' Set.Ioo 0 1\n⊢ Sbtw R (Affine.Simplex.points t i₁) p p₁\n[PROOFSTEP]\nrw [Set.mem_image] at h₁i h₂i \n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₁ p₂ p : P\nh₁ : Sbtw R (Affine.Simplex.points t i₂) p₁ (Affine.Simplex.points t i₃)\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₁' : p ∈ affineSpan R {Affine.Simplex.points t i₁, p₁}\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nhp : p ∈ affineSpan R (Set.range t.points)\nh₁i : ∃ x, x ∈ Set.Ioo 0 1 ∧ ↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) x = p₁\nh₂i : ∃ x, x ∈ Set.Ioo 0 1 ∧ ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) x = p₂\n⊢ Sbtw R (Affine.Simplex.points t i₁) p p₁\n[PROOFSTEP]\nrcases h₁i with ⟨r₁, ⟨hr₁0, hr₁1⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np₂ p : P\nh₂ : Sbtw R (Affine.Simplex.points t i₁) p₂ (Affine.Simplex.points t i₃)\nh₂' : p ∈ affineSpan R {Affine.Simplex.points t i₂, p₂}\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nhp : p ∈ affineSpan R (Set.range t.points)\nh₂i : ∃ x, x ∈ Set.Ioo 0 1 ∧ ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) x = p₂\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nh₁' :\n p ∈ affineSpan R {Affine.Simplex.points t i₁, ↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁}\n⊢ Sbtw R (Affine.Simplex.points t i₁) p (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n[PROOFSTEP]\nrcases h₂i with ⟨r₂, ⟨hr₂0, hr₂1⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\np : P\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nhp : p ∈ affineSpan R (Set.range t.points)\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nh₁' :\n p ∈ affineSpan R {Affine.Simplex.points t i₁, ↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁}\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nh₂' :\n p ∈ affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\n⊢ Sbtw R (Affine.Simplex.points t i₁) p (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n[PROOFSTEP]\nrcases eq_affineCombination_of_mem_affineSpan_of_fintype hp with ⟨w, hw, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : ∑ i : Fin (2 + 1), w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₁, ↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\n⊢ Sbtw R (Affine.Simplex.points t i₁) (↑(Finset.affineCombination R Finset.univ t.points) w)\n (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n[PROOFSTEP]\nhave h₁s :=\n sign_eq_of_affineCombination_mem_affineSpan_single_lineMap t.Independent hw (Finset.mem_univ _) (Finset.mem_univ _)\n (Finset.mem_univ _) h₁₂ h₁₃ h₂₃ hr₁0 hr₁1 h₁'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : ∑ i : Fin (2 + 1), w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₁, ↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\n⊢ Sbtw R (Affine.Simplex.points t i₁) (↑(Finset.affineCombination R Finset.univ t.points) w)\n (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n[PROOFSTEP]\nhave h₂s :=\n sign_eq_of_affineCombination_mem_affineSpan_single_lineMap t.Independent hw (Finset.mem_univ _) (Finset.mem_univ _)\n (Finset.mem_univ _) h₁₂.symm h₂₃ h₁₃ hr₂0 hr₂1 h₂'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : ∑ i : Fin (2 + 1), w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₁, ↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\n⊢ Sbtw R (Affine.Simplex.points t i₁) (↑(Finset.affineCombination R Finset.univ t.points) w)\n (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n[PROOFSTEP]\nrw [← Finset.univ.affineCombination_affineCombinationSingleWeights R t.points (Finset.mem_univ i₁), ←\n Finset.univ.affineCombination_affineCombinationLineMapWeights t.points (Finset.mem_univ _) (Finset.mem_univ _)] at h₁'\n ⊢\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : ∑ i : Fin (2 + 1), w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\n⊢ Sbtw R (↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁))\n (↑(Finset.affineCombination R Finset.univ t.points) w)\n (↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁))\n[PROOFSTEP]\nrefine'\n Sbtw.affineCombination_of_mem_affineSpan_pair t.Independent hw\n (Finset.univ.sum_affineCombinationSingleWeights R (Finset.mem_univ _))\n (Finset.univ.sum_affineCombinationLineMapWeights (Finset.mem_univ _) (Finset.mem_univ _) _) h₁' (Finset.mem_univ i₁)\n _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : ∑ i : Fin (2 + 1), w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\n⊢ Sbtw R (Finset.affineCombinationSingleWeights R i₁ i₁) (w i₁) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁ i₁)\n[PROOFSTEP]\nrw [Finset.affineCombinationSingleWeights_apply_self, Finset.affineCombinationLineMapWeights_apply_of_ne h₁₂ h₁₃,\n sbtw_one_zero_iff]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : ∑ i : Fin (2 + 1), w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\n⊢ w i₁ ∈ Set.Ioo 0 1\n[PROOFSTEP]\nhave hs : ∀ i : Fin 3, SignType.sign (w i) = SignType.sign (w i₃) :=\n by\n intro i\n rcases h3 i with (rfl | rfl | rfl)\n · exact h₂s\n · exact h₁s\n · rfl\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : ∑ i : Fin (2 + 1), w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\n⊢ ∀ (i : Fin 3), ↑SignType.sign (w i) = ↑SignType.sign (w i₃)\n[PROOFSTEP]\nintro i\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : ∑ i : Fin (2 + 1), w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\ni : Fin 3\n⊢ ↑SignType.sign (w i) = ↑SignType.sign (w i₃)\n[PROOFSTEP]\nrcases h3 i with (rfl | rfl | rfl)\n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₂ i₃ : Fin 3\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₂₃ : i₂ ≠ i₃\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nw : Fin (2 + 1) → R\nhw : ∑ i : Fin (2 + 1), w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\ni : Fin 3\nh₁₂ : i ≠ i₂\nh₁₃ : i ≠ i₃\nh3 : ∀ (i_1 : Fin 3), i_1 = i ∨ i_1 = i₂ ∨ i_1 = i₃\nhu : Finset.univ = {i, i₂, i₃}\nh₂ :\n Sbtw R (Affine.Simplex.points t i) (↑(lineMap (Affine.Simplex.points t i) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i) (Affine.Simplex.points t i₃)) r₂}\nh₂s : ↑SignType.sign (w i) = ↑SignType.sign (w i₃)\n⊢ ↑SignType.sign (w i) = ↑SignType.sign (w i₃)\n[PROOFSTEP]\nexact h₂s\n[GOAL]\ncase inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₃ : Fin 3\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : ∑ i : Fin (2 + 1), w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\ni : Fin 3\nh₁₂ : i₁ ≠ i\nh₂₃ : i ≠ i₃\nh3 : ∀ (i_1 : Fin 3), i_1 = i₁ ∨ i_1 = i ∨ i_1 = i₃\nhu : Finset.univ = {i₁, i, i₃}\nh₁ :\n Sbtw R (Affine.Simplex.points t i) (↑(lineMap (Affine.Simplex.points t i) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i) = ↑SignType.sign (w i₃)\n⊢ ↑SignType.sign (w i) = ↑SignType.sign (w i₃)\n[PROOFSTEP]\nexact h₁s\n[GOAL]\ncase inr.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nw : Fin (2 + 1) → R\nhw : ∑ i : Fin (2 + 1), w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\ni : Fin 3\nh₁₃ : i₁ ≠ i\nh₂₃ : i₂ ≠ i\nh3 : ∀ (i_1 : Fin 3), i_1 = i₁ ∨ i_1 = i₂ ∨ i_1 = i\nhu : Finset.univ = {i₁, i₂, i}\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i)) r₁)\n (Affine.Simplex.points t i)\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i)) r₂)\n (Affine.Simplex.points t i)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i)\n⊢ ↑SignType.sign (w i) = ↑SignType.sign (w i)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : ∑ i : Fin (2 + 1), w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\nhs : ∀ (i : Fin 3), ↑SignType.sign (w i) = ↑SignType.sign (w i₃)\n⊢ w i₁ ∈ Set.Ioo 0 1\n[PROOFSTEP]\nhave hss : SignType.sign (∑ i, w i) = 1 := by simp [hw]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : ∑ i : Fin (2 + 1), w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\nhs : ∀ (i : Fin 3), ↑SignType.sign (w i) = ↑SignType.sign (w i₃)\n⊢ ↑SignType.sign (∑ i : Fin (2 + 1), w i) = 1\n[PROOFSTEP]\nsimp [hw]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : ∑ i : Fin (2 + 1), w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\nhs : ∀ (i : Fin 3), ↑SignType.sign (w i) = ↑SignType.sign (w i₃)\nhss : ↑SignType.sign (∑ i : Fin (2 + 1), w i) = 1\n⊢ w i₁ ∈ Set.Ioo 0 1\n[PROOFSTEP]\nhave hs' := sign_sum Finset.univ_nonempty (SignType.sign (w i₃)) fun i _ => hs i\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : ∑ i : Fin (2 + 1), w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\nhs : ∀ (i : Fin 3), ↑SignType.sign (w i) = ↑SignType.sign (w i₃)\nhss : ↑SignType.sign (∑ i : Fin (2 + 1), w i) = 1\nhs' : ↑SignType.sign (∑ i : Fin 3, w i) = ↑SignType.sign (w i₃)\n⊢ w i₁ ∈ Set.Ioo 0 1\n[PROOFSTEP]\nrw [hs'] at hss \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : ∑ i : Fin (2 + 1), w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\nhs : ∀ (i : Fin 3), ↑SignType.sign (w i) = ↑SignType.sign (w i₃)\nhss : ↑SignType.sign (w i₃) = 1\nhs' : ↑SignType.sign (∑ i : Fin 3, w i) = ↑SignType.sign (w i₃)\n⊢ w i₁ ∈ Set.Ioo 0 1\n[PROOFSTEP]\nsimp_rw [hss, sign_eq_one_iff] at hs \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : ∑ i : Fin (2 + 1), w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\nhss : ↑SignType.sign (w i₃) = 1\nhs' : ↑SignType.sign (∑ i : Fin 3, w i) = ↑SignType.sign (w i₃)\nhs : ∀ (i : Fin 3), 0 < w i\n⊢ w i₁ ∈ Set.Ioo 0 1\n[PROOFSTEP]\nrefine' ⟨hs i₁, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : ∑ i : Fin (2 + 1), w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\nhss : ↑SignType.sign (w i₃) = 1\nhs' : ↑SignType.sign (∑ i : Fin 3, w i) = ↑SignType.sign (w i₃)\nhs : ∀ (i : Fin 3), 0 < w i\n⊢ w i₁ < 1\n[PROOFSTEP]\nrw [hu] at hw \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : ∑ i in {i₁, i₂, i₃}, w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\nhss : ↑SignType.sign (w i₃) = 1\nhs' : ↑SignType.sign (∑ i : Fin 3, w i) = ↑SignType.sign (w i₃)\nhs : ∀ (i : Fin 3), 0 < w i\n⊢ w i₁ < 1\n[PROOFSTEP]\nrw [Finset.sum_insert, Finset.sum_insert, Finset.sum_singleton] at hw \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : w i₁ + (w i₂ + w i₃) = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\nhss : ↑SignType.sign (w i₃) = 1\nhs' : ↑SignType.sign (∑ i : Fin 3, w i) = ↑SignType.sign (w i₃)\nhs : ∀ (i : Fin 3), 0 < w i\n⊢ w i₁ < 1\n[PROOFSTEP]\nby_contra hle\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : w i₁ + (w i₂ + w i₃) = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\nhss : ↑SignType.sign (w i₃) = 1\nhs' : ↑SignType.sign (∑ i : Fin 3, w i) = ↑SignType.sign (w i₃)\nhs : ∀ (i : Fin 3), 0 < w i\nhle : ¬w i₁ < 1\n⊢ False\n[PROOFSTEP]\nrw [not_lt] at hle \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : w i₁ + (w i₂ + w i₃) = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\nhss : ↑SignType.sign (w i₃) = 1\nhs' : ↑SignType.sign (∑ i : Fin 3, w i) = ↑SignType.sign (w i₃)\nhs : ∀ (i : Fin 3), 0 < w i\nhle : 1 ≤ w i₁\n⊢ False\n[PROOFSTEP]\nexact (hle.trans_lt (lt_add_of_pos_right _ (Left.add_pos (hs i₂) (hs i₃)))).ne' hw\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : w i₁ + ∑ x in {i₂, i₃}, w x = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\nhss : ↑SignType.sign (w i₃) = 1\nhs' : ↑SignType.sign (∑ i : Fin 3, w i) = ↑SignType.sign (w i₃)\nhs : ∀ (i : Fin 3), 0 < w i\n⊢ ¬i₂ ∈ {i₃}\n[PROOFSTEP]\nsimpa using h₂₃\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁴ : LinearOrderedRing R\ninst✝³ : AddCommGroup V\ninst✝² : Module R V\ninst✝¹ : AddTorsor V P\ninst✝ : NoZeroSMulDivisors R V\nt : Affine.Triangle R P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nthis : DecidableRel fun x x_1 => x < x_1 := LinearOrderedRing.decidableLT\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃\nhu : Finset.univ = {i₁, i₂, i₃}\nr₁ : R\nhr₁0 : 0 < r₁\nhr₁1 : r₁ < 1\nh₁ :\n Sbtw R (Affine.Simplex.points t i₂) (↑(lineMap (Affine.Simplex.points t i₂) (Affine.Simplex.points t i₃)) r₁)\n (Affine.Simplex.points t i₃)\nr₂ : R\nhr₂0 : 0 < r₂\nhr₂1 : r₂ < 1\nh₂ :\n Sbtw R (Affine.Simplex.points t i₁) (↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂)\n (Affine.Simplex.points t i₃)\nw : Fin (2 + 1) → R\nhw : ∑ i in {i₁, i₂, i₃}, w i = 1\nhp : ↑(Finset.affineCombination R Finset.univ t.points) w ∈ affineSpan R (Set.range t.points)\nh₁' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R\n {↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationSingleWeights R i₁),\n ↑(Finset.affineCombination R Finset.univ t.points) (Finset.affineCombinationLineMapWeights i₂ i₃ r₁)}\nh₂' :\n ↑(Finset.affineCombination R Finset.univ t.points) w ∈\n affineSpan R {Affine.Simplex.points t i₂, ↑(lineMap (Affine.Simplex.points t i₁) (Affine.Simplex.points t i₃)) r₂}\nh₁s : ↑SignType.sign (w i₂) = ↑SignType.sign (w i₃)\nh₂s : ↑SignType.sign (w i₁) = ↑SignType.sign (w i₃)\nhss : ↑SignType.sign (w i₃) = 1\nhs' : ↑SignType.sign (∑ i : Fin 3, w i) = ↑SignType.sign (w i₃)\nhs : ∀ (i : Fin 3), 0 < w i\n⊢ ¬i₁ ∈ {i₂, i₃}\n[PROOFSTEP]\nsimpa [not_or] using ⟨h₁₂, h₁₃⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\n⊢ Wbtw R x y z ↔ x = y ∨ z ∈ ↑(lineMap x y) '' Set.Ici 1\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : Wbtw R x y z\n⊢ x = y ∨ z ∈ ↑(lineMap x y) '' Set.Ici 1\n[PROOFSTEP]\nrcases h with ⟨r, ⟨hr0, hr1⟩, rfl⟩\n[GOAL]\ncase refine'_1.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nr : R\nhr0 : 0 ≤ r\nhr1 : r ≤ 1\n⊢ x = ↑(lineMap x z) r ∨ z ∈ ↑(lineMap x (↑(lineMap x z) r)) '' Set.Ici 1\n[PROOFSTEP]\nrcases hr0.lt_or_eq with (hr0' | rfl)\n[GOAL]\ncase refine'_1.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nr : R\nhr0 : 0 ≤ r\nhr1 : r ≤ 1\nhr0' : 0 < r\n⊢ x = ↑(lineMap x z) r ∨ z ∈ ↑(lineMap x (↑(lineMap x z) r)) '' Set.Ici 1\n[PROOFSTEP]\nrw [Set.mem_image]\n[GOAL]\ncase refine'_1.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nr : R\nhr0 : 0 ≤ r\nhr1 : r ≤ 1\nhr0' : 0 < r\n⊢ x = ↑(lineMap x z) r ∨ ∃ x_1, x_1 ∈ Set.Ici 1 ∧ ↑(lineMap x (↑(lineMap x z) r)) x_1 = z\n[PROOFSTEP]\nrefine' Or.inr ⟨r⁻¹, one_le_inv hr0' hr1, _⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nr : R\nhr0 : 0 ≤ r\nhr1 : r ≤ 1\nhr0' : 0 < r\n⊢ ↑(lineMap x (↑(lineMap x z) r)) r⁻¹ = z\n[PROOFSTEP]\nsimp only [lineMap_apply, smul_smul, vadd_vsub]\n[GOAL]\ncase refine'_1.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nr : R\nhr0 : 0 ≤ r\nhr1 : r ≤ 1\nhr0' : 0 < r\n⊢ (r⁻¹ * r) • (z -ᵥ x) +ᵥ x = z\n[PROOFSTEP]\nrw [inv_mul_cancel hr0'.ne', one_smul, vsub_vadd]\n[GOAL]\ncase refine'_1.intro.intro.intro.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nhr0 : 0 ≤ 0\nhr1 : 0 ≤ 1\n⊢ x = ↑(lineMap x z) 0 ∨ z ∈ ↑(lineMap x (↑(lineMap x z) 0)) '' Set.Ici 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : x = y ∨ z ∈ ↑(lineMap x y) '' Set.Ici 1\n⊢ Wbtw R x y z\n[PROOFSTEP]\nrcases h with (rfl | ⟨r, ⟨hr, rfl⟩⟩)\n[GOAL]\ncase refine'_2.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\n⊢ Wbtw R x x z\n[PROOFSTEP]\nexact wbtw_self_left _ _ _\n[GOAL]\ncase refine'_2.inr.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nr : R\nhr : r ∈ Set.Ici 1\n⊢ Wbtw R x y (↑(lineMap x y) r)\n[PROOFSTEP]\nrw [Set.mem_Ici] at hr \n[GOAL]\ncase refine'_2.inr.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nr : R\nhr : 1 ≤ r\n⊢ Wbtw R x y (↑(lineMap x y) r)\n[PROOFSTEP]\nrefine' ⟨r⁻¹, ⟨inv_nonneg.2 (zero_le_one.trans hr), inv_le_one hr⟩, _⟩\n[GOAL]\ncase refine'_2.inr.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nr : R\nhr : 1 ≤ r\n⊢ ↑(lineMap x (↑(lineMap x y) r)) r⁻¹ = y\n[PROOFSTEP]\nsimp only [lineMap_apply, smul_smul, vadd_vsub]\n[GOAL]\ncase refine'_2.inr.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nr : R\nhr : 1 ≤ r\n⊢ (r⁻¹ * r) • (y -ᵥ x) +ᵥ x = y\n[PROOFSTEP]\nrw [inv_mul_cancel (one_pos.trans_le hr).ne', one_smul, vsub_vadd]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : Wbtw R x y z\nhne : x ≠ y\n⊢ z ∈ affineSpan R {x, y}\n[PROOFSTEP]\nrcases h.right_mem_image_Ici_of_left_ne hne with ⟨r, ⟨-, rfl⟩⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nhne : x ≠ y\nr : R\nh : Wbtw R x y (↑(lineMap x y) r)\n⊢ ↑(lineMap x y) r ∈ affineSpan R {x, y}\n[PROOFSTEP]\nexact lineMap_mem_affineSpan_pair _ _ _\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\n⊢ Sbtw R x y z ↔ x ≠ y ∧ z ∈ ↑(lineMap x y) '' Set.Ioi 1\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨h.left_ne, _⟩, fun h => _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : Sbtw R x y z\n⊢ z ∈ ↑(lineMap x y) '' Set.Ioi 1\n[PROOFSTEP]\nobtain ⟨r, ⟨hr, rfl⟩⟩ := h.wbtw.right_mem_image_Ici_of_left_ne h.left_ne\n[GOAL]\ncase refine'_1.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nr : R\nhr : r ∈ Set.Ici 1\nh : Sbtw R x y (↑(lineMap x y) r)\n⊢ ↑(lineMap x y) r ∈ ↑(lineMap x y) '' Set.Ioi 1\n[PROOFSTEP]\nrw [Set.mem_Ici] at hr \n[GOAL]\ncase refine'_1.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nr : R\nhr : 1 ≤ r\nh : Sbtw R x y (↑(lineMap x y) r)\n⊢ ↑(lineMap x y) r ∈ ↑(lineMap x y) '' Set.Ioi 1\n[PROOFSTEP]\nrcases hr.lt_or_eq with (hrlt | rfl)\n[GOAL]\ncase refine'_1.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nr : R\nhr : 1 ≤ r\nh : Sbtw R x y (↑(lineMap x y) r)\nhrlt : 1 < r\n⊢ ↑(lineMap x y) r ∈ ↑(lineMap x y) '' Set.Ioi 1\n[PROOFSTEP]\nexact Set.mem_image_of_mem _ hrlt\n[GOAL]\ncase refine'_1.intro.intro.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nhr : 1 ≤ 1\nh : Sbtw R x y (↑(lineMap x y) 1)\n⊢ ↑(lineMap x y) 1 ∈ ↑(lineMap x y) '' Set.Ioi 1\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase refine'_1.intro.intro.inr.h\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nhr : 1 ≤ 1\nh : Sbtw R x y (↑(lineMap x y) 1)\n⊢ False\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase refine'_2\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : x ≠ y ∧ z ∈ ↑(lineMap x y) '' Set.Ioi 1\n⊢ Sbtw R x y z\n[PROOFSTEP]\nrcases h with ⟨hne, r, hr, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nhne : x ≠ y\nr : R\nhr : r ∈ Set.Ioi 1\n⊢ Sbtw R x y (↑(lineMap x y) r)\n[PROOFSTEP]\nrw [Set.mem_Ioi] at hr \n[GOAL]\ncase refine'_2.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nhne : x ≠ y\nr : R\nhr : 1 < r\n⊢ Sbtw R x y (↑(lineMap x y) r)\n[PROOFSTEP]\nrefine'\n ⟨wbtw_iff_left_eq_or_right_mem_image_Ici.2\n (Or.inr (Set.mem_image_of_mem _ (Set.mem_of_mem_of_subset hr Set.Ioi_subset_Ici_self))),\n hne.symm, _⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nhne : x ≠ y\nr : R\nhr : 1 < r\n⊢ y ≠ ↑(lineMap x y) r\n[PROOFSTEP]\nrw [lineMap_apply, ← @vsub_ne_zero V, vsub_vadd_eq_vsub_sub]\n[GOAL]\ncase refine'_2.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nhne : x ≠ y\nr : R\nhr : 1 < r\n⊢ y -ᵥ x - r • (y -ᵥ x) ≠ 0\n[PROOFSTEP]\nnth_rw 1 [← one_smul R (y -ᵥ x)]\n[GOAL]\ncase refine'_2.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nhne : x ≠ y\nr : R\nhr : 1 < r\n⊢ 1 • (y -ᵥ x) - r • (y -ᵥ x) ≠ 0\n[PROOFSTEP]\nrw [← sub_smul, smul_ne_zero_iff, vsub_ne_zero, sub_ne_zero]\n[GOAL]\ncase refine'_2.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nhne : x ≠ y\nr : R\nhr : 1 < r\n⊢ 1 ≠ r ∧ y ≠ x\n[PROOFSTEP]\nexact ⟨hr.ne, hne.symm⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\n⊢ Wbtw R x y z ↔ z = y ∨ x ∈ ↑(lineMap z y) '' Set.Ici 1\n[PROOFSTEP]\nrw [wbtw_comm, wbtw_iff_left_eq_or_right_mem_image_Ici]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\n⊢ Sbtw R x y z ↔ z ≠ y ∧ x ∈ ↑(lineMap z y) '' Set.Ioi 1\n[PROOFSTEP]\nrw [sbtw_comm, sbtw_iff_left_ne_and_right_mem_image_Ioi]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nr₁ r₂ : R\nhr₁ : 0 ≤ r₁\nhr₂ : r₁ ≤ r₂\n⊢ Wbtw R x (r₁ • v +ᵥ x) (r₂ • v +ᵥ x)\n[PROOFSTEP]\nrefine' ⟨r₁ / r₂, ⟨div_nonneg hr₁ (hr₁.trans hr₂), div_le_one_of_le hr₂ (hr₁.trans hr₂)⟩, _⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nr₁ r₂ : R\nhr₁ : 0 ≤ r₁\nhr₂ : r₁ ≤ r₂\n⊢ ↑(lineMap x (r₂ • v +ᵥ x)) (r₁ / r₂) = r₁ • v +ᵥ x\n[PROOFSTEP]\nby_cases h : r₁ = 0\n[GOAL]\ncase pos\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nr₁ r₂ : R\nhr₁ : 0 ≤ r₁\nhr₂ : r₁ ≤ r₂\nh : r₁ = 0\n⊢ ↑(lineMap x (r₂ • v +ᵥ x)) (r₁ / r₂) = r₁ • v +ᵥ x\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nr₁ r₂ : R\nhr₁ : 0 ≤ r₁\nhr₂ : r₁ ≤ r₂\nh : ¬r₁ = 0\n⊢ ↑(lineMap x (r₂ • v +ᵥ x)) (r₁ / r₂) = r₁ • v +ᵥ x\n[PROOFSTEP]\nsimp [lineMap_apply, smul_smul, ((hr₁.lt_of_ne' h).trans_le hr₂).ne.symm]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nr₁ r₂ : R\nhr₁ : 0 ≤ r₁\nhr₂ : 0 ≤ r₂\n⊢ Wbtw R x (r₁ • v +ᵥ x) (r₂ • v +ᵥ x) ∨ Wbtw R x (r₂ • v +ᵥ x) (r₁ • v +ᵥ x)\n[PROOFSTEP]\nrcases le_total r₁ r₂ with (h | h)\n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nr₁ r₂ : R\nhr₁ : 0 ≤ r₁\nhr₂ : 0 ≤ r₂\nh : r₁ ≤ r₂\n⊢ Wbtw R x (r₁ • v +ᵥ x) (r₂ • v +ᵥ x) ∨ Wbtw R x (r₂ • v +ᵥ x) (r₁ • v +ᵥ x)\n[PROOFSTEP]\nexact Or.inl (wbtw_smul_vadd_smul_vadd_of_nonneg_of_le x v hr₁ h)\n[GOAL]\ncase inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nr₁ r₂ : R\nhr₁ : 0 ≤ r₁\nhr₂ : 0 ≤ r₂\nh : r₂ ≤ r₁\n⊢ Wbtw R x (r₁ • v +ᵥ x) (r₂ • v +ᵥ x) ∨ Wbtw R x (r₂ • v +ᵥ x) (r₁ • v +ᵥ x)\n[PROOFSTEP]\nexact Or.inr (wbtw_smul_vadd_smul_vadd_of_nonneg_of_le x v hr₂ h)\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nr₁ r₂ : R\nhr₁ : r₁ ≤ 0\nhr₂ : r₂ ≤ r₁\n⊢ Wbtw R x (r₁ • v +ᵥ x) (r₂ • v +ᵥ x)\n[PROOFSTEP]\nconvert wbtw_smul_vadd_smul_vadd_of_nonneg_of_le x (-v) (Left.nonneg_neg_iff.2 hr₁) (neg_le_neg_iff.2 hr₂) using 1\n[GOAL]\ncase h.e'_9\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nr₁ r₂ : R\nhr₁ : r₁ ≤ 0\nhr₂ : r₂ ≤ r₁\n⊢ r₁ • v +ᵥ x = -r₁ • -v +ᵥ x\n[PROOFSTEP]\nrw [neg_smul_neg]\n[GOAL]\ncase h.e'_10\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nr₁ r₂ : R\nhr₁ : r₁ ≤ 0\nhr₂ : r₂ ≤ r₁\n⊢ r₂ • v +ᵥ x = -r₂ • -v +ᵥ x\n[PROOFSTEP]\nrw [neg_smul_neg]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nr₁ r₂ : R\nhr₁ : r₁ ≤ 0\nhr₂ : r₂ ≤ 0\n⊢ Wbtw R x (r₁ • v +ᵥ x) (r₂ • v +ᵥ x) ∨ Wbtw R x (r₂ • v +ᵥ x) (r₁ • v +ᵥ x)\n[PROOFSTEP]\nrcases le_total r₁ r₂ with (h | h)\n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nr₁ r₂ : R\nhr₁ : r₁ ≤ 0\nhr₂ : r₂ ≤ 0\nh : r₁ ≤ r₂\n⊢ Wbtw R x (r₁ • v +ᵥ x) (r₂ • v +ᵥ x) ∨ Wbtw R x (r₂ • v +ᵥ x) (r₁ • v +ᵥ x)\n[PROOFSTEP]\nexact Or.inr (wbtw_smul_vadd_smul_vadd_of_nonpos_of_le x v hr₂ h)\n[GOAL]\ncase inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nr₁ r₂ : R\nhr₁ : r₁ ≤ 0\nhr₂ : r₂ ≤ 0\nh : r₂ ≤ r₁\n⊢ Wbtw R x (r₁ • v +ᵥ x) (r₂ • v +ᵥ x) ∨ Wbtw R x (r₂ • v +ᵥ x) (r₁ • v +ᵥ x)\n[PROOFSTEP]\nexact Or.inl (wbtw_smul_vadd_smul_vadd_of_nonpos_of_le x v hr₁ h)\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nr₁ r₂ : R\nhr₁ : r₁ ≤ 0\nhr₂ : 0 ≤ r₂\n⊢ Wbtw R (r₁ • v +ᵥ x) x (r₂ • v +ᵥ x)\n[PROOFSTEP]\nconvert\n wbtw_smul_vadd_smul_vadd_of_nonneg_of_le (r₁ • v +ᵥ x) v (Left.nonneg_neg_iff.2 hr₁)\n (neg_le_sub_iff_le_add.2 ((le_add_iff_nonneg_left r₁).2 hr₂)) using\n 1\n[GOAL]\ncase h.e'_9\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nr₁ r₂ : R\nhr₁ : r₁ ≤ 0\nhr₂ : 0 ≤ r₂\n⊢ x = -r₁ • v +ᵥ (r₁ • v +ᵥ x)\n[PROOFSTEP]\nsimp [sub_smul, ← add_vadd]\n[GOAL]\ncase h.e'_10\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nr₁ r₂ : R\nhr₁ : r₁ ≤ 0\nhr₂ : 0 ≤ r₂\n⊢ r₂ • v +ᵥ x = (r₂ - r₁) • v +ᵥ (r₁ • v +ᵥ x)\n[PROOFSTEP]\nsimp [sub_smul, ← add_vadd]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nr₁ r₂ : R\nhr₁ : 0 ≤ r₁\nhr₂ : r₂ ≤ 0\n⊢ Wbtw R (r₁ • v +ᵥ x) x (r₂ • v +ᵥ x)\n[PROOFSTEP]\nrw [wbtw_comm]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nr₁ r₂ : R\nhr₁ : 0 ≤ r₁\nhr₂ : r₂ ≤ 0\n⊢ Wbtw R (r₂ • v +ᵥ x) x (r₁ • v +ᵥ x)\n[PROOFSTEP]\nexact wbtw_smul_vadd_smul_vadd_of_nonpos_of_nonneg x v hr₂ hr₁\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nw x y z : P\nh₁ : Wbtw R w y z\nh₂ : Wbtw R w x y\n⊢ Wbtw R x y z\n[PROOFSTEP]\nrcases h₁ with ⟨t₁, ht₁, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nw x z : P\nt₁ : R\nht₁ : t₁ ∈ Set.Icc 0 1\nh₂ : Wbtw R w x (↑(lineMap w z) t₁)\n⊢ Wbtw R x (↑(lineMap w z) t₁) z\n[PROOFSTEP]\nrcases h₂ with ⟨t₂, ht₂, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nw z : P\nt₁ : R\nht₁ : t₁ ∈ Set.Icc 0 1\nt₂ : R\nht₂ : t₂ ∈ Set.Icc 0 1\n⊢ Wbtw R (↑(lineMap w (↑(lineMap w z) t₁)) t₂) (↑(lineMap w z) t₁) z\n[PROOFSTEP]\nrefine'\n ⟨(t₁ - t₂ * t₁) / (1 - t₂ * t₁),\n ⟨div_nonneg (sub_nonneg.2 (mul_le_of_le_one_left ht₁.1 ht₂.2)) (sub_nonneg.2 (mul_le_one ht₂.2 ht₁.1 ht₁.2)),\n div_le_one_of_le (sub_le_sub_right ht₁.2 _) (sub_nonneg.2 (mul_le_one ht₂.2 ht₁.1 ht₁.2))⟩,\n _⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nw z : P\nt₁ : R\nht₁ : t₁ ∈ Set.Icc 0 1\nt₂ : R\nht₂ : t₂ ∈ Set.Icc 0 1\n⊢ ↑(lineMap (↑(lineMap w (↑(lineMap w z) t₁)) t₂) z) ((t₁ - t₂ * t₁) / (1 - t₂ * t₁)) = ↑(lineMap w z) t₁\n[PROOFSTEP]\nsimp only [lineMap_apply, smul_smul, ← add_vadd, vsub_vadd_eq_vsub_sub, smul_sub, ← sub_smul, ← add_smul, vadd_vsub,\n vadd_right_cancel_iff, div_mul_eq_mul_div, div_sub_div_same]\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nw z : P\nt₁ : R\nht₁ : t₁ ∈ Set.Icc 0 1\nt₂ : R\nht₂ : t₂ ∈ Set.Icc 0 1\n⊢ ((t₁ - t₂ * t₁ - (t₁ - t₂ * t₁) * (t₂ * t₁)) / (1 - t₂ * t₁) + t₂ * t₁) • (z -ᵥ w) = t₁ • (z -ᵥ w)\n[PROOFSTEP]\nnth_rw 1 [← mul_one (t₁ - t₂ * t₁)]\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nw z : P\nt₁ : R\nht₁ : t₁ ∈ Set.Icc 0 1\nt₂ : R\nht₂ : t₂ ∈ Set.Icc 0 1\n⊢ (((t₁ - t₂ * t₁) * 1 - (t₁ - t₂ * t₁) * (t₂ * t₁)) / (1 - t₂ * t₁) + t₂ * t₁) • (z -ᵥ w) = t₁ • (z -ᵥ w)\n[PROOFSTEP]\nrw [← mul_sub, mul_div_assoc]\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nw z : P\nt₁ : R\nht₁ : t₁ ∈ Set.Icc 0 1\nt₂ : R\nht₂ : t₂ ∈ Set.Icc 0 1\n⊢ ((t₁ - t₂ * t₁) * ((1 - t₂ * t₁) / (1 - t₂ * t₁)) + t₂ * t₁) • (z -ᵥ w) = t₁ • (z -ᵥ w)\n[PROOFSTEP]\nby_cases h : 1 - t₂ * t₁ = 0\n[GOAL]\ncase pos\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nw z : P\nt₁ : R\nht₁ : t₁ ∈ Set.Icc 0 1\nt₂ : R\nht₂ : t₂ ∈ Set.Icc 0 1\nh : 1 - t₂ * t₁ = 0\n⊢ ((t₁ - t₂ * t₁) * ((1 - t₂ * t₁) / (1 - t₂ * t₁)) + t₂ * t₁) • (z -ᵥ w) = t₁ • (z -ᵥ w)\n[PROOFSTEP]\nrw [sub_eq_zero, eq_comm] at h \n[GOAL]\ncase pos\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nw z : P\nt₁ : R\nht₁ : t₁ ∈ Set.Icc 0 1\nt₂ : R\nht₂ : t₂ ∈ Set.Icc 0 1\nh : t₂ * t₁ = 1\n⊢ ((t₁ - t₂ * t₁) * ((1 - t₂ * t₁) / (1 - t₂ * t₁)) + t₂ * t₁) • (z -ᵥ w) = t₁ • (z -ᵥ w)\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nw z : P\nt₁ : R\nht₁ : t₁ ∈ Set.Icc 0 1\nt₂ : R\nht₂ : t₂ ∈ Set.Icc 0 1\nh : t₂ * t₁ = 1\n⊢ ((t₁ - 1) * ((1 - 1) / (1 - 1)) + 1) • (z -ᵥ w) = t₁ • (z -ᵥ w)\n[PROOFSTEP]\nsuffices t₁ = 1 by simp [this]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nw z : P\nt₁ : R\nht₁ : t₁ ∈ Set.Icc 0 1\nt₂ : R\nht₂ : t₂ ∈ Set.Icc 0 1\nh : t₂ * t₁ = 1\nthis : t₁ = 1\n⊢ ((t₁ - 1) * ((1 - 1) / (1 - 1)) + 1) • (z -ᵥ w) = t₁ • (z -ᵥ w)\n[PROOFSTEP]\nsimp [this]\n[GOAL]\ncase pos\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nw z : P\nt₁ : R\nht₁ : t₁ ∈ Set.Icc 0 1\nt₂ : R\nht₂ : t₂ ∈ Set.Icc 0 1\nh : t₂ * t₁ = 1\n⊢ t₁ = 1\n[PROOFSTEP]\nexact eq_of_le_of_not_lt ht₁.2 fun ht₁lt => (mul_lt_one_of_nonneg_of_lt_one_right ht₂.2 ht₁.1 ht₁lt).ne h\n[GOAL]\ncase neg\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nw z : P\nt₁ : R\nht₁ : t₁ ∈ Set.Icc 0 1\nt₂ : R\nht₂ : t₂ ∈ Set.Icc 0 1\nh : ¬1 - t₂ * t₁ = 0\n⊢ ((t₁ - t₂ * t₁) * ((1 - t₂ * t₁) / (1 - t₂ * t₁)) + t₂ * t₁) • (z -ᵥ w) = t₁ • (z -ᵥ w)\n[PROOFSTEP]\nrw [div_self h]\n[GOAL]\ncase neg\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nw z : P\nt₁ : R\nht₁ : t₁ ∈ Set.Icc 0 1\nt₂ : R\nht₂ : t₂ ∈ Set.Icc 0 1\nh : ¬1 - t₂ * t₁ = 0\n⊢ ((t₁ - t₂ * t₁) * 1 + t₂ * t₁) • (z -ᵥ w) = t₁ • (z -ᵥ w)\n[PROOFSTEP]\nring_nf\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nw x y z : P\nh₁ : Wbtw R w x z\nh₂ : Wbtw R x y z\n⊢ Wbtw R w x y\n[PROOFSTEP]\nrw [wbtw_comm] at *\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nw x y z : P\nh₁ : Wbtw R z x w\nh₂ : Wbtw R z y x\n⊢ Wbtw R y x w\n[PROOFSTEP]\nexact h₁.trans_left_right h₂\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : Wbtw R x y z\n⊢ Collinear R {x, y, z}\n[PROOFSTEP]\nrw [collinear_iff_exists_forall_eq_smul_vadd]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : Wbtw R x y z\n⊢ ∃ p₀ v, ∀ (p : P), p ∈ {x, y, z} → ∃ r, p = r • v +ᵥ p₀\n[PROOFSTEP]\nrefine' ⟨x, z -ᵥ x, _⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : Wbtw R x y z\n⊢ ∀ (p : P), p ∈ {x, y, z} → ∃ r, p = r • (z -ᵥ x) +ᵥ x\n[PROOFSTEP]\nintro p hp\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : Wbtw R x y z\np : P\nhp : p ∈ {x, y, z}\n⊢ ∃ r, p = r • (z -ᵥ x) +ᵥ x\n[PROOFSTEP]\nsimp_rw [Set.mem_insert_iff, Set.mem_singleton_iff] at hp \n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : Wbtw R x y z\np : P\nhp : p = x ∨ p = y ∨ p = z\n⊢ ∃ r, p = r • (z -ᵥ x) +ᵥ x\n[PROOFSTEP]\nrcases hp with (rfl | rfl | rfl)\n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\ny z p : P\nh : Wbtw R p y z\n⊢ ∃ r, p = r • (z -ᵥ p) +ᵥ p\n[PROOFSTEP]\nrefine' ⟨0, _⟩\n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\ny z p : P\nh : Wbtw R p y z\n⊢ p = 0 • (z -ᵥ p) +ᵥ p\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z p : P\nh : Wbtw R x p z\n⊢ ∃ r, p = r • (z -ᵥ x) +ᵥ x\n[PROOFSTEP]\nrcases h with ⟨t, -, rfl⟩\n[GOAL]\ncase inr.inl.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nt : R\n⊢ ∃ r, ↑(lineMap x z) t = r • (z -ᵥ x) +ᵥ x\n[PROOFSTEP]\nexact ⟨t, rfl⟩\n[GOAL]\ncase inr.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y p : P\nh : Wbtw R x y p\n⊢ ∃ r, p = r • (p -ᵥ x) +ᵥ x\n[PROOFSTEP]\nrefine' ⟨1, _⟩\n[GOAL]\ncase inr.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y p : P\nh : Wbtw R x y p\n⊢ p = 1 • (p -ᵥ x) +ᵥ x\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : Collinear R {x, y, z}\n⊢ Wbtw R x y z ∨ Wbtw R y z x ∨ Wbtw R z x y\n[PROOFSTEP]\nrw [collinear_iff_of_mem (Set.mem_insert _ _)] at h \n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : ∃ v, ∀ (p : P), p ∈ {x, y, z} → ∃ r, p = r • v +ᵥ x\n⊢ Wbtw R x y z ∨ Wbtw R y z x ∨ Wbtw R z x y\n[PROOFSTEP]\nrcases h with ⟨v, h⟩\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nv : V\nh : ∀ (p : P), p ∈ {x, y, z} → ∃ r, p = r • v +ᵥ x\n⊢ Wbtw R x y z ∨ Wbtw R y z x ∨ Wbtw R z x y\n[PROOFSTEP]\nsimp_rw [Set.mem_insert_iff, Set.mem_singleton_iff] at h \n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nv : V\nh : ∀ (p : P), p = x ∨ p = y ∨ p = z → ∃ r, p = r • v +ᵥ x\n⊢ Wbtw R x y z ∨ Wbtw R y z x ∨ Wbtw R z x y\n[PROOFSTEP]\nhave hy := h y (Or.inr (Or.inl rfl))\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nv : V\nh : ∀ (p : P), p = x ∨ p = y ∨ p = z → ∃ r, p = r • v +ᵥ x\nhy : ∃ r, y = r • v +ᵥ x\n⊢ Wbtw R x y z ∨ Wbtw R y z x ∨ Wbtw R z x y\n[PROOFSTEP]\nhave hz := h z (Or.inr (Or.inr rfl))\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nv : V\nh : ∀ (p : P), p = x ∨ p = y ∨ p = z → ∃ r, p = r • v +ᵥ x\nhy : ∃ r, y = r • v +ᵥ x\nhz : ∃ r, z = r • v +ᵥ x\n⊢ Wbtw R x y z ∨ Wbtw R y z x ∨ Wbtw R z x y\n[PROOFSTEP]\nrcases hy with ⟨ty, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx z : P\nv : V\nhz : ∃ r, z = r • v +ᵥ x\nty : R\nh : ∀ (p : P), p = x ∨ p = ty • v +ᵥ x ∨ p = z → ∃ r, p = r • v +ᵥ x\n⊢ Wbtw R x (ty • v +ᵥ x) z ∨ Wbtw R (ty • v +ᵥ x) z x ∨ Wbtw R z x (ty • v +ᵥ x)\n[PROOFSTEP]\nrcases hz with ⟨tz, rfl⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nty tz : R\nh : ∀ (p : P), p = x ∨ p = ty • v +ᵥ x ∨ p = tz • v +ᵥ x → ∃ r, p = r • v +ᵥ x\n⊢ Wbtw R x (ty • v +ᵥ x) (tz • v +ᵥ x) ∨ Wbtw R (ty • v +ᵥ x) (tz • v +ᵥ x) x ∨ Wbtw R (tz • v +ᵥ x) x (ty • v +ᵥ x)\n[PROOFSTEP]\nrcases lt_trichotomy ty 0 with (hy0 | rfl | hy0)\n[GOAL]\ncase intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nty tz : R\nh : ∀ (p : P), p = x ∨ p = ty • v +ᵥ x ∨ p = tz • v +ᵥ x → ∃ r, p = r • v +ᵥ x\nhy0 : ty < 0\n⊢ Wbtw R x (ty • v +ᵥ x) (tz • v +ᵥ x) ∨ Wbtw R (ty • v +ᵥ x) (tz • v +ᵥ x) x ∨ Wbtw R (tz • v +ᵥ x) x (ty • v +ᵥ x)\n[PROOFSTEP]\nrcases lt_trichotomy tz 0 with (hz0 | rfl | hz0)\n[GOAL]\ncase intro.intro.intro.inl.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nty tz : R\nh : ∀ (p : P), p = x ∨ p = ty • v +ᵥ x ∨ p = tz • v +ᵥ x → ∃ r, p = r • v +ᵥ x\nhy0 : ty < 0\nhz0 : tz < 0\n⊢ Wbtw R x (ty • v +ᵥ x) (tz • v +ᵥ x) ∨ Wbtw R (ty • v +ᵥ x) (tz • v +ᵥ x) x ∨ Wbtw R (tz • v +ᵥ x) x (ty • v +ᵥ x)\n[PROOFSTEP]\nrw [wbtw_comm (z := x)]\n[GOAL]\ncase intro.intro.intro.inl.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nty tz : R\nh : ∀ (p : P), p = x ∨ p = ty • v +ᵥ x ∨ p = tz • v +ᵥ x → ∃ r, p = r • v +ᵥ x\nhy0 : ty < 0\nhz0 : tz < 0\n⊢ Wbtw R x (ty • v +ᵥ x) (tz • v +ᵥ x) ∨ Wbtw R x (tz • v +ᵥ x) (ty • v +ᵥ x) ∨ Wbtw R (tz • v +ᵥ x) x (ty • v +ᵥ x)\n[PROOFSTEP]\nrw [← or_assoc]\n[GOAL]\ncase intro.intro.intro.inl.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nty tz : R\nh : ∀ (p : P), p = x ∨ p = ty • v +ᵥ x ∨ p = tz • v +ᵥ x → ∃ r, p = r • v +ᵥ x\nhy0 : ty < 0\nhz0 : tz < 0\n⊢ (Wbtw R x (ty • v +ᵥ x) (tz • v +ᵥ x) ∨ Wbtw R x (tz • v +ᵥ x) (ty • v +ᵥ x)) ∨ Wbtw R (tz • v +ᵥ x) x (ty • v +ᵥ x)\n[PROOFSTEP]\nexact Or.inl (wbtw_or_wbtw_smul_vadd_of_nonpos _ _ hy0.le hz0.le)\n[GOAL]\ncase intro.intro.intro.inl.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nty : R\nhy0 : ty < 0\nh : ∀ (p : P), p = x ∨ p = ty • v +ᵥ x ∨ p = 0 • v +ᵥ x → ∃ r, p = r • v +ᵥ x\n⊢ Wbtw R x (ty • v +ᵥ x) (0 • v +ᵥ x) ∨ Wbtw R (ty • v +ᵥ x) (0 • v +ᵥ x) x ∨ Wbtw R (0 • v +ᵥ x) x (ty • v +ᵥ x)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.inl.inr.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nty tz : R\nh : ∀ (p : P), p = x ∨ p = ty • v +ᵥ x ∨ p = tz • v +ᵥ x → ∃ r, p = r • v +ᵥ x\nhy0 : ty < 0\nhz0 : 0 < tz\n⊢ Wbtw R x (ty • v +ᵥ x) (tz • v +ᵥ x) ∨ Wbtw R (ty • v +ᵥ x) (tz • v +ᵥ x) x ∨ Wbtw R (tz • v +ᵥ x) x (ty • v +ᵥ x)\n[PROOFSTEP]\nexact Or.inr (Or.inr (wbtw_smul_vadd_smul_vadd_of_nonneg_of_nonpos _ _ hz0.le hy0.le))\n[GOAL]\ncase intro.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\ntz : R\nh : ∀ (p : P), p = x ∨ p = 0 • v +ᵥ x ∨ p = tz • v +ᵥ x → ∃ r, p = r • v +ᵥ x\n⊢ Wbtw R x (0 • v +ᵥ x) (tz • v +ᵥ x) ∨ Wbtw R (0 • v +ᵥ x) (tz • v +ᵥ x) x ∨ Wbtw R (tz • v +ᵥ x) x (0 • v +ᵥ x)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.inr.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nty tz : R\nh : ∀ (p : P), p = x ∨ p = ty • v +ᵥ x ∨ p = tz • v +ᵥ x → ∃ r, p = r • v +ᵥ x\nhy0 : 0 < ty\n⊢ Wbtw R x (ty • v +ᵥ x) (tz • v +ᵥ x) ∨ Wbtw R (ty • v +ᵥ x) (tz • v +ᵥ x) x ∨ Wbtw R (tz • v +ᵥ x) x (ty • v +ᵥ x)\n[PROOFSTEP]\nrcases lt_trichotomy tz 0 with (hz0 | rfl | hz0)\n[GOAL]\ncase intro.intro.intro.inr.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nty tz : R\nh : ∀ (p : P), p = x ∨ p = ty • v +ᵥ x ∨ p = tz • v +ᵥ x → ∃ r, p = r • v +ᵥ x\nhy0 : 0 < ty\nhz0 : tz < 0\n⊢ Wbtw R x (ty • v +ᵥ x) (tz • v +ᵥ x) ∨ Wbtw R (ty • v +ᵥ x) (tz • v +ᵥ x) x ∨ Wbtw R (tz • v +ᵥ x) x (ty • v +ᵥ x)\n[PROOFSTEP]\nrefine' Or.inr (Or.inr (wbtw_smul_vadd_smul_vadd_of_nonpos_of_nonneg _ _ hz0.le hy0.le))\n[GOAL]\ncase intro.intro.intro.inr.inr.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nty : R\nhy0 : 0 < ty\nh : ∀ (p : P), p = x ∨ p = ty • v +ᵥ x ∨ p = 0 • v +ᵥ x → ∃ r, p = r • v +ᵥ x\n⊢ Wbtw R x (ty • v +ᵥ x) (0 • v +ᵥ x) ∨ Wbtw R (ty • v +ᵥ x) (0 • v +ᵥ x) x ∨ Wbtw R (0 • v +ᵥ x) x (ty • v +ᵥ x)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.inr.inr.inr.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nty tz : R\nh : ∀ (p : P), p = x ∨ p = ty • v +ᵥ x ∨ p = tz • v +ᵥ x → ∃ r, p = r • v +ᵥ x\nhy0 : 0 < ty\nhz0 : 0 < tz\n⊢ Wbtw R x (ty • v +ᵥ x) (tz • v +ᵥ x) ∨ Wbtw R (ty • v +ᵥ x) (tz • v +ᵥ x) x ∨ Wbtw R (tz • v +ᵥ x) x (ty • v +ᵥ x)\n[PROOFSTEP]\nrw [wbtw_comm (z := x)]\n[GOAL]\ncase intro.intro.intro.inr.inr.inr.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nty tz : R\nh : ∀ (p : P), p = x ∨ p = ty • v +ᵥ x ∨ p = tz • v +ᵥ x → ∃ r, p = r • v +ᵥ x\nhy0 : 0 < ty\nhz0 : 0 < tz\n⊢ Wbtw R x (ty • v +ᵥ x) (tz • v +ᵥ x) ∨ Wbtw R x (tz • v +ᵥ x) (ty • v +ᵥ x) ∨ Wbtw R (tz • v +ᵥ x) x (ty • v +ᵥ x)\n[PROOFSTEP]\nrw [← or_assoc]\n[GOAL]\ncase intro.intro.intro.inr.inr.inr.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx : P\nv : V\nty tz : R\nh : ∀ (p : P), p = x ∨ p = ty • v +ᵥ x ∨ p = tz • v +ᵥ x → ∃ r, p = r • v +ᵥ x\nhy0 : 0 < ty\nhz0 : 0 < tz\n⊢ (Wbtw R x (ty • v +ᵥ x) (tz • v +ᵥ x) ∨ Wbtw R x (tz • v +ᵥ x) (ty • v +ᵥ x)) ∨ Wbtw R (tz • v +ᵥ x) x (ty • v +ᵥ x)\n[PROOFSTEP]\nexact Or.inl (wbtw_or_wbtw_smul_vadd_of_nonneg _ _ hy0.le hz0.le)\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\n⊢ Wbtw R x y z ↔ SameRay R (y -ᵥ x) (z -ᵥ y)\n[PROOFSTEP]\nrefine' ⟨Wbtw.sameRay_vsub, fun h => _⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : SameRay R (y -ᵥ x) (z -ᵥ y)\n⊢ Wbtw R x y z\n[PROOFSTEP]\nrcases h with (h | h | ⟨r₁, r₂, hr₁, hr₂, h⟩)\n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : y -ᵥ x = 0\n⊢ Wbtw R x y z\n[PROOFSTEP]\nrw [vsub_eq_zero_iff_eq] at h \n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : y = x\n⊢ Wbtw R x y z\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : z -ᵥ y = 0\n⊢ Wbtw R x y z\n[PROOFSTEP]\nrw [vsub_eq_zero_iff_eq] at h \n[GOAL]\ncase inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nh : z = y\n⊢ Wbtw R x y z\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase inr.inr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (y -ᵥ x) = r₂ • (z -ᵥ y)\n⊢ Wbtw R x y z\n[PROOFSTEP]\nrefine'\n ⟨r₂ / (r₁ + r₂),\n ⟨div_nonneg hr₂.le (add_nonneg hr₁.le hr₂.le),\n div_le_one_of_le (le_add_of_nonneg_left hr₁.le) (add_nonneg hr₁.le hr₂.le)⟩,\n _⟩\n[GOAL]\ncase inr.inr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (y -ᵥ x) = r₂ • (z -ᵥ y)\n⊢ ↑(lineMap x z) (r₂ / (r₁ + r₂)) = y\n[PROOFSTEP]\nhave h' : z = r₂⁻¹ • r₁ • (y -ᵥ x) +ᵥ y := by simp [h, hr₂.ne']\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (y -ᵥ x) = r₂ • (z -ᵥ y)\n⊢ z = r₂⁻¹ • r₁ • (y -ᵥ x) +ᵥ y\n[PROOFSTEP]\nsimp [h, hr₂.ne']\n[GOAL]\ncase inr.inr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (y -ᵥ x) = r₂ • (z -ᵥ y)\nh' : z = r₂⁻¹ • r₁ • (y -ᵥ x) +ᵥ y\n⊢ ↑(lineMap x z) (r₂ / (r₁ + r₂)) = y\n[PROOFSTEP]\nrw [eq_comm]\n[GOAL]\ncase inr.inr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (y -ᵥ x) = r₂ • (z -ᵥ y)\nh' : z = r₂⁻¹ • r₁ • (y -ᵥ x) +ᵥ y\n⊢ y = ↑(lineMap x z) (r₂ / (r₁ + r₂))\n[PROOFSTEP]\nsimp only [lineMap_apply, h', vadd_vsub_assoc, smul_smul, ← add_smul, eq_vadd_iff_vsub_eq, smul_add]\n[GOAL]\ncase inr.inr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (y -ᵥ x) = r₂ • (z -ᵥ y)\nh' : z = r₂⁻¹ • r₁ • (y -ᵥ x) +ᵥ y\n⊢ y -ᵥ x = (r₂ / (r₁ + r₂) * (r₂⁻¹ * r₁) + r₂ / (r₁ + r₂)) • (y -ᵥ x)\n[PROOFSTEP]\nconvert (one_smul R (y -ᵥ x)).symm\n[GOAL]\ncase h.e'_3.h.e'_5\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (y -ᵥ x) = r₂ • (z -ᵥ y)\nh' : z = r₂⁻¹ • r₁ • (y -ᵥ x) +ᵥ y\n⊢ r₂ / (r₁ + r₂) * (r₂⁻¹ * r₁) + r₂ / (r₁ + r₂) = 1\n[PROOFSTEP]\nfield_simp [(add_pos hr₁ hr₂).ne', hr₂.ne']\n[GOAL]\ncase h.e'_3.h.e'_5\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y z : P\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (y -ᵥ x) = r₂ • (z -ᵥ y)\nh' : z = r₂⁻¹ • r₁ • (y -ᵥ x) +ᵥ y\n⊢ r₂ * r₁ * (r₁ + r₂) + r₂ * ((r₁ + r₂) * r₂) = (r₁ + r₂) * r₂ * (r₁ + r₂)\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\n⊢ Wbtw R y x (↑(pointReflection R x) y)\n[PROOFSTEP]\nrefine' ⟨2⁻¹, ⟨by norm_num, by norm_num⟩, _⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\n⊢ 0 ≤ 2⁻¹\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\n⊢ 2⁻¹ ≤ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\n⊢ ↑(lineMap y (↑(pointReflection R x) y)) 2⁻¹ = x\n[PROOFSTEP]\nrw [lineMap_apply, pointReflection_apply, vadd_vsub_assoc, ← two_smul R (x -ᵥ y)]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\n⊢ 2⁻¹ • 2 • (x -ᵥ y) +ᵥ y = x\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nh : x ≠ y\n⊢ Sbtw R y x (↑(pointReflection R x) y)\n[PROOFSTEP]\nrefine' ⟨wbtw_pointReflection _ _ _, h, _⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nh : x ≠ y\n⊢ x ≠ ↑(pointReflection R x) y\n[PROOFSTEP]\nnth_rw 1 [← pointReflection_self R x]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nh : x ≠ y\n⊢ ↑(pointReflection R x) x ≠ ↑(pointReflection R x) y\n[PROOFSTEP]\nexact (pointReflection_involutive R x).injective.ne h\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\n⊢ Wbtw R x (midpoint R x y) y\n[PROOFSTEP]\nconvert wbtw_pointReflection R (midpoint R x y) x\n[GOAL]\ncase h.e'_10\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\n⊢ y = ↑(pointReflection R (midpoint R x y)) x\n[PROOFSTEP]\nrw [pointReflection_midpoint_left]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nh : x ≠ y\n⊢ Sbtw R x (midpoint R x y) y\n[PROOFSTEP]\nhave h : midpoint R x y ≠ x := by simp [h]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nh : x ≠ y\n⊢ midpoint R x y ≠ x\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nh✝ : x ≠ y\nh : midpoint R x y ≠ x\n⊢ Sbtw R x (midpoint R x y) y\n[PROOFSTEP]\nconvert sbtw_pointReflection_of_ne R h\n[GOAL]\ncase h.e'_10\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : LinearOrderedField R\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : AddTorsor V P\nx y : P\nh✝ : x ≠ y\nh : midpoint R x y ≠ x\n⊢ y = ↑(pointReflection R (midpoint R x y)) x\n[PROOFSTEP]\nrw [pointReflection_midpoint_left]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.Between", "llama_tokens": 164742, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8006920020959544, "lm_q2_score": 0.7122321842389469, "lm_q1q2_score": 0.570278613555457}} {"text": "[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\nβ : Type u_3\nm : β → (i : ι) → α i\nl : Filter β\n⊢ Tendsto m l (pi f) ↔ ∀ (i : ι), Tendsto (fun x => m x i) l (f i)\n[PROOFSTEP]\nsimp only [pi, tendsto_iInf, tendsto_comap_iff]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\nβ : Type u_3\nm : β → (i : ι) → α i\nl : Filter β\n⊢ (∀ (i : ι), Tendsto (eval i ∘ m) l (f i)) ↔ ∀ (i : ι), Tendsto (fun x => m x i) l (f i)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\nI : Set ι\nhI : Set.Finite I\nh : ∀ (i : ι), i ∈ I → s i ∈ f i\n⊢ Set.pi I s ∈ pi f\n[PROOFSTEP]\nrw [pi_def, biInter_eq_iInter]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\nI : Set ι\nhI : Set.Finite I\nh : ∀ (i : ι), i ∈ I → s i ∈ f i\n⊢ ⋂ (x : ↑I), eval ↑x ⁻¹' s ↑x ∈ pi f\n[PROOFSTEP]\nrefine' mem_iInf_of_iInter hI (fun i => _) Subset.rfl\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\nI : Set ι\nhI : Set.Finite I\nh : ∀ (i : ι), i ∈ I → s i ∈ f i\ni : ↑I\n⊢ eval ↑i ⁻¹' s ↑i ∈ comap (eval ↑i) (f ↑i)\n[PROOFSTEP]\nexact preimage_mem_comap (h i i.2)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns✝ : (i : ι) → Set (α i)\ns : Set ((i : ι) → α i)\n⊢ s ∈ pi f ↔ ∃ I, Set.Finite I ∧ ∃ t, (∀ (i : ι), t i ∈ f i) ∧ Set.pi I t ⊆ s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns✝ : (i : ι) → Set (α i)\ns : Set ((i : ι) → α i)\n⊢ s ∈ pi f → ∃ I, Set.Finite I ∧ ∃ t, (∀ (i : ι), t i ∈ f i) ∧ Set.pi I t ⊆ s\n[PROOFSTEP]\nsimp only [pi, mem_iInf', mem_comap, pi_def]\n[GOAL]\ncase mp\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns✝ : (i : ι) → Set (α i)\ns : Set ((i : ι) → α i)\n⊢ (∃ I,\n Set.Finite I ∧\n ∃ V,\n (∀ (i : ι), ∃ t, t ∈ f i ∧ eval i ⁻¹' t ⊆ V i) ∧\n (∀ (i : ι), ¬i ∈ I → V i = univ) ∧ s = ⋂ (i : ι) (_ : i ∈ I), V i ∧ s = ⋂ (i : ι), V i) →\n ∃ I, Set.Finite I ∧ ∃ t, (∀ (i : ι), t i ∈ f i) ∧ ⋂ (a : ι) (_ : a ∈ I), eval a ⁻¹' t a ⊆ s\n[PROOFSTEP]\nrintro ⟨I, If, V, hVf, -, rfl, -⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\nI : Set ι\nIf : Set.Finite I\nV : ι → Set ((i : ι) → α i)\nhVf : ∀ (i : ι), ∃ t, t ∈ f i ∧ eval i ⁻¹' t ⊆ V i\n⊢ ∃ I_1,\n Set.Finite I_1 ∧ ∃ t, (∀ (i : ι), t i ∈ f i) ∧ ⋂ (a : ι) (_ : a ∈ I_1), eval a ⁻¹' t a ⊆ ⋂ (i : ι) (_ : i ∈ I), V i\n[PROOFSTEP]\nchoose t htf htV using hVf\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\nI : Set ι\nIf : Set.Finite I\nV : ι → Set ((i : ι) → α i)\nt : (i : ι) → Set (α i)\nhtf : ∀ (i : ι), t i ∈ f i\nhtV : ∀ (i : ι), eval i ⁻¹' t i ⊆ V i\n⊢ ∃ I_1,\n Set.Finite I_1 ∧ ∃ t, (∀ (i : ι), t i ∈ f i) ∧ ⋂ (a : ι) (_ : a ∈ I_1), eval a ⁻¹' t a ⊆ ⋂ (i : ι) (_ : i ∈ I), V i\n[PROOFSTEP]\nexact ⟨I, If, t, htf, iInter₂_mono fun i _ => htV i⟩\n[GOAL]\ncase mpr\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns✝ : (i : ι) → Set (α i)\ns : Set ((i : ι) → α i)\n⊢ (∃ I, Set.Finite I ∧ ∃ t, (∀ (i : ι), t i ∈ f i) ∧ Set.pi I t ⊆ s) → s ∈ pi f\n[PROOFSTEP]\nrintro ⟨I, If, t, htf, hts⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns✝ : (i : ι) → Set (α i)\ns : Set ((i : ι) → α i)\nI : Set ι\nIf : Set.Finite I\nt : (i : ι) → Set (α i)\nhtf : ∀ (i : ι), t i ∈ f i\nhts : Set.pi I t ⊆ s\n⊢ s ∈ pi f\n[PROOFSTEP]\nexact mem_of_superset (pi_mem_pi If fun i _ => htf i) hts\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\nI : Set ι\nh : Set.pi I s ∈ pi f\ni : ι\nhi : i ∈ I\n⊢ s i ∈ f i\n[PROOFSTEP]\nrcases mem_pi.1 h with ⟨I', -, t, htf, hts⟩\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\nI : Set ι\nh : Set.pi I s ∈ pi f\ni : ι\nhi : i ∈ I\nI' : Set ι\nt : (i : ι) → Set (α i)\nhtf : ∀ (i : ι), t i ∈ f i\nhts : Set.pi I' t ⊆ Set.pi I s\n⊢ s i ∈ f i\n[PROOFSTEP]\nrefine' mem_of_superset (htf i) fun x hx => _\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\nI : Set ι\nh : Set.pi I s ∈ pi f\ni : ι\nhi : i ∈ I\nI' : Set ι\nt : (i : ι) → Set (α i)\nhtf : ∀ (i : ι), t i ∈ f i\nhts : Set.pi I' t ⊆ Set.pi I s\nx : α i\nhx : x ∈ t i\n⊢ x ∈ s i\n[PROOFSTEP]\nhave : ∀ i, (t i).Nonempty := fun i => nonempty_of_mem (htf i)\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\nI : Set ι\nh : Set.pi I s ∈ pi f\ni : ι\nhi : i ∈ I\nI' : Set ι\nt : (i : ι) → Set (α i)\nhtf : ∀ (i : ι), t i ∈ f i\nhts : Set.pi I' t ⊆ Set.pi I s\nx : α i\nhx : x ∈ t i\nthis : ∀ (i : ι), Set.Nonempty (t i)\n⊢ x ∈ s i\n[PROOFSTEP]\nchoose g hg using this\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\nI : Set ι\nh : Set.pi I s ∈ pi f\ni : ι\nhi : i ∈ I\nI' : Set ι\nt : (i : ι) → Set (α i)\nhtf : ∀ (i : ι), t i ∈ f i\nhts : Set.pi I' t ⊆ Set.pi I s\nx : α i\nhx : x ∈ t i\ng : (i : ι) → α i\nhg : ∀ (i : ι), g i ∈ t i\n⊢ x ∈ s i\n[PROOFSTEP]\nhave : update g i x ∈ I'.pi t := fun j _ => by rcases eq_or_ne j i with (rfl | hne) <;> simp [*]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\nI : Set ι\nh : Set.pi I s ∈ pi f\ni : ι\nhi : i ∈ I\nI' : Set ι\nt : (i : ι) → Set (α i)\nhtf : ∀ (i : ι), t i ∈ f i\nhts : Set.pi I' t ⊆ Set.pi I s\nx : α i\nhx : x ∈ t i\ng : (i : ι) → α i\nhg : ∀ (i : ι), g i ∈ t i\nj : ι\nx✝ : j ∈ I'\n⊢ update g i x j ∈ t j\n[PROOFSTEP]\nrcases eq_or_ne j i with (rfl | hne)\n[GOAL]\ncase inl\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\nI : Set ι\nh : Set.pi I s ∈ pi f\nI' : Set ι\nt : (i : ι) → Set (α i)\nhtf : ∀ (i : ι), t i ∈ f i\nhts : Set.pi I' t ⊆ Set.pi I s\ng : (i : ι) → α i\nhg : ∀ (i : ι), g i ∈ t i\nj : ι\nx✝ : j ∈ I'\nhi : j ∈ I\nx : α j\nhx : x ∈ t j\n⊢ update g j x j ∈ t j\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase inr\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\nI : Set ι\nh : Set.pi I s ∈ pi f\ni : ι\nhi : i ∈ I\nI' : Set ι\nt : (i : ι) → Set (α i)\nhtf : ∀ (i : ι), t i ∈ f i\nhts : Set.pi I' t ⊆ Set.pi I s\nx : α i\nhx : x ∈ t i\ng : (i : ι) → α i\nhg : ∀ (i : ι), g i ∈ t i\nj : ι\nx✝ : j ∈ I'\nhne : j ≠ i\n⊢ update g i x j ∈ t j\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\nI : Set ι\nh : Set.pi I s ∈ pi f\ni : ι\nhi : i ∈ I\nI' : Set ι\nt : (i : ι) → Set (α i)\nhtf : ∀ (i : ι), t i ∈ f i\nhts : Set.pi I' t ⊆ Set.pi I s\nx : α i\nhx : x ∈ t i\ng : (i : ι) → α i\nhg : ∀ (i : ι), g i ∈ t i\nthis : update g i x ∈ Set.pi I' t\n⊢ x ∈ s i\n[PROOFSTEP]\nsimpa using hts this i hi\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns✝ : (i : ι) → Set (α i)\nι' : ι → Type\ns : (i : ι) → ι' i → Set (α i)\np : (i : ι) → ι' i → Prop\nh : ∀ (i : ι), HasBasis (f i) (p i) (s i)\n⊢ HasBasis (pi f) (fun If => Set.Finite If.fst ∧ ∀ (i : ι), i ∈ If.fst → p i (Prod.snd If i)) fun If =>\n Set.pi If.fst fun i => s i (Prod.snd If i)\n[PROOFSTEP]\nsimpa [Set.pi_def] using hasBasis_iInf' fun i => (h i).comap (eval i : (∀ j, α j) → α i)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\n⊢ pi f ⊓ 𝓟 (Set.pi univ s) = ⊥ ↔ ∃ i, f i ⊓ 𝓟 (s i) = ⊥\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\n⊢ pi f ⊓ 𝓟 (Set.pi univ s) = ⊥ → ∃ i, f i ⊓ 𝓟 (s i) = ⊥\n[PROOFSTEP]\nsimp only [inf_principal_eq_bot, mem_pi]\n[GOAL]\ncase mp\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\n⊢ (∃ I, Set.Finite I ∧ ∃ t, (∀ (i : ι), t i ∈ f i) ∧ Set.pi I t ⊆ (Set.pi univ s)ᶜ) → ∃ i, (s i)ᶜ ∈ f i\n[PROOFSTEP]\ncontrapose!\n[GOAL]\ncase mp\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\n⊢ (∀ (i : ι), ¬(s i)ᶜ ∈ f i) →\n ∀ (I : Set ι), Set.Finite I → ∀ (t : (i : ι) → Set (α i)), (∀ (i : ι), t i ∈ f i) → ¬Set.pi I t ⊆ (Set.pi univ s)ᶜ\n[PROOFSTEP]\nrintro (hsf : ∀ i, ∃ᶠ x in f i, x ∈ s i) I - t htf hts\n[GOAL]\ncase mp\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\nhsf : ∀ (i : ι), ∃ᶠ (x : α i) in f i, x ∈ s i\nI : Set ι\nt : (i : ι) → Set (α i)\nhtf : ∀ (i : ι), t i ∈ f i\nhts : Set.pi I t ⊆ (Set.pi univ s)ᶜ\n⊢ False\n[PROOFSTEP]\nhave : ∀ i, (s i ∩ t i).Nonempty := fun i => ((hsf i).and_eventually (htf i)).exists\n[GOAL]\ncase mp\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\nhsf : ∀ (i : ι), ∃ᶠ (x : α i) in f i, x ∈ s i\nI : Set ι\nt : (i : ι) → Set (α i)\nhtf : ∀ (i : ι), t i ∈ f i\nhts : Set.pi I t ⊆ (Set.pi univ s)ᶜ\nthis : ∀ (i : ι), Set.Nonempty (s i ∩ t i)\n⊢ False\n[PROOFSTEP]\nchoose x hxs hxt using this\n[GOAL]\ncase mp\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\nhsf : ∀ (i : ι), ∃ᶠ (x : α i) in f i, x ∈ s i\nI : Set ι\nt : (i : ι) → Set (α i)\nhtf : ∀ (i : ι), t i ∈ f i\nhts : Set.pi I t ⊆ (Set.pi univ s)ᶜ\nx : (i : ι) → α i\nhxs : ∀ (i : ι), x i ∈ s i\nhxt : ∀ (i : ι), x i ∈ t i\n⊢ False\n[PROOFSTEP]\nexact hts (fun i _ => hxt i) (mem_univ_pi.2 hxs)\n[GOAL]\ncase mpr\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\n⊢ (∃ i, f i ⊓ 𝓟 (s i) = ⊥) → pi f ⊓ 𝓟 (Set.pi univ s) = ⊥\n[PROOFSTEP]\nsimp only [inf_principal_eq_bot]\n[GOAL]\ncase mpr\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\n⊢ (∃ i, (s i)ᶜ ∈ f i) → (Set.pi univ s)ᶜ ∈ pi f\n[PROOFSTEP]\nrintro ⟨i, hi⟩\n[GOAL]\ncase mpr.intro\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ni : ι\nhi : (s i)ᶜ ∈ f i\n⊢ (Set.pi univ s)ᶜ ∈ pi f\n[PROOFSTEP]\nfilter_upwards [mem_pi_of_mem i hi] with x using mt fun h => h i trivial\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\nI : Set ι\n⊢ pi f ⊓ 𝓟 (Set.pi I s) = ⊥ ↔ ∃ i, i ∈ I ∧ f i ⊓ 𝓟 (s i) = ⊥\n[PROOFSTEP]\nrw [← univ_pi_piecewise_univ I, pi_inf_principal_univ_pi_eq_bot]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\nI : Set ι\n⊢ (∃ i, f i ⊓ 𝓟 (piecewise I s (fun x => univ) i) = ⊥) ↔ ∃ i, i ∈ I ∧ f i ⊓ 𝓟 (s i) = ⊥\n[PROOFSTEP]\nrefine' exists_congr fun i => _\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\nI : Set ι\ni : ι\n⊢ f i ⊓ 𝓟 (piecewise I s (fun x => univ) i) = ⊥ ↔ i ∈ I ∧ f i ⊓ 𝓟 (s i) = ⊥\n[PROOFSTEP]\nby_cases hi : i ∈ I\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\nI : Set ι\ni : ι\nhi : i ∈ I\n⊢ f i ⊓ 𝓟 (piecewise I s (fun x => univ) i) = ⊥ ↔ i ∈ I ∧ f i ⊓ 𝓟 (s i) = ⊥\n[PROOFSTEP]\nsimp [hi, NeBot.ne']\n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\nI : Set ι\ni : ι\nhi : ¬i ∈ I\n⊢ f i ⊓ 𝓟 (piecewise I s (fun x => univ) i) = ⊥ ↔ i ∈ I ∧ f i ⊓ 𝓟 (s i) = ⊥\n[PROOFSTEP]\nsimp [hi, NeBot.ne']\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\n⊢ NeBot (pi f ⊓ 𝓟 (Set.pi univ s)) ↔ ∀ (i : ι), NeBot (f i ⊓ 𝓟 (s i))\n[PROOFSTEP]\nsimp [neBot_iff]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\nI : Set ι\n⊢ NeBot (pi f ⊓ 𝓟 (Set.pi I s)) ↔ ∀ (i : ι), i ∈ I → NeBot (f i ⊓ 𝓟 (s i))\n[PROOFSTEP]\nsimp [neBot_iff]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\n⊢ pi f = ⊥ ↔ ∃ i, f i = ⊥\n[PROOFSTEP]\nsimpa using @pi_inf_principal_univ_pi_eq_bot ι α f fun _ => univ\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\n⊢ NeBot (pi f) ↔ ∀ (i : ι), NeBot (f i)\n[PROOFSTEP]\nsimp [neBot_iff]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf✝ f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\nf : (i : ι) → Filter (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\ni : ι\n⊢ map (eval i) (pi f) = f i\n[PROOFSTEP]\nrefine' le_antisymm (tendsto_eval_pi f i) fun s hs => _\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf✝ f₁ f₂ : (i : ι) → Filter (α i)\ns✝ : (i : ι) → Set (α i)\nf : (i : ι) → Filter (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\ni : ι\ns : Set (α i)\nhs : s ∈ map (eval i) (pi f)\n⊢ s ∈ f i\n[PROOFSTEP]\nrcases mem_pi.1 (mem_map.1 hs) with ⟨I, hIf, t, htf, hI⟩\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\nf✝ f₁ f₂ : (i : ι) → Filter (α i)\ns✝ : (i : ι) → Set (α i)\nf : (i : ι) → Filter (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\ni : ι\ns : Set (α i)\nhs : s ∈ map (eval i) (pi f)\nI : Set ι\nhIf : Set.Finite I\nt : (i : ι) → Set (α i)\nhtf : ∀ (i : ι), t i ∈ f i\nhI : Set.pi I t ⊆ eval i ⁻¹' s\n⊢ s ∈ f i\n[PROOFSTEP]\nrw [← image_subset_iff] at hI \n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\nf✝ f₁ f₂ : (i : ι) → Filter (α i)\ns✝ : (i : ι) → Set (α i)\nf : (i : ι) → Filter (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\ni : ι\ns : Set (α i)\nhs : s ∈ map (eval i) (pi f)\nI : Set ι\nhIf : Set.Finite I\nt : (i : ι) → Set (α i)\nhtf : ∀ (i : ι), t i ∈ f i\nhI : eval i '' Set.pi I t ⊆ s\n⊢ s ∈ f i\n[PROOFSTEP]\nrefine' mem_of_superset (htf i) ((subset_eval_image_pi _ _).trans hI)\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\nf✝ f₁ f₂ : (i : ι) → Filter (α i)\ns✝ : (i : ι) → Set (α i)\nf : (i : ι) → Filter (α i)\ninst✝ : ∀ (i : ι), NeBot (f i)\ni : ι\ns : Set (α i)\nhs : s ∈ map (eval i) (pi f)\nI : Set ι\nhIf : Set.Finite I\nt : (i : ι) → Set (α i)\nhtf : ∀ (i : ι), t i ∈ f i\nhI : eval i '' Set.pi I t ⊆ s\n⊢ Set.Nonempty (Set.pi I t)\n[PROOFSTEP]\nexact nonempty_of_mem (pi_mem_pi hIf fun i _ => htf i)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f₁ i)\n⊢ pi f₁ = pi f₂ ↔ f₁ = f₂\n[PROOFSTEP]\nrefine' ⟨fun h => _, congr_arg pi⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f₁ i)\nh : pi f₁ = pi f₂\n⊢ f₁ = f₂\n[PROOFSTEP]\nhave hle : f₁ ≤ f₂ := pi_le_pi.1 h.le\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f₁ i)\nh : pi f₁ = pi f₂\nhle : f₁ ≤ f₂\n⊢ f₁ = f₂\n[PROOFSTEP]\nhaveI : ∀ i, NeBot (f₂ i) := fun i => neBot_of_le (hle i)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), NeBot (f₁ i)\nh : pi f₁ = pi f₂\nhle : f₁ ≤ f₂\nthis : ∀ (i : ι), NeBot (f₂ i)\n⊢ f₁ = f₂\n[PROOFSTEP]\nexact hle.antisymm (pi_le_pi.1 h.ge)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns✝ : (i : ι) → Set (α i)\ns : Set ((i : ι) → α i)\n⊢ s ∈ Filter.coprodᵢ f ↔ ∀ (i : ι), ∃ t₁, t₁ ∈ f i ∧ eval i ⁻¹' t₁ ⊆ s\n[PROOFSTEP]\nsimp [Filter.coprodᵢ]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns✝ : (i : ι) → Set (α i)\ns : Set ((i : ι) → α i)\n⊢ sᶜ ∈ Filter.coprodᵢ f ↔ ∀ (i : ι), (eval i '' s)ᶜ ∈ f i\n[PROOFSTEP]\nsimp only [Filter.coprodᵢ, mem_iSup, compl_mem_comap]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\n⊢ NeBot (Filter.coprodᵢ f) ↔ (∀ (i : ι), Nonempty (α i)) ∧ ∃ d, NeBot (f d)\n[PROOFSTEP]\nsimp only [Filter.coprodᵢ, iSup_neBot, ← exists_and_left, ← comap_eval_neBot_iff']\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), Nonempty (α i)\n⊢ NeBot (Filter.coprodᵢ f) ↔ ∃ d, NeBot (f d)\n[PROOFSTEP]\nsimp [coprodᵢ_neBot_iff', *]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\n⊢ Filter.coprodᵢ f = ⊥ ↔ (∃ i, IsEmpty (α i)) ∨ f = ⊥\n[PROOFSTEP]\nsimpa only [not_neBot, not_and_or, funext_iff, not_forall, not_exists, not_nonempty_iff] using coprodᵢ_neBot_iff'.not\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\ninst✝ : ∀ (i : ι), Nonempty (α i)\n⊢ Filter.coprodᵢ f = ⊥ ↔ f = ⊥\n[PROOFSTEP]\nsimpa [funext_iff] using coprodᵢ_neBot_iff.not\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\nβ : ι → Type u_3\nm : (i : ι) → α i → β i\n⊢ map (fun k i => m i (k i)) (Filter.coprodᵢ f) ≤ Filter.coprodᵢ fun i => map (m i) (f i)\n[PROOFSTEP]\nsimp only [le_def, mem_map, mem_coprodᵢ_iff]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns : (i : ι) → Set (α i)\nβ : ι → Type u_3\nm : (i : ι) → α i → β i\n⊢ ∀ (x : Set ((i : ι) → β i)),\n (∀ (i : ι), ∃ t₁, m i ⁻¹' t₁ ∈ f i ∧ eval i ⁻¹' t₁ ⊆ x) →\n ∀ (i : ι), ∃ t₁, t₁ ∈ f i ∧ eval i ⁻¹' t₁ ⊆ (fun k i => m i (k i)) ⁻¹' x\n[PROOFSTEP]\nintro s h i\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns✝ : (i : ι) → Set (α i)\nβ : ι → Type u_3\nm : (i : ι) → α i → β i\ns : Set ((i : ι) → β i)\nh : ∀ (i : ι), ∃ t₁, m i ⁻¹' t₁ ∈ f i ∧ eval i ⁻¹' t₁ ⊆ s\ni : ι\n⊢ ∃ t₁, t₁ ∈ f i ∧ eval i ⁻¹' t₁ ⊆ (fun k i => m i (k i)) ⁻¹' s\n[PROOFSTEP]\nobtain ⟨t, H, hH⟩ := h i\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : ι → Type u_2\nf f₁ f₂ : (i : ι) → Filter (α i)\ns✝ : (i : ι) → Set (α i)\nβ : ι → Type u_3\nm : (i : ι) → α i → β i\ns : Set ((i : ι) → β i)\nh : ∀ (i : ι), ∃ t₁, m i ⁻¹' t₁ ∈ f i ∧ eval i ⁻¹' t₁ ⊆ s\ni : ι\nt : Set (β i)\nH : m i ⁻¹' t ∈ f i\nhH : eval i ⁻¹' t ⊆ s\n⊢ ∃ t₁, t₁ ∈ f i ∧ eval i ⁻¹' t₁ ⊆ (fun k i => m i (k i)) ⁻¹' s\n[PROOFSTEP]\nexact ⟨{x : α i | m i x ∈ t}, H, fun x hx => hH hx⟩\n", "meta": {"mathlib_filename": "Mathlib.Order.Filter.Pi", "llama_tokens": 10667, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8519527944504227, "lm_q2_score": 0.6688802669716107, "lm_q1q2_score": 0.5698544125992085}} {"text": "[GOAL]\nα : Type u_1\nn : ℕ\n⊢ Even (card (Fin (bit0 n)))\n[PROOFSTEP]\nrw [Fintype.card_fin]\n[GOAL]\nα : Type u_1\nn : ℕ\n⊢ Even (bit0 n)\n[PROOFSTEP]\nexact even_bit0 _\n", "meta": {"mathlib_filename": "Mathlib.Data.Fintype.Parity", "llama_tokens": 87, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.851952809486198, "lm_q2_score": 0.6688802537704063, "lm_q1q2_score": 0.5698544114095387}} {"text": "[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\nα β : A₁ ⟶ A₂\n⊢ F.map (α.f + β.f) ≫ A₂.str = A₁.str ≫ (α.f + β.f)\n[PROOFSTEP]\nsimp only [Functor.map_add, add_comp, Endofunctor.Algebra.Hom.h, comp_add]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\n⊢ ∀ (a b c : A₁ ⟶ A₂), a + b + c = a + (b + c)\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\na✝ b✝ c✝ : A₁ ⟶ A₂\n⊢ a✝ + b✝ + c✝ = a✝ + (b✝ + c✝)\n[PROOFSTEP]\napply Algebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\na✝ b✝ c✝ : A₁ ⟶ A₂\n⊢ (a✝ + b✝ + c✝).f = (a✝ + (b✝ + c✝)).f\n[PROOFSTEP]\napply add_assoc\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\n⊢ F.map 0 ≫ A₂.str = A₁.str ≫ 0\n[PROOFSTEP]\nsimp only [Functor.map_zero, zero_comp, comp_zero]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\n⊢ ∀ (a : A₁ ⟶ A₂), 0 + a = a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\na✝ : A₁ ⟶ A₂\n⊢ 0 + a✝ = a✝\n[PROOFSTEP]\napply Algebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\na✝ : A₁ ⟶ A₂\n⊢ (0 + a✝).f = a✝.f\n[PROOFSTEP]\napply zero_add\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\n⊢ ∀ (a : A₁ ⟶ A₂), a + 0 = a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\na✝ : A₁ ⟶ A₂\n⊢ a✝ + 0 = a✝\n[PROOFSTEP]\napply Algebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\na✝ : A₁ ⟶ A₂\n⊢ (a✝ + 0).f = a✝.f\n[PROOFSTEP]\napply add_zero\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\nn : ℕ\nα : A₁ ⟶ A₂\n⊢ F.map (n • α.f) ≫ A₂.str = A₁.str ≫ (n • α.f)\n[PROOFSTEP]\nrw [comp_nsmul, Functor.map_nsmul, nsmul_comp, Endofunctor.Algebra.Hom.h]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\n⊢ ∀ (x : A₁ ⟶ A₂), (fun n α => Algebra.Hom.mk (n • α.f)) 0 x = 0\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\nx✝ : A₁ ⟶ A₂\n⊢ (fun n α => Algebra.Hom.mk (n • α.f)) 0 x✝ = 0\n[PROOFSTEP]\napply Algebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\nx✝ : A₁ ⟶ A₂\n⊢ ((fun n α => Algebra.Hom.mk (n • α.f)) 0 x✝).f = 0.f\n[PROOFSTEP]\napply zero_smul\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\n⊢ ∀ (n : ℕ) (x : A₁ ⟶ A₂),\n (fun n α => Algebra.Hom.mk (n • α.f)) (n + 1) x = x + (fun n α => Algebra.Hom.mk (n • α.f)) n x\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\nn✝ : ℕ\nx✝ : A₁ ⟶ A₂\n⊢ (fun n α => Algebra.Hom.mk (n • α.f)) (n✝ + 1) x✝ = x✝ + (fun n α => Algebra.Hom.mk (n • α.f)) n✝ x✝\n[PROOFSTEP]\napply Algebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\nn✝ : ℕ\nx✝ : A₁ ⟶ A₂\n⊢ ((fun n α => Algebra.Hom.mk (n • α.f)) (n✝ + 1) x✝).f = (x✝ + (fun n α => Algebra.Hom.mk (n • α.f)) n✝ x✝).f\n[PROOFSTEP]\napply succ_nsmul\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\nα : A₁ ⟶ A₂\n⊢ F.map (-α.f) ≫ A₂.str = A₁.str ≫ (-α.f)\n[PROOFSTEP]\nsimp only [Functor.map_neg, neg_comp, Endofunctor.Algebra.Hom.h, comp_neg]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\nα β : A₁ ⟶ A₂\n⊢ F.map (α.f - β.f) ≫ A₂.str = A₁.str ≫ (α.f - β.f)\n[PROOFSTEP]\nsimp only [Functor.map_sub, sub_comp, Endofunctor.Algebra.Hom.h, comp_sub]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\n⊢ ∀ (a b : A₁ ⟶ A₂), a - b = a + -b\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\na✝ b✝ : A₁ ⟶ A₂\n⊢ a✝ - b✝ = a✝ + -b✝\n[PROOFSTEP]\napply Algebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\na✝ b✝ : A₁ ⟶ A₂\n⊢ (a✝ - b✝).f = (a✝ + -b✝).f\n[PROOFSTEP]\napply sub_eq_add_neg\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\nr : ℤ\nα : A₁ ⟶ A₂\n⊢ F.map (r • α.f) ≫ A₂.str = A₁.str ≫ (r • α.f)\n[PROOFSTEP]\nrw [comp_zsmul, Functor.map_zsmul, zsmul_comp, Endofunctor.Algebra.Hom.h]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\n⊢ ∀ (a : A₁ ⟶ A₂), (fun r α => Algebra.Hom.mk (r • α.f)) 0 a = 0\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\na✝ : A₁ ⟶ A₂\n⊢ (fun r α => Algebra.Hom.mk (r • α.f)) 0 a✝ = 0\n[PROOFSTEP]\napply Algebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\na✝ : A₁ ⟶ A₂\n⊢ ((fun r α => Algebra.Hom.mk (r • α.f)) 0 a✝).f = 0.f\n[PROOFSTEP]\napply zero_smul\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\n⊢ ∀ (n : ℕ) (a : A₁ ⟶ A₂),\n (fun r α => Algebra.Hom.mk (r • α.f)) (Int.ofNat (Nat.succ n)) a =\n a + (fun r α => Algebra.Hom.mk (r • α.f)) (Int.ofNat n) a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\nn✝ : ℕ\na✝ : A₁ ⟶ A₂\n⊢ (fun r α => Algebra.Hom.mk (r • α.f)) (Int.ofNat (Nat.succ n✝)) a✝ =\n a✝ + (fun r α => Algebra.Hom.mk (r • α.f)) (Int.ofNat n✝) a✝\n[PROOFSTEP]\napply Algebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\nn✝ : ℕ\na✝ : A₁ ⟶ A₂\n⊢ ((fun r α => Algebra.Hom.mk (r • α.f)) (Int.ofNat (Nat.succ n✝)) a✝).f =\n (a✝ + (fun r α => Algebra.Hom.mk (r • α.f)) (Int.ofNat n✝) a✝).f\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\nn✝ : ℕ\na✝ : A₁ ⟶ A₂\n⊢ ↑(Nat.succ n✝) • a✝.f = (a✝ + Algebra.Hom.mk (↑n✝ • a✝.f)).f\n[PROOFSTEP]\nsimp only [coe_nat_zsmul, succ_nsmul]\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\nn✝ : ℕ\na✝ : A₁ ⟶ A₂\n⊢ a✝.f + n✝ • a✝.f = (a✝ + Algebra.Hom.mk (n✝ • a✝.f)).f\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\n⊢ ∀ (n : ℕ) (a : A₁ ⟶ A₂),\n (fun r α => Algebra.Hom.mk (r • α.f)) (Int.negSucc n) a = -(fun r α => Algebra.Hom.mk (r • α.f)) (↑(Nat.succ n)) a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\nn✝ : ℕ\na✝ : A₁ ⟶ A₂\n⊢ (fun r α => Algebra.Hom.mk (r • α.f)) (Int.negSucc n✝) a✝ = -(fun r α => Algebra.Hom.mk (r • α.f)) (↑(Nat.succ n✝)) a✝\n[PROOFSTEP]\napply Algebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\nn✝ : ℕ\na✝ : A₁ ⟶ A₂\n⊢ ((fun r α => Algebra.Hom.mk (r • α.f)) (Int.negSucc n✝) a✝).f =\n (-(fun r α => Algebra.Hom.mk (r • α.f)) (↑(Nat.succ n✝)) a✝).f\n[PROOFSTEP]\nsimp only [negSucc_zsmul, neg_inj, nsmul_eq_smul_cast ℤ]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\n⊢ ∀ (a : A₁ ⟶ A₂), -a + a = 0\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\na✝ : A₁ ⟶ A₂\n⊢ -a✝ + a✝ = 0\n[PROOFSTEP]\napply Algebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\na✝ : A₁ ⟶ A₂\n⊢ (-a✝ + a✝).f = 0.f\n[PROOFSTEP]\napply add_left_neg\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\n⊢ ∀ (a b : A₁ ⟶ A₂), a + b = b + a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\na✝ b✝ : A₁ ⟶ A₂\n⊢ a✝ + b✝ = b✝ + a✝\n[PROOFSTEP]\napply Algebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Algebra F\na✝ b✝ : A₁ ⟶ A₂\n⊢ (a✝ + b✝).f = (b✝ + a✝).f\n[PROOFSTEP]\napply add_comm\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\n⊢ ∀ (P Q R : Algebra F) (f f' : P ⟶ Q) (g : Q ⟶ R), (f + f') ≫ g = f ≫ g + f' ≫ g\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nP✝ Q✝ R✝ : Algebra F\nf✝ f'✝ : P✝ ⟶ Q✝\ng✝ : Q✝ ⟶ R✝\n⊢ (f✝ + f'✝) ≫ g✝ = f✝ ≫ g✝ + f'✝ ≫ g✝\n[PROOFSTEP]\napply Algebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nP✝ Q✝ R✝ : Algebra F\nf✝ f'✝ : P✝ ⟶ Q✝\ng✝ : Q✝ ⟶ R✝\n⊢ ((f✝ + f'✝) ≫ g✝).f = (f✝ ≫ g✝ + f'✝ ≫ g✝).f\n[PROOFSTEP]\napply add_comp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\n⊢ ∀ (P Q R : Algebra F) (f : P ⟶ Q) (g g' : Q ⟶ R), f ≫ (g + g') = f ≫ g + f ≫ g'\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nP✝ Q✝ R✝ : Algebra F\nf✝ : P✝ ⟶ Q✝\ng✝ g'✝ : Q✝ ⟶ R✝\n⊢ f✝ ≫ (g✝ + g'✝) = f✝ ≫ g✝ + f✝ ≫ g'✝\n[PROOFSTEP]\napply Algebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nP✝ Q✝ R✝ : Algebra F\nf✝ : P✝ ⟶ Q✝\ng✝ g'✝ : Q✝ ⟶ R✝\n⊢ (f✝ ≫ (g✝ + g'✝)).f = (f✝ ≫ g✝ + f✝ ≫ g'✝).f\n[PROOFSTEP]\napply comp_add\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\nα β : A₁ ⟶ A₂\n⊢ A₁.str ≫ F.map (α.f + β.f) = (α.f + β.f) ≫ A₂.str\n[PROOFSTEP]\nsimp only [Functor.map_add, comp_add, Endofunctor.Coalgebra.Hom.h, add_comp]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\n⊢ ∀ (a b c : A₁ ⟶ A₂), a + b + c = a + (b + c)\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\na✝ b✝ c✝ : A₁ ⟶ A₂\n⊢ a✝ + b✝ + c✝ = a✝ + (b✝ + c✝)\n[PROOFSTEP]\napply Coalgebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\na✝ b✝ c✝ : A₁ ⟶ A₂\n⊢ (a✝ + b✝ + c✝).f = (a✝ + (b✝ + c✝)).f\n[PROOFSTEP]\napply add_assoc\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\n⊢ A₁.str ≫ F.map 0 = 0 ≫ A₂.str\n[PROOFSTEP]\nsimp only [Functor.map_zero, zero_comp, comp_zero]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\n⊢ ∀ (a : A₁ ⟶ A₂), 0 + a = a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\na✝ : A₁ ⟶ A₂\n⊢ 0 + a✝ = a✝\n[PROOFSTEP]\napply Coalgebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\na✝ : A₁ ⟶ A₂\n⊢ (0 + a✝).f = a✝.f\n[PROOFSTEP]\napply zero_add\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\n⊢ ∀ (a : A₁ ⟶ A₂), a + 0 = a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\na✝ : A₁ ⟶ A₂\n⊢ a✝ + 0 = a✝\n[PROOFSTEP]\napply Coalgebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\na✝ : A₁ ⟶ A₂\n⊢ (a✝ + 0).f = a✝.f\n[PROOFSTEP]\napply add_zero\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\nn : ℕ\nα : A₁ ⟶ A₂\n⊢ A₁.str ≫ F.map (n • α.f) = (n • α.f) ≫ A₂.str\n[PROOFSTEP]\nrw [Functor.map_nsmul, comp_nsmul, Endofunctor.Coalgebra.Hom.h, nsmul_comp]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\n⊢ ∀ (x : A₁ ⟶ A₂), (fun n α => Coalgebra.Hom.mk (n • α.f)) 0 x = 0\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\nx✝ : A₁ ⟶ A₂\n⊢ (fun n α => Coalgebra.Hom.mk (n • α.f)) 0 x✝ = 0\n[PROOFSTEP]\napply Coalgebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\nx✝ : A₁ ⟶ A₂\n⊢ ((fun n α => Coalgebra.Hom.mk (n • α.f)) 0 x✝).f = 0.f\n[PROOFSTEP]\napply zero_smul\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\n⊢ ∀ (n : ℕ) (x : A₁ ⟶ A₂),\n (fun n α => Coalgebra.Hom.mk (n • α.f)) (n + 1) x = x + (fun n α => Coalgebra.Hom.mk (n • α.f)) n x\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\nn✝ : ℕ\nx✝ : A₁ ⟶ A₂\n⊢ (fun n α => Coalgebra.Hom.mk (n • α.f)) (n✝ + 1) x✝ = x✝ + (fun n α => Coalgebra.Hom.mk (n • α.f)) n✝ x✝\n[PROOFSTEP]\napply Coalgebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\nn✝ : ℕ\nx✝ : A₁ ⟶ A₂\n⊢ ((fun n α => Coalgebra.Hom.mk (n • α.f)) (n✝ + 1) x✝).f = (x✝ + (fun n α => Coalgebra.Hom.mk (n • α.f)) n✝ x✝).f\n[PROOFSTEP]\napply succ_nsmul\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\nα : A₁ ⟶ A₂\n⊢ A₁.str ≫ F.map (-α.f) = (-α.f) ≫ A₂.str\n[PROOFSTEP]\nsimp only [Functor.map_neg, comp_neg, Endofunctor.Coalgebra.Hom.h, neg_comp]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\nα β : A₁ ⟶ A₂\n⊢ A₁.str ≫ F.map (α.f - β.f) = (α.f - β.f) ≫ A₂.str\n[PROOFSTEP]\nsimp only [Functor.map_sub, comp_sub, Endofunctor.Coalgebra.Hom.h, sub_comp]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\n⊢ ∀ (a b : A₁ ⟶ A₂), a - b = a + -b\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\na✝ b✝ : A₁ ⟶ A₂\n⊢ a✝ - b✝ = a✝ + -b✝\n[PROOFSTEP]\napply Coalgebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\na✝ b✝ : A₁ ⟶ A₂\n⊢ (a✝ - b✝).f = (a✝ + -b✝).f\n[PROOFSTEP]\napply sub_eq_add_neg\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\nr : ℤ\nα : A₁ ⟶ A₂\n⊢ A₁.str ≫ F.map (r • α.f) = (r • α.f) ≫ A₂.str\n[PROOFSTEP]\nrw [Functor.map_zsmul, comp_zsmul, Endofunctor.Coalgebra.Hom.h, zsmul_comp]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\n⊢ ∀ (a : A₁ ⟶ A₂), (fun r α => Coalgebra.Hom.mk (r • α.f)) 0 a = 0\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\na✝ : A₁ ⟶ A₂\n⊢ (fun r α => Coalgebra.Hom.mk (r • α.f)) 0 a✝ = 0\n[PROOFSTEP]\napply Coalgebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\na✝ : A₁ ⟶ A₂\n⊢ ((fun r α => Coalgebra.Hom.mk (r • α.f)) 0 a✝).f = 0.f\n[PROOFSTEP]\napply zero_smul\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\n⊢ ∀ (n : ℕ) (a : A₁ ⟶ A₂),\n (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.ofNat (Nat.succ n)) a =\n a + (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.ofNat n) a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\nn✝ : ℕ\na✝ : A₁ ⟶ A₂\n⊢ (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.ofNat (Nat.succ n✝)) a✝ =\n a✝ + (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.ofNat n✝) a✝\n[PROOFSTEP]\napply Coalgebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\nn✝ : ℕ\na✝ : A₁ ⟶ A₂\n⊢ ((fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.ofNat (Nat.succ n✝)) a✝).f =\n (a✝ + (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.ofNat n✝) a✝).f\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\nn✝ : ℕ\na✝ : A₁ ⟶ A₂\n⊢ ↑(Nat.succ n✝) • a✝.f = (a✝ + Coalgebra.Hom.mk (↑n✝ • a✝.f)).f\n[PROOFSTEP]\nsimp only [coe_nat_zsmul, succ_nsmul]\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\nn✝ : ℕ\na✝ : A₁ ⟶ A₂\n⊢ a✝.f + n✝ • a✝.f = (a✝ + Coalgebra.Hom.mk (n✝ • a✝.f)).f\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\n⊢ ∀ (n : ℕ) (a : A₁ ⟶ A₂),\n (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.negSucc n) a =\n -(fun r α => Coalgebra.Hom.mk (r • α.f)) (↑(Nat.succ n)) a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\nn✝ : ℕ\na✝ : A₁ ⟶ A₂\n⊢ (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.negSucc n✝) a✝ =\n -(fun r α => Coalgebra.Hom.mk (r • α.f)) (↑(Nat.succ n✝)) a✝\n[PROOFSTEP]\napply Coalgebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\nn✝ : ℕ\na✝ : A₁ ⟶ A₂\n⊢ ((fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.negSucc n✝) a✝).f =\n (-(fun r α => Coalgebra.Hom.mk (r • α.f)) (↑(Nat.succ n✝)) a✝).f\n[PROOFSTEP]\nsimp only [negSucc_zsmul, neg_inj, nsmul_eq_smul_cast ℤ]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\n⊢ ∀ (a : A₁ ⟶ A₂), -a + a = 0\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\na✝ : A₁ ⟶ A₂\n⊢ -a✝ + a✝ = 0\n[PROOFSTEP]\napply Coalgebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\na✝ : A₁ ⟶ A₂\n⊢ (-a✝ + a✝).f = 0.f\n[PROOFSTEP]\napply add_left_neg\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\n⊢ ∀ (a b : A₁ ⟶ A₂), a + b = b + a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\na✝ b✝ : A₁ ⟶ A₂\n⊢ a✝ + b✝ = b✝ + a✝\n[PROOFSTEP]\napply Coalgebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nA₁ A₂ : Coalgebra F\na✝ b✝ : A₁ ⟶ A₂\n⊢ (a✝ + b✝).f = (b✝ + a✝).f\n[PROOFSTEP]\napply add_comm\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\n⊢ ∀ (P Q R : Coalgebra F) (f f' : P ⟶ Q) (g : Q ⟶ R), (f + f') ≫ g = f ≫ g + f' ≫ g\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nP✝ Q✝ R✝ : Coalgebra F\nf✝ f'✝ : P✝ ⟶ Q✝\ng✝ : Q✝ ⟶ R✝\n⊢ (f✝ + f'✝) ≫ g✝ = f✝ ≫ g✝ + f'✝ ≫ g✝\n[PROOFSTEP]\napply Coalgebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nP✝ Q✝ R✝ : Coalgebra F\nf✝ f'✝ : P✝ ⟶ Q✝\ng✝ : Q✝ ⟶ R✝\n⊢ ((f✝ + f'✝) ≫ g✝).f = (f✝ ≫ g✝ + f'✝ ≫ g✝).f\n[PROOFSTEP]\napply add_comp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\n⊢ ∀ (P Q R : Coalgebra F) (f : P ⟶ Q) (g g' : Q ⟶ R), f ≫ (g + g') = f ≫ g + f ≫ g'\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nP✝ Q✝ R✝ : Coalgebra F\nf✝ : P✝ ⟶ Q✝\ng✝ g'✝ : Q✝ ⟶ R✝\n⊢ f✝ ≫ (g✝ + g'✝) = f✝ ≫ g✝ + f✝ ≫ g'✝\n[PROOFSTEP]\napply Coalgebra.Hom.ext\n[GOAL]\ncase f\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nF : C ⥤ C\ninst✝ : Functor.Additive F\nP✝ Q✝ R✝ : Coalgebra F\nf✝ : P✝ ⟶ Q✝\ng✝ g'✝ : Q✝ ⟶ R✝\n⊢ (f✝ ≫ (g✝ + g'✝)).f = (f✝ ≫ g✝ + f✝ ≫ g'✝).f\n[PROOFSTEP]\napply comp_add\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Preadditive.EndoFunctor", "llama_tokens": 12962, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8104788995148792, "lm_q2_score": 0.702530051167069, "lm_q1q2_score": 0.5693857827460178}} {"text": "[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nA : Type u_2\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nD D1✝ D2✝ : Derivation R A A\na✝ : A\nD1 D2 : Derivation R A A\na b : A\n⊢ ↑⁅↑D1, ↑D2⁆ (a * b) = a • ↑⁅↑D1, ↑D2⁆ b + b • ↑⁅↑D1, ↑D2⁆ a\n[PROOFSTEP]\nsimp only [Ring.lie_def, map_add, Algebra.id.smul_eq_mul, LinearMap.mul_apply, leibniz, coeFn_coe, LinearMap.sub_apply]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nA : Type u_2\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nD D1✝ D2✝ : Derivation R A A\na✝ : A\nD1 D2 : Derivation R A A\na b : A\n⊢ a * ↑D1 (↑D2 b) + ↑D2 b * ↑D1 a + (b * ↑D1 (↑D2 a) + ↑D2 a * ↑D1 b) -\n (a * ↑D2 (↑D1 b) + ↑D1 b * ↑D2 a + (b * ↑D2 (↑D1 a) + ↑D1 a * ↑D2 b)) =\n a * (↑D1 (↑D2 b) - ↑D2 (↑D1 b)) + b * (↑D1 (↑D2 a) - ↑D2 (↑D1 a))\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nA : Type u_2\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nD D1 D2 : Derivation R A A\na : A\nd e f : Derivation R A A\n⊢ ⁅d + e, f⁆ = ⁅d, f⁆ + ⁅e, f⁆\n[PROOFSTEP]\next a\n[GOAL]\ncase H\nR : Type u_1\ninst✝² : CommRing R\nA : Type u_2\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nD D1 D2 : Derivation R A A\na✝ : A\nd e f : Derivation R A A\na : A\n⊢ ↑⁅d + e, f⁆ a = ↑(⁅d, f⁆ + ⁅e, f⁆) a\n[PROOFSTEP]\nsimp only [commutator_apply, add_apply, map_add]\n[GOAL]\ncase H\nR : Type u_1\ninst✝² : CommRing R\nA : Type u_2\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nD D1 D2 : Derivation R A A\na✝ : A\nd e f : Derivation R A A\na : A\n⊢ ↑d (↑f a) + ↑e (↑f a) - (↑f (↑d a) + ↑f (↑e a)) = ↑d (↑f a) - ↑f (↑d a) + (↑e (↑f a) - ↑f (↑e a))\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nA : Type u_2\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nD D1 D2 : Derivation R A A\na : A\nd e f : Derivation R A A\n⊢ ⁅d, e + f⁆ = ⁅d, e⁆ + ⁅d, f⁆\n[PROOFSTEP]\next a\n[GOAL]\ncase H\nR : Type u_1\ninst✝² : CommRing R\nA : Type u_2\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nD D1 D2 : Derivation R A A\na✝ : A\nd e f : Derivation R A A\na : A\n⊢ ↑⁅d, e + f⁆ a = ↑(⁅d, e⁆ + ⁅d, f⁆) a\n[PROOFSTEP]\nsimp only [commutator_apply, add_apply, map_add]\n[GOAL]\ncase H\nR : Type u_1\ninst✝² : CommRing R\nA : Type u_2\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nD D1 D2 : Derivation R A A\na✝ : A\nd e f : Derivation R A A\na : A\n⊢ ↑d (↑e a) + ↑d (↑f a) - (↑e (↑d a) + ↑f (↑d a)) = ↑d (↑e a) - ↑e (↑d a) + (↑d (↑f a) - ↑f (↑d a))\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nA : Type u_2\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nD D1 D2 : Derivation R A A\na : A\nd : Derivation R A A\n⊢ ⁅d, d⁆ = 0\n[PROOFSTEP]\next a\n[GOAL]\ncase H\nR : Type u_1\ninst✝² : CommRing R\nA : Type u_2\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nD D1 D2 : Derivation R A A\na✝ : A\nd : Derivation R A A\na : A\n⊢ ↑⁅d, d⁆ a = ↑0 a\n[PROOFSTEP]\nsimp only [commutator_apply, add_apply, map_add]\n[GOAL]\ncase H\nR : Type u_1\ninst✝² : CommRing R\nA : Type u_2\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nD D1 D2 : Derivation R A A\na✝ : A\nd : Derivation R A A\na : A\n⊢ ↑d (↑d a) - ↑d (↑d a) = ↑0 a\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase H\nR : Type u_1\ninst✝² : CommRing R\nA : Type u_2\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nD D1 D2 : Derivation R A A\na✝ : A\nd : Derivation R A A\na : A\n⊢ 0 = ↑0 a\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nA : Type u_2\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nD D1 D2 : Derivation R A A\na : A\nd e f : Derivation R A A\n⊢ ⁅d, ⁅e, f⁆⁆ = ⁅⁅d, e⁆, f⁆ + ⁅e, ⁅d, f⁆⁆\n[PROOFSTEP]\next a\n[GOAL]\ncase H\nR : Type u_1\ninst✝² : CommRing R\nA : Type u_2\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nD D1 D2 : Derivation R A A\na✝ : A\nd e f : Derivation R A A\na : A\n⊢ ↑⁅d, ⁅e, f⁆⁆ a = ↑(⁅⁅d, e⁆, f⁆ + ⁅e, ⁅d, f⁆⁆) a\n[PROOFSTEP]\nsimp only [commutator_apply, add_apply, sub_apply, map_sub]\n[GOAL]\ncase H\nR : Type u_1\ninst✝² : CommRing R\nA : Type u_2\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nD D1 D2 : Derivation R A A\na✝ : A\nd e f : Derivation R A A\na : A\n⊢ ↑d (↑e (↑f a)) - ↑d (↑f (↑e a)) - (↑e (↑f (↑d a)) - ↑f (↑e (↑d a))) =\n ↑d (↑e (↑f a)) - ↑e (↑d (↑f a)) - (↑f (↑d (↑e a)) - ↑f (↑e (↑d a))) +\n (↑e (↑d (↑f a)) - ↑e (↑f (↑d a)) - (↑d (↑f (↑e a)) - ↑f (↑d (↑e a))))\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nA : Type u_2\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nD D1 D2 : Derivation R A A\na : A\nsrc✝ : Module R (Derivation R A A) := instModule\nr : R\nd e : Derivation R A A\n⊢ ⁅d, r • e⁆ = r • ⁅d, e⁆\n[PROOFSTEP]\next a\n[GOAL]\ncase H\nR : Type u_1\ninst✝² : CommRing R\nA : Type u_2\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nD D1 D2 : Derivation R A A\na✝ : A\nsrc✝ : Module R (Derivation R A A) := instModule\nr : R\nd e : Derivation R A A\na : A\n⊢ ↑⁅d, r • e⁆ a = ↑(r • ⁅d, e⁆) a\n[PROOFSTEP]\nsimp only [commutator_apply, map_smul, smul_sub, smul_apply]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Derivation.Lie", "llama_tokens": 2737, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8688267626522813, "lm_q2_score": 0.6548947223065755, "lm_q1q2_score": 0.5689900614596868}} {"text": "[GOAL]\nι : Type u\nhi : Nonempty ι\nR : Type v\ninst✝¹ : Semiring R\np : ℕ\ninst✝ : CharP R p\nx : ℕ\ni : ι\nh : ↑x = 0\nj : ι\n⊢ ↑(Pi.evalRingHom (fun x => R) j) ↑x = 0\n[PROOFSTEP]\nrw [map_natCast, h]\n[GOAL]\nι : Type u\nhi : Nonempty ι\nR : Type v\ninst✝¹ : Semiring R\np : ℕ\ninst✝ : CharP R p\nx : ℕ\ni : ι\nh : ↑x = 0\n⊢ ↑(Pi.evalRingHom (fun x => R) i) ↑x = 0\n[PROOFSTEP]\nrw [h, RingHom.map_zero]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.CharP.Pi", "llama_tokens": 223, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.837619947119304, "lm_q2_score": 0.6791787056691698, "lm_q1q2_score": 0.5688936315271673}} {"text": "[GOAL]\nm n : ℤ\n⊢ ¬n % 2 = 1 ↔ n % 2 = 0\n[PROOFSTEP]\ncases' emod_two_eq_zero_or_one n with h h\n[GOAL]\ncase inl\nm n : ℤ\nh : n % 2 = 0\n⊢ ¬n % 2 = 1 ↔ n % 2 = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase inr\nm n : ℤ\nh : n % 2 = 1\n⊢ ¬n % 2 = 1 ↔ n % 2 = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nm n : ℤ\n⊢ ¬n % 2 = 0 ↔ n % 2 = 1\n[PROOFSTEP]\ncases' emod_two_eq_zero_or_one n with h h\n[GOAL]\ncase inl\nm n : ℤ\nh : n % 2 = 0\n⊢ ¬n % 2 = 0 ↔ n % 2 = 1\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase inr\nm n : ℤ\nh : n % 2 = 1\n⊢ ¬n % 2 = 0 ↔ n % 2 = 1\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nm✝ n : ℤ\nx✝ : Even n\nm : ℤ\nhm : n = m + m\n⊢ n % 2 = 0\n[PROOFSTEP]\nsimp [← two_mul, hm]\n[GOAL]\nm n : ℤ\nh : n % 2 = 0\n⊢ n % 2 + 2 * (n / 2) = n / 2 + n / 2\n[PROOFSTEP]\nsimp [← two_mul, h]\n[GOAL]\nm✝ n : ℤ\nx✝ : Odd n\nm : ℤ\nhm : n = 2 * m + 1\n⊢ n % 2 = 1\n[PROOFSTEP]\nrw [hm, add_emod]\n[GOAL]\nm✝ n : ℤ\nx✝ : Odd n\nm : ℤ\nhm : n = 2 * m + 1\n⊢ (2 * m % 2 + 1 % 2) % 2 = 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nm n : ℤ\nh : n % 2 = 1\n⊢ n % 2 + 2 * (n / 2) = 2 * (n / 2) + 1\n[PROOFSTEP]\nrw [h]\n[GOAL]\nm n : ℤ\nh : n % 2 = 1\n⊢ 1 + 2 * (n / 2) = 2 * (n / 2) + 1\n[PROOFSTEP]\nabel\n[GOAL]\nm n : ℤ\nh : n % 2 = 1\n⊢ 1 + 2 * (n / 2) = 2 * (n / 2) + 1\n[PROOFSTEP]\nabel\n[GOAL]\nm n : ℤ\n⊢ ¬Even n ↔ n % 2 = 1\n[PROOFSTEP]\nrw [even_iff, emod_two_ne_zero]\n[GOAL]\nm n : ℤ\n⊢ ¬Odd n ↔ n % 2 = 0\n[PROOFSTEP]\nrw [odd_iff, emod_two_ne_one]\n[GOAL]\nm n : ℤ\n⊢ Even n ↔ ¬Odd n\n[PROOFSTEP]\nrw [not_odd_iff, even_iff]\n[GOAL]\nm n : ℤ\n⊢ Odd n ↔ ¬Even n\n[PROOFSTEP]\nrw [not_even_iff, odd_iff]\n[GOAL]\nm n : ℤ\n⊢ IsCompl {n | Even n} {n | Odd n}\n[PROOFSTEP]\nsimp [← Set.compl_setOf, isCompl_compl]\n[GOAL]\nm n✝ n : ℤ\n⊢ ∃ k, n = 2 * k ∨ n = 2 * k + 1\n[PROOFSTEP]\nsimpa only [two_mul, exists_or, Odd, Even] using even_or_odd n\n[GOAL]\nm n✝ n : ℤ\n⊢ Xor' (Even n) (Odd n)\n[PROOFSTEP]\ncases even_or_odd n with\n| inl h => exact Or.inl ⟨h, even_iff_not_odd.mp h⟩\n| inr h => exact Or.inr ⟨h, odd_iff_not_even.mp h⟩\n[GOAL]\nm n✝ n : ℤ\nx✝ : Even n ∨ Odd n\n⊢ Xor' (Even n) (Odd n)\n[PROOFSTEP]\ncases even_or_odd n with\n| inl h => exact Or.inl ⟨h, even_iff_not_odd.mp h⟩\n| inr h => exact Or.inr ⟨h, odd_iff_not_even.mp h⟩\n[GOAL]\ncase inl\nm n✝ n : ℤ\nh : Even n\n⊢ Xor' (Even n) (Odd n)\n[PROOFSTEP]\n\n| inl h => exact Or.inl ⟨h, even_iff_not_odd.mp h⟩\n[GOAL]\ncase inl\nm n✝ n : ℤ\nh : Even n\n⊢ Xor' (Even n) (Odd n)\n[PROOFSTEP]\nexact Or.inl ⟨h, even_iff_not_odd.mp h⟩\n[GOAL]\ncase inr\nm n✝ n : ℤ\nh : Odd n\n⊢ Xor' (Even n) (Odd n)\n[PROOFSTEP]\n\n| inr h => exact Or.inr ⟨h, odd_iff_not_even.mp h⟩\n[GOAL]\ncase inr\nm n✝ n : ℤ\nh : Odd n\n⊢ Xor' (Even n) (Odd n)\n[PROOFSTEP]\nexact Or.inr ⟨h, odd_iff_not_even.mp h⟩\n[GOAL]\nm n✝ n : ℤ\n⊢ ∃ k, Xor' (n = 2 * k) (n = 2 * k + 1)\n[PROOFSTEP]\nrcases even_or_odd n with (⟨k, rfl⟩ | ⟨k, rfl⟩)\n[GOAL]\ncase inl.intro\nm n k : ℤ\n⊢ ∃ k_1, Xor' (k + k = 2 * k_1) (k + k = 2 * k_1 + 1)\n[PROOFSTEP]\nuse k\n[GOAL]\ncase inr.intro\nm n k : ℤ\n⊢ ∃ k_1, Xor' (2 * k + 1 = 2 * k_1) (2 * k + 1 = 2 * k_1 + 1)\n[PROOFSTEP]\nuse k\n[GOAL]\ncase h\nm n k : ℤ\n⊢ Xor' (k + k = 2 * k) (k + k = 2 * k + 1)\n[PROOFSTEP]\nsimpa only [← two_mul, Xor', true_and_iff, eq_self_iff_true, not_true, or_false_iff, and_false_iff] using\n (succ_ne_self (2 * k)).symm\n[GOAL]\ncase h\nm n k : ℤ\n⊢ Xor' (2 * k + 1 = 2 * k) (2 * k + 1 = 2 * k + 1)\n[PROOFSTEP]\nsimp only [Xor', add_right_eq_self, false_or_iff, eq_self_iff_true, not_true, not_false_iff, one_ne_zero, and_self_iff]\n[GOAL]\nm n : ℤ\n⊢ ¬Even 1\n[PROOFSTEP]\nrw [even_iff]\n[GOAL]\nm n : ℤ\n⊢ ¬1 % 2 = 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nm n : ℤ\n⊢ Even (m + n) ↔ (Even m ↔ Even n)\n[PROOFSTEP]\ncases' emod_two_eq_zero_or_one m with h₁ h₁\n[GOAL]\ncase inl\nm n : ℤ\nh₁ : m % 2 = 0\n⊢ Even (m + n) ↔ (Even m ↔ Even n)\n[PROOFSTEP]\ncases' emod_two_eq_zero_or_one n with h₂ h₂\n[GOAL]\ncase inr\nm n : ℤ\nh₁ : m % 2 = 1\n⊢ Even (m + n) ↔ (Even m ↔ Even n)\n[PROOFSTEP]\ncases' emod_two_eq_zero_or_one n with h₂ h₂\n[GOAL]\ncase inl.inl\nm n : ℤ\nh₁ : m % 2 = 0\nh₂ : n % 2 = 0\n⊢ Even (m + n) ↔ (Even m ↔ Even n)\n[PROOFSTEP]\nsimp [even_iff, h₁, h₂, Int.add_emod]\n[GOAL]\ncase inl.inr\nm n : ℤ\nh₁ : m % 2 = 0\nh₂ : n % 2 = 1\n⊢ Even (m + n) ↔ (Even m ↔ Even n)\n[PROOFSTEP]\nsimp [even_iff, h₁, h₂, Int.add_emod]\n[GOAL]\ncase inr.inl\nm n : ℤ\nh₁ : m % 2 = 1\nh₂ : n % 2 = 0\n⊢ Even (m + n) ↔ (Even m ↔ Even n)\n[PROOFSTEP]\nsimp [even_iff, h₁, h₂, Int.add_emod]\n[GOAL]\ncase inr.inr\nm n : ℤ\nh₁ : m % 2 = 1\nh₂ : n % 2 = 1\n⊢ Even (m + n) ↔ (Even m ↔ Even n)\n[PROOFSTEP]\nsimp [even_iff, h₁, h₂, Int.add_emod]\n[GOAL]\nm n : ℤ\n⊢ Even (m + n) ↔ (Odd m ↔ Odd n)\n[PROOFSTEP]\nrw [even_add, even_iff_not_odd, even_iff_not_odd, not_iff_not]\n[GOAL]\nm n✝ n : ℤ\n⊢ ¬Even (bit1 n)\n[PROOFSTEP]\nsimp [bit1, parity_simps]\n[GOAL]\nm n✝ n : ℤ\n⊢ ¬2 ∣ 2 * n + 1\n[PROOFSTEP]\nsimp [add_emod]\n[GOAL]\nm n : ℤ\n⊢ Even (m - n) ↔ (Even m ↔ Even n)\n[PROOFSTEP]\nsimp [sub_eq_add_neg, parity_simps]\n[GOAL]\nm n : ℤ\n⊢ Even (m - n) ↔ (Odd m ↔ Odd n)\n[PROOFSTEP]\nrw [even_sub, even_iff_not_odd, even_iff_not_odd, not_iff_not]\n[GOAL]\nm n : ℤ\n⊢ Even (n + 1) ↔ ¬Even n\n[PROOFSTEP]\nsimp [even_add]\n[GOAL]\nm n : ℤ\n⊢ Even (m * n) ↔ Even m ∨ Even n\n[PROOFSTEP]\ncases' emod_two_eq_zero_or_one m with h₁ h₁\n[GOAL]\ncase inl\nm n : ℤ\nh₁ : m % 2 = 0\n⊢ Even (m * n) ↔ Even m ∨ Even n\n[PROOFSTEP]\ncases' emod_two_eq_zero_or_one n with h₂ h₂\n[GOAL]\ncase inr\nm n : ℤ\nh₁ : m % 2 = 1\n⊢ Even (m * n) ↔ Even m ∨ Even n\n[PROOFSTEP]\ncases' emod_two_eq_zero_or_one n with h₂ h₂\n[GOAL]\ncase inl.inl\nm n : ℤ\nh₁ : m % 2 = 0\nh₂ : n % 2 = 0\n⊢ Even (m * n) ↔ Even m ∨ Even n\n[PROOFSTEP]\nsimp [even_iff, h₁, h₂, Int.mul_emod]\n[GOAL]\ncase inl.inr\nm n : ℤ\nh₁ : m % 2 = 0\nh₂ : n % 2 = 1\n⊢ Even (m * n) ↔ Even m ∨ Even n\n[PROOFSTEP]\nsimp [even_iff, h₁, h₂, Int.mul_emod]\n[GOAL]\ncase inr.inl\nm n : ℤ\nh₁ : m % 2 = 1\nh₂ : n % 2 = 0\n⊢ Even (m * n) ↔ Even m ∨ Even n\n[PROOFSTEP]\nsimp [even_iff, h₁, h₂, Int.mul_emod]\n[GOAL]\ncase inr.inr\nm n : ℤ\nh₁ : m % 2 = 1\nh₂ : n % 2 = 1\n⊢ Even (m * n) ↔ Even m ∨ Even n\n[PROOFSTEP]\nsimp [even_iff, h₁, h₂, Int.mul_emod]\n[GOAL]\nm n : ℤ\n⊢ Odd (m * n) ↔ Odd m ∧ Odd n\n[PROOFSTEP]\nsimp [not_or, parity_simps]\n[GOAL]\nm n✝ : ℤ\nn : ℕ\n⊢ Even (m ^ n) ↔ Even m ∧ n ≠ 0\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nm n : ℤ\n⊢ Even (m ^ Nat.zero) ↔ Even m ∧ Nat.zero ≠ 0\n[PROOFSTEP]\nsimp [*, even_mul, pow_succ]\n[GOAL]\ncase succ\nm n✝ : ℤ\nn : ℕ\nih : Even (m ^ n) ↔ Even m ∧ n ≠ 0\n⊢ Even (m ^ Nat.succ n) ↔ Even m ∧ Nat.succ n ≠ 0\n[PROOFSTEP]\nsimp [*, even_mul, pow_succ]\n[GOAL]\ncase succ\nm n✝ : ℤ\nn : ℕ\nih : Even (m ^ n) ↔ Even m ∧ n ≠ 0\n⊢ Even m → ¬n = 0 → Even m\n[PROOFSTEP]\ntauto\n[GOAL]\nm n✝ : ℤ\nn : ℕ\n⊢ Odd (m ^ n) ↔ Odd m ∨ n = 0\n[PROOFSTEP]\nrw [← not_iff_not, ← Int.even_iff_not_odd, not_or, ← Int.even_iff_not_odd, Int.even_pow]\n[GOAL]\nm n : ℤ\n⊢ Odd (m + n) ↔ (Odd m ↔ Even n)\n[PROOFSTEP]\nrw [odd_iff_not_even, even_add, not_iff, odd_iff_not_even]\n[GOAL]\nm n : ℤ\n⊢ Odd (m + n) ↔ (Odd n ↔ Even m)\n[PROOFSTEP]\nrw [add_comm, odd_add]\n[GOAL]\nm n : ℤ\nh : Odd (m + n)\nhnot : m = n\n⊢ False\n[PROOFSTEP]\nsimp [hnot, parity_simps] at h \n[GOAL]\nm n : ℤ\n⊢ Odd (m - n) ↔ (Odd m ↔ Even n)\n[PROOFSTEP]\nrw [odd_iff_not_even, even_sub, not_iff, odd_iff_not_even]\n[GOAL]\nm n : ℤ\n⊢ Odd (m - n) ↔ (Odd n ↔ Even m)\n[PROOFSTEP]\nrw [odd_iff_not_even, even_sub, not_iff, not_iff_comm, odd_iff_not_even]\n[GOAL]\nm n✝ n : ℤ\n⊢ Even (n * (n + 1))\n[PROOFSTEP]\nsimpa [even_mul, parity_simps] using n.even_or_odd\n[GOAL]\nm n✝ : ℤ\nn : ℕ\n⊢ Even ↑n ↔ Even n\n[PROOFSTEP]\nrw_mod_cast [even_iff, Nat.even_iff]\n[GOAL]\nm n✝ : ℤ\nn : ℕ\n⊢ Odd ↑n ↔ Odd n\n[PROOFSTEP]\nrw [odd_iff_not_even, Nat.odd_iff_not_even, even_coe_nat]\n[GOAL]\nm n : ℤ\n⊢ Even (natAbs n) ↔ Even n\n[PROOFSTEP]\nsimp [even_iff_two_dvd, dvd_natAbs, coe_nat_dvd_left.symm]\n[GOAL]\nm n : ℤ\n⊢ Odd (natAbs n) ↔ Odd n\n[PROOFSTEP]\nrw [odd_iff_not_even, Nat.odd_iff_not_even, natAbs_even]\n[GOAL]\nm n a b : ℤ\nha : Odd a\nhb : Odd b\n⊢ 4 ∣ a + b ∨ 4 ∣ a - b\n[PROOFSTEP]\nobtain ⟨m, rfl⟩ := ha\n[GOAL]\ncase intro\nm✝ n b : ℤ\nhb : Odd b\nm : ℤ\n⊢ 4 ∣ 2 * m + 1 + b ∨ 4 ∣ 2 * m + 1 - b\n[PROOFSTEP]\nobtain ⟨n, rfl⟩ := hb\n[GOAL]\ncase intro.intro\nm✝ n✝ m n : ℤ\n⊢ 4 ∣ 2 * m + 1 + (2 * n + 1) ∨ 4 ∣ 2 * m + 1 - (2 * n + 1)\n[PROOFSTEP]\nobtain h | h := Int.even_or_odd (m + n)\n[GOAL]\ncase intro.intro.inl\nm✝ n✝ m n : ℤ\nh : Even (m + n)\n⊢ 4 ∣ 2 * m + 1 + (2 * n + 1) ∨ 4 ∣ 2 * m + 1 - (2 * n + 1)\n[PROOFSTEP]\nright\n[GOAL]\ncase intro.intro.inl.h\nm✝ n✝ m n : ℤ\nh : Even (m + n)\n⊢ 4 ∣ 2 * m + 1 - (2 * n + 1)\n[PROOFSTEP]\nrw [Int.even_add, ← Int.even_sub] at h \n[GOAL]\ncase intro.intro.inl.h\nm✝ n✝ m n : ℤ\nh : Even (m - n)\n⊢ 4 ∣ 2 * m + 1 - (2 * n + 1)\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := h\n[GOAL]\ncase intro.intro.inl.h.intro\nm✝ n✝ m n k : ℤ\nhk : m - n = k + k\n⊢ 4 ∣ 2 * m + 1 - (2 * n + 1)\n[PROOFSTEP]\nconvert dvd_mul_right 4 k using 1\n[GOAL]\ncase h.e'_4\nm✝ n✝ m n k : ℤ\nhk : m - n = k + k\n⊢ 2 * m + 1 - (2 * n + 1) = 4 * k\n[PROOFSTEP]\nrw [eq_add_of_sub_eq hk, mul_add, add_assoc, add_sub_cancel, ← two_mul, ← mul_assoc]\n[GOAL]\ncase h.e'_4\nm✝ n✝ m n k : ℤ\nhk : m - n = k + k\n⊢ 2 * 2 * k = 4 * k\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.intro.inr\nm✝ n✝ m n : ℤ\nh : Odd (m + n)\n⊢ 4 ∣ 2 * m + 1 + (2 * n + 1) ∨ 4 ∣ 2 * m + 1 - (2 * n + 1)\n[PROOFSTEP]\nleft\n[GOAL]\ncase intro.intro.inr.h\nm✝ n✝ m n : ℤ\nh : Odd (m + n)\n⊢ 4 ∣ 2 * m + 1 + (2 * n + 1)\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := h\n[GOAL]\ncase intro.intro.inr.h.intro\nm✝ n✝ m n k : ℤ\nhk : m + n = 2 * k + 1\n⊢ 4 ∣ 2 * m + 1 + (2 * n + 1)\n[PROOFSTEP]\nconvert dvd_mul_right 4 (k + 1) using 1\n[GOAL]\ncase h.e'_4\nm✝ n✝ m n k : ℤ\nhk : m + n = 2 * k + 1\n⊢ 2 * m + 1 + (2 * n + 1) = 4 * (k + 1)\n[PROOFSTEP]\nrw [eq_sub_of_add_eq hk, add_right_comm, ← add_sub, mul_add, mul_sub, add_assoc, add_assoc, sub_add, add_assoc, ←\n sub_sub (2 * n), sub_self, zero_sub, sub_neg_eq_add, ← mul_assoc, mul_add]\n[GOAL]\ncase h.e'_4\nm✝ n✝ m n k : ℤ\nhk : m + n = 2 * k + 1\n⊢ 2 * 2 * k + (2 * 1 + (1 + 1)) = 4 * k + 4 * 1\n[PROOFSTEP]\nrfl\n[GOAL]\nm n : ℤ\n⊢ Odd n → 2 * (n / 2) + 1 = n\n[PROOFSTEP]\nrintro ⟨c, rfl⟩\n[GOAL]\ncase intro\nm c : ℤ\n⊢ 2 * ((2 * c + 1) / 2) + 1 = 2 * c + 1\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase intro\nm c : ℤ\n⊢ (2 * c + 1) / 2 * 2 + 1 = 2 * c + 1\n[PROOFSTEP]\nconvert Int.ediv_add_emod' (2 * c + 1) 2\n[GOAL]\ncase h.e'_2.h.e'_6\nm c : ℤ\n⊢ 1 = (2 * c + 1) % 2\n[PROOFSTEP]\nsimp [Int.add_emod]\n[GOAL]\nm n : ℤ\n⊢ Odd n → n / 2 * 2 + 1 = n\n[PROOFSTEP]\nrintro ⟨c, rfl⟩\n[GOAL]\ncase intro\nm c : ℤ\n⊢ (2 * c + 1) / 2 * 2 + 1 = 2 * c + 1\n[PROOFSTEP]\nconvert Int.ediv_add_emod' (2 * c + 1) 2\n[GOAL]\ncase h.e'_2.h.e'_6\nm c : ℤ\n⊢ 1 = (2 * c + 1) % 2\n[PROOFSTEP]\nsimp [Int.add_emod]\n[GOAL]\nm n : ℤ\n⊢ Odd n → 1 + n / 2 * 2 = n\n[PROOFSTEP]\nrintro ⟨c, rfl⟩\n[GOAL]\ncase intro\nm c : ℤ\n⊢ 1 + (2 * c + 1) / 2 * 2 = 2 * c + 1\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\ncase intro\nm c : ℤ\n⊢ (2 * c + 1) / 2 * 2 + 1 = 2 * c + 1\n[PROOFSTEP]\nconvert Int.ediv_add_emod' (2 * c + 1) 2\n[GOAL]\ncase h.e'_2.h.e'_6\nm c : ℤ\n⊢ 1 = (2 * c + 1) % 2\n[PROOFSTEP]\nsimp [Int.add_emod]\n[GOAL]\nm✝ n✝ m n : ℤ\nh : Even m\n⊢ ¬Even (n + 3) ↔ Even (m ^ 2 + m + n)\n[PROOFSTEP]\nsimp [*, (by decide : ¬2 = 0), parity_simps]\n[GOAL]\nm✝ n✝ m n : ℤ\nh : Even m\n⊢ ¬2 = 0\n[PROOFSTEP]\ndecide\n[GOAL]\nm n : ℤ\n⊢ ¬Even 25394535\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.Parity", "llama_tokens": 6533, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8418256472515683, "lm_q2_score": 0.6757646010190476, "lm_q1q2_score": 0.5688759726425575}} {"text": "[GOAL]\nM : Type u_1\nN : Type u_2\nS : Type u_3\nM₀ : Type u_4\nM₁ : Type u_5\nR : Type u_6\nG : Type u_7\nG₀ : Type u_8\ninst✝⁷ : Mul M\ninst✝⁶ : Monoid N\ninst✝⁵ : Semigroup S\ninst✝⁴ : MulZeroClass M₀\ninst✝³ : MulOneClass M₁\ninst✝² : NonAssocRing R\ninst✝¹ : Group G\ninst✝ : CancelMonoidWithZero G₀\np q : S\nh : Commute p q\nh₁ : IsIdempotentElem p\nh₂ : IsIdempotentElem q\n⊢ IsIdempotentElem (p * q)\n[PROOFSTEP]\nrw [IsIdempotentElem, mul_assoc, ← mul_assoc q, ← h.eq, mul_assoc p, h₂.eq, ← mul_assoc, h₁.eq]\n[GOAL]\nM : Type u_1\nN : Type u_2\nS : Type u_3\nM₀ : Type u_4\nM₁ : Type u_5\nR : Type u_6\nG : Type u_7\nG₀ : Type u_8\ninst✝⁷ : Mul M\ninst✝⁶ : Monoid N\ninst✝⁵ : Semigroup S\ninst✝⁴ : MulZeroClass M₀\ninst✝³ : MulOneClass M₁\ninst✝² : NonAssocRing R\ninst✝¹ : Group G\ninst✝ : CancelMonoidWithZero G₀\np : R\nh : IsIdempotentElem p\n⊢ IsIdempotentElem (1 - p)\n[PROOFSTEP]\nrw [IsIdempotentElem, mul_sub, mul_one, sub_mul, one_mul, h.eq, sub_self, sub_zero]\n[GOAL]\nM : Type u_1\nN : Type u_2\nS : Type u_3\nM₀ : Type u_4\nM₁ : Type u_5\nR : Type u_6\nG : Type u_7\nG₀ : Type u_8\ninst✝⁷ : Mul M\ninst✝⁶ : Monoid N\ninst✝⁵ : Semigroup S\ninst✝⁴ : MulZeroClass M₀\ninst✝³ : MulOneClass M₁\ninst✝² : NonAssocRing R\ninst✝¹ : Group G\ninst✝ : CancelMonoidWithZero G₀\np : N\nn✝ : ℕ\nh : IsIdempotentElem p\nn : ℕ\nx✝ : IsIdempotentElem (p ^ n)\n⊢ p ^ Nat.succ n * p ^ Nat.succ n = p ^ Nat.succ n\n[PROOFSTEP]\nconv_rhs =>\n rw [← h.eq]\n --Porting note: was `nth_rw 3 [← h.eq]`\n[GOAL]\nM : Type u_1\nN : Type u_2\nS : Type u_3\nM₀ : Type u_4\nM₁ : Type u_5\nR : Type u_6\nG : Type u_7\nG₀ : Type u_8\ninst✝⁷ : Mul M\ninst✝⁶ : Monoid N\ninst✝⁵ : Semigroup S\ninst✝⁴ : MulZeroClass M₀\ninst✝³ : MulOneClass M₁\ninst✝² : NonAssocRing R\ninst✝¹ : Group G\ninst✝ : CancelMonoidWithZero G₀\np : N\nn✝ : ℕ\nh : IsIdempotentElem p\nn : ℕ\nx✝ : IsIdempotentElem (p ^ n)\n| p ^ Nat.succ n\n[PROOFSTEP]\nrw [← h.eq]\n --Porting note: was `nth_rw 3 [← h.eq]`\n[GOAL]\nM : Type u_1\nN : Type u_2\nS : Type u_3\nM₀ : Type u_4\nM₁ : Type u_5\nR : Type u_6\nG : Type u_7\nG₀ : Type u_8\ninst✝⁷ : Mul M\ninst✝⁶ : Monoid N\ninst✝⁵ : Semigroup S\ninst✝⁴ : MulZeroClass M₀\ninst✝³ : MulOneClass M₁\ninst✝² : NonAssocRing R\ninst✝¹ : Group G\ninst✝ : CancelMonoidWithZero G₀\np : N\nn✝ : ℕ\nh : IsIdempotentElem p\nn : ℕ\nx✝ : IsIdempotentElem (p ^ n)\n| p ^ Nat.succ n\n[PROOFSTEP]\nrw [← h.eq]\n --Porting note: was `nth_rw 3 [← h.eq]`\n[GOAL]\nM : Type u_1\nN : Type u_2\nS : Type u_3\nM₀ : Type u_4\nM₁ : Type u_5\nR : Type u_6\nG : Type u_7\nG₀ : Type u_8\ninst✝⁷ : Mul M\ninst✝⁶ : Monoid N\ninst✝⁵ : Semigroup S\ninst✝⁴ : MulZeroClass M₀\ninst✝³ : MulOneClass M₁\ninst✝² : NonAssocRing R\ninst✝¹ : Group G\ninst✝ : CancelMonoidWithZero G₀\np : N\nn✝ : ℕ\nh : IsIdempotentElem p\nn : ℕ\nx✝ : IsIdempotentElem (p ^ n)\n| p ^ Nat.succ n\n[PROOFSTEP]\nrw [← h.eq]\n --Porting note: was `nth_rw 3 [← h.eq]`\n[GOAL]\nM : Type u_1\nN : Type u_2\nS : Type u_3\nM₀ : Type u_4\nM₁ : Type u_5\nR : Type u_6\nG : Type u_7\nG₀ : Type u_8\ninst✝⁷ : Mul M\ninst✝⁶ : Monoid N\ninst✝⁵ : Semigroup S\ninst✝⁴ : MulZeroClass M₀\ninst✝³ : MulOneClass M₁\ninst✝² : NonAssocRing R\ninst✝¹ : Group G\ninst✝ : CancelMonoidWithZero G₀\np : N\nn✝ : ℕ\nh : IsIdempotentElem p\nn : ℕ\nx✝ : IsIdempotentElem (p ^ n)\n⊢ p ^ Nat.succ n * p ^ Nat.succ n = (p * p) ^ Nat.succ n\n[PROOFSTEP]\nrw [← sq, ← sq, ← pow_mul, ← pow_mul']\n[GOAL]\nM : Type u_1\nN : Type u_2\nS : Type u_3\nM₀ : Type u_4\nM₁ : Type u_5\nR : Type u_6\nG : Type u_7\nG₀ : Type u_8\ninst✝⁷ : Mul M\ninst✝⁶ : Monoid N\ninst✝⁵ : Semigroup S\ninst✝⁴ : MulZeroClass M₀\ninst✝³ : MulOneClass M₁\ninst✝² : NonAssocRing R\ninst✝¹ : Group G\ninst✝ : CancelMonoidWithZero G₀\np : N\nn✝ : ℕ\nh : IsIdempotentElem p\nn : ℕ\nih : p ^ (n + 1) = p\n⊢ p ^ (Nat.succ n + 1) = p\n[PROOFSTEP]\nrw [pow_succ, ih, h.eq]\n[GOAL]\nM : Type u_1\nN : Type u_2\nS : Type u_3\nM₀ : Type u_4\nM₁ : Type u_5\nR : Type u_6\nG : Type u_7\nG₀ : Type u_8\ninst✝⁷ : Mul M\ninst✝⁶ : Monoid N\ninst✝⁵ : Semigroup S\ninst✝⁴ : MulZeroClass M₀\ninst✝³ : MulOneClass M₁\ninst✝² : NonAssocRing R\ninst✝¹ : Group G\ninst✝ : CancelMonoidWithZero G₀\np : G₀\n⊢ IsIdempotentElem p ↔ p = 0 ∨ p = 1\n[PROOFSTEP]\nrefine'\n Iff.intro (fun h => or_iff_not_imp_left.mpr fun hp => _) fun h =>\n h.elim (fun hp => hp.symm ▸ zero) fun hp => hp.symm ▸ one\n[GOAL]\nM : Type u_1\nN : Type u_2\nS : Type u_3\nM₀ : Type u_4\nM₁ : Type u_5\nR : Type u_6\nG : Type u_7\nG₀ : Type u_8\ninst✝⁷ : Mul M\ninst✝⁶ : Monoid N\ninst✝⁵ : Semigroup S\ninst✝⁴ : MulZeroClass M₀\ninst✝³ : MulOneClass M₁\ninst✝² : NonAssocRing R\ninst✝¹ : Group G\ninst✝ : CancelMonoidWithZero G₀\np : G₀\nh : IsIdempotentElem p\nhp : ¬p = 0\n⊢ p = 1\n[PROOFSTEP]\nexact mul_left_cancel₀ hp (h.trans (mul_one p).symm)\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Ring.Idempotents", "llama_tokens": 2480, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8333246035907933, "lm_q2_score": 0.6825737473266735, "lm_q1q2_score": 0.5688054974124825}} {"text": "[GOAL]\nC : Type u\ninst✝ : Groupoid C\nX Y : C\nf : X ⟶ Y\n⊢ inv (inv f) = f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nX Y : C\nf : Y ⟶ X\n⊢ inv (inv f) = f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nX Y a✝ b✝ : C\nf : a✝ ⟶ b✝\n⊢ Quiver.reverse (Quiver.reverse f) = f\n[PROOFSTEP]\ndsimp [Quiver.reverse]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nX Y a✝ b✝ : C\nf : a✝ ⟶ b✝\n⊢ Groupoid.inv (Groupoid.inv f) = f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nX Y : C\nD : Type u_1\ninst✝ : Groupoid D\nF : C ⥤ D\nu✝ v✝ : C\nf : u✝ ⟶ v✝\n⊢ F.map (Quiver.reverse f) = Quiver.reverse (F.map f)\n[PROOFSTEP]\nsimp only [Quiver.reverse, Quiver.HasReverse.reverse', Groupoid.inv_eq_inv, Functor.map_inv]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nX Y : C\nf : X ⟶ Y\n⊢ f ≫ inv f = 𝟙 X\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nX Y : C\nf : X ⟶ Y\n⊢ inv f ≫ f = 𝟙 Y\n[PROOFSTEP]\naesop_cat\n[GOAL]\nI : Type u\nJ : I → Type u₂\ninst✝ : (i : I) → Groupoid (J i)\nX✝ Y✝ : (i : I) → J i\nf : X✝ ⟶ Y✝\n⊢ (fun {X Y} f i => Groupoid.inv (f i)) f ≫ f = 𝟙 Y✝\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h\nI : Type u\nJ : I → Type u₂\ninst✝ : (i : I) → Groupoid (J i)\nX✝ Y✝ : (i : I) → J i\nf : X✝ ⟶ Y✝\ni : I\n⊢ ((fun {X Y} f i => Groupoid.inv (f i)) f ≫ f) i = 𝟙 Y✝ i\n[PROOFSTEP]\napply Groupoid.inv_comp\n[GOAL]\nI : Type u\nJ : I → Type u₂\ninst✝ : (i : I) → Groupoid (J i)\nX✝ Y✝ : (i : I) → J i\nf : X✝ ⟶ Y✝\n⊢ f ≫ (fun {X Y} f i => Groupoid.inv (f i)) f = 𝟙 X✝\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h\nI : Type u\nJ : I → Type u₂\ninst✝ : (i : I) → Groupoid (J i)\nX✝ Y✝ : (i : I) → J i\nf : X✝ ⟶ Y✝\ni : I\n⊢ (f ≫ (fun {X Y} f i => Groupoid.inv (f i)) f) i = 𝟙 X✝ i\n[PROOFSTEP]\napply Groupoid.comp_inv\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Groupoid", "llama_tokens": 1012, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8244619263765707, "lm_q2_score": 0.6893056040203135, "lm_q1q2_score": 0.5683062261527533}} {"text": "[GOAL]\nm : ℝ\nhm : 1 < m\nk : ℕ\n⊢ Summable fun i => 1 / m ^ (i + (k + 1))!\n[PROOFSTEP]\nconvert (summable_nat_add_iff (k + 1)).2 (LiouvilleNumber.summable hm)\n[GOAL]\nm : ℝ\nhm : 1 < m\nk x✝ : ℕ\n⊢ 0 ≤ 1 / m ^ (x✝ + (k + 1))!\n[PROOFSTEP]\npositivity\n[GOAL]\nm : ℝ\nhm : 1 < m\nk : ℕ\n⊢ 0 < 1 / m ^ (0 + (k + 1))!\n[PROOFSTEP]\npositivity\n[GOAL]\nn : ℕ\nm : ℝ\nm1 : 1 < m\nm0 : 0 < m\nmi : 1 / m < 1\n⊢ ∑' (i : ℕ), 1 / m ^ (i + (n + 1)!) = ∑' (i : ℕ), (1 / m) ^ i * (1 / m ^ (n + 1)!)\n[PROOFSTEP]\nsimp only [pow_add, one_div, mul_inv, inv_pow]\n -- factor the constant `(1 / m ^ (n + 1)!)` out of the series\n[GOAL]\nn : ℕ\nm : ℝ\nm1 : 1 < m\nm0 : 0 < m\nmi : 1 / m < 1\n⊢ (∑' (i : ℕ), (1 / m) ^ i) * (1 / m ^ (n + 1)!) = (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!)\n[PROOFSTEP]\nrw [tsum_geometric_of_lt_1 (by positivity) mi]\n[GOAL]\nn : ℕ\nm : ℝ\nm1 : 1 < m\nm0 : 0 < m\nmi : 1 / m < 1\n⊢ 0 ≤ 1 / m\n[PROOFSTEP]\npositivity\n[GOAL]\nn : ℕ\nm : ℝ\nhm : 2 ≤ m\n⊢ 0 ≤ 1 / m ^ (n + 1)!\n[PROOFSTEP]\npositivity\n[GOAL]\nn : ℕ\nm : ℝ\nhm : 2 ≤ m\n⊢ 2 / m ^ (n ! * (n + 1)) ≤ 1 / m ^ (n ! * n)\n[PROOFSTEP]\napply (div_le_div_iff _ _).mpr\n[GOAL]\nn : ℕ\nm : ℝ\nhm : 2 ≤ m\n⊢ 2 * m ^ (n ! * n) ≤ 1 * m ^ (n ! * (n + 1))\nn : ℕ\nm : ℝ\nhm : 2 ≤ m\n⊢ 0 < m ^ (n ! * (n + 1))\nn : ℕ m : ℝ hm : 2 ≤ m ⊢ 0 < m ^ (n ! * n)\n[PROOFSTEP]\nconv_rhs =>\n rw [one_mul, mul_add, pow_add, mul_one, pow_mul, mul_comm, ← pow_mul]\n -- the second factors coincide, so we prove the inequality of the first factors*\n[GOAL]\nn : ℕ\nm : ℝ\nhm : 2 ≤ m\n| 1 * m ^ (n ! * (n + 1))\n[PROOFSTEP]\nrw [one_mul, mul_add, pow_add, mul_one, pow_mul, mul_comm, ← pow_mul]\n -- the second factors coincide, so we prove the inequality of the first factors*\n[GOAL]\nn : ℕ\nm : ℝ\nhm : 2 ≤ m\n| 1 * m ^ (n ! * (n + 1))\n[PROOFSTEP]\nrw [one_mul, mul_add, pow_add, mul_one, pow_mul, mul_comm, ← pow_mul]\n -- the second factors coincide, so we prove the inequality of the first factors*\n[GOAL]\nn : ℕ\nm : ℝ\nhm : 2 ≤ m\n| 1 * m ^ (n ! * (n + 1))\n[PROOFSTEP]\nrw [one_mul, mul_add, pow_add, mul_one, pow_mul, mul_comm, ← pow_mul]\n -- the second factors coincide, so we prove the inequality of the first factors*\n[GOAL]\nn : ℕ\nm : ℝ\nhm : 2 ≤ m\n⊢ 2 * m ^ (n ! * n) ≤ m ^ n ! * m ^ (n ! * n)\nn : ℕ\nm : ℝ\nhm : 2 ≤ m\n⊢ 0 < m ^ (n ! * (n + 1))\nn : ℕ m : ℝ hm : 2 ≤ m ⊢ 0 < m ^ (n ! * n)\n[PROOFSTEP]\nrefine'\n (mul_le_mul_right _).mpr\n _\n -- solve all the inequalities `0 < m ^ ??`\n[GOAL]\ncase refine'_1\nn : ℕ\nm : ℝ\nhm : 2 ≤ m\n⊢ 0 < m ^ (n ! * n)\ncase refine'_2\nn : ℕ\nm : ℝ\nhm : 2 ≤ m\n⊢ 2 ≤ m ^ n !\nn : ℕ\nm : ℝ\nhm : 2 ≤ m\n⊢ 0 < m ^ (n ! * (n + 1))\nn : ℕ m : ℝ hm : 2 ≤ m ⊢ 0 < m ^ (n ! * n)\n[PROOFSTEP]\nany_goals\n exact\n pow_pos (zero_lt_two.trans_le hm)\n _\n -- `2 ≤ m ^ n!` is a consequence of monotonicity of exponentiation at `2 ≤ m`.\n[GOAL]\ncase refine'_1\nn : ℕ\nm : ℝ\nhm : 2 ≤ m\n⊢ 0 < m ^ (n ! * n)\n[PROOFSTEP]\nexact\n pow_pos (zero_lt_two.trans_le hm)\n _\n -- `2 ≤ m ^ n!` is a consequence of monotonicity of exponentiation at `2 ≤ m`.\n[GOAL]\ncase refine'_2\nn : ℕ\nm : ℝ\nhm : 2 ≤ m\n⊢ 2 ≤ m ^ n !\n[PROOFSTEP]\nexact\n pow_pos (zero_lt_two.trans_le hm)\n _\n -- `2 ≤ m ^ n!` is a consequence of monotonicity of exponentiation at `2 ≤ m`.\n[GOAL]\nn : ℕ\nm : ℝ\nhm : 2 ≤ m\n⊢ 0 < m ^ (n ! * (n + 1))\n[PROOFSTEP]\nexact\n pow_pos (zero_lt_two.trans_le hm)\n _\n -- `2 ≤ m ^ n!` is a consequence of monotonicity of exponentiation at `2 ≤ m`.\n[GOAL]\nn : ℕ\nm : ℝ\nhm : 2 ≤ m\n⊢ 0 < m ^ (n ! * n)\n[PROOFSTEP]\nexact\n pow_pos (zero_lt_two.trans_le hm)\n _\n -- `2 ≤ m ^ n!` is a consequence of monotonicity of exponentiation at `2 ≤ m`.\n[GOAL]\ncase refine'_2\nn : ℕ\nm : ℝ\nhm : 2 ≤ m\n⊢ 2 ≤ m ^ n !\n[PROOFSTEP]\nexact _root_.trans (_root_.trans hm (pow_one _).symm.le) (pow_mono (one_le_two.trans hm) n.factorial_pos)\n[GOAL]\nm : ℕ\nhm : 0 < m\nk : ℕ\n⊢ ∃ p, partialSum (↑m) k = ↑p / ↑(m ^ k !)\n[PROOFSTEP]\ninduction' k with k h\n[GOAL]\ncase zero\nm : ℕ\nhm : 0 < m\n⊢ ∃ p, partialSum (↑m) Nat.zero = ↑p / ↑(m ^ Nat.zero !)\n[PROOFSTEP]\nexact ⟨1, by rw [partialSum, range_one, sum_singleton, Nat.cast_one, Nat.factorial, pow_one, pow_one]⟩\n[GOAL]\nm : ℕ\nhm : 0 < m\n⊢ partialSum (↑m) Nat.zero = ↑1 / ↑(m ^ Nat.zero !)\n[PROOFSTEP]\nrw [partialSum, range_one, sum_singleton, Nat.cast_one, Nat.factorial, pow_one, pow_one]\n[GOAL]\ncase succ\nm : ℕ\nhm : 0 < m\nk : ℕ\nh : ∃ p, partialSum (↑m) k = ↑p / ↑(m ^ k !)\n⊢ ∃ p, partialSum (↑m) (Nat.succ k) = ↑p / ↑(m ^ (Nat.succ k)!)\n[PROOFSTEP]\nrcases h with ⟨p_k, h_k⟩\n[GOAL]\ncase succ.intro\nm : ℕ\nhm : 0 < m\nk p_k : ℕ\nh_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)\n⊢ ∃ p, partialSum (↑m) (Nat.succ k) = ↑p / ↑(m ^ (Nat.succ k)!)\n[PROOFSTEP]\nuse p_k * m ^ ((k + 1)! - k !) + 1\n[GOAL]\ncase h\nm : ℕ\nhm : 0 < m\nk p_k : ℕ\nh_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)\n⊢ partialSum (↑m) (Nat.succ k) = ↑(p_k * m ^ ((k + 1)! - k !) + 1) / ↑(m ^ (Nat.succ k)!)\n[PROOFSTEP]\nrw [partialSum_succ, h_k, div_add_div, div_eq_div_iff, add_mul]\n[GOAL]\ncase h\nm : ℕ\nhm : 0 < m\nk p_k : ℕ\nh_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)\n⊢ ↑p_k * ↑m ^ (k + 1)! * ↑(m ^ (Nat.succ k)!) + ↑(m ^ k !) * 1 * ↑(m ^ (Nat.succ k)!) =\n ↑(p_k * m ^ ((k + 1)! - k !) + 1) * (↑(m ^ k !) * ↑m ^ (k + 1)!)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\nm : ℕ\nhm : 0 < m\nk p_k : ℕ\nh_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)\n⊢ p_k * m ^ (k + 1)! * m ^ (Nat.succ k)! + m ^ k ! * 1 * m ^ (Nat.succ k)! =\n (p_k * m ^ ((k + 1)! - k !) + 1) * (m ^ k ! * m ^ (k + 1)!)\n[PROOFSTEP]\nrw [add_mul, one_mul, Nat.factorial_succ, add_mul, one_mul, add_tsub_cancel_right, pow_add]\n[GOAL]\ncase h\nm : ℕ\nhm : 0 < m\nk p_k : ℕ\nh_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)\n⊢ p_k * (m ^ (k * k !) * m ^ k !) * (m ^ (k * k !) * m ^ k !) + m ^ k ! * 1 * (m ^ (k * k !) * m ^ k !) =\n p_k * m ^ (k * k !) * (m ^ k ! * (m ^ (k * k !) * m ^ k !)) + m ^ k ! * (m ^ (k * k !) * m ^ k !)\n[PROOFSTEP]\nsimp [mul_assoc]\n[GOAL]\ncase h.hb\nm : ℕ\nhm : 0 < m\nk p_k : ℕ\nh_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)\n⊢ ↑(m ^ k !) * ↑m ^ (k + 1)! ≠ 0\ncase h.hd\nm : ℕ\nhm : 0 < m\nk p_k : ℕ\nh_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)\n⊢ ↑(m ^ (Nat.succ k)!) ≠ 0\ncase h.hb\nm : ℕ\nhm : 0 < m\nk p_k : ℕ\nh_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)\n⊢ ↑(m ^ k !) ≠ 0\ncase h.hd m : ℕ hm : 0 < m k p_k : ℕ h_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !) ⊢ ↑m ^ (k + 1)! ≠ 0\n[PROOFSTEP]\nall_goals positivity\n[GOAL]\ncase h.hb\nm : ℕ\nhm : 0 < m\nk p_k : ℕ\nh_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)\n⊢ ↑(m ^ k !) * ↑m ^ (k + 1)! ≠ 0\n[PROOFSTEP]\npositivity\n[GOAL]\ncase h.hd\nm : ℕ\nhm : 0 < m\nk p_k : ℕ\nh_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)\n⊢ ↑(m ^ (Nat.succ k)!) ≠ 0\n[PROOFSTEP]\npositivity\n[GOAL]\ncase h.hb\nm : ℕ\nhm : 0 < m\nk p_k : ℕ\nh_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)\n⊢ ↑(m ^ k !) ≠ 0\n[PROOFSTEP]\npositivity\n[GOAL]\ncase h.hd\nm : ℕ\nhm : 0 < m\nk p_k : ℕ\nh_k : partialSum (↑m) k = ↑p_k / ↑(m ^ k !)\n⊢ ↑m ^ (k + 1)! ≠ 0\n[PROOFSTEP]\npositivity\n[GOAL]\nm : ℕ\nhm : 2 ≤ m\n⊢ Liouville (liouvilleNumber ↑m)\n[PROOFSTEP]\nhave mZ1 : 1 < (m : ℤ) := by norm_cast\n[GOAL]\nm : ℕ\nhm : 2 ≤ m\n⊢ 1 < ↑m\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nm : ℕ\nhm : 2 ≤ m\nmZ1 : 1 < ↑m\n⊢ Liouville (liouvilleNumber ↑m)\n[PROOFSTEP]\nhave m1 : 1 < (m : ℝ) := by norm_cast\n[GOAL]\nm : ℕ\nhm : 2 ≤ m\nmZ1 : 1 < ↑m\n⊢ 1 < ↑m\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nm : ℕ\nhm : 2 ≤ m\nmZ1 : 1 < ↑m\nm1 : 1 < ↑m\n⊢ Liouville (liouvilleNumber ↑m)\n[PROOFSTEP]\nintro n\n[GOAL]\nm : ℕ\nhm : 2 ≤ m\nmZ1 : 1 < ↑m\nm1 : 1 < ↑m\nn : ℕ\n⊢ ∃ a b, 1 < b ∧ liouvilleNumber ↑m ≠ ↑a / ↑b ∧ |liouvilleNumber ↑m - ↑a / ↑b| < 1 / ↑b ^ n\n[PROOFSTEP]\nrcases partialSum_eq_rat (zero_lt_two.trans_le hm) n with ⟨p, hp⟩\n[GOAL]\ncase intro\nm : ℕ\nhm : 2 ≤ m\nmZ1 : 1 < ↑m\nm1 : 1 < ↑m\nn p : ℕ\nhp : partialSum (↑m) n = ↑p / ↑(m ^ n !)\n⊢ ∃ a b, 1 < b ∧ liouvilleNumber ↑m ≠ ↑a / ↑b ∧ |liouvilleNumber ↑m - ↑a / ↑b| < 1 / ↑b ^ n\n[PROOFSTEP]\nrefine' ⟨p, m ^ n !, by rw [Nat.cast_pow]; exact one_lt_pow mZ1 n.factorial_ne_zero, _⟩\n[GOAL]\nm : ℕ\nhm : 2 ≤ m\nmZ1 : 1 < ↑m\nm1 : 1 < ↑m\nn p : ℕ\nhp : partialSum (↑m) n = ↑p / ↑(m ^ n !)\n⊢ 1 < ↑(m ^ n !)\n[PROOFSTEP]\nrw [Nat.cast_pow]\n[GOAL]\nm : ℕ\nhm : 2 ≤ m\nmZ1 : 1 < ↑m\nm1 : 1 < ↑m\nn p : ℕ\nhp : partialSum (↑m) n = ↑p / ↑(m ^ n !)\n⊢ 1 < ↑m ^ n !\n[PROOFSTEP]\nexact one_lt_pow mZ1 n.factorial_ne_zero\n[GOAL]\ncase intro\nm : ℕ\nhm : 2 ≤ m\nmZ1 : 1 < ↑m\nm1 : 1 < ↑m\nn p : ℕ\nhp : partialSum (↑m) n = ↑p / ↑(m ^ n !)\n⊢ liouvilleNumber ↑m ≠ ↑↑p / ↑↑(m ^ n !) ∧ |liouvilleNumber ↑m - ↑↑p / ↑↑(m ^ n !)| < 1 / ↑↑(m ^ n !) ^ n\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase intro\nm : ℕ\nhm : 2 ≤ m\nmZ1 : 1 < ↑m\nm1 : 1 < ↑m\nn p : ℕ\nhp : partialSum (↑m) n = ↑p / ↑(m ^ n !)\n⊢ liouvilleNumber ↑m ≠ ↑p / ↑m ^ n ! ∧ |liouvilleNumber ↑m - ↑p / ↑m ^ n !| < 1 / (↑m ^ n !) ^ n\n[PROOFSTEP]\nrw [Nat.cast_pow] at hp \n[GOAL]\ncase intro\nm : ℕ\nhm : 2 ≤ m\nmZ1 : 1 < ↑m\nm1 : 1 < ↑m\nn p : ℕ\nhp : partialSum (↑m) n = ↑p / ↑m ^ n !\n⊢ liouvilleNumber ↑m ≠ ↑p / ↑m ^ n ! ∧ |liouvilleNumber ↑m - ↑p / ↑m ^ n !| < 1 / (↑m ^ n !) ^ n\n[PROOFSTEP]\nrw [← partialSum_add_remainder m1 n, ← hp]\n[GOAL]\ncase intro\nm : ℕ\nhm : 2 ≤ m\nmZ1 : 1 < ↑m\nm1 : 1 < ↑m\nn p : ℕ\nhp : partialSum (↑m) n = ↑p / ↑m ^ n !\n⊢ partialSum (↑m) n + remainder (↑m) n ≠ partialSum (↑m) n ∧\n |partialSum (↑m) n + remainder (↑m) n - partialSum (↑m) n| < 1 / (↑m ^ n !) ^ n\n[PROOFSTEP]\nhave hpos := remainder_pos m1 n\n[GOAL]\ncase intro\nm : ℕ\nhm : 2 ≤ m\nmZ1 : 1 < ↑m\nm1 : 1 < ↑m\nn p : ℕ\nhp : partialSum (↑m) n = ↑p / ↑m ^ n !\nhpos : 0 < remainder (↑m) n\n⊢ partialSum (↑m) n + remainder (↑m) n ≠ partialSum (↑m) n ∧\n |partialSum (↑m) n + remainder (↑m) n - partialSum (↑m) n| < 1 / (↑m ^ n !) ^ n\n[PROOFSTEP]\nsimpa [abs_of_pos hpos, hpos.ne'] using @remainder_lt n m (by assumption_mod_cast)\n[GOAL]\nm : ℕ\nhm : 2 ≤ m\nmZ1 : 1 < ↑m\nm1 : 1 < ↑m\nn p : ℕ\nhp : partialSum (↑m) n = ↑p / ↑m ^ n !\nhpos : 0 < remainder (↑m) n\n⊢ 2 ≤ ↑m\n[PROOFSTEP]\nassumption_mod_cast\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.Liouville.LiouvilleNumber", "llama_tokens": 5507, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7905303186696747, "lm_q2_score": 0.7185943985973772, "lm_q1q2_score": 0.5680706589174278}} {"text": "[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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\n⊢ ∀ (x : E), ‖↑0 x‖ ≤ 0 * ‖x‖\n[PROOFSTEP]\nsimp [le_refl]\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\n⊢ ∀ (x : E), ‖↑LinearMap.id x‖ ≤ 1 * ‖x‖\n[PROOFSTEP]\nsimp [le_refl]\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\n⊢ IsBoundedLinearMap 𝕜 fun x => x.fst\n[PROOFSTEP]\nrefine' (LinearMap.fst 𝕜 E F).isLinear.with_bound 1 fun x => _\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nx : E × F\n⊢ ‖↑(LinearMap.fst 𝕜 E F) x‖ ≤ 1 * ‖x‖\n[PROOFSTEP]\nrw [one_mul]\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nx : E × F\n⊢ ‖↑(LinearMap.fst 𝕜 E F) x‖ ≤ ‖x‖\n[PROOFSTEP]\nexact le_max_left _ _\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\n⊢ IsBoundedLinearMap 𝕜 fun x => x.snd\n[PROOFSTEP]\nrefine' (LinearMap.snd 𝕜 E F).isLinear.with_bound 1 fun x => _\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nx : E × F\n⊢ ‖↑(LinearMap.snd 𝕜 E F) x‖ ≤ 1 * ‖x‖\n[PROOFSTEP]\nrw [one_mul]\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nx : E × F\n⊢ ‖↑(LinearMap.snd 𝕜 E F) x‖ ≤ ‖x‖\n[PROOFSTEP]\nexact le_max_right _ _\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\nhf : IsBoundedLinearMap 𝕜 f\n⊢ IsBoundedLinearMap 𝕜 fun e => -f e\n[PROOFSTEP]\nrw [show (fun e => -f e) = fun e => (-1 : 𝕜) • f e by funext; 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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\nhf : IsBoundedLinearMap 𝕜 f\n⊢ (fun e => -f e) = fun e => -1 • f e\n[PROOFSTEP]\nfunext\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\nhf : IsBoundedLinearMap 𝕜 f\nx✝ : E\n⊢ -f x✝ = -1 • f x✝\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\nhf : IsBoundedLinearMap 𝕜 f\n⊢ IsBoundedLinearMap 𝕜 fun e => -1 • f e\n[PROOFSTEP]\nexact smul (-1) hf\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\nhf : IsBoundedLinearMap 𝕜 f\nhg : IsBoundedLinearMap 𝕜 g\nhlf : IsLinearMap 𝕜 f\nMf : ℝ\nleft✝¹ : 0 < Mf\nhMf : ∀ (x : E), ‖f x‖ ≤ Mf * ‖x‖\nhlg : IsLinearMap 𝕜 g\nMg : ℝ\nleft✝ : 0 < Mg\nhMg : ∀ (x : E), ‖g x‖ ≤ Mg * ‖x‖\nx : E\n⊢ Mf * ‖x‖ + Mg * ‖x‖ ≤ (Mf + Mg) * ‖x‖\n[PROOFSTEP]\nrw [add_mul]\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\nhf : IsBoundedLinearMap 𝕜 f\nhg : IsBoundedLinearMap 𝕜 g\n⊢ IsBoundedLinearMap 𝕜 fun e => f e - g e\n[PROOFSTEP]\nsimpa [sub_eq_add_neg] using add hf (neg hg)\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\nx : E\nhf✝ : IsBoundedLinearMap 𝕜 f\nhf : IsLinearMap 𝕜 f\nM : ℝ\nleft✝ : 0 < M\nhM : ∀ (x : E), ‖f x‖ ≤ M * ‖x‖\ne : E\n⊢ ‖f e - f x‖ = ‖↑(IsLinearMap.mk' f hf) (e - x)‖\n[PROOFSTEP]\nrw [(hf.mk' _).map_sub e x]\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\nx : E\nhf✝ : IsBoundedLinearMap 𝕜 f\nhf : IsLinearMap 𝕜 f\nM : ℝ\nleft✝ : 0 < M\nhM : ∀ (x : E), ‖f x‖ ≤ M * ‖x‖\ne : E\n⊢ ‖f e - f x‖ = ‖↑(IsLinearMap.mk' f hf) e - ↑(IsLinearMap.mk' f hf) x‖\n[PROOFSTEP]\nrfl\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\nx : E\nhf✝ : IsBoundedLinearMap 𝕜 f\nhf : IsLinearMap 𝕜 f\nM : ℝ\nleft✝ : 0 < M\nhM : ∀ (x : E), ‖f x‖ ≤ M * ‖x‖\nthis : Tendsto (fun e => M * ‖e - x‖) (𝓝 x) (𝓝 (M * 0))\n⊢ Tendsto (fun e => M * ‖e - x‖) (𝓝 x) (𝓝 0)\n[PROOFSTEP]\nsimpa\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\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝² : Fintype ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\np₁ p₂ : ContinuousMultilinearMap 𝕜 E F × ContinuousMultilinearMap 𝕜 E G\n⊢ ContinuousMultilinearMap.prod (p₁ + p₂).fst (p₁ + p₂).snd =\n ContinuousMultilinearMap.prod p₁.fst p₁.snd + ContinuousMultilinearMap.prod p₂.fst p₂.snd\n[PROOFSTEP]\next1 m\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\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝² : Fintype ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\np₁ p₂ : ContinuousMultilinearMap 𝕜 E F × ContinuousMultilinearMap 𝕜 E G\nm : (i : ι) → E i\n⊢ ↑(ContinuousMultilinearMap.prod (p₁ + p₂).fst (p₁ + p₂).snd) m =\n ↑(ContinuousMultilinearMap.prod p₁.fst p₁.snd + ContinuousMultilinearMap.prod p₂.fst p₂.snd) m\n[PROOFSTEP]\nrfl\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\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝² : Fintype ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\nc : 𝕜\np : ContinuousMultilinearMap 𝕜 E F × ContinuousMultilinearMap 𝕜 E G\n⊢ ContinuousMultilinearMap.prod (c • p).fst (c • p).snd = c • ContinuousMultilinearMap.prod p.fst p.snd\n[PROOFSTEP]\next1 m\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\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝² : Fintype ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\nc : 𝕜\np : ContinuousMultilinearMap 𝕜 E F × ContinuousMultilinearMap 𝕜 E G\nm : (i : ι) → E i\n⊢ ↑(ContinuousMultilinearMap.prod (c • p).fst (c • p).snd) m = ↑(c • ContinuousMultilinearMap.prod p.fst p.snd) m\n[PROOFSTEP]\nrfl\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\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝² : Fintype ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\np : ContinuousMultilinearMap 𝕜 E F × ContinuousMultilinearMap 𝕜 E G\n⊢ ‖ContinuousMultilinearMap.prod p.fst p.snd‖ ≤ 1 * ‖p‖\n[PROOFSTEP]\nrw [one_mul]\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\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝² : Fintype ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\np : ContinuousMultilinearMap 𝕜 E F × ContinuousMultilinearMap 𝕜 E G\n⊢ ‖ContinuousMultilinearMap.prod p.fst p.snd‖ ≤ ‖p‖\n[PROOFSTEP]\napply ContinuousMultilinearMap.op_norm_le_bound _ (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\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝² : Fintype ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\np : ContinuousMultilinearMap 𝕜 E F × ContinuousMultilinearMap 𝕜 E G\n⊢ ∀ (m : (i : ι) → E i), ‖↑(ContinuousMultilinearMap.prod p.fst p.snd) m‖ ≤ ‖p‖ * ∏ i : ι, ‖m i‖\n[PROOFSTEP]\nintro 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\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝² : Fintype ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\np : ContinuousMultilinearMap 𝕜 E F × ContinuousMultilinearMap 𝕜 E G\nm : (i : ι) → E i\n⊢ ‖↑(ContinuousMultilinearMap.prod p.fst p.snd) m‖ ≤ ‖p‖ * ∏ i : ι, ‖m i‖\n[PROOFSTEP]\nrw [ContinuousMultilinearMap.prod_apply, norm_prod_le_iff]\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\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝² : Fintype ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\np : ContinuousMultilinearMap 𝕜 E F × ContinuousMultilinearMap 𝕜 E G\nm : (i : ι) → E i\n⊢ ‖(↑p.fst m, ↑p.snd m).fst‖ ≤ ‖p‖ * ∏ i : ι, ‖m i‖ ∧ ‖(↑p.fst m, ↑p.snd m).snd‖ ≤ ‖p‖ * ∏ i : ι, ‖m i‖\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\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\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝² : Fintype ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\np : ContinuousMultilinearMap 𝕜 E F × ContinuousMultilinearMap 𝕜 E G\nm : (i : ι) → E i\n⊢ ‖(↑p.fst m, ↑p.snd m).fst‖ ≤ ‖p‖ * ∏ i : ι, ‖m i‖\n[PROOFSTEP]\nexact\n (p.1.le_op_norm m).trans (mul_le_mul_of_nonneg_right (norm_fst_le p) (Finset.prod_nonneg fun i _ => norm_nonneg _))\n[GOAL]\ncase right\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\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝² : Fintype ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\np : ContinuousMultilinearMap 𝕜 E F × ContinuousMultilinearMap 𝕜 E G\nm : (i : ι) → E i\n⊢ ‖(↑p.fst m, ↑p.snd m).snd‖ ≤ ‖p‖ * ∏ i : ι, ‖m i‖\n[PROOFSTEP]\nexact\n (p.2.le_op_norm m).trans (mul_le_mul_of_nonneg_right (norm_snd_le p) (Finset.prod_nonneg fun i _ => 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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝ : Fintype ι\ng : G →L[𝕜] E\n⊢ IsBoundedLinearMap 𝕜 fun f => ContinuousMultilinearMap.compContinuousLinearMap f fun x => g\n[PROOFSTEP]\nrefine' IsLinearMap.with_bound ⟨fun f₁ f₂ => by ext; rfl, fun c f => by ext; rfl⟩ (‖g‖ ^ Fintype.card ι) fun f => _\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝ : Fintype ι\ng : G →L[𝕜] E\nf₁ f₂ : ContinuousMultilinearMap 𝕜 (fun x => E) F\n⊢ (ContinuousMultilinearMap.compContinuousLinearMap (f₁ + f₂) fun x => g) =\n (ContinuousMultilinearMap.compContinuousLinearMap f₁ fun x => g) +\n ContinuousMultilinearMap.compContinuousLinearMap f₂ fun x => g\n[PROOFSTEP]\next\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝ : Fintype ι\ng : G →L[𝕜] E\nf₁ f₂ : ContinuousMultilinearMap 𝕜 (fun x => E) F\nx✝ : ι → G\n⊢ ↑(ContinuousMultilinearMap.compContinuousLinearMap (f₁ + f₂) fun x => g) x✝ =\n ↑((ContinuousMultilinearMap.compContinuousLinearMap f₁ fun x => g) +\n ContinuousMultilinearMap.compContinuousLinearMap f₂ fun x => g)\n x✝\n[PROOFSTEP]\nrfl\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝ : Fintype ι\ng : G →L[𝕜] E\nc : 𝕜\nf : ContinuousMultilinearMap 𝕜 (fun x => E) F\n⊢ (ContinuousMultilinearMap.compContinuousLinearMap (c • f) fun x => g) =\n c • ContinuousMultilinearMap.compContinuousLinearMap f fun x => g\n[PROOFSTEP]\next\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝ : Fintype ι\ng : G →L[𝕜] E\nc : 𝕜\nf : ContinuousMultilinearMap 𝕜 (fun x => E) F\nx✝ : ι → G\n⊢ ↑(ContinuousMultilinearMap.compContinuousLinearMap (c • f) fun x => g) x✝ =\n ↑(c • ContinuousMultilinearMap.compContinuousLinearMap f fun x => g) x✝\n[PROOFSTEP]\nrfl\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝ : Fintype ι\ng : G →L[𝕜] E\nf : ContinuousMultilinearMap 𝕜 (fun x => E) F\n⊢ ‖ContinuousMultilinearMap.compContinuousLinearMap f fun x => g‖ ≤ ‖g‖ ^ Fintype.card ι * ‖f‖\n[PROOFSTEP]\napply ContinuousMultilinearMap.op_norm_le_bound _ _ _\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝ : Fintype ι\ng : G →L[𝕜] E\nf : ContinuousMultilinearMap 𝕜 (fun x => E) F\n⊢ 0 ≤ ‖g‖ ^ Fintype.card ι * ‖f‖\n[PROOFSTEP]\napply_rules [mul_nonneg, pow_nonneg, 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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝ : Fintype ι\ng : G →L[𝕜] E\nf : ContinuousMultilinearMap 𝕜 (fun x => E) F\n⊢ ∀ (m : ι → G),\n ‖↑(ContinuousMultilinearMap.compContinuousLinearMap f fun x => g) m‖ ≤ ‖g‖ ^ Fintype.card ι * ‖f‖ * ∏ i : ι, ‖m i‖\n[PROOFSTEP]\nintro 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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝ : Fintype ι\ng : G →L[𝕜] E\nf : ContinuousMultilinearMap 𝕜 (fun x => E) F\nm : ι → G\n⊢ ‖↑(ContinuousMultilinearMap.compContinuousLinearMap f fun x => g) m‖ ≤ ‖g‖ ^ Fintype.card ι * ‖f‖ * ∏ i : ι, ‖m i‖\n[PROOFSTEP]\ncalc\n ‖f (g ∘ m)‖ ≤ ‖f‖ * ∏ i, ‖g (m i)‖ := f.le_op_norm _\n _ ≤ ‖f‖ * ∏ i, ‖g‖ * ‖m i‖ := by\n apply mul_le_mul_of_nonneg_left _ (norm_nonneg _)\n exact Finset.prod_le_prod (fun i _ => norm_nonneg _) fun i _ => g.le_op_norm _\n _ = ‖g‖ ^ Fintype.card ι * ‖f‖ * ∏ i, ‖m i‖ :=\n by\n simp [Finset.prod_mul_distrib, Finset.card_univ]\n ring\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝ : Fintype ι\ng : G →L[𝕜] E\nf : ContinuousMultilinearMap 𝕜 (fun x => E) F\nm : ι → G\n⊢ ‖f‖ * ∏ i : ι, ‖↑g (m i)‖ ≤ ‖f‖ * ∏ i : ι, ‖g‖ * ‖m i‖\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝ : Fintype ι\ng : G →L[𝕜] E\nf : ContinuousMultilinearMap 𝕜 (fun x => E) F\nm : ι → G\n⊢ ∏ i : ι, ‖↑g (m i)‖ ≤ ∏ i : ι, ‖g‖ * ‖m i‖\n[PROOFSTEP]\nexact Finset.prod_le_prod (fun i _ => norm_nonneg _) fun i _ => g.le_op_norm _\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝ : Fintype ι\ng : G →L[𝕜] E\nf : ContinuousMultilinearMap 𝕜 (fun x => E) F\nm : ι → G\n⊢ ‖f‖ * ∏ i : ι, ‖g‖ * ‖m i‖ = ‖g‖ ^ Fintype.card ι * ‖f‖ * ∏ i : ι, ‖m i‖\n[PROOFSTEP]\nsimp [Finset.prod_mul_distrib, Finset.card_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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nι : Type u_5\ninst✝ : Fintype ι\ng : G →L[𝕜] E\nf : ContinuousMultilinearMap 𝕜 (fun x => E) F\nm : ι → G\n⊢ ‖f‖ * (‖g‖ ^ Fintype.card ι * ∏ x : ι, ‖m x‖) = ‖g‖ ^ Fintype.card ι * ‖f‖ * ∏ x : ι, ‖m 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\nG : Type u_4\ninst✝¹¹ : NormedAddCommGroup G\ninst✝¹⁰ : NormedSpace 𝕜 G\nR : Type u_5\n𝕜₂ : Type u_6\n𝕜' : Type u_7\ninst✝⁹ : NontriviallyNormedField 𝕜'\ninst✝⁸ : NontriviallyNormedField 𝕜₂\nM : Type u_8\ninst✝⁷ : TopologicalSpace M\nσ₁₂ : 𝕜 →+* 𝕜₂\nG' : Type u_9\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace 𝕜₂ G'\ninst✝⁴ : NormedSpace 𝕜' G'\ninst✝³ : SMulCommClass 𝕜₂ 𝕜' G'\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nρ₁₂ : R →+* 𝕜'\nf : M →SL[ρ₁₂] F →SL[σ₁₂] G'\nx x' : M\ny : F\n⊢ ↑(↑f (x + x')) y = ↑(↑f x) y + ↑(↑f x') y\n[PROOFSTEP]\nrw [f.map_add, add_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\nG : Type u_4\ninst✝¹¹ : NormedAddCommGroup G\ninst✝¹⁰ : NormedSpace 𝕜 G\nR : Type u_5\n𝕜₂ : Type u_6\n𝕜' : Type u_7\ninst✝⁹ : NontriviallyNormedField 𝕜'\ninst✝⁸ : NontriviallyNormedField 𝕜₂\nM : Type u_8\ninst✝⁷ : TopologicalSpace M\nσ₁₂ : 𝕜 →+* 𝕜₂\nG' : Type u_9\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace 𝕜₂ G'\ninst✝⁴ : NormedSpace 𝕜' G'\ninst✝³ : SMulCommClass 𝕜₂ 𝕜' G'\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nρ₁₂ : R →+* 𝕜'\nf : M →SL[ρ₁₂] F →SL[σ₁₂] G'\ny : F\n⊢ ↑(↑f 0) y = 0\n[PROOFSTEP]\nrw [f.map_zero, zero_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\nG : Type u_4\ninst✝¹¹ : NormedAddCommGroup G\ninst✝¹⁰ : NormedSpace 𝕜 G\nR : Type u_5\n𝕜₂ : Type u_6\n𝕜' : Type u_7\ninst✝⁹ : NontriviallyNormedField 𝕜'\ninst✝⁸ : NontriviallyNormedField 𝕜₂\nM : Type u_8\ninst✝⁷ : TopologicalSpace M\nσ₁₂ : 𝕜 →+* 𝕜₂\nG' : Type u_9\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace 𝕜₂ G'\ninst✝⁴ : NormedSpace 𝕜' G'\ninst✝³ : SMulCommClass 𝕜₂ 𝕜' G'\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nρ₁₂ : R →+* 𝕜'\nf : M →SL[ρ₁₂] F →SL[σ₁₂] G'\nc : R\nx : M\ny : F\n⊢ ↑(↑f (c • x)) y = ↑ρ₁₂ c • ↑(↑f x) y\n[PROOFSTEP]\nrw [f.map_smulₛₗ, smul_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\nG : Type u_4\ninst✝¹¹ : NormedAddCommGroup G\ninst✝¹⁰ : NormedSpace 𝕜 G\nR : Type u_5\n𝕜₂ : Type u_6\n𝕜' : Type u_7\ninst✝⁹ : NontriviallyNormedField 𝕜'\ninst✝⁸ : NontriviallyNormedField 𝕜₂\nM : Type u_8\ninst✝⁷ : TopologicalSpace M\nσ₁₂ : 𝕜 →+* 𝕜₂\nG' : Type u_9\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace 𝕜₂ G'\ninst✝⁴ : NormedSpace 𝕜' G'\ninst✝³ : SMulCommClass 𝕜₂ 𝕜' G'\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nρ₁₂ : R →+* 𝕜'\nf : M →SL[ρ₁₂] F →SL[σ₁₂] G'\nx x' : M\ny : F\n⊢ ↑(↑f (x - x')) y = ↑(↑f x) y - ↑(↑f x') y\n[PROOFSTEP]\nrw [f.map_sub, sub_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\nG : Type u_4\ninst✝¹¹ : NormedAddCommGroup G\ninst✝¹⁰ : NormedSpace 𝕜 G\nR : Type u_5\n𝕜₂ : Type u_6\n𝕜' : Type u_7\ninst✝⁹ : NontriviallyNormedField 𝕜'\ninst✝⁸ : NontriviallyNormedField 𝕜₂\nM : Type u_8\ninst✝⁷ : TopologicalSpace M\nσ₁₂ : 𝕜 →+* 𝕜₂\nG' : Type u_9\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace 𝕜₂ G'\ninst✝⁴ : NormedSpace 𝕜' G'\ninst✝³ : SMulCommClass 𝕜₂ 𝕜' G'\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nρ₁₂ : R →+* 𝕜'\nf : M →SL[ρ₁₂] F →SL[σ₁₂] G'\nx : M\ny : F\n⊢ ↑(↑f (-x)) y = -↑(↑f x) y\n[PROOFSTEP]\nrw [f.map_neg, neg_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\nG : Type u_4\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace 𝕜 G\nR : Type u_5\n𝕜₂ : Type u_6\n𝕜' : Type u_7\ninst✝⁶ : NontriviallyNormedField 𝕜'\ninst✝⁵ : NontriviallyNormedField 𝕜₂\nM : Type u_8\ninst✝⁴ : TopologicalSpace M\nσ₁₂ : 𝕜 →+* 𝕜₂\nG' : Type u_9\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace 𝕜₂ G'\ninst✝¹ : NormedSpace 𝕜' G'\ninst✝ : SMulCommClass 𝕜₂ 𝕜' G'\nf : E →L[𝕜] F →L[𝕜] G\nc : 𝕜\nx : E\ny : F\n⊢ ↑(↑f (c • x)) y = c • ↑(↑f x) y\n[PROOFSTEP]\nrw [f.map_smul, smul_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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf✝ : E × F → G\nf : E →L[𝕜] F →L[𝕜] G\nx : E\ny : F\n⊢ ‖f‖ * ‖x‖ * ‖y‖ ≤ max ‖f‖ 1 * ‖x‖ * ‖y‖\n[PROOFSTEP]\napply_rules [mul_le_mul_of_nonneg_right, norm_nonneg, le_max_left]\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E × F → G\nh : IsBoundedBilinearMap 𝕜 f\nC : ℝ\nCpos : C > 0\nhC : ∀ (x : E) (y : F), ‖f (x, y)‖ ≤ C * ‖x‖ * ‖y‖\nx✝ : E × F\nx : E\ny : F\n⊢ ‖f (x, y)‖ ≤ ?m.264130 h C Cpos hC * ‖‖(x, y).fst‖ * ‖(x, y).snd‖‖\n[PROOFSTEP]\nsimpa [mul_assoc] using hC x y\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E × F → G\nh : IsBoundedBilinearMap 𝕜 f\n⊢ Continuous f\n[PROOFSTEP]\nrefine continuous_iff_continuousAt.2 fun x ↦ tendsto_sub_nhds_zero_iff.1 ?_\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E × F → G\nh : IsBoundedBilinearMap 𝕜 f\nx : E × F\n⊢ Tendsto (fun n => f n - f x) (𝓝 x) (𝓝 0)\n[PROOFSTEP]\nsuffices : Tendsto (λ y : E × F ↦ f (y.1 - x.1, y.2) + f (x.1, y.2 - x.2)) (𝓝 x) (𝓝 (0 + 0))\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E × F → G\nh : IsBoundedBilinearMap 𝕜 f\nx : E × F\nthis : Tendsto (fun y => f (y.fst - x.fst, y.snd) + f (x.fst, y.snd - x.snd)) (𝓝 x) (𝓝 (0 + 0))\n⊢ Tendsto (fun n => f n - f x) (𝓝 x) (𝓝 0)\n[PROOFSTEP]\nsimpa only [h.map_sub_left, h.map_sub_right, sub_add_sub_cancel, zero_add] using this\n[GOAL]\ncase this\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E × F → G\nh : IsBoundedBilinearMap 𝕜 f\nx : E × F\n⊢ Tendsto (fun y => f (y.fst - x.fst, y.snd) + f (x.fst, y.snd - x.snd)) (𝓝 x) (𝓝 (0 + 0))\n[PROOFSTEP]\napply Tendsto.add\n[GOAL]\ncase this.hf\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E × F → G\nh : IsBoundedBilinearMap 𝕜 f\nx : E × F\n⊢ Tendsto (fun x_1 => f (x_1.fst - x.fst, x_1.snd)) (𝓝 x) (𝓝 0)\n[PROOFSTEP]\nrw [← isLittleO_one_iff ℝ, ← one_mul 1]\n[GOAL]\ncase this.hf\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E × F → G\nh : IsBoundedBilinearMap 𝕜 f\nx : E × F\n⊢ (fun x_1 => f (x_1.fst - x.fst, x_1.snd)) =o[𝓝 x] fun _x => 1 * 1\n[PROOFSTEP]\nrefine h.isBigO_comp.trans_isLittleO ?_\n[GOAL]\ncase this.hf\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E × F → G\nh : IsBoundedBilinearMap 𝕜 f\nx : E × F\n⊢ (fun x_1 => ‖x_1.fst - x.fst‖ * ‖x_1.snd‖) =o[𝓝 x] fun _x => 1 * 1\n[PROOFSTEP]\nrefine (IsLittleO.norm_left ?_).mul_isBigO (IsBigO.norm_left ?_)\n[GOAL]\ncase this.hf.refine_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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E × F → G\nh : IsBoundedBilinearMap 𝕜 f\nx : E × F\n⊢ (fun x_1 => x_1.fst - x.fst) =o[𝓝 x] fun _x => 1\n[PROOFSTEP]\nexact (isLittleO_one_iff _).2 (tendsto_sub_nhds_zero_iff.2 (continuous_fst.tendsto _))\n[GOAL]\ncase this.hf.refine_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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E × F → G\nh : IsBoundedBilinearMap 𝕜 f\nx : E × F\n⊢ (fun x => x.snd) =O[𝓝 x] fun _x => 1\n[PROOFSTEP]\nexact (continuous_snd.tendsto _).isBigO_one ℝ\n[GOAL]\ncase this.hg\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E × F → G\nh : IsBoundedBilinearMap 𝕜 f\nx : E × F\n⊢ Tendsto (fun x_1 => f (x.fst, x_1.snd - x.snd)) (𝓝 x) (𝓝 0)\n[PROOFSTEP]\nrefine Continuous.tendsto' ?_ _ _ (by rw [h.map_sub_right, sub_self])\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E × F → G\nh : IsBoundedBilinearMap 𝕜 f\nx : E × F\n⊢ f (x.fst, x.snd - x.snd) = 0\n[PROOFSTEP]\nrw [h.map_sub_right, sub_self]\n[GOAL]\ncase this.hg\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E × F → G\nh : IsBoundedBilinearMap 𝕜 f\nx : E × F\n⊢ Continuous fun x_1 => f (x.fst, x_1.snd - x.snd)\n[PROOFSTEP]\nexact ((h.toContinuousLinearMap x.1).continuous).comp (continuous_snd.sub continuous_const)\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E × F → G\n⊢ IsBoundedBilinearMap 𝕜 fun p => p.fst * p.snd\n[PROOFSTEP]\nsimp_rw [← smul_eq_mul]\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\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf : E × F → G\n⊢ IsBoundedBilinearMap 𝕜 fun p => p.fst • p.snd\n[PROOFSTEP]\nexact isBoundedBilinearMap_smul\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace E\n⊢ IsOpen (range toContinuousLinearMap)\n[PROOFSTEP]\nrw [isOpen_iff_mem_nhds, forall_range_iff]\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace E\n⊢ ∀ (i : E ≃L[𝕜] F), range toContinuousLinearMap ∈ 𝓝 ↑i\n[PROOFSTEP]\nrefine' fun e => IsOpen.mem_nhds _ (mem_range_self _)\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\n⊢ IsOpen (range toContinuousLinearMap)\n[PROOFSTEP]\nlet O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => (e.symm : F →L[𝕜] E).comp f\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\nO : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f\n⊢ IsOpen (range toContinuousLinearMap)\n[PROOFSTEP]\nhave h_O : Continuous O := isBoundedBilinearMap_comp.continuous_right\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\nO : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f\nh_O : Continuous O\n⊢ IsOpen (range toContinuousLinearMap)\n[PROOFSTEP]\nconvert show IsOpen (O ⁻¹' {x | IsUnit x}) from Units.isOpen.preimage h_O using 1\n[GOAL]\ncase 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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\nO : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f\nh_O : Continuous O\n⊢ range toContinuousLinearMap = O ⁻¹' {x | IsUnit x}\n[PROOFSTEP]\next f'\n[GOAL]\ncase h.e'_3.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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\nO : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f\nh_O : Continuous O\nf' : E →L[𝕜] F\n⊢ f' ∈ range toContinuousLinearMap ↔ f' ∈ O ⁻¹' {x | IsUnit x}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.e'_3.h.mp\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\nO : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f\nh_O : Continuous O\nf' : E →L[𝕜] F\n⊢ f' ∈ range toContinuousLinearMap → f' ∈ O ⁻¹' {x | IsUnit x}\n[PROOFSTEP]\nrintro ⟨e', rfl⟩\n[GOAL]\ncase h.e'_3.h.mp.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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\nO : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f\nh_O : Continuous O\ne' : E ≃L[𝕜] F\n⊢ ↑e' ∈ O ⁻¹' {x | IsUnit x}\n[PROOFSTEP]\nexact ⟨(e'.trans e.symm).toUnit, rfl⟩\n[GOAL]\ncase h.e'_3.h.mpr\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\nO : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f\nh_O : Continuous O\nf' : E →L[𝕜] F\n⊢ f' ∈ O ⁻¹' {x | IsUnit x} → f' ∈ range toContinuousLinearMap\n[PROOFSTEP]\nrintro ⟨w, hw⟩\n[GOAL]\ncase h.e'_3.h.mpr.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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\nO : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f\nh_O : Continuous O\nf' : E →L[𝕜] F\nw : (E →L[𝕜] E)ˣ\nhw : ↑w = O f'\n⊢ f' ∈ range toContinuousLinearMap\n[PROOFSTEP]\nuse(unitsEquiv 𝕜 E w).trans e\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\nO : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f\nh_O : Continuous O\nf' : E →L[𝕜] F\nw : (E →L[𝕜] E)ˣ\nhw : ↑w = O f'\n⊢ ↑(ContinuousLinearEquiv.trans (↑(unitsEquiv 𝕜 E) w) e) = f'\n[PROOFSTEP]\next x\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\nO : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f\nh_O : Continuous O\nf' : E →L[𝕜] F\nw : (E →L[𝕜] E)ˣ\nhw : ↑w = O f'\nx : E\n⊢ ↑↑(ContinuousLinearEquiv.trans (↑(unitsEquiv 𝕜 E) w) e) x = ↑f' x\n[PROOFSTEP]\nsimp [hw]\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\nG : Type u_4\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\n⊢ ↑e ∈ range toContinuousLinearMap\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.BoundedLinearMaps", "llama_tokens": 20096, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8397339676722393, "lm_q2_score": 0.6757646075489392, "lm_q1q2_score": 0.5674624951095444}} {"text": "[GOAL]\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\n⊢ IsSquare 2 ↔ Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5\n[PROOFSTEP]\nclassical\nby_cases hF : ringChar F = 2\nfocus\n have h := FiniteField.even_card_of_char_two hF\n simp only [FiniteField.isSquare_of_char_two hF, true_iff_iff]\nrotate_left\nfocus\n have h := FiniteField.odd_card_of_char_ne_two hF\n rw [← quadraticChar_one_iff_isSquare (Ring.two_ne_zero hF), quadraticChar_two hF, χ₈_nat_eq_if_mod_eight]\n simp only [h, Nat.one_ne_zero, if_false, ite_eq_left_iff, Ne.def, (by decide : (-1 : ℤ) ≠ 1), imp_false,\n Classical.not_not]\nall_goals\n rw [← Nat.mod_mod_of_dvd _ (by norm_num : 2 ∣ 8)] at h \n have h₁ := Nat.mod_lt (Fintype.card F) (by decide : 0 < 8)\n revert h₁ h\n generalize Fintype.card F % 8 = n\n intros;\n interval_cases n <;>\n simp_all\n -- Porting note: was `decide!`\n[GOAL]\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\n⊢ IsSquare 2 ↔ Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5\n[PROOFSTEP]\nby_cases hF : ringChar F = 2\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\n⊢ IsSquare 2 ↔ Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\n⊢ IsSquare 2 ↔ Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5\n[PROOFSTEP]\nfocus\n have h := FiniteField.even_card_of_char_two hF\n simp only [FiniteField.isSquare_of_char_two hF, true_iff_iff]\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\n⊢ IsSquare 2 ↔ Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5\n[PROOFSTEP]\nhave h := FiniteField.even_card_of_char_two hF\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nh : Fintype.card F % 2 = 0\n⊢ IsSquare 2 ↔ Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5\n[PROOFSTEP]\nsimp only [FiniteField.isSquare_of_char_two hF, true_iff_iff]\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nh : Fintype.card F % 2 = 0\n⊢ Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\n⊢ IsSquare 2 ↔ Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5\n[PROOFSTEP]\nrotate_left\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\n⊢ IsSquare 2 ↔ Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nh : Fintype.card F % 2 = 0\n⊢ Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5\n[PROOFSTEP]\nfocus\n have h := FiniteField.odd_card_of_char_ne_two hF\n rw [← quadraticChar_one_iff_isSquare (Ring.two_ne_zero hF), quadraticChar_two hF, χ₈_nat_eq_if_mod_eight]\n simp only [h, Nat.one_ne_zero, if_false, ite_eq_left_iff, Ne.def, (by decide : (-1 : ℤ) ≠ 1), imp_false,\n Classical.not_not]\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\n⊢ IsSquare 2 ↔ Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5\n[PROOFSTEP]\nhave h := FiniteField.odd_card_of_char_ne_two hF\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nh : Fintype.card F % 2 = 1\n⊢ IsSquare 2 ↔ Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5\n[PROOFSTEP]\nrw [← quadraticChar_one_iff_isSquare (Ring.two_ne_zero hF), quadraticChar_two hF, χ₈_nat_eq_if_mod_eight]\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nh : Fintype.card F % 2 = 1\n⊢ (if Fintype.card F % 2 = 0 then 0 else if Fintype.card F % 8 = 1 ∨ Fintype.card F % 8 = 7 then 1 else -1) = 1 ↔\n Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5\n[PROOFSTEP]\nsimp only [h, Nat.one_ne_zero, if_false, ite_eq_left_iff, Ne.def, (by decide : (-1 : ℤ) ≠ 1), imp_false,\n Classical.not_not]\n[GOAL]\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nh : Fintype.card F % 2 = 1\n⊢ -1 ≠ 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nh : Fintype.card F % 2 = 1\n⊢ Fintype.card F % 8 = 1 ∨ Fintype.card F % 8 = 7 ↔ ¬Fintype.card F % 8 = 3 ∧ ¬Fintype.card F % 8 = 5\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nh : Fintype.card F % 2 = 0\n⊢ Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5\n[PROOFSTEP]\nall_goals\n rw [← Nat.mod_mod_of_dvd _ (by norm_num : 2 ∣ 8)] at h \n have h₁ := Nat.mod_lt (Fintype.card F) (by decide : 0 < 8)\n revert h₁ h\n generalize Fintype.card F % 8 = n\n intros;\n interval_cases n <;>\n simp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nh : Fintype.card F % 2 = 1\n⊢ Fintype.card F % 8 = 1 ∨ Fintype.card F % 8 = 7 ↔ ¬Fintype.card F % 8 = 3 ∧ ¬Fintype.card F % 8 = 5\n[PROOFSTEP]\nrw [← Nat.mod_mod_of_dvd _ (by norm_num : 2 ∣ 8)] at h \n[GOAL]\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nh : Fintype.card F % 2 = 1\n⊢ 2 ∣ 8\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nh : Fintype.card F % 8 % 2 = 1\n⊢ Fintype.card F % 8 = 1 ∨ Fintype.card F % 8 = 7 ↔ ¬Fintype.card F % 8 = 3 ∧ ¬Fintype.card F % 8 = 5\n[PROOFSTEP]\nhave h₁ := Nat.mod_lt (Fintype.card F) (by decide : 0 < 8)\n[GOAL]\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nh : Fintype.card F % 8 % 2 = 1\n⊢ 0 < 8\n[PROOFSTEP]\ndecide\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nh : Fintype.card F % 8 % 2 = 1\nh₁ : Fintype.card F % 8 < 8\n⊢ Fintype.card F % 8 = 1 ∨ Fintype.card F % 8 = 7 ↔ ¬Fintype.card F % 8 = 3 ∧ ¬Fintype.card F % 8 = 5\n[PROOFSTEP]\nrevert h₁ h\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\n⊢ Fintype.card F % 8 % 2 = 1 →\n Fintype.card F % 8 < 8 →\n (Fintype.card F % 8 = 1 ∨ Fintype.card F % 8 = 7 ↔ ¬Fintype.card F % 8 = 3 ∧ ¬Fintype.card F % 8 = 5)\n[PROOFSTEP]\ngeneralize Fintype.card F % 8 = n\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\n⊢ n % 2 = 1 → n < 8 → (n = 1 ∨ n = 7 ↔ ¬n = 3 ∧ ¬n = 5)\n[PROOFSTEP]\nintros\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\nh✝ : n % 2 = 1\nh₁✝ : n < 8\n⊢ n = 1 ∨ n = 7 ↔ ¬n = 3 ∧ ¬n = 5\n[PROOFSTEP]\ninterval_cases n\n[GOAL]\ncase neg.«0»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\nh✝ : 0 % 2 = 1\nh₁✝ : 0 < 8\n⊢ 0 = 1 ∨ 0 = 7 ↔ ¬0 = 3 ∧ ¬0 = 5\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase neg.«1»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\nh✝ : 1 % 2 = 1\nh₁✝ : 1 < 8\n⊢ 1 = 1 ∨ 1 = 7 ↔ ¬1 = 3 ∧ ¬1 = 5\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase neg.«2»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\nh✝ : 2 % 2 = 1\nh₁✝ : 2 < 8\n⊢ 2 = 1 ∨ 2 = 7 ↔ ¬2 = 3 ∧ ¬2 = 5\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase neg.«3»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\nh✝ : 3 % 2 = 1\nh₁✝ : 3 < 8\n⊢ 3 = 1 ∨ 3 = 7 ↔ ¬3 = 3 ∧ ¬3 = 5\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase neg.«4»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\nh✝ : 4 % 2 = 1\nh₁✝ : 4 < 8\n⊢ 4 = 1 ∨ 4 = 7 ↔ ¬4 = 3 ∧ ¬4 = 5\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase neg.«5»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\nh✝ : 5 % 2 = 1\nh₁✝ : 5 < 8\n⊢ 5 = 1 ∨ 5 = 7 ↔ ¬5 = 3 ∧ ¬5 = 5\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase neg.«6»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\nh✝ : 6 % 2 = 1\nh₁✝ : 6 < 8\n⊢ 6 = 1 ∨ 6 = 7 ↔ ¬6 = 3 ∧ ¬6 = 5\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase neg.«7»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\nh✝ : 7 % 2 = 1\nh₁✝ : 7 < 8\n⊢ 7 = 1 ∨ 7 = 7 ↔ ¬7 = 3 ∧ ¬7 = 5\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nh : Fintype.card F % 2 = 0\n⊢ Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5\n[PROOFSTEP]\nrw [← Nat.mod_mod_of_dvd _ (by norm_num : 2 ∣ 8)] at h \n[GOAL]\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nh : Fintype.card F % 2 = 0\n⊢ 2 ∣ 8\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nh : Fintype.card F % 8 % 2 = 0\n⊢ Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5\n[PROOFSTEP]\nhave h₁ := Nat.mod_lt (Fintype.card F) (by decide : 0 < 8)\n[GOAL]\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nh : Fintype.card F % 8 % 2 = 0\n⊢ 0 < 8\n[PROOFSTEP]\ndecide\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nh : Fintype.card F % 8 % 2 = 0\nh₁ : Fintype.card F % 8 < 8\n⊢ Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5\n[PROOFSTEP]\nrevert h₁ h\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\n⊢ Fintype.card F % 8 % 2 = 0 → Fintype.card F % 8 < 8 → Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5\n[PROOFSTEP]\ngeneralize Fintype.card F % 8 = n\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\n⊢ n % 2 = 0 → n < 8 → n ≠ 3 ∧ n ≠ 5\n[PROOFSTEP]\nintros\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\nh✝ : n % 2 = 0\nh₁✝ : n < 8\n⊢ n ≠ 3 ∧ n ≠ 5\n[PROOFSTEP]\ninterval_cases n\n[GOAL]\ncase pos.«0»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\nh✝ : 0 % 2 = 0\nh₁✝ : 0 < 8\n⊢ 0 ≠ 3 ∧ 0 ≠ 5\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase pos.«1»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\nh✝ : 1 % 2 = 0\nh₁✝ : 1 < 8\n⊢ 1 ≠ 3 ∧ 1 ≠ 5\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase pos.«2»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\nh✝ : 2 % 2 = 0\nh₁✝ : 2 < 8\n⊢ 2 ≠ 3 ∧ 2 ≠ 5\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase pos.«3»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\nh✝ : 3 % 2 = 0\nh₁✝ : 3 < 8\n⊢ 3 ≠ 3 ∧ 3 ≠ 5\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase pos.«4»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\nh✝ : 4 % 2 = 0\nh₁✝ : 4 < 8\n⊢ 4 ≠ 3 ∧ 4 ≠ 5\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase pos.«5»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\nh✝ : 5 % 2 = 0\nh₁✝ : 5 < 8\n⊢ 5 ≠ 3 ∧ 5 ≠ 5\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase pos.«6»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\nh✝ : 6 % 2 = 0\nh₁✝ : 6 < 8\n⊢ 6 ≠ 3 ∧ 6 ≠ 5\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase pos.«7»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\nh✝ : 7 % 2 = 0\nh₁✝ : 7 < 8\n⊢ 7 ≠ 3 ∧ 7 ≠ 5\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\ninst✝ : DecidableEq F\nhF : ringChar F ≠ 2\n⊢ ↑(quadraticChar F) (-2) = ↑χ₈' ↑(Fintype.card F)\n[PROOFSTEP]\nrw [(by norm_num : (-2 : F) = -1 * 2), map_mul, χ₈'_eq_χ₄_mul_χ₈, quadraticChar_neg_one hF, quadraticChar_two hF,\n @cast_nat_cast _ (ZMod 4) _ _ _ (by norm_num : 4 ∣ 8)]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\ninst✝ : DecidableEq F\nhF : ringChar F ≠ 2\n⊢ -2 = -1 * 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\ninst✝ : DecidableEq F\nhF : ringChar F ≠ 2\n⊢ 4 ∣ 8\n[PROOFSTEP]\nnorm_num\n[GOAL]\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\n⊢ IsSquare (-2) ↔ Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7\n[PROOFSTEP]\nclassical\nby_cases hF : ringChar F = 2\nfocus\n have h := FiniteField.even_card_of_char_two hF\n simp only [FiniteField.isSquare_of_char_two hF, true_iff_iff]\nrotate_left\nfocus\n have h := FiniteField.odd_card_of_char_ne_two hF\n rw [← quadraticChar_one_iff_isSquare (neg_ne_zero.mpr (Ring.two_ne_zero hF)), quadraticChar_neg_two hF,\n χ₈'_nat_eq_if_mod_eight]\n simp only [h, Nat.one_ne_zero, if_false, ite_eq_left_iff, Ne.def, (by decide : (-1 : ℤ) ≠ 1), imp_false,\n Classical.not_not]\nall_goals\n rw [← Nat.mod_mod_of_dvd _ (by norm_num : 2 ∣ 8)] at h \n have h₁ := Nat.mod_lt (Fintype.card F) (by decide : 0 < 8)\n revert h₁ h\n generalize Fintype.card F % 8 = n\n intros;\n interval_cases n <;>\n simp_all\n -- Porting note: was `decide!`\n[GOAL]\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\n⊢ IsSquare (-2) ↔ Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7\n[PROOFSTEP]\nby_cases hF : ringChar F = 2\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\n⊢ IsSquare (-2) ↔ Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\n⊢ IsSquare (-2) ↔ Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7\n[PROOFSTEP]\nfocus\n have h := FiniteField.even_card_of_char_two hF\n simp only [FiniteField.isSquare_of_char_two hF, true_iff_iff]\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\n⊢ IsSquare (-2) ↔ Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7\n[PROOFSTEP]\nhave h := FiniteField.even_card_of_char_two hF\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nh : Fintype.card F % 2 = 0\n⊢ IsSquare (-2) ↔ Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7\n[PROOFSTEP]\nsimp only [FiniteField.isSquare_of_char_two hF, true_iff_iff]\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nh : Fintype.card F % 2 = 0\n⊢ Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\n⊢ IsSquare (-2) ↔ Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7\n[PROOFSTEP]\nrotate_left\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\n⊢ IsSquare (-2) ↔ Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nh : Fintype.card F % 2 = 0\n⊢ Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7\n[PROOFSTEP]\nfocus\n have h := FiniteField.odd_card_of_char_ne_two hF\n rw [← quadraticChar_one_iff_isSquare (neg_ne_zero.mpr (Ring.two_ne_zero hF)), quadraticChar_neg_two hF,\n χ₈'_nat_eq_if_mod_eight]\n simp only [h, Nat.one_ne_zero, if_false, ite_eq_left_iff, Ne.def, (by decide : (-1 : ℤ) ≠ 1), imp_false,\n Classical.not_not]\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\n⊢ IsSquare (-2) ↔ Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7\n[PROOFSTEP]\nhave h := FiniteField.odd_card_of_char_ne_two hF\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nh : Fintype.card F % 2 = 1\n⊢ IsSquare (-2) ↔ Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7\n[PROOFSTEP]\nrw [← quadraticChar_one_iff_isSquare (neg_ne_zero.mpr (Ring.two_ne_zero hF)), quadraticChar_neg_two hF,\n χ₈'_nat_eq_if_mod_eight]\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nh : Fintype.card F % 2 = 1\n⊢ (if Fintype.card F % 2 = 0 then 0 else if Fintype.card F % 8 = 1 ∨ Fintype.card F % 8 = 3 then 1 else -1) = 1 ↔\n Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7\n[PROOFSTEP]\nsimp only [h, Nat.one_ne_zero, if_false, ite_eq_left_iff, Ne.def, (by decide : (-1 : ℤ) ≠ 1), imp_false,\n Classical.not_not]\n[GOAL]\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nh : Fintype.card F % 2 = 1\n⊢ -1 ≠ 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nh : Fintype.card F % 2 = 1\n⊢ Fintype.card F % 8 = 1 ∨ Fintype.card F % 8 = 3 ↔ ¬Fintype.card F % 8 = 5 ∧ ¬Fintype.card F % 8 = 7\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nh : Fintype.card F % 2 = 0\n⊢ Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7\n[PROOFSTEP]\nall_goals\n rw [← Nat.mod_mod_of_dvd _ (by norm_num : 2 ∣ 8)] at h \n have h₁ := Nat.mod_lt (Fintype.card F) (by decide : 0 < 8)\n revert h₁ h\n generalize Fintype.card F % 8 = n\n intros;\n interval_cases n <;>\n simp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nh : Fintype.card F % 2 = 1\n⊢ Fintype.card F % 8 = 1 ∨ Fintype.card F % 8 = 3 ↔ ¬Fintype.card F % 8 = 5 ∧ ¬Fintype.card F % 8 = 7\n[PROOFSTEP]\nrw [← Nat.mod_mod_of_dvd _ (by norm_num : 2 ∣ 8)] at h \n[GOAL]\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nh : Fintype.card F % 2 = 1\n⊢ 2 ∣ 8\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nh : Fintype.card F % 8 % 2 = 1\n⊢ Fintype.card F % 8 = 1 ∨ Fintype.card F % 8 = 3 ↔ ¬Fintype.card F % 8 = 5 ∧ ¬Fintype.card F % 8 = 7\n[PROOFSTEP]\nhave h₁ := Nat.mod_lt (Fintype.card F) (by decide : 0 < 8)\n[GOAL]\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nh : Fintype.card F % 8 % 2 = 1\n⊢ 0 < 8\n[PROOFSTEP]\ndecide\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nh : Fintype.card F % 8 % 2 = 1\nh₁ : Fintype.card F % 8 < 8\n⊢ Fintype.card F % 8 = 1 ∨ Fintype.card F % 8 = 3 ↔ ¬Fintype.card F % 8 = 5 ∧ ¬Fintype.card F % 8 = 7\n[PROOFSTEP]\nrevert h₁ h\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\n⊢ Fintype.card F % 8 % 2 = 1 →\n Fintype.card F % 8 < 8 →\n (Fintype.card F % 8 = 1 ∨ Fintype.card F % 8 = 3 ↔ ¬Fintype.card F % 8 = 5 ∧ ¬Fintype.card F % 8 = 7)\n[PROOFSTEP]\ngeneralize Fintype.card F % 8 = n\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\n⊢ n % 2 = 1 → n < 8 → (n = 1 ∨ n = 3 ↔ ¬n = 5 ∧ ¬n = 7)\n[PROOFSTEP]\nintros\n[GOAL]\ncase neg\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\nh✝ : n % 2 = 1\nh₁✝ : n < 8\n⊢ n = 1 ∨ n = 3 ↔ ¬n = 5 ∧ ¬n = 7\n[PROOFSTEP]\ninterval_cases n\n[GOAL]\ncase neg.«0»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\nh✝ : 0 % 2 = 1\nh₁✝ : 0 < 8\n⊢ 0 = 1 ∨ 0 = 3 ↔ ¬0 = 5 ∧ ¬0 = 7\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase neg.«1»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\nh✝ : 1 % 2 = 1\nh₁✝ : 1 < 8\n⊢ 1 = 1 ∨ 1 = 3 ↔ ¬1 = 5 ∧ ¬1 = 7\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase neg.«2»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\nh✝ : 2 % 2 = 1\nh₁✝ : 2 < 8\n⊢ 2 = 1 ∨ 2 = 3 ↔ ¬2 = 5 ∧ ¬2 = 7\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase neg.«3»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\nh✝ : 3 % 2 = 1\nh₁✝ : 3 < 8\n⊢ 3 = 1 ∨ 3 = 3 ↔ ¬3 = 5 ∧ ¬3 = 7\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase neg.«4»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\nh✝ : 4 % 2 = 1\nh₁✝ : 4 < 8\n⊢ 4 = 1 ∨ 4 = 3 ↔ ¬4 = 5 ∧ ¬4 = 7\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase neg.«5»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\nh✝ : 5 % 2 = 1\nh₁✝ : 5 < 8\n⊢ 5 = 1 ∨ 5 = 3 ↔ ¬5 = 5 ∧ ¬5 = 7\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase neg.«6»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\nh✝ : 6 % 2 = 1\nh₁✝ : 6 < 8\n⊢ 6 = 1 ∨ 6 = 3 ↔ ¬6 = 5 ∧ ¬6 = 7\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase neg.«7»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ¬ringChar F = 2\nn : ℕ\nh✝ : 7 % 2 = 1\nh₁✝ : 7 < 8\n⊢ 7 = 1 ∨ 7 = 3 ↔ ¬7 = 5 ∧ ¬7 = 7\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nh : Fintype.card F % 2 = 0\n⊢ Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7\n[PROOFSTEP]\nrw [← Nat.mod_mod_of_dvd _ (by norm_num : 2 ∣ 8)] at h \n[GOAL]\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nh : Fintype.card F % 2 = 0\n⊢ 2 ∣ 8\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nh : Fintype.card F % 8 % 2 = 0\n⊢ Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7\n[PROOFSTEP]\nhave h₁ := Nat.mod_lt (Fintype.card F) (by decide : 0 < 8)\n[GOAL]\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nh : Fintype.card F % 8 % 2 = 0\n⊢ 0 < 8\n[PROOFSTEP]\ndecide\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nh : Fintype.card F % 8 % 2 = 0\nh₁ : Fintype.card F % 8 < 8\n⊢ Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7\n[PROOFSTEP]\nrevert h₁ h\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\n⊢ Fintype.card F % 8 % 2 = 0 → Fintype.card F % 8 < 8 → Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7\n[PROOFSTEP]\ngeneralize Fintype.card F % 8 = n\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\n⊢ n % 2 = 0 → n < 8 → n ≠ 5 ∧ n ≠ 7\n[PROOFSTEP]\nintros\n[GOAL]\ncase pos\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\nh✝ : n % 2 = 0\nh₁✝ : n < 8\n⊢ n ≠ 5 ∧ n ≠ 7\n[PROOFSTEP]\ninterval_cases n\n[GOAL]\ncase pos.«0»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\nh✝ : 0 % 2 = 0\nh₁✝ : 0 < 8\n⊢ 0 ≠ 5 ∧ 0 ≠ 7\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase pos.«1»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\nh✝ : 1 % 2 = 0\nh₁✝ : 1 < 8\n⊢ 1 ≠ 5 ∧ 1 ≠ 7\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase pos.«2»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\nh✝ : 2 % 2 = 0\nh₁✝ : 2 < 8\n⊢ 2 ≠ 5 ∧ 2 ≠ 7\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase pos.«3»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\nh✝ : 3 % 2 = 0\nh₁✝ : 3 < 8\n⊢ 3 ≠ 5 ∧ 3 ≠ 7\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase pos.«4»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\nh✝ : 4 % 2 = 0\nh₁✝ : 4 < 8\n⊢ 4 ≠ 5 ∧ 4 ≠ 7\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase pos.«5»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\nh✝ : 5 % 2 = 0\nh₁✝ : 5 < 8\n⊢ 5 ≠ 5 ∧ 5 ≠ 7\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase pos.«6»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\nh✝ : 6 % 2 = 0\nh₁✝ : 6 < 8\n⊢ 6 ≠ 5 ∧ 6 ≠ 7\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\ncase pos.«7»\nF : Type u_1\ninst✝¹ : Field F\ninst✝ : Fintype F\nhF : ringChar F = 2\nn : ℕ\nh✝ : 7 % 2 = 0\nh₁✝ : 7 < 8\n⊢ 7 ≠ 5 ∧ 7 ≠ 7\n[PROOFSTEP]\nsimp_all\n -- Porting note: was `decide!`\n[GOAL]\nF : Type u_1\ninst✝⁵ : Field F\ninst✝⁴ : Fintype F\ninst✝³ : DecidableEq F\nhF : ringChar F ≠ 2\nF' : Type u_2\ninst✝² : Field F'\ninst✝¹ : Fintype F'\ninst✝ : DecidableEq F'\nhF' : ringChar F' ≠ 2\nh : ringChar F' ≠ ringChar F\n⊢ ↑(quadraticChar F) ↑(Fintype.card F') = ↑(quadraticChar F') (↑(↑(quadraticChar F) (-1)) * ↑(Fintype.card F))\n[PROOFSTEP]\nlet χ := (quadraticChar F).ringHomComp (algebraMap ℤ F')\n[GOAL]\nF : Type u_1\ninst✝⁵ : Field F\ninst✝⁴ : Fintype F\ninst✝³ : DecidableEq F\nhF : ringChar F ≠ 2\nF' : Type u_2\ninst✝² : Field F'\ninst✝¹ : Fintype F'\ninst✝ : DecidableEq F'\nhF' : ringChar F' ≠ 2\nh : ringChar F' ≠ ringChar F\nχ : MulChar F F' := ringHomComp (quadraticChar F) (algebraMap ℤ F')\n⊢ ↑(quadraticChar F) ↑(Fintype.card F') = ↑(quadraticChar F') (↑(↑(quadraticChar F) (-1)) * ↑(Fintype.card F))\n[PROOFSTEP]\nhave hχ₁ : χ.IsNontrivial := by\n obtain ⟨a, ha⟩ := quadraticChar_exists_neg_one hF\n have hu : IsUnit a := by\n contrapose ha\n exact ne_of_eq_of_ne (map_nonunit (quadraticChar F) ha) (mt zero_eq_neg.mp one_ne_zero)\n use hu.unit\n simp only [IsUnit.unit_spec, ringHomComp_apply, eq_intCast, Ne.def, ha]\n rw [Int.cast_neg, Int.cast_one]\n exact Ring.neg_one_ne_one_of_char_ne_two hF'\n[GOAL]\nF : Type u_1\ninst✝⁵ : Field F\ninst✝⁴ : Fintype F\ninst✝³ : DecidableEq F\nhF : ringChar F ≠ 2\nF' : Type u_2\ninst✝² : Field F'\ninst✝¹ : Fintype F'\ninst✝ : DecidableEq F'\nhF' : ringChar F' ≠ 2\nh : ringChar F' ≠ ringChar F\nχ : MulChar F F' := ringHomComp (quadraticChar F) (algebraMap ℤ F')\n⊢ IsNontrivial χ\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := quadraticChar_exists_neg_one hF\n[GOAL]\ncase intro\nF : Type u_1\ninst✝⁵ : Field F\ninst✝⁴ : Fintype F\ninst✝³ : DecidableEq F\nhF : ringChar F ≠ 2\nF' : Type u_2\ninst✝² : Field F'\ninst✝¹ : Fintype F'\ninst✝ : DecidableEq F'\nhF' : ringChar F' ≠ 2\nh : ringChar F' ≠ ringChar F\nχ : MulChar F F' := ringHomComp (quadraticChar F) (algebraMap ℤ F')\na : F\nha : ↑(quadraticChar F) a = -1\n⊢ IsNontrivial χ\n[PROOFSTEP]\nhave hu : IsUnit a := by\n contrapose ha\n exact ne_of_eq_of_ne (map_nonunit (quadraticChar F) ha) (mt zero_eq_neg.mp one_ne_zero)\n[GOAL]\nF : Type u_1\ninst✝⁵ : Field F\ninst✝⁴ : Fintype F\ninst✝³ : DecidableEq F\nhF : ringChar F ≠ 2\nF' : Type u_2\ninst✝² : Field F'\ninst✝¹ : Fintype F'\ninst✝ : DecidableEq F'\nhF' : ringChar F' ≠ 2\nh : ringChar F' ≠ ringChar F\nχ : MulChar F F' := ringHomComp (quadraticChar F) (algebraMap ℤ F')\na : F\nha : ↑(quadraticChar F) a = -1\n⊢ IsUnit a\n[PROOFSTEP]\ncontrapose ha\n[GOAL]\nF : Type u_1\ninst✝⁵ : Field F\ninst✝⁴ : Fintype F\ninst✝³ : DecidableEq F\nhF : ringChar F ≠ 2\nF' : Type u_2\ninst✝² : Field F'\ninst✝¹ : Fintype F'\ninst✝ : DecidableEq F'\nhF' : ringChar F' ≠ 2\nh : ringChar F' ≠ ringChar F\nχ : MulChar F F' := ringHomComp (quadraticChar F) (algebraMap ℤ F')\na : F\nha : ¬IsUnit a\n⊢ ¬↑(quadraticChar F) a = -1\n[PROOFSTEP]\nexact ne_of_eq_of_ne (map_nonunit (quadraticChar F) ha) (mt zero_eq_neg.mp one_ne_zero)\n[GOAL]\ncase intro\nF : Type u_1\ninst✝⁵ : Field F\ninst✝⁴ : Fintype F\ninst✝³ : DecidableEq F\nhF : ringChar F ≠ 2\nF' : Type u_2\ninst✝² : Field F'\ninst✝¹ : Fintype F'\ninst✝ : DecidableEq F'\nhF' : ringChar F' ≠ 2\nh : ringChar F' ≠ ringChar F\nχ : MulChar F F' := ringHomComp (quadraticChar F) (algebraMap ℤ F')\na : F\nha : ↑(quadraticChar F) a = -1\nhu : IsUnit a\n⊢ IsNontrivial χ\n[PROOFSTEP]\nuse hu.unit\n[GOAL]\ncase h\nF : Type u_1\ninst✝⁵ : Field F\ninst✝⁴ : Fintype F\ninst✝³ : DecidableEq F\nhF : ringChar F ≠ 2\nF' : Type u_2\ninst✝² : Field F'\ninst✝¹ : Fintype F'\ninst✝ : DecidableEq F'\nhF' : ringChar F' ≠ 2\nh : ringChar F' ≠ ringChar F\nχ : MulChar F F' := ringHomComp (quadraticChar F) (algebraMap ℤ F')\na : F\nha : ↑(quadraticChar F) a = -1\nhu : IsUnit a\n⊢ ↑χ ↑(IsUnit.unit hu) ≠ 1\n[PROOFSTEP]\nsimp only [IsUnit.unit_spec, ringHomComp_apply, eq_intCast, Ne.def, ha]\n[GOAL]\ncase h\nF : Type u_1\ninst✝⁵ : Field F\ninst✝⁴ : Fintype F\ninst✝³ : DecidableEq F\nhF : ringChar F ≠ 2\nF' : Type u_2\ninst✝² : Field F'\ninst✝¹ : Fintype F'\ninst✝ : DecidableEq F'\nhF' : ringChar F' ≠ 2\nh : ringChar F' ≠ ringChar F\nχ : MulChar F F' := ringHomComp (quadraticChar F) (algebraMap ℤ F')\na : F\nha : ↑(quadraticChar F) a = -1\nhu : IsUnit a\n⊢ ¬↑(-1) = 1\n[PROOFSTEP]\nrw [Int.cast_neg, Int.cast_one]\n[GOAL]\ncase h\nF : Type u_1\ninst✝⁵ : Field F\ninst✝⁴ : Fintype F\ninst✝³ : DecidableEq F\nhF : ringChar F ≠ 2\nF' : Type u_2\ninst✝² : Field F'\ninst✝¹ : Fintype F'\ninst✝ : DecidableEq F'\nhF' : ringChar F' ≠ 2\nh : ringChar F' ≠ ringChar F\nχ : MulChar F F' := ringHomComp (quadraticChar F) (algebraMap ℤ F')\na : F\nha : ↑(quadraticChar F) a = -1\nhu : IsUnit a\n⊢ ¬-1 = 1\n[PROOFSTEP]\nexact Ring.neg_one_ne_one_of_char_ne_two hF'\n[GOAL]\nF : Type u_1\ninst✝⁵ : Field F\ninst✝⁴ : Fintype F\ninst✝³ : DecidableEq F\nhF : ringChar F ≠ 2\nF' : Type u_2\ninst✝² : Field F'\ninst✝¹ : Fintype F'\ninst✝ : DecidableEq F'\nhF' : ringChar F' ≠ 2\nh : ringChar F' ≠ ringChar F\nχ : MulChar F F' := ringHomComp (quadraticChar F) (algebraMap ℤ F')\nhχ₁ : IsNontrivial χ\n⊢ ↑(quadraticChar F) ↑(Fintype.card F') = ↑(quadraticChar F') (↑(↑(quadraticChar F) (-1)) * ↑(Fintype.card F))\n[PROOFSTEP]\nhave hχ₂ : χ.IsQuadratic := IsQuadratic.comp (quadraticChar_isQuadratic F) _\n[GOAL]\nF : Type u_1\ninst✝⁵ : Field F\ninst✝⁴ : Fintype F\ninst✝³ : DecidableEq F\nhF : ringChar F ≠ 2\nF' : Type u_2\ninst✝² : Field F'\ninst✝¹ : Fintype F'\ninst✝ : DecidableEq F'\nhF' : ringChar F' ≠ 2\nh : ringChar F' ≠ ringChar F\nχ : MulChar F F' := ringHomComp (quadraticChar F) (algebraMap ℤ F')\nhχ₁ : IsNontrivial χ\nhχ₂ : IsQuadratic χ\n⊢ ↑(quadraticChar F) ↑(Fintype.card F') = ↑(quadraticChar F') (↑(↑(quadraticChar F) (-1)) * ↑(Fintype.card F))\n[PROOFSTEP]\nhave h := Char.card_pow_card hχ₁ hχ₂ h hF'\n[GOAL]\nF : Type u_1\ninst✝⁵ : Field F\ninst✝⁴ : Fintype F\ninst✝³ : DecidableEq F\nhF : ringChar F ≠ 2\nF' : Type u_2\ninst✝² : Field F'\ninst✝¹ : Fintype F'\ninst✝ : DecidableEq F'\nhF' : ringChar F' ≠ 2\nh✝ : ringChar F' ≠ ringChar F\nχ : MulChar F F' := ringHomComp (quadraticChar F) (algebraMap ℤ F')\nhχ₁ : IsNontrivial χ\nhχ₂ : IsQuadratic χ\nh : (↑χ (-1) * ↑(Fintype.card F)) ^ (Fintype.card F' / 2) = ↑χ ↑(Fintype.card F')\n⊢ ↑(quadraticChar F) ↑(Fintype.card F') = ↑(quadraticChar F') (↑(↑(quadraticChar F) (-1)) * ↑(Fintype.card F))\n[PROOFSTEP]\nrw [← quadraticChar_eq_pow_of_char_ne_two' hF'] at h \n[GOAL]\nF : Type u_1\ninst✝⁵ : Field F\ninst✝⁴ : Fintype F\ninst✝³ : DecidableEq F\nhF : ringChar F ≠ 2\nF' : Type u_2\ninst✝² : Field F'\ninst✝¹ : Fintype F'\ninst✝ : DecidableEq F'\nhF' : ringChar F' ≠ 2\nh✝ : ringChar F' ≠ ringChar F\nχ : MulChar F F' := ringHomComp (quadraticChar F) (algebraMap ℤ F')\nhχ₁ : IsNontrivial χ\nhχ₂ : IsQuadratic χ\nh : ↑(↑(quadraticChar F') (↑χ (-1) * ↑(Fintype.card F))) = ↑χ ↑(Fintype.card F')\n⊢ ↑(quadraticChar F) ↑(Fintype.card F') = ↑(quadraticChar F') (↑(↑(quadraticChar F) (-1)) * ↑(Fintype.card F))\n[PROOFSTEP]\nexact (IsQuadratic.eq_of_eq_coe (quadraticChar_isQuadratic F') (quadraticChar_isQuadratic F) hF' h).symm\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\ninst✝² : Fintype F\ninst✝¹ : DecidableEq F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp₁ : p ≠ 2\nhp₂ : ringChar F ≠ p\n⊢ ↑(quadraticChar F) ↑p = ↑(quadraticChar (ZMod p)) (↑(↑χ₄ ↑(Fintype.card F)) * ↑(Fintype.card F))\n[PROOFSTEP]\nrw [← quadraticChar_neg_one hF]\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\ninst✝² : Fintype F\ninst✝¹ : DecidableEq F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp₁ : p ≠ 2\nhp₂ : ringChar F ≠ p\n⊢ ↑(quadraticChar F) ↑p = ↑(quadraticChar (ZMod p)) (↑(↑(quadraticChar F) (-1)) * ↑(Fintype.card F))\n[PROOFSTEP]\nhave h :=\n quadraticChar_card_card hF (ne_of_eq_of_ne (ringChar_zmod_n p) hp₁) (ne_of_eq_of_ne (ringChar_zmod_n p) hp₂.symm)\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\ninst✝² : Fintype F\ninst✝¹ : DecidableEq F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp₁ : p ≠ 2\nhp₂ : ringChar F ≠ p\nh :\n ↑(quadraticChar F) ↑(Fintype.card (ZMod p)) =\n ↑(quadraticChar (ZMod p)) (↑(↑(quadraticChar F) (-1)) * ↑(Fintype.card F))\n⊢ ↑(quadraticChar F) ↑p = ↑(quadraticChar (ZMod p)) (↑(↑(quadraticChar F) (-1)) * ↑(Fintype.card F))\n[PROOFSTEP]\nrwa [card p] at h \n[GOAL]\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\n⊢ IsSquare ↑p ↔ ↑(quadraticChar (ZMod p)) (↑(↑χ₄ ↑(Fintype.card F)) * ↑(Fintype.card F)) ≠ -1\n[PROOFSTEP]\nclassical\nby_cases hFp : ringChar F = p\n· rw [show (p : F) = 0 by rw [← hFp]; exact ringChar.Nat.cast_ringChar]\n simp only [isSquare_zero, Ne.def, true_iff_iff, map_mul]\n obtain ⟨n, _, hc⟩ := FiniteField.card F (ringChar F)\n have hchar : ringChar F = ringChar (ZMod p) := by rw [hFp]; exact (ringChar_zmod_n p).symm\n conv => enter [1, 1, 2]; rw [hc, Nat.cast_pow, map_pow, hchar, map_ringChar]\n simp only [zero_pow n.pos, mul_zero, zero_eq_neg, one_ne_zero, not_false_iff]\n· rw [← Iff.not_left (@quadraticChar_neg_one_iff_not_isSquare F _ _ _ _), quadraticChar_odd_prime hF hp]\n exact hFp\n[GOAL]\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\n⊢ IsSquare ↑p ↔ ↑(quadraticChar (ZMod p)) (↑(↑χ₄ ↑(Fintype.card F)) * ↑(Fintype.card F)) ≠ -1\n[PROOFSTEP]\nby_cases hFp : ringChar F = p\n[GOAL]\ncase pos\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nhFp : ringChar F = p\n⊢ IsSquare ↑p ↔ ↑(quadraticChar (ZMod p)) (↑(↑χ₄ ↑(Fintype.card F)) * ↑(Fintype.card F)) ≠ -1\n[PROOFSTEP]\nrw [show (p : F) = 0 by rw [← hFp]; exact ringChar.Nat.cast_ringChar]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nhFp : ringChar F = p\n⊢ ↑p = 0\n[PROOFSTEP]\nrw [← hFp]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nhFp : ringChar F = p\n⊢ ↑(ringChar F) = 0\n[PROOFSTEP]\nexact ringChar.Nat.cast_ringChar\n[GOAL]\ncase pos\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nhFp : ringChar F = p\n⊢ IsSquare 0 ↔ ↑(quadraticChar (ZMod p)) (↑(↑χ₄ ↑(Fintype.card F)) * ↑(Fintype.card F)) ≠ -1\n[PROOFSTEP]\nsimp only [isSquare_zero, Ne.def, true_iff_iff, map_mul]\n[GOAL]\ncase pos\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nhFp : ringChar F = p\n⊢ ¬↑(quadraticChar (ZMod p)) ↑(↑χ₄ ↑(Fintype.card F)) * ↑(quadraticChar (ZMod p)) ↑(Fintype.card F) = -1\n[PROOFSTEP]\nobtain ⟨n, _, hc⟩ := FiniteField.card F (ringChar F)\n[GOAL]\ncase pos.intro.intro\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nhFp : ringChar F = p\nn : ℕ+\nleft✝ : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\n⊢ ¬↑(quadraticChar (ZMod p)) ↑(↑χ₄ ↑(Fintype.card F)) * ↑(quadraticChar (ZMod p)) ↑(Fintype.card F) = -1\n[PROOFSTEP]\nhave hchar : ringChar F = ringChar (ZMod p) := by rw [hFp]; exact (ringChar_zmod_n p).symm\n[GOAL]\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nhFp : ringChar F = p\nn : ℕ+\nleft✝ : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\n⊢ ringChar F = ringChar (ZMod p)\n[PROOFSTEP]\nrw [hFp]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nhFp : ringChar F = p\nn : ℕ+\nleft✝ : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\n⊢ p = ringChar (ZMod p)\n[PROOFSTEP]\nexact (ringChar_zmod_n p).symm\n[GOAL]\ncase pos.intro.intro\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nhFp : ringChar F = p\nn : ℕ+\nleft✝ : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nhchar : ringChar F = ringChar (ZMod p)\n⊢ ¬↑(quadraticChar (ZMod p)) ↑(↑χ₄ ↑(Fintype.card F)) * ↑(quadraticChar (ZMod p)) ↑(Fintype.card F) = -1\n[PROOFSTEP]\nconv => enter [1, 1, 2]; rw [hc, Nat.cast_pow, map_pow, hchar, map_ringChar]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nhFp : ringChar F = p\nn : ℕ+\nleft✝ : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nhchar : ringChar F = ringChar (ZMod p)\n| ¬↑(quadraticChar (ZMod p)) ↑(↑χ₄ ↑(Fintype.card F)) * ↑(quadraticChar (ZMod p)) ↑(Fintype.card F) = -1\n[PROOFSTEP]\nenter [1, 1, 2]; rw [hc, Nat.cast_pow, map_pow, hchar, map_ringChar]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nhFp : ringChar F = p\nn : ℕ+\nleft✝ : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nhchar : ringChar F = ringChar (ZMod p)\n| ¬↑(quadraticChar (ZMod p)) ↑(↑χ₄ ↑(Fintype.card F)) * ↑(quadraticChar (ZMod p)) ↑(Fintype.card F) = -1\n[PROOFSTEP]\nenter [1, 1, 2]; rw [hc, Nat.cast_pow, map_pow, hchar, map_ringChar]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nhFp : ringChar F = p\nn : ℕ+\nleft✝ : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nhchar : ringChar F = ringChar (ZMod p)\n| ¬↑(quadraticChar (ZMod p)) ↑(↑χ₄ ↑(Fintype.card F)) * ↑(quadraticChar (ZMod p)) ↑(Fintype.card F) = -1\n[PROOFSTEP]\nenter [1, 1, 2]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nhFp : ringChar F = p\nn : ℕ+\nleft✝ : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nhchar : ringChar F = ringChar (ZMod p)\n| ↑(quadraticChar (ZMod p)) ↑(Fintype.card F)\n[PROOFSTEP]\nrw [hc, Nat.cast_pow, map_pow, hchar, map_ringChar]\n[GOAL]\ncase pos.intro.intro\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nhFp : ringChar F = p\nn : ℕ+\nleft✝ : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nhchar : ringChar F = ringChar (ZMod p)\n⊢ ¬↑(quadraticChar (ZMod p)) ↑(↑χ₄ ↑(Fintype.card F)) * 0 ^ ↑n = -1\n[PROOFSTEP]\nsimp only [zero_pow n.pos, mul_zero, zero_eq_neg, one_ne_zero, not_false_iff]\n[GOAL]\ncase neg\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nhFp : ¬ringChar F = p\n⊢ IsSquare ↑p ↔ ↑(quadraticChar (ZMod p)) (↑(↑χ₄ ↑(Fintype.card F)) * ↑(Fintype.card F)) ≠ -1\n[PROOFSTEP]\nrw [← Iff.not_left (@quadraticChar_neg_one_iff_not_isSquare F _ _ _ _), quadraticChar_odd_prime hF hp]\n[GOAL]\ncase neg\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Fintype F\nhF : ringChar F ≠ 2\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nhFp : ¬ringChar F = p\n⊢ ringChar F ≠ p\n[PROOFSTEP]\nexact hFp\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.GaussSum", "llama_tokens": 20165, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8479677660619633, "lm_q2_score": 0.6688802603710086, "lm_q1q2_score": 0.5671889001497485}} {"text": "[GOAL]\n⊢ catalan 0 = 1\n[PROOFSTEP]\nrw [catalan]\n[GOAL]\nn : ℕ\n⊢ catalan (n + 1) = ∑ i : Fin (Nat.succ n), catalan ↑i * catalan (n - ↑i)\n[PROOFSTEP]\nrw [catalan]\n[GOAL]\nn : ℕ\n⊢ catalan (n + 1) = ∑ ij in Nat.antidiagonal n, catalan ij.fst * catalan ij.snd\n[PROOFSTEP]\nrw [catalan_succ, Nat.sum_antidiagonal_eq_sum_range_succ (fun x y => catalan x * catalan y) n, sum_range]\n[GOAL]\n⊢ catalan 1 = 1\n[PROOFSTEP]\nsimp [catalan_succ]\n[GOAL]\nn i : ℕ\nh : i ≤ n\n⊢ gosperCatalan (n + 1) (i + 1) - gosperCatalan (n + 1) i =\n ↑(Nat.centralBinom i) / (↑i + 1) * ↑(Nat.centralBinom (n - i)) / (↑n - ↑i + 1)\n[PROOFSTEP]\nhave l₁ : (n : ℚ) + 1 ≠ 0 := by norm_cast; exact n.succ_ne_zero\n[GOAL]\nn i : ℕ\nh : i ≤ n\n⊢ ↑n + 1 ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nn i : ℕ\nh : i ≤ n\n⊢ ¬n + 1 = 0\n[PROOFSTEP]\nexact n.succ_ne_zero\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\n⊢ gosperCatalan (n + 1) (i + 1) - gosperCatalan (n + 1) i =\n ↑(Nat.centralBinom i) / (↑i + 1) * ↑(Nat.centralBinom (n - i)) / (↑n - ↑i + 1)\n[PROOFSTEP]\nhave l₂ : (n : ℚ) + 1 + 1 ≠ 0 := by norm_cast; exact (n + 1).succ_ne_zero\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\n⊢ ↑n + 1 + 1 ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\n⊢ ¬n + 1 + 1 = 0\n[PROOFSTEP]\nexact (n + 1).succ_ne_zero\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\n⊢ gosperCatalan (n + 1) (i + 1) - gosperCatalan (n + 1) i =\n ↑(Nat.centralBinom i) / (↑i + 1) * ↑(Nat.centralBinom (n - i)) / (↑n - ↑i + 1)\n[PROOFSTEP]\nhave l₃ : (i : ℚ) + 1 ≠ 0 := by norm_cast; exact i.succ_ne_zero\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\n⊢ ↑i + 1 ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\n⊢ ¬i + 1 = 0\n[PROOFSTEP]\nexact i.succ_ne_zero\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\nl₃ : ↑i + 1 ≠ 0\n⊢ gosperCatalan (n + 1) (i + 1) - gosperCatalan (n + 1) i =\n ↑(Nat.centralBinom i) / (↑i + 1) * ↑(Nat.centralBinom (n - i)) / (↑n - ↑i + 1)\n[PROOFSTEP]\nhave l₄ : (n : ℚ) - i + 1 ≠ 0 := by norm_cast; exact (n - i).succ_ne_zero\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\nl₃ : ↑i + 1 ≠ 0\n⊢ ↑n - ↑i + 1 ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\nl₃ : ↑i + 1 ≠ 0\n⊢ ¬n - i + 1 = 0\n[PROOFSTEP]\nexact (n - i).succ_ne_zero\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\nl₃ : ↑i + 1 ≠ 0\nl₄ : ↑n - ↑i + 1 ≠ 0\n⊢ gosperCatalan (n + 1) (i + 1) - gosperCatalan (n + 1) i =\n ↑(Nat.centralBinom i) / (↑i + 1) * ↑(Nat.centralBinom (n - i)) / (↑n - ↑i + 1)\n[PROOFSTEP]\nhave h₁ := (mul_div_cancel_left (↑(Nat.centralBinom (i + 1))) l₃).symm\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\nl₃ : ↑i + 1 ≠ 0\nl₄ : ↑n - ↑i + 1 ≠ 0\nh₁ : ↑(Nat.centralBinom (i + 1)) = (↑i + 1) * ↑(Nat.centralBinom (i + 1)) / (↑i + 1)\n⊢ gosperCatalan (n + 1) (i + 1) - gosperCatalan (n + 1) i =\n ↑(Nat.centralBinom i) / (↑i + 1) * ↑(Nat.centralBinom (n - i)) / (↑n - ↑i + 1)\n[PROOFSTEP]\nhave h₂ := (mul_div_cancel_left (↑(Nat.centralBinom (n - i + 1))) l₄).symm\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\nl₃ : ↑i + 1 ≠ 0\nl₄ : ↑n - ↑i + 1 ≠ 0\nh₁ : ↑(Nat.centralBinom (i + 1)) = (↑i + 1) * ↑(Nat.centralBinom (i + 1)) / (↑i + 1)\nh₂ : ↑(Nat.centralBinom (n - i + 1)) = (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) / (↑n - ↑i + 1)\n⊢ gosperCatalan (n + 1) (i + 1) - gosperCatalan (n + 1) i =\n ↑(Nat.centralBinom i) / (↑i + 1) * ↑(Nat.centralBinom (n - i)) / (↑n - ↑i + 1)\n[PROOFSTEP]\nhave h₃ : ((i : ℚ) + 1) * (i + 1).centralBinom = 2 * (2 * i + 1) * i.centralBinom := by\n exact_mod_cast Nat.succ_mul_centralBinom_succ i\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\nl₃ : ↑i + 1 ≠ 0\nl₄ : ↑n - ↑i + 1 ≠ 0\nh₁ : ↑(Nat.centralBinom (i + 1)) = (↑i + 1) * ↑(Nat.centralBinom (i + 1)) / (↑i + 1)\nh₂ : ↑(Nat.centralBinom (n - i + 1)) = (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) / (↑n - ↑i + 1)\n⊢ (↑i + 1) * ↑(Nat.centralBinom (i + 1)) = 2 * (2 * ↑i + 1) * ↑(Nat.centralBinom i)\n[PROOFSTEP]\nexact_mod_cast Nat.succ_mul_centralBinom_succ i\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\nl₃ : ↑i + 1 ≠ 0\nl₄ : ↑n - ↑i + 1 ≠ 0\nh₁ : ↑(Nat.centralBinom (i + 1)) = (↑i + 1) * ↑(Nat.centralBinom (i + 1)) / (↑i + 1)\nh₂ : ↑(Nat.centralBinom (n - i + 1)) = (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) / (↑n - ↑i + 1)\nh₃ : (↑i + 1) * ↑(Nat.centralBinom (i + 1)) = 2 * (2 * ↑i + 1) * ↑(Nat.centralBinom i)\n⊢ gosperCatalan (n + 1) (i + 1) - gosperCatalan (n + 1) i =\n ↑(Nat.centralBinom i) / (↑i + 1) * ↑(Nat.centralBinom (n - i)) / (↑n - ↑i + 1)\n[PROOFSTEP]\nhave h₄ : ((n : ℚ) - i + 1) * (n - i + 1).centralBinom = 2 * (2 * (n - i) + 1) * (n - i).centralBinom := by\n exact_mod_cast Nat.succ_mul_centralBinom_succ (n - i)\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\nl₃ : ↑i + 1 ≠ 0\nl₄ : ↑n - ↑i + 1 ≠ 0\nh₁ : ↑(Nat.centralBinom (i + 1)) = (↑i + 1) * ↑(Nat.centralBinom (i + 1)) / (↑i + 1)\nh₂ : ↑(Nat.centralBinom (n - i + 1)) = (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) / (↑n - ↑i + 1)\nh₃ : (↑i + 1) * ↑(Nat.centralBinom (i + 1)) = 2 * (2 * ↑i + 1) * ↑(Nat.centralBinom i)\n⊢ (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) = 2 * (2 * (↑n - ↑i) + 1) * ↑(Nat.centralBinom (n - i))\n[PROOFSTEP]\nexact_mod_cast Nat.succ_mul_centralBinom_succ (n - i)\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\nl₃ : ↑i + 1 ≠ 0\nl₄ : ↑n - ↑i + 1 ≠ 0\nh₁ : ↑(Nat.centralBinom (i + 1)) = (↑i + 1) * ↑(Nat.centralBinom (i + 1)) / (↑i + 1)\nh₂ : ↑(Nat.centralBinom (n - i + 1)) = (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) / (↑n - ↑i + 1)\nh₃ : (↑i + 1) * ↑(Nat.centralBinom (i + 1)) = 2 * (2 * ↑i + 1) * ↑(Nat.centralBinom i)\nh₄ : (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) = 2 * (2 * (↑n - ↑i) + 1) * ↑(Nat.centralBinom (n - i))\n⊢ gosperCatalan (n + 1) (i + 1) - gosperCatalan (n + 1) i =\n ↑(Nat.centralBinom i) / (↑i + 1) * ↑(Nat.centralBinom (n - i)) / (↑n - ↑i + 1)\n[PROOFSTEP]\nsimp only [gosperCatalan]\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\nl₃ : ↑i + 1 ≠ 0\nl₄ : ↑n - ↑i + 1 ≠ 0\nh₁ : ↑(Nat.centralBinom (i + 1)) = (↑i + 1) * ↑(Nat.centralBinom (i + 1)) / (↑i + 1)\nh₂ : ↑(Nat.centralBinom (n - i + 1)) = (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) / (↑n - ↑i + 1)\nh₃ : (↑i + 1) * ↑(Nat.centralBinom (i + 1)) = 2 * (2 * ↑i + 1) * ↑(Nat.centralBinom i)\nh₄ : (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) = 2 * (2 * (↑n - ↑i) + 1) * ↑(Nat.centralBinom (n - i))\n⊢ ↑(Nat.centralBinom (i + 1)) * ↑(Nat.centralBinom (n + 1 - (i + 1))) * (2 * ↑(i + 1) - ↑(n + 1)) /\n (2 * ↑(n + 1) * (↑(n + 1) + 1)) -\n ↑(Nat.centralBinom i) * ↑(Nat.centralBinom (n + 1 - i)) * (2 * ↑i - ↑(n + 1)) / (2 * ↑(n + 1) * (↑(n + 1) + 1)) =\n ↑(Nat.centralBinom i) / (↑i + 1) * ↑(Nat.centralBinom (n - i)) / (↑n - ↑i + 1)\n[PROOFSTEP]\npush_cast\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\nl₃ : ↑i + 1 ≠ 0\nl₄ : ↑n - ↑i + 1 ≠ 0\nh₁ : ↑(Nat.centralBinom (i + 1)) = (↑i + 1) * ↑(Nat.centralBinom (i + 1)) / (↑i + 1)\nh₂ : ↑(Nat.centralBinom (n - i + 1)) = (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) / (↑n - ↑i + 1)\nh₃ : (↑i + 1) * ↑(Nat.centralBinom (i + 1)) = 2 * (2 * ↑i + 1) * ↑(Nat.centralBinom i)\nh₄ : (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) = 2 * (2 * (↑n - ↑i) + 1) * ↑(Nat.centralBinom (n - i))\n⊢ ↑(Nat.centralBinom (i + 1)) * ↑(Nat.centralBinom (n + 1 - (i + 1))) * (2 * (↑i + 1) - (↑n + 1)) /\n (2 * (↑n + 1) * (↑n + 1 + 1)) -\n ↑(Nat.centralBinom i) * ↑(Nat.centralBinom (n + 1 - i)) * (2 * ↑i - (↑n + 1)) / (2 * (↑n + 1) * (↑n + 1 + 1)) =\n ↑(Nat.centralBinom i) / (↑i + 1) * ↑(Nat.centralBinom (n - i)) / (↑n - ↑i + 1)\n[PROOFSTEP]\nrw [show n + 1 - i = n - i + 1 by rw [Nat.add_comm (n - i) 1, ← (Nat.add_sub_assoc h 1), add_comm]]\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\nl₃ : ↑i + 1 ≠ 0\nl₄ : ↑n - ↑i + 1 ≠ 0\nh₁ : ↑(Nat.centralBinom (i + 1)) = (↑i + 1) * ↑(Nat.centralBinom (i + 1)) / (↑i + 1)\nh₂ : ↑(Nat.centralBinom (n - i + 1)) = (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) / (↑n - ↑i + 1)\nh₃ : (↑i + 1) * ↑(Nat.centralBinom (i + 1)) = 2 * (2 * ↑i + 1) * ↑(Nat.centralBinom i)\nh₄ : (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) = 2 * (2 * (↑n - ↑i) + 1) * ↑(Nat.centralBinom (n - i))\n⊢ n + 1 - i = n - i + 1\n[PROOFSTEP]\nrw [Nat.add_comm (n - i) 1, ← (Nat.add_sub_assoc h 1), add_comm]\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\nl₃ : ↑i + 1 ≠ 0\nl₄ : ↑n - ↑i + 1 ≠ 0\nh₁ : ↑(Nat.centralBinom (i + 1)) = (↑i + 1) * ↑(Nat.centralBinom (i + 1)) / (↑i + 1)\nh₂ : ↑(Nat.centralBinom (n - i + 1)) = (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) / (↑n - ↑i + 1)\nh₃ : (↑i + 1) * ↑(Nat.centralBinom (i + 1)) = 2 * (2 * ↑i + 1) * ↑(Nat.centralBinom i)\nh₄ : (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) = 2 * (2 * (↑n - ↑i) + 1) * ↑(Nat.centralBinom (n - i))\n⊢ ↑(Nat.centralBinom (i + 1)) * ↑(Nat.centralBinom (n + 1 - (i + 1))) * (2 * (↑i + 1) - (↑n + 1)) /\n (2 * (↑n + 1) * (↑n + 1 + 1)) -\n ↑(Nat.centralBinom i) * ↑(Nat.centralBinom (n - i + 1)) * (2 * ↑i - (↑n + 1)) / (2 * (↑n + 1) * (↑n + 1 + 1)) =\n ↑(Nat.centralBinom i) / (↑i + 1) * ↑(Nat.centralBinom (n - i)) / (↑n - ↑i + 1)\n[PROOFSTEP]\nrw [h₁, h₂, h₃, h₄]\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\nl₃ : ↑i + 1 ≠ 0\nl₄ : ↑n - ↑i + 1 ≠ 0\nh₁ : ↑(Nat.centralBinom (i + 1)) = (↑i + 1) * ↑(Nat.centralBinom (i + 1)) / (↑i + 1)\nh₂ : ↑(Nat.centralBinom (n - i + 1)) = (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) / (↑n - ↑i + 1)\nh₃ : (↑i + 1) * ↑(Nat.centralBinom (i + 1)) = 2 * (2 * ↑i + 1) * ↑(Nat.centralBinom i)\nh₄ : (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) = 2 * (2 * (↑n - ↑i) + 1) * ↑(Nat.centralBinom (n - i))\n⊢ 2 * (2 * ↑i + 1) * ↑(Nat.centralBinom i) / (↑i + 1) * ↑(Nat.centralBinom (n + 1 - (i + 1))) *\n (2 * (↑i + 1) - (↑n + 1)) /\n (2 * (↑n + 1) * (↑n + 1 + 1)) -\n ↑(Nat.centralBinom i) * (2 * (2 * (↑n - ↑i) + 1) * ↑(Nat.centralBinom (n - i)) / (↑n - ↑i + 1)) *\n (2 * ↑i - (↑n + 1)) /\n (2 * (↑n + 1) * (↑n + 1 + 1)) =\n ↑(Nat.centralBinom i) / (↑i + 1) * ↑(Nat.centralBinom (n - i)) / (↑n - ↑i + 1)\n[PROOFSTEP]\nfield_simp\n[GOAL]\nn i : ℕ\nh : i ≤ n\nl₁ : ↑n + 1 ≠ 0\nl₂ : ↑n + 1 + 1 ≠ 0\nl₃ : ↑i + 1 ≠ 0\nl₄ : ↑n - ↑i + 1 ≠ 0\nh₁ : ↑(Nat.centralBinom (i + 1)) = (↑i + 1) * ↑(Nat.centralBinom (i + 1)) / (↑i + 1)\nh₂ : ↑(Nat.centralBinom (n - i + 1)) = (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) / (↑n - ↑i + 1)\nh₃ : (↑i + 1) * ↑(Nat.centralBinom (i + 1)) = 2 * (2 * ↑i + 1) * ↑(Nat.centralBinom i)\nh₄ : (↑n - ↑i + 1) * ↑(Nat.centralBinom (n - i + 1)) = 2 * (2 * (↑n - ↑i) + 1) * ↑(Nat.centralBinom (n - i))\n⊢ (2 * (2 * ↑i + 1) * ↑(Nat.centralBinom i) * ↑(Nat.centralBinom (n - i)) * (2 * (↑i + 1) - (↑n + 1)) *\n ((↑n - ↑i + 1) * (2 * (↑n + 1) * (↑n + 1 + 1))) -\n (↑i + 1) * (2 * (↑n + 1) * (↑n + 1 + 1)) *\n (↑(Nat.centralBinom i) * (2 * (2 * (↑n - ↑i) + 1) * ↑(Nat.centralBinom (n - i))) * (2 * ↑i - (↑n + 1)))) *\n ((↑i + 1) * (↑n - ↑i + 1)) =\n ↑(Nat.centralBinom i) * ↑(Nat.centralBinom (n - i)) *\n ((↑i + 1) * (2 * (↑n + 1) * (↑n + 1 + 1)) * ((↑n - ↑i + 1) * (2 * (↑n + 1) * (↑n + 1 + 1))))\n[PROOFSTEP]\nring\n[GOAL]\nn : ℕ\n⊢ gosperCatalan (n + 1) (n + 1) - gosperCatalan (n + 1) 0 = ↑(Nat.centralBinom (n + 1)) / (↑n + 2)\n[PROOFSTEP]\nhave : (n : ℚ) + 1 ≠ 0 := by norm_cast; exact n.succ_ne_zero\n[GOAL]\nn : ℕ\n⊢ ↑n + 1 ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nn : ℕ\n⊢ ¬n + 1 = 0\n[PROOFSTEP]\nexact n.succ_ne_zero\n[GOAL]\nn : ℕ\nthis : ↑n + 1 ≠ 0\n⊢ gosperCatalan (n + 1) (n + 1) - gosperCatalan (n + 1) 0 = ↑(Nat.centralBinom (n + 1)) / (↑n + 2)\n[PROOFSTEP]\nhave : (n : ℚ) + 1 + 1 ≠ 0 := by norm_cast; exact (n + 1).succ_ne_zero\n[GOAL]\nn : ℕ\nthis : ↑n + 1 ≠ 0\n⊢ ↑n + 1 + 1 ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nn : ℕ\nthis : ↑n + 1 ≠ 0\n⊢ ¬n + 1 + 1 = 0\n[PROOFSTEP]\nexact (n + 1).succ_ne_zero\n[GOAL]\nn : ℕ\nthis✝ : ↑n + 1 ≠ 0\nthis : ↑n + 1 + 1 ≠ 0\n⊢ gosperCatalan (n + 1) (n + 1) - gosperCatalan (n + 1) 0 = ↑(Nat.centralBinom (n + 1)) / (↑n + 2)\n[PROOFSTEP]\nhave h : (n : ℚ) + 2 ≠ 0 := by norm_cast; exact (n + 1).succ_ne_zero\n[GOAL]\nn : ℕ\nthis✝ : ↑n + 1 ≠ 0\nthis : ↑n + 1 + 1 ≠ 0\n⊢ ↑n + 2 ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nn : ℕ\nthis✝ : ↑n + 1 ≠ 0\nthis : ↑n + 1 + 1 ≠ 0\n⊢ ¬n + 2 = 0\n[PROOFSTEP]\nexact (n + 1).succ_ne_zero\n[GOAL]\nn : ℕ\nthis✝ : ↑n + 1 ≠ 0\nthis : ↑n + 1 + 1 ≠ 0\nh : ↑n + 2 ≠ 0\n⊢ gosperCatalan (n + 1) (n + 1) - gosperCatalan (n + 1) 0 = ↑(Nat.centralBinom (n + 1)) / (↑n + 2)\n[PROOFSTEP]\nsimp only [gosperCatalan, Nat.sub_zero, Nat.centralBinom_zero, Nat.sub_self]\n[GOAL]\nn : ℕ\nthis✝ : ↑n + 1 ≠ 0\nthis : ↑n + 1 + 1 ≠ 0\nh : ↑n + 2 ≠ 0\n⊢ ↑(Nat.centralBinom (n + 1)) * ↑1 * (2 * ↑(n + 1) - ↑(n + 1)) / (2 * ↑(n + 1) * (↑(n + 1) + 1)) -\n ↑1 * ↑(Nat.centralBinom (n + 1)) * (2 * ↑0 - ↑(n + 1)) / (2 * ↑(n + 1) * (↑(n + 1) + 1)) =\n ↑(Nat.centralBinom (n + 1)) / (↑n + 2)\n[PROOFSTEP]\nfield_simp\n[GOAL]\nn : ℕ\nthis✝ : ↑n + 1 ≠ 0\nthis : ↑n + 1 + 1 ≠ 0\nh : ↑n + 2 ≠ 0\n⊢ (↑(Nat.centralBinom (n + 1)) * (2 * (↑n + 1) - (↑n + 1)) - ↑(Nat.centralBinom (n + 1)) * (-1 + -↑n)) * (↑n + 2) =\n ↑(Nat.centralBinom (n + 1)) * (2 * (↑n + 1) * (↑n + 1 + 1))\n[PROOFSTEP]\nring\n[GOAL]\nn : ℕ\n⊢ catalan n = Nat.centralBinom n / (n + 1)\n[PROOFSTEP]\nsuffices (catalan n : ℚ) = Nat.centralBinom n / (n + 1)\n by\n have h := Nat.succ_dvd_centralBinom n\n exact_mod_cast this\n[GOAL]\nn : ℕ\nthis : ↑(catalan n) = ↑(Nat.centralBinom n) / (↑n + 1)\n⊢ catalan n = Nat.centralBinom n / (n + 1)\n[PROOFSTEP]\nhave h := Nat.succ_dvd_centralBinom n\n[GOAL]\nn : ℕ\nthis : ↑(catalan n) = ↑(Nat.centralBinom n) / (↑n + 1)\nh : n + 1 ∣ Nat.centralBinom n\n⊢ catalan n = Nat.centralBinom n / (n + 1)\n[PROOFSTEP]\nexact_mod_cast this\n[GOAL]\nn : ℕ\n⊢ ↑(catalan n) = ↑(Nat.centralBinom n) / (↑n + 1)\n[PROOFSTEP]\ninduction' n using Nat.case_strong_induction_on with d hd\n[GOAL]\ncase hz\n⊢ ↑(catalan 0) = ↑(Nat.centralBinom 0) / (↑0 + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hi\nd : ℕ\nhd : ∀ (m : ℕ), m ≤ d → ↑(catalan m) = ↑(Nat.centralBinom m) / (↑m + 1)\n⊢ ↑(catalan (Nat.succ d)) = ↑(Nat.centralBinom (Nat.succ d)) / (↑(Nat.succ d) + 1)\n[PROOFSTEP]\nsimp_rw [catalan_succ, Nat.cast_sum, Nat.cast_mul]\n[GOAL]\ncase hi\nd : ℕ\nhd : ∀ (m : ℕ), m ≤ d → ↑(catalan m) = ↑(Nat.centralBinom m) / (↑m + 1)\n⊢ ∑ x : Fin (Nat.succ d), ↑(catalan ↑x) * ↑(catalan (d - ↑x)) = ↑(Nat.centralBinom (Nat.succ d)) / (↑(Nat.succ d) + 1)\n[PROOFSTEP]\ntrans (∑ i : Fin d.succ, Nat.centralBinom i / (i + 1) * (Nat.centralBinom (d - i) / (d - i + 1)) : ℚ)\n[GOAL]\nd : ℕ\nhd : ∀ (m : ℕ), m ≤ d → ↑(catalan m) = ↑(Nat.centralBinom m) / (↑m + 1)\n⊢ ∑ x : Fin (Nat.succ d), ↑(catalan ↑x) * ↑(catalan (d - ↑x)) =\n ∑ i : Fin (Nat.succ d), ↑(Nat.centralBinom ↑i) / (↑↑i + 1) * (↑(Nat.centralBinom (d - ↑i)) / (↑d - ↑↑i + 1))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nd : ℕ\nhd : ∀ (m : ℕ), m ≤ d → ↑(catalan m) = ↑(Nat.centralBinom m) / (↑m + 1)\n⊢ (fun x => ↑(catalan ↑x) * ↑(catalan (d - ↑x))) = fun i =>\n ↑(Nat.centralBinom ↑i) / (↑↑i + 1) * (↑(Nat.centralBinom (d - ↑i)) / (↑d - ↑↑i + 1))\n[PROOFSTEP]\next1 x\n[GOAL]\ncase e_f.h\nd : ℕ\nhd : ∀ (m : ℕ), m ≤ d → ↑(catalan m) = ↑(Nat.centralBinom m) / (↑m + 1)\nx : Fin (Nat.succ d)\n⊢ ↑(catalan ↑x) * ↑(catalan (d - ↑x)) =\n ↑(Nat.centralBinom ↑x) / (↑↑x + 1) * (↑(Nat.centralBinom (d - ↑x)) / (↑d - ↑↑x + 1))\n[PROOFSTEP]\nhave m_le_d : x.val ≤ d := by apply Nat.le_of_lt_succ; apply x.2\n[GOAL]\nd : ℕ\nhd : ∀ (m : ℕ), m ≤ d → ↑(catalan m) = ↑(Nat.centralBinom m) / (↑m + 1)\nx : Fin (Nat.succ d)\n⊢ ↑x ≤ d\n[PROOFSTEP]\napply Nat.le_of_lt_succ\n[GOAL]\ncase a\nd : ℕ\nhd : ∀ (m : ℕ), m ≤ d → ↑(catalan m) = ↑(Nat.centralBinom m) / (↑m + 1)\nx : Fin (Nat.succ d)\n⊢ ↑x < Nat.succ d\n[PROOFSTEP]\napply x.2\n[GOAL]\ncase e_f.h\nd : ℕ\nhd : ∀ (m : ℕ), m ≤ d → ↑(catalan m) = ↑(Nat.centralBinom m) / (↑m + 1)\nx : Fin (Nat.succ d)\nm_le_d : ↑x ≤ d\n⊢ ↑(catalan ↑x) * ↑(catalan (d - ↑x)) =\n ↑(Nat.centralBinom ↑x) / (↑↑x + 1) * (↑(Nat.centralBinom (d - ↑x)) / (↑d - ↑↑x + 1))\n[PROOFSTEP]\nhave d_minus_x_le_d : (d - x.val) ≤ d := tsub_le_self\n[GOAL]\ncase e_f.h\nd : ℕ\nhd : ∀ (m : ℕ), m ≤ d → ↑(catalan m) = ↑(Nat.centralBinom m) / (↑m + 1)\nx : Fin (Nat.succ d)\nm_le_d : ↑x ≤ d\nd_minus_x_le_d : d - ↑x ≤ d\n⊢ ↑(catalan ↑x) * ↑(catalan (d - ↑x)) =\n ↑(Nat.centralBinom ↑x) / (↑↑x + 1) * (↑(Nat.centralBinom (d - ↑x)) / (↑d - ↑↑x + 1))\n[PROOFSTEP]\nrw [hd _ m_le_d, hd _ d_minus_x_le_d]\n[GOAL]\ncase e_f.h\nd : ℕ\nhd : ∀ (m : ℕ), m ≤ d → ↑(catalan m) = ↑(Nat.centralBinom m) / (↑m + 1)\nx : Fin (Nat.succ d)\nm_le_d : ↑x ≤ d\nd_minus_x_le_d : d - ↑x ≤ d\n⊢ ↑(Nat.centralBinom ↑x) / (↑↑x + 1) * (↑(Nat.centralBinom (d - ↑x)) / (↑(d - ↑x) + 1)) =\n ↑(Nat.centralBinom ↑x) / (↑↑x + 1) * (↑(Nat.centralBinom (d - ↑x)) / (↑d - ↑↑x + 1))\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nd : ℕ\nhd : ∀ (m : ℕ), m ≤ d → ↑(catalan m) = ↑(Nat.centralBinom m) / (↑m + 1)\n⊢ ∑ i : Fin (Nat.succ d), ↑(Nat.centralBinom ↑i) / (↑↑i + 1) * (↑(Nat.centralBinom (d - ↑i)) / (↑d - ↑↑i + 1)) =\n ↑(Nat.centralBinom (Nat.succ d)) / (↑(Nat.succ d) + 1)\n[PROOFSTEP]\ntrans (∑ i : Fin d.succ, (gosperCatalan (d + 1) (i + 1) - gosperCatalan (d + 1) i))\n[GOAL]\nd : ℕ\nhd : ∀ (m : ℕ), m ≤ d → ↑(catalan m) = ↑(Nat.centralBinom m) / (↑m + 1)\n⊢ ∑ i : Fin (Nat.succ d), ↑(Nat.centralBinom ↑i) / (↑↑i + 1) * (↑(Nat.centralBinom (d - ↑i)) / (↑d - ↑↑i + 1)) =\n ∑ i : Fin (Nat.succ d), (gosperCatalan (d + 1) (↑i + 1) - gosperCatalan (d + 1) ↑i)\n[PROOFSTEP]\nrefine' sum_congr rfl fun i _ => _\n[GOAL]\nd : ℕ\nhd : ∀ (m : ℕ), m ≤ d → ↑(catalan m) = ↑(Nat.centralBinom m) / (↑m + 1)\ni : Fin (Nat.succ d)\nx✝ : i ∈ univ\n⊢ ↑(Nat.centralBinom ↑i) / (↑↑i + 1) * (↑(Nat.centralBinom (d - ↑i)) / (↑d - ↑↑i + 1)) =\n gosperCatalan (d + 1) (↑i + 1) - gosperCatalan (d + 1) ↑i\n[PROOFSTEP]\nrw [gosper_trick i.is_le, mul_div]\n[GOAL]\nd : ℕ\nhd : ∀ (m : ℕ), m ≤ d → ↑(catalan m) = ↑(Nat.centralBinom m) / (↑m + 1)\n⊢ ∑ i : Fin (Nat.succ d), (gosperCatalan (d + 1) (↑i + 1) - gosperCatalan (d + 1) ↑i) =\n ↑(Nat.centralBinom (Nat.succ d)) / (↑(Nat.succ d) + 1)\n[PROOFSTEP]\nrw [← sum_range fun i => gosperCatalan (d + 1) (i + 1) - gosperCatalan (d + 1) i, sum_range_sub, Nat.succ_eq_add_one]\n[GOAL]\nd : ℕ\nhd : ∀ (m : ℕ), m ≤ d → ↑(catalan m) = ↑(Nat.centralBinom m) / (↑m + 1)\n⊢ gosperCatalan (d + 1) (d + 1) - gosperCatalan (d + 1) 0 = ↑(Nat.centralBinom (d + 1)) / (↑(d + 1) + 1)\n[PROOFSTEP]\nrw [gosper_catalan_sub_eq_central_binom_div d]\n[GOAL]\nd : ℕ\nhd : ∀ (m : ℕ), m ≤ d → ↑(catalan m) = ↑(Nat.centralBinom m) / (↑m + 1)\n⊢ ↑(Nat.centralBinom (d + 1)) / (↑d + 2) = ↑(Nat.centralBinom (d + 1)) / (↑(d + 1) + 1)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\n⊢ catalan 2 = 2\n[PROOFSTEP]\nunfold catalan\n[GOAL]\n⊢ ∑ i : Fin (Nat.succ 1), catalan ↑i * catalan (1 - ↑i) = 2\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ catalan 3 = 5\n[PROOFSTEP]\nunfold catalan\n[GOAL]\n⊢ ∑ i : Fin (Nat.succ 2), catalan ↑i * catalan (2 - ↑i) = 5\n[PROOFSTEP]\nrfl\n[GOAL]\na b : Finset (Tree Unit)\nx✝¹ x✝ : Tree Unit × Tree Unit\nx₁ x₂ y₁ y₂ : Tree Unit\nh : (fun x => node () x.fst x.snd) (x₁, x₂) = (fun x => node () x.fst x.snd) (y₁, y₂)\n⊢ (x₁, x₂) = (y₁, y₂)\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nn : ℕ\nijh : { x // x ∈ Nat.antidiagonal n }\n⊢ (invImage (fun a => sizeOf a) instWellFoundedRelation).1 (↑ijh).fst (Nat.succ n)\n[PROOFSTEP]\nsimp_wf\n[GOAL]\nn : ℕ\nijh : { x // x ∈ Nat.antidiagonal n }\n⊢ (↑ijh).fst < Nat.succ n\n[PROOFSTEP]\ntry exact Nat.lt_succ_of_le (fst_le ijh.2)\n[GOAL]\nn : ℕ\nijh : { x // x ∈ Nat.antidiagonal n }\n⊢ (↑ijh).fst < Nat.succ n\n[PROOFSTEP]\nexact Nat.lt_succ_of_le (fst_le ijh.2)\n[GOAL]\n\n[PROOFSTEP]\ntry exact Nat.lt_succ_of_le (snd_le ijh.2)\n[GOAL]\n\n[PROOFSTEP]\nexact Nat.lt_succ_of_le (snd_le ijh.2)\n[GOAL]\nn : ℕ\nijh : { x // x ∈ Nat.antidiagonal n }\n⊢ (invImage (fun a => sizeOf a) instWellFoundedRelation).1 (↑ijh).snd (Nat.succ n)\n[PROOFSTEP]\nsimp_wf\n[GOAL]\nn : ℕ\nijh : { x // x ∈ Nat.antidiagonal n }\n⊢ (↑ijh).snd < Nat.succ n\n[PROOFSTEP]\ntry exact Nat.lt_succ_of_le (fst_le ijh.2)\n[GOAL]\nn : ℕ\nijh : { x // x ∈ Nat.antidiagonal n }\n⊢ (↑ijh).snd < Nat.succ n\n[PROOFSTEP]\nexact Nat.lt_succ_of_le (fst_le ijh.2)\n[GOAL]\nn : ℕ\nijh : { x // x ∈ Nat.antidiagonal n }\n⊢ (↑ijh).snd < Nat.succ n\n[PROOFSTEP]\ntry exact Nat.lt_succ_of_le (snd_le ijh.2)\n[GOAL]\nn : ℕ\nijh : { x // x ∈ Nat.antidiagonal n }\n⊢ (↑ijh).snd < Nat.succ n\n[PROOFSTEP]\nexact Nat.lt_succ_of_le (snd_le ijh.2)\n[GOAL]\n⊢ treesOfNumNodesEq 0 = {nil}\n[PROOFSTEP]\nrw [treesOfNumNodesEq]\n[GOAL]\nn : ℕ\n⊢ treesOfNumNodesEq (n + 1) =\n Finset.biUnion (Nat.antidiagonal n) fun ij => pairwiseNode (treesOfNumNodesEq ij.fst) (treesOfNumNodesEq ij.snd)\n[PROOFSTEP]\nrw [treesOfNumNodesEq]\n[GOAL]\nn : ℕ\n⊢ (Finset.biUnion (attach (Nat.antidiagonal n)) fun ijh =>\n pairwiseNode (treesOfNumNodesEq (↑ijh).fst) (treesOfNumNodesEq (↑ijh).snd)) =\n Finset.biUnion (Nat.antidiagonal n) fun ij => pairwiseNode (treesOfNumNodesEq ij.fst) (treesOfNumNodesEq ij.snd)\n[PROOFSTEP]\next\n[GOAL]\ncase a\nn : ℕ\na✝ : Tree Unit\n⊢ (a✝ ∈\n Finset.biUnion (attach (Nat.antidiagonal n)) fun ijh =>\n pairwiseNode (treesOfNumNodesEq (↑ijh).fst) (treesOfNumNodesEq (↑ijh).snd)) ↔\n a✝ ∈\n Finset.biUnion (Nat.antidiagonal n) fun ij => pairwiseNode (treesOfNumNodesEq ij.fst) (treesOfNumNodesEq ij.snd)\n[PROOFSTEP]\nsimp\n[GOAL]\nx : Tree Unit\nn : ℕ\n⊢ x ∈ treesOfNumNodesEq n ↔ numNodes x = n\n[PROOFSTEP]\ninduction x using Tree.unitRecOn generalizing n\n[GOAL]\ncase base\nn : ℕ\n⊢ nil ∈ treesOfNumNodesEq n ↔ numNodes nil = n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase ind\nx✝ y✝ : Tree Unit\na✝¹ : ∀ {n : ℕ}, x✝ ∈ treesOfNumNodesEq n ↔ numNodes x✝ = n\na✝ : ∀ {n : ℕ}, y✝ ∈ treesOfNumNodesEq n ↔ numNodes y✝ = n\nn : ℕ\n⊢ node () x✝ y✝ ∈ treesOfNumNodesEq n ↔ numNodes (node () x✝ y✝) = n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase base.zero\n⊢ nil ∈ treesOfNumNodesEq Nat.zero ↔ numNodes nil = Nat.zero\n[PROOFSTEP]\nsimp [treesOfNumNodesEq_succ, Nat.succ_eq_add_one, *]\n[GOAL]\ncase base.succ\nn✝ : ℕ\n⊢ nil ∈ treesOfNumNodesEq (Nat.succ n✝) ↔ numNodes nil = Nat.succ n✝\n[PROOFSTEP]\nsimp [treesOfNumNodesEq_succ, Nat.succ_eq_add_one, *]\n[GOAL]\ncase ind.zero\nx✝ y✝ : Tree Unit\na✝¹ : ∀ {n : ℕ}, x✝ ∈ treesOfNumNodesEq n ↔ numNodes x✝ = n\na✝ : ∀ {n : ℕ}, y✝ ∈ treesOfNumNodesEq n ↔ numNodes y✝ = n\n⊢ node () x✝ y✝ ∈ treesOfNumNodesEq Nat.zero ↔ numNodes (node () x✝ y✝) = Nat.zero\n[PROOFSTEP]\nsimp [treesOfNumNodesEq_succ, Nat.succ_eq_add_one, *]\n[GOAL]\ncase ind.succ\nx✝ y✝ : Tree Unit\na✝¹ : ∀ {n : ℕ}, x✝ ∈ treesOfNumNodesEq n ↔ numNodes x✝ = n\na✝ : ∀ {n : ℕ}, y✝ ∈ treesOfNumNodesEq n ↔ numNodes y✝ = n\nn✝ : ℕ\n⊢ node () x✝ y✝ ∈ treesOfNumNodesEq (Nat.succ n✝) ↔ numNodes (node () x✝ y✝) = Nat.succ n✝\n[PROOFSTEP]\nsimp [treesOfNumNodesEq_succ, Nat.succ_eq_add_one, *]\n[GOAL]\ncase base.succ\nn✝ : ℕ\n⊢ ¬0 = n✝ + 1\n[PROOFSTEP]\nexact (Nat.succ_ne_zero _).symm\n[GOAL]\nn : ℕ\n⊢ ∀ (x : Tree Unit), x ∈ ↑(treesOfNumNodesEq n) ↔ x ∈ {x | numNodes x = n}\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ card (treesOfNumNodesEq n) = catalan n\n[PROOFSTEP]\ninduction' n using Nat.case_strong_induction_on with n ih\n[GOAL]\ncase hz\n⊢ card (treesOfNumNodesEq 0) = catalan 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hi\nn : ℕ\nih : ∀ (m : ℕ), m ≤ n → card (treesOfNumNodesEq m) = catalan m\n⊢ card (treesOfNumNodesEq (Nat.succ n)) = catalan (Nat.succ n)\n[PROOFSTEP]\nrw [treesOfNumNodesEq_succ, card_biUnion, catalan_succ']\n[GOAL]\ncase hi\nn : ℕ\nih : ∀ (m : ℕ), m ≤ n → card (treesOfNumNodesEq m) = catalan m\n⊢ ∑ u in Nat.antidiagonal n, card (pairwiseNode (treesOfNumNodesEq u.fst) (treesOfNumNodesEq u.snd)) =\n ∑ ij in Nat.antidiagonal n, catalan ij.fst * catalan ij.snd\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase hi\nn : ℕ\nih : ∀ (m : ℕ), m ≤ n → card (treesOfNumNodesEq m) = catalan m\n⊢ ∀ (x : ℕ × ℕ),\n x ∈ Nat.antidiagonal n →\n card (pairwiseNode (treesOfNumNodesEq x.fst) (treesOfNumNodesEq x.snd)) = catalan x.fst * catalan x.snd\n[PROOFSTEP]\nrintro ⟨i, j⟩ H\n[GOAL]\ncase hi.mk\nn : ℕ\nih : ∀ (m : ℕ), m ≤ n → card (treesOfNumNodesEq m) = catalan m\ni j : ℕ\nH : (i, j) ∈ Nat.antidiagonal n\n⊢ card (pairwiseNode (treesOfNumNodesEq (i, j).fst) (treesOfNumNodesEq (i, j).snd)) =\n catalan (i, j).fst * catalan (i, j).snd\n[PROOFSTEP]\nrw [card_map, card_product, ih _ (fst_le H), ih _ (snd_le H)]\n[GOAL]\ncase hi\nn : ℕ\nih : ∀ (m : ℕ), m ≤ n → card (treesOfNumNodesEq m) = catalan m\n⊢ ∀ (x : ℕ × ℕ),\n x ∈ Nat.antidiagonal n →\n ∀ (y : ℕ × ℕ),\n y ∈ Nat.antidiagonal n →\n x ≠ y →\n Disjoint (pairwiseNode (treesOfNumNodesEq x.fst) (treesOfNumNodesEq x.snd))\n (pairwiseNode (treesOfNumNodesEq y.fst) (treesOfNumNodesEq y.snd))\n[PROOFSTEP]\nsimp_rw [disjoint_left]\n[GOAL]\ncase hi\nn : ℕ\nih : ∀ (m : ℕ), m ≤ n → card (treesOfNumNodesEq m) = catalan m\n⊢ ∀ (x : ℕ × ℕ),\n x ∈ Nat.antidiagonal n →\n ∀ (y : ℕ × ℕ),\n y ∈ Nat.antidiagonal n →\n x ≠ y →\n ∀ ⦃a : Tree Unit⦄,\n a ∈ pairwiseNode (treesOfNumNodesEq x.fst) (treesOfNumNodesEq x.snd) →\n ¬a ∈ pairwiseNode (treesOfNumNodesEq y.fst) (treesOfNumNodesEq y.snd)\n[PROOFSTEP]\nrintro ⟨i, j⟩ _ ⟨i', j'⟩\n _\n -- Porting note: was clear * -; tidy\n[GOAL]\ncase hi.mk.mk\nn : ℕ\nih : ∀ (m : ℕ), m ≤ n → card (treesOfNumNodesEq m) = catalan m\ni j : ℕ\na✝¹ : (i, j) ∈ Nat.antidiagonal n\ni' j' : ℕ\na✝ : (i', j') ∈ Nat.antidiagonal n\n⊢ (i, j) ≠ (i', j') →\n ∀ ⦃a : Tree Unit⦄,\n a ∈ pairwiseNode (treesOfNumNodesEq (i, j).fst) (treesOfNumNodesEq (i, j).snd) →\n ¬a ∈ pairwiseNode (treesOfNumNodesEq (i', j').fst) (treesOfNumNodesEq (i', j').snd)\n[PROOFSTEP]\nintros h a\n[GOAL]\ncase hi.mk.mk\nn : ℕ\nih : ∀ (m : ℕ), m ≤ n → card (treesOfNumNodesEq m) = catalan m\ni j : ℕ\na✝¹ : (i, j) ∈ Nat.antidiagonal n\ni' j' : ℕ\na✝ : (i', j') ∈ Nat.antidiagonal n\nh : (i, j) ≠ (i', j')\na : Tree Unit\n⊢ a ∈ pairwiseNode (treesOfNumNodesEq (i, j).fst) (treesOfNumNodesEq (i, j).snd) →\n ¬a ∈ pairwiseNode (treesOfNumNodesEq (i', j').fst) (treesOfNumNodesEq (i', j').snd)\n[PROOFSTEP]\ncases' a with a l r\n[GOAL]\ncase hi.mk.mk.nil\nn : ℕ\nih : ∀ (m : ℕ), m ≤ n → card (treesOfNumNodesEq m) = catalan m\ni j : ℕ\na✝¹ : (i, j) ∈ Nat.antidiagonal n\ni' j' : ℕ\na✝ : (i', j') ∈ Nat.antidiagonal n\nh : (i, j) ≠ (i', j')\n⊢ nil ∈ pairwiseNode (treesOfNumNodesEq (i, j).fst) (treesOfNumNodesEq (i, j).snd) →\n ¬nil ∈ pairwiseNode (treesOfNumNodesEq (i', j').fst) (treesOfNumNodesEq (i', j').snd)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase hi.mk.mk.nil\nn : ℕ\nih : ∀ (m : ℕ), m ≤ n → card (treesOfNumNodesEq m) = catalan m\ni j : ℕ\na✝¹ : (i, j) ∈ Nat.antidiagonal n\ni' j' : ℕ\na✝ : (i', j') ∈ Nat.antidiagonal n\nh✝ : (i, j) ≠ (i', j')\nh : nil ∈ pairwiseNode (treesOfNumNodesEq (i, j).fst) (treesOfNumNodesEq (i, j).snd)\n⊢ ¬nil ∈ pairwiseNode (treesOfNumNodesEq (i', j').fst) (treesOfNumNodesEq (i', j').snd)\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase hi.mk.mk.node\nn : ℕ\nih : ∀ (m : ℕ), m ≤ n → card (treesOfNumNodesEq m) = catalan m\ni j : ℕ\na✝¹ : (i, j) ∈ Nat.antidiagonal n\ni' j' : ℕ\na✝ : (i', j') ∈ Nat.antidiagonal n\nh : (i, j) ≠ (i', j')\na : Unit\nl r : Tree Unit\n⊢ node a l r ∈ pairwiseNode (treesOfNumNodesEq (i, j).fst) (treesOfNumNodesEq (i, j).snd) →\n ¬node a l r ∈ pairwiseNode (treesOfNumNodesEq (i', j').fst) (treesOfNumNodesEq (i', j').snd)\n[PROOFSTEP]\nintro h1 h2\n[GOAL]\ncase hi.mk.mk.node\nn : ℕ\nih : ∀ (m : ℕ), m ≤ n → card (treesOfNumNodesEq m) = catalan m\ni j : ℕ\na✝¹ : (i, j) ∈ Nat.antidiagonal n\ni' j' : ℕ\na✝ : (i', j') ∈ Nat.antidiagonal n\nh : (i, j) ≠ (i', j')\na : Unit\nl r : Tree Unit\nh1 : node a l r ∈ pairwiseNode (treesOfNumNodesEq (i, j).fst) (treesOfNumNodesEq (i, j).snd)\nh2 : node a l r ∈ pairwiseNode (treesOfNumNodesEq (i', j').fst) (treesOfNumNodesEq (i', j').snd)\n⊢ False\n[PROOFSTEP]\napply h\n[GOAL]\ncase hi.mk.mk.node\nn : ℕ\nih : ∀ (m : ℕ), m ≤ n → card (treesOfNumNodesEq m) = catalan m\ni j : ℕ\na✝¹ : (i, j) ∈ Nat.antidiagonal n\ni' j' : ℕ\na✝ : (i', j') ∈ Nat.antidiagonal n\nh : (i, j) ≠ (i', j')\na : Unit\nl r : Tree Unit\nh1 : node a l r ∈ pairwiseNode (treesOfNumNodesEq (i, j).fst) (treesOfNumNodesEq (i, j).snd)\nh2 : node a l r ∈ pairwiseNode (treesOfNumNodesEq (i', j').fst) (treesOfNumNodesEq (i', j').snd)\n⊢ (i, j) = (i', j')\n[PROOFSTEP]\ntrans (numNodes l, numNodes r)\n[GOAL]\nn : ℕ\nih : ∀ (m : ℕ), m ≤ n → card (treesOfNumNodesEq m) = catalan m\ni j : ℕ\na✝¹ : (i, j) ∈ Nat.antidiagonal n\ni' j' : ℕ\na✝ : (i', j') ∈ Nat.antidiagonal n\nh : (i, j) ≠ (i', j')\na : Unit\nl r : Tree Unit\nh1 : node a l r ∈ pairwiseNode (treesOfNumNodesEq (i, j).fst) (treesOfNumNodesEq (i, j).snd)\nh2 : node a l r ∈ pairwiseNode (treesOfNumNodesEq (i', j').fst) (treesOfNumNodesEq (i', j').snd)\n⊢ (i, j) = (numNodes l, numNodes r)\n[PROOFSTEP]\nsimp at h1 \n[GOAL]\nn : ℕ\nih : ∀ (m : ℕ), m ≤ n → card (treesOfNumNodesEq m) = catalan m\ni j : ℕ\na✝¹ : (i, j) ∈ Nat.antidiagonal n\ni' j' : ℕ\na✝ : (i', j') ∈ Nat.antidiagonal n\nh : (i, j) ≠ (i', j')\na : Unit\nl r : Tree Unit\nh2 : node a l r ∈ pairwiseNode (treesOfNumNodesEq (i', j').fst) (treesOfNumNodesEq (i', j').snd)\nh1 : numNodes l = i ∧ numNodes r = j\n⊢ (i, j) = (numNodes l, numNodes r)\n[PROOFSTEP]\nsimp [h1]\n[GOAL]\nn : ℕ\nih : ∀ (m : ℕ), m ≤ n → card (treesOfNumNodesEq m) = catalan m\ni j : ℕ\na✝¹ : (i, j) ∈ Nat.antidiagonal n\ni' j' : ℕ\na✝ : (i', j') ∈ Nat.antidiagonal n\nh : (i, j) ≠ (i', j')\na : Unit\nl r : Tree Unit\nh1 : node a l r ∈ pairwiseNode (treesOfNumNodesEq (i, j).fst) (treesOfNumNodesEq (i, j).snd)\nh2 : node a l r ∈ pairwiseNode (treesOfNumNodesEq (i', j').fst) (treesOfNumNodesEq (i', j').snd)\n⊢ (numNodes l, numNodes r) = (i', j')\n[PROOFSTEP]\nsimp at h2 \n[GOAL]\nn : ℕ\nih : ∀ (m : ℕ), m ≤ n → card (treesOfNumNodesEq m) = catalan m\ni j : ℕ\na✝¹ : (i, j) ∈ Nat.antidiagonal n\ni' j' : ℕ\na✝ : (i', j') ∈ Nat.antidiagonal n\nh : (i, j) ≠ (i', j')\na : Unit\nl r : Tree Unit\nh1 : node a l r ∈ pairwiseNode (treesOfNumNodesEq (i, j).fst) (treesOfNumNodesEq (i, j).snd)\nh2 : numNodes l = i' ∧ numNodes r = j'\n⊢ (numNodes l, numNodes r) = (i', j')\n[PROOFSTEP]\nsimp [h2]\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.Catalan", "llama_tokens": 17049, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8652240825770432, "lm_q2_score": 0.6548947155710234, "lm_q1q2_score": 0.5666306794644924}} {"text": "[GOAL]\nm n k : ℕ\n⊢ gcd m (n + k * m) = gcd m n\n[PROOFSTEP]\nsimp [gcd_rec m (n + k * m), gcd_rec m n]\n[GOAL]\nm n k : ℕ\n⊢ gcd m (n + m * k) = gcd m n\n[PROOFSTEP]\nsimp [gcd_rec m (n + m * k), gcd_rec m n]\n[GOAL]\nm n k : ℕ\n⊢ gcd m (k * m + n) = gcd m n\n[PROOFSTEP]\nsimp [add_comm _ n]\n[GOAL]\nm n k : ℕ\n⊢ gcd m (m * k + n) = gcd m n\n[PROOFSTEP]\nsimp [add_comm _ n]\n[GOAL]\nm n k : ℕ\n⊢ gcd (m + k * n) n = gcd m n\n[PROOFSTEP]\nrw [gcd_comm, gcd_add_mul_right_right, gcd_comm]\n[GOAL]\nm n k : ℕ\n⊢ gcd (m + n * k) n = gcd m n\n[PROOFSTEP]\nrw [gcd_comm, gcd_add_mul_left_right, gcd_comm]\n[GOAL]\nm n k : ℕ\n⊢ gcd (k * n + m) n = gcd m n\n[PROOFSTEP]\nrw [gcd_comm, gcd_mul_right_add_right, gcd_comm]\n[GOAL]\nm n k : ℕ\n⊢ gcd (n * k + m) n = gcd m n\n[PROOFSTEP]\nrw [gcd_comm, gcd_mul_left_add_right, gcd_comm]\n[GOAL]\nm n : ℕ\n⊢ gcd m (n + m) = gcd m (n + 1 * m)\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\nm n : ℕ\n⊢ gcd (m + n) n = gcd m n\n[PROOFSTEP]\nrw [gcd_comm, gcd_add_self_right, gcd_comm]\n[GOAL]\nm n : ℕ\n⊢ gcd (m + n) m = gcd n m\n[PROOFSTEP]\nrw [add_comm, gcd_add_self_left]\n[GOAL]\nm n : ℕ\n⊢ gcd m (m + n) = gcd m n\n[PROOFSTEP]\nrw [add_comm, gcd_add_self_right]\n[GOAL]\nm n : ℕ\n⊢ 0 < m → 0 < n → 0 < lcm m n\n[PROOFSTEP]\nsimp_rw [pos_iff_ne_zero]\n[GOAL]\nm n : ℕ\n⊢ m ≠ 0 → n ≠ 0 → lcm m n ≠ 0\n[PROOFSTEP]\nexact lcm_ne_zero\n[GOAL]\nm n : ℕ\nh : coprime m n\n⊢ lcm m n = m * n\n[PROOFSTEP]\nrw [← one_mul (lcm m n), ← h.gcd_eq_one, gcd_mul_lcm]\n[GOAL]\nm n : ℕ\n⊢ coprime m (n + m) ↔ coprime m n\n[PROOFSTEP]\nrw [coprime, coprime, gcd_add_self_right]\n[GOAL]\nm n : ℕ\n⊢ coprime m (m + n) ↔ coprime m n\n[PROOFSTEP]\nrw [add_comm, coprime_add_self_right]\n[GOAL]\nm n : ℕ\n⊢ coprime (m + n) n ↔ coprime m n\n[PROOFSTEP]\nrw [coprime, coprime, gcd_add_self_left]\n[GOAL]\nm n : ℕ\n⊢ coprime (m + n) m ↔ coprime n m\n[PROOFSTEP]\nrw [coprime, coprime, gcd_self_add_left]\n[GOAL]\nm n k : ℕ\n⊢ coprime m (n + k * m) ↔ coprime m n\n[PROOFSTEP]\nrw [coprime, coprime, gcd_add_mul_right_right]\n[GOAL]\nm n k : ℕ\n⊢ coprime m (n + m * k) ↔ coprime m n\n[PROOFSTEP]\nrw [coprime, coprime, gcd_add_mul_left_right]\n[GOAL]\nm n k : ℕ\n⊢ coprime m (k * m + n) ↔ coprime m n\n[PROOFSTEP]\nrw [coprime, coprime, gcd_mul_right_add_right]\n[GOAL]\nm n k : ℕ\n⊢ coprime m (m * k + n) ↔ coprime m n\n[PROOFSTEP]\nrw [coprime, coprime, gcd_mul_left_add_right]\n[GOAL]\nm n k : ℕ\n⊢ coprime (m + k * n) n ↔ coprime m n\n[PROOFSTEP]\nrw [coprime, coprime, gcd_add_mul_right_left]\n[GOAL]\nm n k : ℕ\n⊢ coprime (m + n * k) n ↔ coprime m n\n[PROOFSTEP]\nrw [coprime, coprime, gcd_add_mul_left_left]\n[GOAL]\nm n k : ℕ\n⊢ coprime (k * n + m) n ↔ coprime m n\n[PROOFSTEP]\nrw [coprime, coprime, gcd_mul_right_add_left]\n[GOAL]\nm n k : ℕ\n⊢ coprime (n * k + m) n ↔ coprime m n\n[PROOFSTEP]\nrw [coprime, coprime, gcd_mul_left_add_left]\n[GOAL]\nn : ℕ\nhn : 0 < n\na b : ℕ\n⊢ coprime (a ^ n) b ↔ coprime a b\n[PROOFSTEP]\nobtain ⟨n, rfl⟩ := exists_eq_succ_of_ne_zero hn.ne'\n[GOAL]\ncase intro\na b n : ℕ\nhn : 0 < succ n\n⊢ coprime (a ^ succ n) b ↔ coprime a b\n[PROOFSTEP]\nrw [pow_succ, Nat.coprime_mul_iff_left]\n[GOAL]\ncase intro\na b n : ℕ\nhn : 0 < succ n\n⊢ coprime (a ^ n) b ∧ coprime a b ↔ coprime a b\n[PROOFSTEP]\nexact ⟨And.right, fun hab => ⟨hab.pow_left _, hab⟩⟩\n[GOAL]\nn : ℕ\nhn : 0 < n\na b : ℕ\n⊢ coprime a (b ^ n) ↔ coprime a b\n[PROOFSTEP]\nrw [Nat.coprime_comm, coprime_pow_left_iff hn, Nat.coprime_comm]\n[GOAL]\n⊢ ¬coprime 0 0\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ coprime 1 n ↔ True\n[PROOFSTEP]\nsimp [coprime]\n[GOAL]\nn : ℕ\n⊢ coprime n 1 ↔ True\n[PROOFSTEP]\nsimp [coprime]\n[GOAL]\na b c : ℕ\nhac : coprime a c\nb_dvd_c : b ∣ c\n⊢ gcd (a * b) c = b\n[PROOFSTEP]\nrcases exists_eq_mul_left_of_dvd b_dvd_c with ⟨d, rfl⟩\n[GOAL]\ncase intro\na b d : ℕ\nhac : coprime a (d * b)\nb_dvd_c : b ∣ d * b\n⊢ gcd (a * b) (d * b) = b\n[PROOFSTEP]\nrw [gcd_mul_right]\n[GOAL]\ncase intro\na b d : ℕ\nhac : coprime a (d * b)\nb_dvd_c : b ∣ d * b\n⊢ gcd a d * b = b\n[PROOFSTEP]\nconvert one_mul b\n[GOAL]\ncase h.e'_2.h.e'_5\na b d : ℕ\nhac : coprime a (d * b)\nb_dvd_c : b ∣ d * b\n⊢ gcd a d = 1\n[PROOFSTEP]\nexact coprime.coprime_mul_right_right hac\n[GOAL]\nm n k : ℕ\nH : k ∣ m * n\n⊢ { d // k = ↑d.fst * ↑d.snd }\n[PROOFSTEP]\ncases h0 : gcd k m\n[GOAL]\ncase zero\nm n k : ℕ\nH : k ∣ m * n\nh0 : gcd k m = zero\n⊢ { d // k = ↑d.fst * ↑d.snd }\ncase succ m n k : ℕ H : k ∣ m * n n✝ : ℕ h0 : gcd k m = succ n✝ ⊢ { d // k = ↑d.fst * ↑d.snd }\n[PROOFSTEP]\ncase zero =>\n obtain rfl : k = 0 := eq_zero_of_gcd_eq_zero_left h0\n obtain rfl : m = 0 := eq_zero_of_gcd_eq_zero_right h0\n exact ⟨⟨⟨0, dvd_refl 0⟩, ⟨n, dvd_refl n⟩⟩, (zero_mul n).symm⟩\n[GOAL]\nm n k : ℕ\nH : k ∣ m * n\nh0 : gcd k m = zero\n⊢ { d // k = ↑d.fst * ↑d.snd }\n[PROOFSTEP]\ncase zero =>\n obtain rfl : k = 0 := eq_zero_of_gcd_eq_zero_left h0\n obtain rfl : m = 0 := eq_zero_of_gcd_eq_zero_right h0\n exact ⟨⟨⟨0, dvd_refl 0⟩, ⟨n, dvd_refl n⟩⟩, (zero_mul n).symm⟩\n[GOAL]\nm n k : ℕ\nH : k ∣ m * n\nh0 : gcd k m = zero\n⊢ { d // k = ↑d.fst * ↑d.snd }\n[PROOFSTEP]\nobtain rfl : k = 0 := eq_zero_of_gcd_eq_zero_left h0\n[GOAL]\nm n : ℕ\nH : 0 ∣ m * n\nh0 : gcd 0 m = zero\n⊢ { d // 0 = ↑d.fst * ↑d.snd }\n[PROOFSTEP]\nobtain rfl : m = 0 := eq_zero_of_gcd_eq_zero_right h0\n[GOAL]\nn : ℕ\nH : 0 ∣ 0 * n\nh0 : gcd 0 0 = zero\n⊢ { d // 0 = ↑d.fst * ↑d.snd }\n[PROOFSTEP]\nexact ⟨⟨⟨0, dvd_refl 0⟩, ⟨n, dvd_refl n⟩⟩, (zero_mul n).symm⟩\n[GOAL]\ncase succ\nm n k : ℕ\nH : k ∣ m * n\nn✝ : ℕ\nh0 : gcd k m = succ n✝\n⊢ { d // k = ↑d.fst * ↑d.snd }\n[PROOFSTEP]\ncase succ tmp =>\n have hpos : 0 < gcd k m := h0.symm ▸ Nat.zero_lt_succ _; clear h0 tmp\n have hd : gcd k m * (k / gcd k m) = k := Nat.mul_div_cancel' (gcd_dvd_left k m)\n refine' ⟨⟨⟨gcd k m, gcd_dvd_right k m⟩, ⟨k / gcd k m, _⟩⟩, hd.symm⟩\n apply Nat.dvd_of_mul_dvd_mul_left hpos\n rw [hd, ← gcd_mul_right]\n exact dvd_gcd (dvd_mul_right _ _) H\n[GOAL]\nm n k : ℕ\nH : k ∣ m * n\ntmp : ℕ\nh0 : gcd k m = succ tmp\n⊢ { d // k = ↑d.fst * ↑d.snd }\n[PROOFSTEP]\ncase succ tmp =>\n have hpos : 0 < gcd k m := h0.symm ▸ Nat.zero_lt_succ _; clear h0 tmp\n have hd : gcd k m * (k / gcd k m) = k := Nat.mul_div_cancel' (gcd_dvd_left k m)\n refine' ⟨⟨⟨gcd k m, gcd_dvd_right k m⟩, ⟨k / gcd k m, _⟩⟩, hd.symm⟩\n apply Nat.dvd_of_mul_dvd_mul_left hpos\n rw [hd, ← gcd_mul_right]\n exact dvd_gcd (dvd_mul_right _ _) H\n[GOAL]\nm n k : ℕ\nH : k ∣ m * n\ntmp : ℕ\nh0 : gcd k m = succ tmp\n⊢ { d // k = ↑d.fst * ↑d.snd }\n[PROOFSTEP]\nhave hpos : 0 < gcd k m := h0.symm ▸ Nat.zero_lt_succ _\n[GOAL]\nm n k : ℕ\nH : k ∣ m * n\ntmp : ℕ\nh0 : gcd k m = succ tmp\nhpos : 0 < gcd k m\n⊢ { d // k = ↑d.fst * ↑d.snd }\n[PROOFSTEP]\nclear h0 tmp\n[GOAL]\nm n k : ℕ\nH : k ∣ m * n\nhpos : 0 < gcd k m\n⊢ { d // k = ↑d.fst * ↑d.snd }\n[PROOFSTEP]\nhave hd : gcd k m * (k / gcd k m) = k := Nat.mul_div_cancel' (gcd_dvd_left k m)\n[GOAL]\nm n k : ℕ\nH : k ∣ m * n\nhpos : 0 < gcd k m\nhd : gcd k m * (k / gcd k m) = k\n⊢ { d // k = ↑d.fst * ↑d.snd }\n[PROOFSTEP]\nrefine' ⟨⟨⟨gcd k m, gcd_dvd_right k m⟩, ⟨k / gcd k m, _⟩⟩, hd.symm⟩\n[GOAL]\nm n k : ℕ\nH : k ∣ m * n\nhpos : 0 < gcd k m\nhd : gcd k m * (k / gcd k m) = k\n⊢ k / gcd k m ∣ n\n[PROOFSTEP]\napply Nat.dvd_of_mul_dvd_mul_left hpos\n[GOAL]\nm n k : ℕ\nH : k ∣ m * n\nhpos : 0 < gcd k m\nhd : gcd k m * (k / gcd k m) = k\n⊢ gcd k m * (k / gcd k m) ∣ gcd k m * n\n[PROOFSTEP]\nrw [hd, ← gcd_mul_right]\n[GOAL]\nm n k : ℕ\nH : k ∣ m * n\nhpos : 0 < gcd k m\nhd : gcd k m * (k / gcd k m) = k\n⊢ k ∣ gcd (k * n) (m * n)\n[PROOFSTEP]\nexact dvd_gcd (dvd_mul_right _ _) H\n[GOAL]\nx m n : ℕ\n⊢ x ∣ m * n ↔ ∃ y z, y ∣ m ∧ z ∣ n ∧ y * z = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nx m n : ℕ\n⊢ x ∣ m * n → ∃ y z, y ∣ m ∧ z ∣ n ∧ y * z = x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nx m n : ℕ\nh : x ∣ m * n\n⊢ ∃ y z, y ∣ m ∧ z ∣ n ∧ y * z = x\n[PROOFSTEP]\nobtain ⟨⟨⟨y, hy⟩, ⟨z, hz⟩⟩, rfl⟩ := prod_dvd_and_dvd_of_dvd_prod h\n[GOAL]\ncase mp.mk.mk.mk.mk\nm n y : ℕ\nhy : y ∣ m\nz : ℕ\nhz : z ∣ n\nh :\n ↑({ val := y, property := hy }, { val := z, property := hz }).fst *\n ↑({ val := y, property := hy }, { val := z, property := hz }).snd ∣\n m * n\n⊢ ∃ y_1 z_1,\n y_1 ∣ m ∧\n z_1 ∣ n ∧\n y_1 * z_1 =\n ↑({ val := y, property := hy }, { val := z, property := hz }).fst *\n ↑({ val := y, property := hy }, { val := z, property := hz }).snd\n[PROOFSTEP]\nexact ⟨y, z, hy, hz, rfl⟩\n[GOAL]\ncase mpr\nx m n : ℕ\n⊢ (∃ y z, y ∣ m ∧ z ∣ n ∧ y * z = x) → x ∣ m * n\n[PROOFSTEP]\nrintro ⟨y, z, hy, hz, rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nm n y z : ℕ\nhy : y ∣ m\nhz : z ∣ n\n⊢ y * z ∣ m * n\n[PROOFSTEP]\nexact mul_dvd_mul hy hz\n[GOAL]\na b n : ℕ\nn0 : 0 < n\n⊢ a ^ n ∣ b ^ n ↔ a ∣ b\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => pow_dvd_pow_of_dvd h _⟩\n[GOAL]\na b n : ℕ\nn0 : 0 < n\nh : a ^ n ∣ b ^ n\n⊢ a ∣ b\n[PROOFSTEP]\ncases' Nat.eq_zero_or_pos (gcd a b) with g0 g0\n[GOAL]\ncase inl\na b n : ℕ\nn0 : 0 < n\nh : a ^ n ∣ b ^ n\ng0 : gcd a b = 0\n⊢ a ∣ b\n[PROOFSTEP]\nsimp [eq_zero_of_gcd_eq_zero_right g0]\n[GOAL]\ncase inr\na b n : ℕ\nn0 : 0 < n\nh : a ^ n ∣ b ^ n\ng0 : gcd a b > 0\n⊢ a ∣ b\n[PROOFSTEP]\nrcases exists_coprime' g0 with ⟨g, a', b', g0', co, rfl, rfl⟩\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro\nn : ℕ\nn0 : 0 < n\ng : ℕ\na' b' : ℕ\ng0' : 0 < g\nco : coprime a' b'\nh : (a' * g) ^ n ∣ (b' * g) ^ n\ng0 : gcd (a' * g) (b' * g) > 0\n⊢ a' * g ∣ b' * g\n[PROOFSTEP]\nrw [mul_pow, mul_pow] at h \n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro\nn : ℕ\nn0 : 0 < n\ng : ℕ\na' b' : ℕ\ng0' : 0 < g\nco : coprime a' b'\nh : a' ^ n * g ^ n ∣ b' ^ n * g ^ n\ng0 : gcd (a' * g) (b' * g) > 0\n⊢ a' * g ∣ b' * g\n[PROOFSTEP]\nreplace h := Nat.dvd_of_mul_dvd_mul_right (pow_pos g0' _) h\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro\nn : ℕ\nn0 : 0 < n\ng : ℕ\na' b' : ℕ\ng0' : 0 < g\nco : coprime a' b'\ng0 : gcd (a' * g) (b' * g) > 0\nh : a' ^ n ∣ b' ^ n\n⊢ a' * g ∣ b' * g\n[PROOFSTEP]\nhave := pow_dvd_pow a' n0\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro\nn : ℕ\nn0 : 0 < n\ng : ℕ\na' b' : ℕ\ng0' : 0 < g\nco : coprime a' b'\ng0 : gcd (a' * g) (b' * g) > 0\nh : a' ^ n ∣ b' ^ n\nthis : a' ^ succ 0 ∣ a' ^ n\n⊢ a' * g ∣ b' * g\n[PROOFSTEP]\nrw [pow_one, (co.pow n n).eq_one_of_dvd h] at this \n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro\nn : ℕ\nn0 : 0 < n\ng : ℕ\na' b' : ℕ\ng0' : 0 < g\nco : coprime a' b'\ng0 : gcd (a' * g) (b' * g) > 0\nh : a' ^ n ∣ b' ^ n\nthis : a' ∣ 1\n⊢ a' * g ∣ b' * g\n[PROOFSTEP]\nsimp [eq_one_of_dvd_one this]\n[GOAL]\na b k : ℕ\nh_ab_coprime : coprime a b\nhka : k ∣ a\nhkb : k ∣ b\n⊢ k = 1\n[PROOFSTEP]\nrw [coprime_iff_gcd_eq_one] at h_ab_coprime \n[GOAL]\na b k : ℕ\nh_ab_coprime : gcd a b = 1\nhka : k ∣ a\nhkb : k ∣ b\n⊢ k = 1\n[PROOFSTEP]\nhave h1 := dvd_gcd hka hkb\n[GOAL]\na b k : ℕ\nh_ab_coprime : gcd a b = 1\nhka : k ∣ a\nhkb : k ∣ b\nh1 : k ∣ gcd a b\n⊢ k = 1\n[PROOFSTEP]\nrw [h_ab_coprime] at h1 \n[GOAL]\na b k : ℕ\nh_ab_coprime : gcd a b = 1\nhka : k ∣ a\nhkb : k ∣ b\nh1 : k ∣ 1\n⊢ k = 1\n[PROOFSTEP]\nexact Nat.dvd_one.mp h1\n[GOAL]\nm n a b : ℕ\ncop : coprime m n\nha : a ≠ 0\nhb : b ≠ 0\n⊢ a * m + b * n ≠ m * n\n[PROOFSTEP]\nintro h\n[GOAL]\nm n a b : ℕ\ncop : coprime m n\nha : a ≠ 0\nhb : b ≠ 0\nh : a * m + b * n = m * n\n⊢ False\n[PROOFSTEP]\nobtain ⟨x, rfl⟩ : n ∣ a :=\n cop.symm.dvd_of_dvd_mul_right\n ((Nat.dvd_add_iff_left (Nat.dvd_mul_left n b)).mpr ((congr_arg _ h).mpr (Nat.dvd_mul_left n m)))\n[GOAL]\ncase intro\nm n b : ℕ\ncop : coprime m n\nhb : b ≠ 0\nx : ℕ\nha : n * x ≠ 0\nh : n * x * m + b * n = m * n\n⊢ False\n[PROOFSTEP]\nobtain ⟨y, rfl⟩ : m ∣ b :=\n cop.dvd_of_dvd_mul_right\n ((Nat.dvd_add_iff_right (Nat.dvd_mul_left m (n * x))).mpr ((congr_arg _ h).mpr (Nat.dvd_mul_right m n)))\n[GOAL]\ncase intro.intro\nm n : ℕ\ncop : coprime m n\nx : ℕ\nha : n * x ≠ 0\ny : ℕ\nhb : m * y ≠ 0\nh : n * x * m + m * y * n = m * n\n⊢ False\n[PROOFSTEP]\nrw [mul_comm, mul_ne_zero_iff, ← one_le_iff_ne_zero] at ha hb \n[GOAL]\ncase intro.intro\nm n : ℕ\ncop : coprime m n\nx : ℕ\nha : 1 ≤ x ∧ n ≠ 0\ny : ℕ\nhb : 1 ≤ y ∧ m ≠ 0\nh : n * x * m + m * y * n = m * n\n⊢ False\n[PROOFSTEP]\nrefine' mul_ne_zero hb.2 ha.2 (eq_zero_of_mul_eq_self_left (ne_of_gt (add_le_add ha.1 hb.1)) _)\n[GOAL]\ncase intro.intro\nm n : ℕ\ncop : coprime m n\nx : ℕ\nha : 1 ≤ x ∧ n ≠ 0\ny : ℕ\nhb : 1 ≤ y ∧ m ≠ 0\nh : n * x * m + m * y * n = m * n\n⊢ (x + y) * (m * n) = m * n\n[PROOFSTEP]\nrw [← mul_assoc, ← h, add_mul, add_mul, mul_comm _ n, ← mul_assoc, mul_comm y]\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.GCD.Basic", "llama_tokens": 6789, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8175744761936437, "lm_q2_score": 0.6926419831347361, "lm_q1q2_score": 0.5662864065511084}} {"text": "[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\nr : R\n⊢ ↑(ι (Q' Q)) (m, r) = ↑(v Q) m + r • e0 Q\n[PROOFSTEP]\nrw [e0, v, LinearMap.comp_apply, LinearMap.inl_apply, ← LinearMap.map_smul, Prod.smul_mk, smul_zero, smul_eq_mul,\n mul_one, ← LinearMap.map_add, Prod.mk_add_mk, zero_add, add_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\n⊢ ↑(algebraMap R (CliffordAlgebra (Q' Q))) (↑(Q' Q) (0, 1)) = -1\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑(algebraMap R (CliffordAlgebra (Q' Q))) (↑(Q' Q) (↑(LinearMap.inl R M R) m)) =\n ↑(algebraMap R (CliffordAlgebra (Q' Q))) (↑Q m)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ -(e0 Q * ↑(v Q) m) = ↑(v Q) m * e0 Q\n[PROOFSTEP]\nrefine' neg_eq_of_add_eq_zero_right ((ι_mul_ι_add_swap _ _).trans _)\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑(algebraMap R (CliffordAlgebra (Q' Q))) (QuadraticForm.polar ↑(Q' Q) (0, 1) (↑(LinearMap.inl R M R) m)) = 0\n[PROOFSTEP]\ndsimp [QuadraticForm.polar]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑(algebraMap R (CliffordAlgebra (Q' Q))) (↑Q (0 + m) + -((1 + 0) * (1 + 0)) - (↑Q 0 + -(1 * 1)) - (↑Q m + -(0 * 0))) =\n 0\n[PROOFSTEP]\nsimp only [add_zero, mul_zero, mul_one, zero_add, neg_zero, QuadraticForm.map_zero, add_sub_cancel, sub_self, map_zero,\n zero_sub]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ -(↑(v Q) m * e0 Q) = e0 Q * ↑(v Q) m\n[PROOFSTEP]\nrw [neg_eq_iff_eq_neg]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑(v Q) m * e0 Q = -(e0 Q * ↑(v Q) m)\n[PROOFSTEP]\nexact (neg_e0_mul_v _ m).symm\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ e0 Q * ↑(v Q) m * e0 Q = ↑(v Q) m\n[PROOFSTEP]\nrw [← neg_v_mul_e0, ← neg_mul, mul_assoc, e0_mul_e0, mul_neg_one, neg_neg]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\n⊢ CliffordAlgebra Q →ₐ[R] { x // x ∈ even (Q' Q) }\n[PROOFSTEP]\nrefine' CliffordAlgebra.lift Q ⟨_, fun m => _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\n⊢ M →ₗ[R] { x // x ∈ even (Q' Q) }\n[PROOFSTEP]\nrefine' LinearMap.codRestrict _ _ fun m => Submodule.mem_iSup_of_mem ⟨2, rfl⟩ _\n[GOAL]\ncase refine'_1.refine'_1\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\n⊢ M →ₗ[R] CliffordAlgebra (Q' Q)\ncase refine'_1.refine'_2\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑?refine'_1.refine'_1 m ∈ LinearMap.range (ι (Q' Q)) ^ ↑{ val := 2, property := (_ : ↑2 = ↑2) }\n[PROOFSTEP]\nexact (LinearMap.mulLeft R <| e0 Q).comp (v Q)\n[GOAL]\ncase refine'_1.refine'_2\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑(LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q)) m ∈\n LinearMap.range (ι (Q' Q)) ^ ↑{ val := 2, property := (_ : ↑2 = ↑2) }\n[PROOFSTEP]\nrw [Subtype.coe_mk, pow_two]\n[GOAL]\ncase refine'_1.refine'_2\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑(LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q)) m ∈ LinearMap.range (ι (Q' Q)) * LinearMap.range (ι (Q' Q))\n[PROOFSTEP]\nexact Submodule.mul_mem_mul (LinearMap.mem_range_self _ _) (LinearMap.mem_range_self _ _)\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑(LinearMap.codRestrict (⨆ (i : { n // ↑n = 0 }), LinearMap.range (ι (Q' Q)) ^ ↑i)\n (LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q))\n (_ :\n ∀ (m : M),\n ↑(LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q)) m ∈\n ⨆ (i : { n // ↑n = 0 }), LinearMap.range (ι (Q' Q)) ^ ↑i))\n m *\n ↑(LinearMap.codRestrict (⨆ (i : { n // ↑n = 0 }), LinearMap.range (ι (Q' Q)) ^ ↑i)\n (LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q))\n (_ :\n ∀ (m : M),\n ↑(LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q)) m ∈\n ⨆ (i : { n // ↑n = 0 }), LinearMap.range (ι (Q' Q)) ^ ↑i))\n m =\n ↑(algebraMap R { x // x ∈ even (Q' Q) }) (↑Q m)\n[PROOFSTEP]\next1\n[GOAL]\ncase refine'_2.a\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑(↑(LinearMap.codRestrict (⨆ (i : { n // ↑n = 0 }), LinearMap.range (ι (Q' Q)) ^ ↑i)\n (LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q))\n (_ :\n ∀ (m : M),\n ↑(LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q)) m ∈\n ⨆ (i : { n // ↑n = 0 }), LinearMap.range (ι (Q' Q)) ^ ↑i))\n m *\n ↑(LinearMap.codRestrict (⨆ (i : { n // ↑n = 0 }), LinearMap.range (ι (Q' Q)) ^ ↑i)\n (LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q))\n (_ :\n ∀ (m : M),\n ↑(LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q)) m ∈\n ⨆ (i : { n // ↑n = 0 }), LinearMap.range (ι (Q' Q)) ^ ↑i))\n m) =\n ↑(↑(algebraMap R { x // x ∈ even (Q' Q) }) (↑Q m))\n[PROOFSTEP]\nrw [Subalgebra.coe_mul]\n -- porting note: was part of the `dsimp only` below\n[GOAL]\ncase refine'_2.a\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑(↑(LinearMap.codRestrict (⨆ (i : { n // ↑n = 0 }), LinearMap.range (ι (Q' Q)) ^ ↑i)\n (LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q))\n (_ :\n ∀ (m : M),\n ↑(LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q)) m ∈\n ⨆ (i : { n // ↑n = 0 }), LinearMap.range (ι (Q' Q)) ^ ↑i))\n m) *\n ↑(↑(LinearMap.codRestrict (⨆ (i : { n // ↑n = 0 }), LinearMap.range (ι (Q' Q)) ^ ↑i)\n (LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q))\n (_ :\n ∀ (m : M),\n ↑(LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q)) m ∈\n ⨆ (i : { n // ↑n = 0 }), LinearMap.range (ι (Q' Q)) ^ ↑i))\n m) =\n ↑(↑(algebraMap R { x // x ∈ even (Q' Q) }) (↑Q m))\n[PROOFSTEP]\nerw [LinearMap.codRestrict_apply]\n -- porting note: was part of the `dsimp only` below\n[GOAL]\ncase refine'_2.a\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑(LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q)) m * ↑(LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q)) m =\n ↑(↑(algebraMap R { x // x ∈ even (Q' Q) }) (↑Q m))\n[PROOFSTEP]\ndsimp only [LinearMap.comp_apply, LinearMap.mulLeft_apply, Subalgebra.coe_algebraMap]\n[GOAL]\ncase refine'_2.a\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ e0 Q * ↑(v Q) m * (e0 Q * ↑(v Q) m) = ↑(algebraMap R (CliffordAlgebra (Q' Q))) (↑Q m)\n[PROOFSTEP]\nrw [← mul_assoc, e0_mul_v_mul_e0, v_sq_scalar]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑(↑(toEven Q) (↑(ι Q) m)) = e0 Q * ↑(v Q) m\n[PROOFSTEP]\nrw [toEven, CliffordAlgebra.lift_ι_apply]\n -- porting note: was `rw`\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑(↑(LinearMap.codRestrict (⨆ (i : { n // ↑n = 0 }), LinearMap.range (ι (Q' Q)) ^ ↑i)\n (LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q))\n (_ :\n ∀ (m : M),\n ↑(LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q)) m ∈\n ⨆ (i : { n // ↑n = 0 }), LinearMap.range (ι (Q' Q)) ^ ↑i))\n m) =\n e0 Q * ↑(v Q) m\n[PROOFSTEP]\nerw [LinearMap.codRestrict_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑(LinearMap.comp (LinearMap.mulLeft R (e0 Q)) (v Q)) m = e0 Q * ↑(v Q) m\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\n⊢ { x // x ∈ even (Q' Q) } →ₐ[R] CliffordAlgebra Q\n[PROOFSTEP]\nlet f : M × R →ₗ[R] M × R →ₗ[R] CliffordAlgebra Q :=\n ((Algebra.lmul R (CliffordAlgebra Q)).toLinearMap.comp <|\n (ι Q).comp (LinearMap.fst _ _ _) + (Algebra.linearMap R _).comp (LinearMap.snd _ _ _)).compl₂\n ((ι Q).comp (LinearMap.fst _ _ _) - (Algebra.linearMap R _).comp (LinearMap.snd _ _ _))\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nf : M × R →ₗ[R] M × R →ₗ[R] CliffordAlgebra Q :=\n LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R))\n⊢ { x // x ∈ even (Q' Q) } →ₐ[R] CliffordAlgebra Q\n[PROOFSTEP]\nhaveI f_apply : ∀ x y, f x y = (ι Q x.1 + algebraMap R _ x.2) * (ι Q y.1 - algebraMap R _ y.2) := fun x y => by rfl\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nf : M × R →ₗ[R] M × R →ₗ[R] CliffordAlgebra Q :=\n LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R))\nx y : M × R\n⊢ ↑(↑f x) y =\n (↑(ι Q) x.fst + ↑(algebraMap R (CliffordAlgebra Q)) x.snd) *\n (↑(ι Q) y.fst - ↑(algebraMap R (CliffordAlgebra Q)) y.snd)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nf : M × R →ₗ[R] M × R →ₗ[R] CliffordAlgebra Q :=\n LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R))\nf_apply :\n ∀ (x y : M × R),\n ↑(↑f x) y =\n (↑(ι Q) x.fst + ↑(algebraMap R (CliffordAlgebra Q)) x.snd) *\n (↑(ι Q) y.fst - ↑(algebraMap R (CliffordAlgebra Q)) y.snd)\n⊢ { x // x ∈ even (Q' Q) } →ₐ[R] CliffordAlgebra Q\n[PROOFSTEP]\nhaveI hc : ∀ (r : R) (x : CliffordAlgebra Q), Commute (algebraMap _ _ r) x := Algebra.commutes\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nf : M × R →ₗ[R] M × R →ₗ[R] CliffordAlgebra Q :=\n LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R))\nf_apply :\n ∀ (x y : M × R),\n ↑(↑f x) y =\n (↑(ι Q) x.fst + ↑(algebraMap R (CliffordAlgebra Q)) x.snd) *\n (↑(ι Q) y.fst - ↑(algebraMap R (CliffordAlgebra Q)) y.snd)\nhc : ∀ (r : R) (x : CliffordAlgebra Q), Commute (↑(algebraMap R (CliffordAlgebra Q)) r) x\n⊢ { x // x ∈ even (Q' Q) } →ₐ[R] CliffordAlgebra Q\n[PROOFSTEP]\nhaveI hm : ∀ m : M × R, ι Q m.1 * ι Q m.1 - algebraMap R _ m.2 * algebraMap R _ m.2 = algebraMap R _ (Q' Q m) :=\n by\n intro m\n rw [ι_sq_scalar, ← RingHom.map_mul, ← RingHom.map_sub, sub_eq_add_neg, Q'_apply, sub_eq_add_neg]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nf : M × R →ₗ[R] M × R →ₗ[R] CliffordAlgebra Q :=\n LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R))\nf_apply :\n ∀ (x y : M × R),\n ↑(↑f x) y =\n (↑(ι Q) x.fst + ↑(algebraMap R (CliffordAlgebra Q)) x.snd) *\n (↑(ι Q) y.fst - ↑(algebraMap R (CliffordAlgebra Q)) y.snd)\nhc : ∀ (r : R) (x : CliffordAlgebra Q), Commute (↑(algebraMap R (CliffordAlgebra Q)) r) x\n⊢ ∀ (m : M × R),\n ↑(ι Q) m.fst * ↑(ι Q) m.fst -\n ↑(algebraMap R (CliffordAlgebra Q)) m.snd * ↑(algebraMap R (CliffordAlgebra Q)) m.snd =\n ↑(algebraMap R (CliffordAlgebra Q)) (↑(Q' Q) m)\n[PROOFSTEP]\nintro m\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nf : M × R →ₗ[R] M × R →ₗ[R] CliffordAlgebra Q :=\n LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R))\nf_apply :\n ∀ (x y : M × R),\n ↑(↑f x) y =\n (↑(ι Q) x.fst + ↑(algebraMap R (CliffordAlgebra Q)) x.snd) *\n (↑(ι Q) y.fst - ↑(algebraMap R (CliffordAlgebra Q)) y.snd)\nhc : ∀ (r : R) (x : CliffordAlgebra Q), Commute (↑(algebraMap R (CliffordAlgebra Q)) r) x\nm : M × R\n⊢ ↑(ι Q) m.fst * ↑(ι Q) m.fst - ↑(algebraMap R (CliffordAlgebra Q)) m.snd * ↑(algebraMap R (CliffordAlgebra Q)) m.snd =\n ↑(algebraMap R (CliffordAlgebra Q)) (↑(Q' Q) m)\n[PROOFSTEP]\nrw [ι_sq_scalar, ← RingHom.map_mul, ← RingHom.map_sub, sub_eq_add_neg, Q'_apply, sub_eq_add_neg]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nf : M × R →ₗ[R] M × R →ₗ[R] CliffordAlgebra Q :=\n LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R))\nf_apply :\n ∀ (x y : M × R),\n ↑(↑f x) y =\n (↑(ι Q) x.fst + ↑(algebraMap R (CliffordAlgebra Q)) x.snd) *\n (↑(ι Q) y.fst - ↑(algebraMap R (CliffordAlgebra Q)) y.snd)\nhc : ∀ (r : R) (x : CliffordAlgebra Q), Commute (↑(algebraMap R (CliffordAlgebra Q)) r) x\nhm :\n ∀ (m : M × R),\n ↑(ι Q) m.fst * ↑(ι Q) m.fst -\n ↑(algebraMap R (CliffordAlgebra Q)) m.snd * ↑(algebraMap R (CliffordAlgebra Q)) m.snd =\n ↑(algebraMap R (CliffordAlgebra Q)) (↑(Q' Q) m)\n⊢ { x // x ∈ even (Q' Q) } →ₐ[R] CliffordAlgebra Q\n[PROOFSTEP]\nrefine' even.lift (Q' Q) ⟨f, _, _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nf : M × R →ₗ[R] M × R →ₗ[R] CliffordAlgebra Q :=\n LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R))\nf_apply :\n ∀ (x y : M × R),\n ↑(↑f x) y =\n (↑(ι Q) x.fst + ↑(algebraMap R (CliffordAlgebra Q)) x.snd) *\n (↑(ι Q) y.fst - ↑(algebraMap R (CliffordAlgebra Q)) y.snd)\nhc : ∀ (r : R) (x : CliffordAlgebra Q), Commute (↑(algebraMap R (CliffordAlgebra Q)) r) x\nhm :\n ∀ (m : M × R),\n ↑(ι Q) m.fst * ↑(ι Q) m.fst -\n ↑(algebraMap R (CliffordAlgebra Q)) m.snd * ↑(algebraMap R (CliffordAlgebra Q)) m.snd =\n ↑(algebraMap R (CliffordAlgebra Q)) (↑(Q' Q) m)\n⊢ ∀ (m : M × R), ↑(↑f m) m = ↑(algebraMap R (CliffordAlgebra Q)) (↑(Q' Q) m)\n[PROOFSTEP]\nsimp_rw [f_apply]\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nf : M × R →ₗ[R] M × R →ₗ[R] CliffordAlgebra Q :=\n LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R))\nf_apply :\n ∀ (x y : M × R),\n ↑(↑f x) y =\n (↑(ι Q) x.fst + ↑(algebraMap R (CliffordAlgebra Q)) x.snd) *\n (↑(ι Q) y.fst - ↑(algebraMap R (CliffordAlgebra Q)) y.snd)\nhc : ∀ (r : R) (x : CliffordAlgebra Q), Commute (↑(algebraMap R (CliffordAlgebra Q)) r) x\nhm :\n ∀ (m : M × R),\n ↑(ι Q) m.fst * ↑(ι Q) m.fst -\n ↑(algebraMap R (CliffordAlgebra Q)) m.snd * ↑(algebraMap R (CliffordAlgebra Q)) m.snd =\n ↑(algebraMap R (CliffordAlgebra Q)) (↑(Q' Q) m)\n⊢ ∀ (m₁ m₂ m₃ : M × R), ↑(↑f m₁) m₂ * ↑(↑f m₂) m₃ = ↑(Q' Q) m₂ • ↑(↑f m₁) m₃\n[PROOFSTEP]\nsimp_rw [f_apply]\n[GOAL]\ncase refine'_1\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nf : M × R →ₗ[R] M × R →ₗ[R] CliffordAlgebra Q :=\n LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R))\nf_apply :\n ∀ (x y : M × R),\n ↑(↑f x) y =\n (↑(ι Q) x.fst + ↑(algebraMap R (CliffordAlgebra Q)) x.snd) *\n (↑(ι Q) y.fst - ↑(algebraMap R (CliffordAlgebra Q)) y.snd)\nhc : ∀ (r : R) (x : CliffordAlgebra Q), Commute (↑(algebraMap R (CliffordAlgebra Q)) r) x\nhm :\n ∀ (m : M × R),\n ↑(ι Q) m.fst * ↑(ι Q) m.fst -\n ↑(algebraMap R (CliffordAlgebra Q)) m.snd * ↑(algebraMap R (CliffordAlgebra Q)) m.snd =\n ↑(algebraMap R (CliffordAlgebra Q)) (↑(Q' Q) m)\n⊢ ∀ (m : M × R),\n (↑(ι Q) m.fst + ↑(algebraMap R (CliffordAlgebra Q)) m.snd) *\n (↑(ι Q) m.fst - ↑(algebraMap R (CliffordAlgebra Q)) m.snd) =\n ↑(algebraMap R (CliffordAlgebra Q)) (↑(Q' Q) m)\n[PROOFSTEP]\nintro m\n[GOAL]\ncase refine'_1\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nf : M × R →ₗ[R] M × R →ₗ[R] CliffordAlgebra Q :=\n LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R))\nf_apply :\n ∀ (x y : M × R),\n ↑(↑f x) y =\n (↑(ι Q) x.fst + ↑(algebraMap R (CliffordAlgebra Q)) x.snd) *\n (↑(ι Q) y.fst - ↑(algebraMap R (CliffordAlgebra Q)) y.snd)\nhc : ∀ (r : R) (x : CliffordAlgebra Q), Commute (↑(algebraMap R (CliffordAlgebra Q)) r) x\nhm :\n ∀ (m : M × R),\n ↑(ι Q) m.fst * ↑(ι Q) m.fst -\n ↑(algebraMap R (CliffordAlgebra Q)) m.snd * ↑(algebraMap R (CliffordAlgebra Q)) m.snd =\n ↑(algebraMap R (CliffordAlgebra Q)) (↑(Q' Q) m)\nm : M × R\n⊢ (↑(ι Q) m.fst + ↑(algebraMap R (CliffordAlgebra Q)) m.snd) *\n (↑(ι Q) m.fst - ↑(algebraMap R (CliffordAlgebra Q)) m.snd) =\n ↑(algebraMap R (CliffordAlgebra Q)) (↑(Q' Q) m)\n[PROOFSTEP]\nrw [← (hc _ _).symm.mul_self_sub_mul_self_eq, hm]\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nf : M × R →ₗ[R] M × R →ₗ[R] CliffordAlgebra Q :=\n LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R))\nf_apply :\n ∀ (x y : M × R),\n ↑(↑f x) y =\n (↑(ι Q) x.fst + ↑(algebraMap R (CliffordAlgebra Q)) x.snd) *\n (↑(ι Q) y.fst - ↑(algebraMap R (CliffordAlgebra Q)) y.snd)\nhc : ∀ (r : R) (x : CliffordAlgebra Q), Commute (↑(algebraMap R (CliffordAlgebra Q)) r) x\nhm :\n ∀ (m : M × R),\n ↑(ι Q) m.fst * ↑(ι Q) m.fst -\n ↑(algebraMap R (CliffordAlgebra Q)) m.snd * ↑(algebraMap R (CliffordAlgebra Q)) m.snd =\n ↑(algebraMap R (CliffordAlgebra Q)) (↑(Q' Q) m)\n⊢ ∀ (m₁ m₂ m₃ : M × R),\n (↑(ι Q) m₁.fst + ↑(algebraMap R (CliffordAlgebra Q)) m₁.snd) *\n (↑(ι Q) m₂.fst - ↑(algebraMap R (CliffordAlgebra Q)) m₂.snd) *\n ((↑(ι Q) m₂.fst + ↑(algebraMap R (CliffordAlgebra Q)) m₂.snd) *\n (↑(ι Q) m₃.fst - ↑(algebraMap R (CliffordAlgebra Q)) m₃.snd)) =\n ↑(Q' Q) m₂ •\n ((↑(ι Q) m₁.fst + ↑(algebraMap R (CliffordAlgebra Q)) m₁.snd) *\n (↑(ι Q) m₃.fst - ↑(algebraMap R (CliffordAlgebra Q)) m₃.snd))\n[PROOFSTEP]\nintro m₁ m₂ m₃\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nf : M × R →ₗ[R] M × R →ₗ[R] CliffordAlgebra Q :=\n LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R))\nf_apply :\n ∀ (x y : M × R),\n ↑(↑f x) y =\n (↑(ι Q) x.fst + ↑(algebraMap R (CliffordAlgebra Q)) x.snd) *\n (↑(ι Q) y.fst - ↑(algebraMap R (CliffordAlgebra Q)) y.snd)\nhc : ∀ (r : R) (x : CliffordAlgebra Q), Commute (↑(algebraMap R (CliffordAlgebra Q)) r) x\nhm :\n ∀ (m : M × R),\n ↑(ι Q) m.fst * ↑(ι Q) m.fst -\n ↑(algebraMap R (CliffordAlgebra Q)) m.snd * ↑(algebraMap R (CliffordAlgebra Q)) m.snd =\n ↑(algebraMap R (CliffordAlgebra Q)) (↑(Q' Q) m)\nm₁ m₂ m₃ : M × R\n⊢ (↑(ι Q) m₁.fst + ↑(algebraMap R (CliffordAlgebra Q)) m₁.snd) *\n (↑(ι Q) m₂.fst - ↑(algebraMap R (CliffordAlgebra Q)) m₂.snd) *\n ((↑(ι Q) m₂.fst + ↑(algebraMap R (CliffordAlgebra Q)) m₂.snd) *\n (↑(ι Q) m₃.fst - ↑(algebraMap R (CliffordAlgebra Q)) m₃.snd)) =\n ↑(Q' Q) m₂ •\n ((↑(ι Q) m₁.fst + ↑(algebraMap R (CliffordAlgebra Q)) m₁.snd) *\n (↑(ι Q) m₃.fst - ↑(algebraMap R (CliffordAlgebra Q)) m₃.snd))\n[PROOFSTEP]\nrw [← mul_smul_comm, ← mul_assoc, mul_assoc (_ + _), ← (hc _ _).symm.mul_self_sub_mul_self_eq', Algebra.smul_def, ←\n mul_assoc, hm]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y : M × R\n⊢ ↑(ofEven Q) (↑(↑(even.ι (Q' Q)).bilin x) y) =\n (↑(ι Q) x.fst + ↑(algebraMap R (CliffordAlgebra Q)) x.snd) *\n (↑(ι Q) y.fst - ↑(algebraMap R (CliffordAlgebra Q)) y.snd)\n[PROOFSTEP]\nunfold ofEven\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y : M × R\n⊢ ↑(let f :=\n LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R));\n ↑(even.lift (Q' Q))\n { bilin := f,\n contract :=\n (_ :\n ∀ (m : M × R),\n ↑(↑(LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n m)\n m =\n ↑(algebraMap R (CliffordAlgebra Q)) (↑(Q' Q) m)),\n contract_mid :=\n (_ :\n ∀ (m₁ m₂ m₃ : M × R),\n ↑(↑(LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n m₁)\n m₂ *\n ↑(↑(LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n m₂)\n m₃ =\n ↑(Q' Q) m₂ •\n ↑(↑(LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n m₁)\n m₃) })\n (↑(↑(even.ι (Q' Q)).bilin x) y) =\n (↑(ι Q) x.fst + ↑(algebraMap R (CliffordAlgebra Q)) x.snd) *\n (↑(ι Q) y.fst - ↑(algebraMap R (CliffordAlgebra Q)) y.snd)\n[PROOFSTEP]\nlift_lets\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y : M × R\n⊢ let f :=\n LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R));\n ↑(↑(even.lift (Q' Q))\n { bilin := f,\n contract :=\n (_ :\n ∀ (m : M × R),\n ↑(↑(LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n m)\n m =\n ↑(algebraMap R (CliffordAlgebra Q)) (↑(Q' Q) m)),\n contract_mid :=\n (_ :\n ∀ (m₁ m₂ m₃ : M × R),\n ↑(↑(LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n m₁)\n m₂ *\n ↑(↑(LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n m₂)\n m₃ =\n ↑(Q' Q) m₂ •\n ↑(↑(LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n m₁)\n m₃) })\n (↑(↑(even.ι (Q' Q)).bilin x) y) =\n (↑(ι Q) x.fst + ↑(algebraMap R (CliffordAlgebra Q)) x.snd) *\n (↑(ι Q) y.fst - ↑(algebraMap R (CliffordAlgebra Q)) y.snd)\n[PROOFSTEP]\nintro f\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y : M × R\nf : M × R →ₗ[R] M × R →ₗ[R] CliffordAlgebra Q :=\n LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R))\n⊢ ↑(↑(even.lift (Q' Q))\n { bilin := f,\n contract :=\n (_ :\n ∀ (m : M × R),\n ↑(↑(LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n m)\n m =\n ↑(algebraMap R (CliffordAlgebra Q)) (↑(Q' Q) m)),\n contract_mid :=\n (_ :\n ∀ (m₁ m₂ m₃ : M × R),\n ↑(↑(LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n m₁)\n m₂ *\n ↑(↑(LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n m₂)\n m₃ =\n ↑(Q' Q) m₂ •\n ↑(↑(LinearMap.compl₂\n (LinearMap.comp (AlgHom.toLinearMap (Algebra.lmul R (CliffordAlgebra Q)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) +\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n (LinearMap.comp (ι Q) (LinearMap.fst R M R) -\n LinearMap.comp (Algebra.linearMap R (CliffordAlgebra Q)) (LinearMap.snd R M R)))\n m₁)\n m₃) })\n (↑(↑(even.ι (Q' Q)).bilin x) y) =\n (↑(ι Q) x.fst + ↑(algebraMap R (CliffordAlgebra Q)) x.snd) *\n (↑(ι Q) y.fst - ↑(algebraMap R (CliffordAlgebra Q)) y.snd)\n[PROOFSTEP]\nrefine @even.lift_ι R (M × R) _ _ _ (Q' Q) _ _ _ ⟨f, ?_, ?_⟩ x y\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm₁✝ m₂✝ : M × R\nm₁ : M\nr₁ : R\nm₂ : M\nr₂ : R\n⊢ ↑(↑(toEven Q) (↑(ofEven Q) (↑(↑(even.ι (Q' Q)).bilin (m₁, r₁)) (m₂, r₂)))) =\n (e0 Q * ↑(v Q) m₁ + ↑(algebraMap R (CliffordAlgebra (Q' Q))) r₁) *\n (e0 Q * ↑(v Q) m₂ - ↑(algebraMap R (CliffordAlgebra (Q' Q))) r₂)\n[PROOFSTEP]\nrw [ofEven_ι, AlgHom.map_mul, AlgHom.map_add, AlgHom.map_sub, AlgHom.commutes, AlgHom.commutes, Subalgebra.coe_mul,\n Subalgebra.coe_add, Subalgebra.coe_sub, toEven_ι, toEven_ι, Subalgebra.coe_algebraMap, Subalgebra.coe_algebraMap]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm₁✝ m₂✝ : M × R\nm₁ : M\nr₁ : R\nm₂ : M\nr₂ : R\n⊢ (e0 Q * ↑(v Q) m₁ + ↑(algebraMap R (CliffordAlgebra (Q' Q))) r₁) *\n (e0 Q * ↑(v Q) m₂ - ↑(algebraMap R (CliffordAlgebra (Q' Q))) r₂) =\n e0 Q * ↑(v Q) m₁ * (e0 Q * ↑(v Q) m₂) + r₁ • e0 Q * ↑(v Q) m₂ - r₂ • e0 Q * ↑(v Q) m₁ -\n ↑(algebraMap R (CliffordAlgebra (Q' Q))) (r₁ * r₂)\n[PROOFSTEP]\nrw [mul_sub, add_mul, add_mul, ← Algebra.commutes, ← Algebra.smul_def, ← map_mul, ← Algebra.smul_def,\n sub_add_eq_sub_sub, smul_mul_assoc, smul_mul_assoc]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm₁✝ m₂✝ : M × R\nm₁ : M\nr₁ : R\nm₂ : M\nr₂ : R\n⊢ e0 Q * ↑(v Q) m₁ * (e0 Q * ↑(v Q) m₂) + r₁ • e0 Q * ↑(v Q) m₂ - r₂ • e0 Q * ↑(v Q) m₁ -\n ↑(algebraMap R (CliffordAlgebra (Q' Q))) (r₁ * r₂) =\n ↑(v Q) m₁ * ↑(v Q) m₂ + r₁ • e0 Q * ↑(v Q) m₂ + ↑(v Q) m₁ * r₂ • e0 Q + r₁ • e0 Q * r₂ • e0 Q\n[PROOFSTEP]\nhave h1 : e0 Q * v Q m₁ * (e0 Q * v Q m₂) = v Q m₁ * v Q m₂ := by rw [← mul_assoc, e0_mul_v_mul_e0]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm₁✝ m₂✝ : M × R\nm₁ : M\nr₁ : R\nm₂ : M\nr₂ : R\n⊢ e0 Q * ↑(v Q) m₁ * (e0 Q * ↑(v Q) m₂) = ↑(v Q) m₁ * ↑(v Q) m₂\n[PROOFSTEP]\nrw [← mul_assoc, e0_mul_v_mul_e0]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm₁✝ m₂✝ : M × R\nm₁ : M\nr₁ : R\nm₂ : M\nr₂ : R\nh1 : e0 Q * ↑(v Q) m₁ * (e0 Q * ↑(v Q) m₂) = ↑(v Q) m₁ * ↑(v Q) m₂\n⊢ e0 Q * ↑(v Q) m₁ * (e0 Q * ↑(v Q) m₂) + r₁ • e0 Q * ↑(v Q) m₂ - r₂ • e0 Q * ↑(v Q) m₁ -\n ↑(algebraMap R (CliffordAlgebra (Q' Q))) (r₁ * r₂) =\n ↑(v Q) m₁ * ↑(v Q) m₂ + r₁ • e0 Q * ↑(v Q) m₂ + ↑(v Q) m₁ * r₂ • e0 Q + r₁ • e0 Q * r₂ • e0 Q\n[PROOFSTEP]\nhave h2 : -(r₂ • e0 Q * v Q m₁) = v Q m₁ * r₂ • e0 Q := by rw [mul_smul_comm, smul_mul_assoc, ← smul_neg, neg_e0_mul_v]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm₁✝ m₂✝ : M × R\nm₁ : M\nr₁ : R\nm₂ : M\nr₂ : R\nh1 : e0 Q * ↑(v Q) m₁ * (e0 Q * ↑(v Q) m₂) = ↑(v Q) m₁ * ↑(v Q) m₂\n⊢ -(r₂ • e0 Q * ↑(v Q) m₁) = ↑(v Q) m₁ * r₂ • e0 Q\n[PROOFSTEP]\nrw [mul_smul_comm, smul_mul_assoc, ← smul_neg, neg_e0_mul_v]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm₁✝ m₂✝ : M × R\nm₁ : M\nr₁ : R\nm₂ : M\nr₂ : R\nh1 : e0 Q * ↑(v Q) m₁ * (e0 Q * ↑(v Q) m₂) = ↑(v Q) m₁ * ↑(v Q) m₂\nh2 : -(r₂ • e0 Q * ↑(v Q) m₁) = ↑(v Q) m₁ * r₂ • e0 Q\n⊢ e0 Q * ↑(v Q) m₁ * (e0 Q * ↑(v Q) m₂) + r₁ • e0 Q * ↑(v Q) m₂ - r₂ • e0 Q * ↑(v Q) m₁ -\n ↑(algebraMap R (CliffordAlgebra (Q' Q))) (r₁ * r₂) =\n ↑(v Q) m₁ * ↑(v Q) m₂ + r₁ • e0 Q * ↑(v Q) m₂ + ↑(v Q) m₁ * r₂ • e0 Q + r₁ • e0 Q * r₂ • e0 Q\n[PROOFSTEP]\nhave h3 : -algebraMap R _ (r₁ * r₂) = r₁ • e0 Q * r₂ • e0 Q := by\n rw [Algebra.algebraMap_eq_smul_one, smul_mul_smul, e0_mul_e0, smul_neg]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm₁✝ m₂✝ : M × R\nm₁ : M\nr₁ : R\nm₂ : M\nr₂ : R\nh1 : e0 Q * ↑(v Q) m₁ * (e0 Q * ↑(v Q) m₂) = ↑(v Q) m₁ * ↑(v Q) m₂\nh2 : -(r₂ • e0 Q * ↑(v Q) m₁) = ↑(v Q) m₁ * r₂ • e0 Q\n⊢ -↑(algebraMap R (CliffordAlgebra (Q' Q))) (r₁ * r₂) = r₁ • e0 Q * r₂ • e0 Q\n[PROOFSTEP]\nrw [Algebra.algebraMap_eq_smul_one, smul_mul_smul, e0_mul_e0, smul_neg]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm₁✝ m₂✝ : M × R\nm₁ : M\nr₁ : R\nm₂ : M\nr₂ : R\nh1 : e0 Q * ↑(v Q) m₁ * (e0 Q * ↑(v Q) m₂) = ↑(v Q) m₁ * ↑(v Q) m₂\nh2 : -(r₂ • e0 Q * ↑(v Q) m₁) = ↑(v Q) m₁ * r₂ • e0 Q\nh3 : -↑(algebraMap R (CliffordAlgebra (Q' Q))) (r₁ * r₂) = r₁ • e0 Q * r₂ • e0 Q\n⊢ e0 Q * ↑(v Q) m₁ * (e0 Q * ↑(v Q) m₂) + r₁ • e0 Q * ↑(v Q) m₂ - r₂ • e0 Q * ↑(v Q) m₁ -\n ↑(algebraMap R (CliffordAlgebra (Q' Q))) (r₁ * r₂) =\n ↑(v Q) m₁ * ↑(v Q) m₂ + r₁ • e0 Q * ↑(v Q) m₂ + ↑(v Q) m₁ * r₂ • e0 Q + r₁ • e0 Q * r₂ • e0 Q\n[PROOFSTEP]\nrw [sub_eq_add_neg, sub_eq_add_neg, h1, h2, h3]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm₁✝ m₂✝ : M × R\nm₁ : M\nr₁ : R\nm₂ : M\nr₂ : R\n⊢ ↑(v Q) m₁ * ↑(v Q) m₂ + r₁ • e0 Q * ↑(v Q) m₂ + ↑(v Q) m₁ * r₂ • e0 Q + r₁ • e0 Q * r₂ • e0 Q =\n ↑(ι (Q' Q)) (m₁, r₁) * ↑(ι (Q' Q)) (m₂, r₂)\n[PROOFSTEP]\nrw [ι_eq_v_add_smul_e0, ι_eq_v_add_smul_e0, mul_add, add_mul, add_mul, add_assoc]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑(ofEven Q) (↑(toEven Q) (↑(ι Q) m)) =\n ↑(ofEven Q) { val := ↑(↑(toEven Q) (↑(ι Q) m)), property := (_ : ↑(↑(toEven Q) (↑(ι Q) m)) ∈ even (Q' Q)) }\n[PROOFSTEP]\nrw [Subtype.coe_eta]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑(ofEven Q) { val := ↑(↑(toEven Q) (↑(ι Q) m)), property := (_ : ↑(↑(toEven Q) (↑(ι Q) m)) ∈ even (Q' Q)) } =\n (↑(ι Q) 0 + ↑(algebraMap R (CliffordAlgebra Q)) 1) * (↑(ι Q) m - ↑(algebraMap R (CliffordAlgebra Q)) 0)\n[PROOFSTEP]\nsimp_rw [toEven_ι]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑(ofEven Q) { val := e0 Q * ↑(v Q) m, property := (_ : (fun x => x ∈ even (Q' Q)) (e0 Q * ↑(v Q) m)) } =\n (↑(ι Q) 0 + ↑(algebraMap R (CliffordAlgebra Q)) 1) * (↑(ι Q) m - ↑(algebraMap R (CliffordAlgebra Q)) 0)\n[PROOFSTEP]\nexact ofEven_ι Q _ _\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ (↑(ι Q) 0 + ↑(algebraMap R (CliffordAlgebra Q)) 1) * (↑(ι Q) m - ↑(algebraMap R (CliffordAlgebra Q)) 0) = ↑(ι Q) m\n[PROOFSTEP]\nrw [map_one, map_zero, map_zero, sub_zero, zero_add, one_mul]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx : CliffordAlgebra Q\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute x))) = ↑reverse ↑(↑(toEven Q) x)\n[PROOFSTEP]\ninduction x using CliffordAlgebra.induction\n[GOAL]\ncase h_grade0\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nr✝ : R\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (↑(algebraMap R (CliffordAlgebra Q)) r✝)))) =\n ↑reverse ↑(↑(toEven Q) (↑(algebraMap R (CliffordAlgebra Q)) r✝))\ncase h_grade1\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx✝ : M\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (↑(ι Q) x✝)))) = ↑reverse ↑(↑(toEven Q) (↑(ι Q) x✝))\ncase h_mul\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\na✝² b✝ : CliffordAlgebra Q\na✝¹ : ↑(↑(toEven Q) (↑reverse (↑involute a✝²))) = ↑reverse ↑(↑(toEven Q) a✝²)\na✝ : ↑(↑(toEven Q) (↑reverse (↑involute b✝))) = ↑reverse ↑(↑(toEven Q) b✝)\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (a✝² * b✝)))) = ↑reverse ↑(↑(toEven Q) (a✝² * b✝))\ncase h_add\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\na✝² b✝ : CliffordAlgebra Q\na✝¹ : ↑(↑(toEven Q) (↑reverse (↑involute a✝²))) = ↑reverse ↑(↑(toEven Q) a✝²)\na✝ : ↑(↑(toEven Q) (↑reverse (↑involute b✝))) = ↑reverse ↑(↑(toEven Q) b✝)\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (a✝² + b✝)))) = ↑reverse ↑(↑(toEven Q) (a✝² + b✝))\n[PROOFSTEP]\ncase h_grade0 r => simp only [AlgHom.commutes, Subalgebra.coe_algebraMap, reverse.commutes]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nr : R\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (↑(algebraMap R (CliffordAlgebra Q)) r)))) =\n ↑reverse ↑(↑(toEven Q) (↑(algebraMap R (CliffordAlgebra Q)) r))\n[PROOFSTEP]\ncase h_grade0 r => simp only [AlgHom.commutes, Subalgebra.coe_algebraMap, reverse.commutes]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nr : R\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (↑(algebraMap R (CliffordAlgebra Q)) r)))) =\n ↑reverse ↑(↑(toEven Q) (↑(algebraMap R (CliffordAlgebra Q)) r))\n[PROOFSTEP]\nsimp only [AlgHom.commutes, Subalgebra.coe_algebraMap, reverse.commutes]\n[GOAL]\ncase h_grade1\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx✝ : M\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (↑(ι Q) x✝)))) = ↑reverse ↑(↑(toEven Q) (↑(ι Q) x✝))\ncase h_mul\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\na✝² b✝ : CliffordAlgebra Q\na✝¹ : ↑(↑(toEven Q) (↑reverse (↑involute a✝²))) = ↑reverse ↑(↑(toEven Q) a✝²)\na✝ : ↑(↑(toEven Q) (↑reverse (↑involute b✝))) = ↑reverse ↑(↑(toEven Q) b✝)\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (a✝² * b✝)))) = ↑reverse ↑(↑(toEven Q) (a✝² * b✝))\ncase h_add\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\na✝² b✝ : CliffordAlgebra Q\na✝¹ : ↑(↑(toEven Q) (↑reverse (↑involute a✝²))) = ↑reverse ↑(↑(toEven Q) a✝²)\na✝ : ↑(↑(toEven Q) (↑reverse (↑involute b✝))) = ↑reverse ↑(↑(toEven Q) b✝)\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (a✝² + b✝)))) = ↑reverse ↑(↑(toEven Q) (a✝² + b✝))\n[PROOFSTEP]\ncase h_grade1 m =>\n -- porting note: added `letI`\n letI : SubtractionMonoid (even (Q' Q)) := AddGroup.toSubtractionMonoid\n simp only [involute_ι, Subalgebra.coe_neg, toEven_ι, reverse.map_mul, reverse_v, reverse_e0, reverse_ι, neg_e0_mul_v,\n map_neg]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (↑(ι Q) m)))) = ↑reverse ↑(↑(toEven Q) (↑(ι Q) m))\n[PROOFSTEP]\ncase h_grade1 m =>\n -- porting note: added `letI`\n letI : SubtractionMonoid (even (Q' Q)) := AddGroup.toSubtractionMonoid\n simp only [involute_ι, Subalgebra.coe_neg, toEven_ι, reverse.map_mul, reverse_v, reverse_e0, reverse_ι, neg_e0_mul_v,\n map_neg]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (↑(ι Q) m)))) = ↑reverse ↑(↑(toEven Q) (↑(ι Q) m))\n[PROOFSTEP]\nletI : SubtractionMonoid (even (Q' Q)) := AddGroup.toSubtractionMonoid\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nm : M\nthis : SubtractionMonoid { x // x ∈ even (Q' Q) } := AddGroup.toSubtractionMonoid\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (↑(ι Q) m)))) = ↑reverse ↑(↑(toEven Q) (↑(ι Q) m))\n[PROOFSTEP]\nsimp only [involute_ι, Subalgebra.coe_neg, toEven_ι, reverse.map_mul, reverse_v, reverse_e0, reverse_ι, neg_e0_mul_v,\n map_neg]\n[GOAL]\ncase h_mul\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\na✝² b✝ : CliffordAlgebra Q\na✝¹ : ↑(↑(toEven Q) (↑reverse (↑involute a✝²))) = ↑reverse ↑(↑(toEven Q) a✝²)\na✝ : ↑(↑(toEven Q) (↑reverse (↑involute b✝))) = ↑reverse ↑(↑(toEven Q) b✝)\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (a✝² * b✝)))) = ↑reverse ↑(↑(toEven Q) (a✝² * b✝))\ncase h_add\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\na✝² b✝ : CliffordAlgebra Q\na✝¹ : ↑(↑(toEven Q) (↑reverse (↑involute a✝²))) = ↑reverse ↑(↑(toEven Q) a✝²)\na✝ : ↑(↑(toEven Q) (↑reverse (↑involute b✝))) = ↑reverse ↑(↑(toEven Q) b✝)\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (a✝² + b✝)))) = ↑reverse ↑(↑(toEven Q) (a✝² + b✝))\n[PROOFSTEP]\ncase h_mul x y hx hy => simp only [map_mul, Subalgebra.coe_mul, reverse.map_mul, hx, hy]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y : CliffordAlgebra Q\nhx : ↑(↑(toEven Q) (↑reverse (↑involute x))) = ↑reverse ↑(↑(toEven Q) x)\nhy : ↑(↑(toEven Q) (↑reverse (↑involute y))) = ↑reverse ↑(↑(toEven Q) y)\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (x * y)))) = ↑reverse ↑(↑(toEven Q) (x * y))\n[PROOFSTEP]\ncase h_mul x y hx hy => simp only [map_mul, Subalgebra.coe_mul, reverse.map_mul, hx, hy]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y : CliffordAlgebra Q\nhx : ↑(↑(toEven Q) (↑reverse (↑involute x))) = ↑reverse ↑(↑(toEven Q) x)\nhy : ↑(↑(toEven Q) (↑reverse (↑involute y))) = ↑reverse ↑(↑(toEven Q) y)\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (x * y)))) = ↑reverse ↑(↑(toEven Q) (x * y))\n[PROOFSTEP]\nsimp only [map_mul, Subalgebra.coe_mul, reverse.map_mul, hx, hy]\n[GOAL]\ncase h_add\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\na✝² b✝ : CliffordAlgebra Q\na✝¹ : ↑(↑(toEven Q) (↑reverse (↑involute a✝²))) = ↑reverse ↑(↑(toEven Q) a✝²)\na✝ : ↑(↑(toEven Q) (↑reverse (↑involute b✝))) = ↑reverse ↑(↑(toEven Q) b✝)\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (a✝² + b✝)))) = ↑reverse ↑(↑(toEven Q) (a✝² + b✝))\n[PROOFSTEP]\ncase h_add x y hx hy => simp only [map_add, Subalgebra.coe_add, hx, hy]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y : CliffordAlgebra Q\nhx : ↑(↑(toEven Q) (↑reverse (↑involute x))) = ↑reverse ↑(↑(toEven Q) x)\nhy : ↑(↑(toEven Q) (↑reverse (↑involute y))) = ↑reverse ↑(↑(toEven Q) y)\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (x + y)))) = ↑reverse ↑(↑(toEven Q) (x + y))\n[PROOFSTEP]\ncase h_add x y hx hy => simp only [map_add, Subalgebra.coe_add, hx, hy]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ : QuadraticForm R M\nx y : CliffordAlgebra Q\nhx : ↑(↑(toEven Q) (↑reverse (↑involute x))) = ↑reverse ↑(↑(toEven Q) x)\nhy : ↑(↑(toEven Q) (↑reverse (↑involute y))) = ↑reverse ↑(↑(toEven Q) y)\n⊢ ↑(↑(toEven Q) (↑reverse (↑involute (x + y)))) = ↑reverse ↑(↑(toEven Q) (x + y))\n[PROOFSTEP]\nsimp only [map_add, Subalgebra.coe_add, hx, hy]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ Q' : QuadraticForm R M\nh : Q' = -Q\nthis✝ : AddCommGroup { x // x ∈ even Q' } := AddSubgroupClass.toAddCommGroup (even Q')\nthis : HasDistribNeg { x // x ∈ even Q' } := NonUnitalNonAssocRing.toHasDistribNeg\nm : M\n⊢ ↑(↑(-(even.ι Q').bilin) m) m = ↑(algebraMap R { x // x ∈ even Q' }) (↑Q m)\n[PROOFSTEP]\nsimp_rw [LinearMap.neg_apply, EvenHom.contract, h, QuadraticForm.neg_apply, map_neg, neg_neg]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ Q' : QuadraticForm R M\nh : Q' = -Q\nthis✝ : AddCommGroup { x // x ∈ even Q' } := AddSubgroupClass.toAddCommGroup (even Q')\nthis : HasDistribNeg { x // x ∈ even Q' } := NonUnitalNonAssocRing.toHasDistribNeg\nm₁ m₂ m₃ : M\n⊢ ↑(↑(-(even.ι Q').bilin) m₁) m₂ * ↑(↑(-(even.ι Q').bilin) m₂) m₃ = ↑Q m₂ • ↑(↑(-(even.ι Q').bilin) m₁) m₃\n[PROOFSTEP]\nsimp_rw [LinearMap.neg_apply, neg_mul_neg, EvenHom.contract_mid, h, QuadraticForm.neg_apply, smul_neg, neg_smul]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ Q' : QuadraticForm R M\nh : Q' = -Q\nh' : Q = -Q'\n⊢ AlgHom.comp (evenToNeg Q' Q h') (evenToNeg Q Q' h) = AlgHom.id R { x // x ∈ even Q }\n[PROOFSTEP]\next m₁ m₂ : 4\n[GOAL]\ncase h.bilin.h.h\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ Q' : QuadraticForm R M\nh : Q' = -Q\nh' : Q = -Q'\nm₁ m₂ : M\n⊢ ↑(↑(EvenHom.compr₂ (even.ι Q) (AlgHom.comp (evenToNeg Q' Q h') (evenToNeg Q Q' h))).bilin m₁) m₂ =\n ↑(↑(EvenHom.compr₂ (even.ι Q) (AlgHom.id R { x // x ∈ even Q })).bilin m₁) m₂\n[PROOFSTEP]\ndsimp only [EvenHom.compr₂_bilin, LinearMap.compr₂_apply, AlgHom.toLinearMap_apply, AlgHom.comp_apply, AlgHom.id_apply]\n[GOAL]\ncase h.bilin.h.h\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nQ Q' : QuadraticForm R M\nh : Q' = -Q\nh' : Q = -Q'\nm₁ m₂ : M\n⊢ ↑(evenToNeg Q' Q h') (↑(evenToNeg Q Q' h) (↑(↑(even.ι Q).bilin m₁) m₂)) = ↑(↑(even.ι Q).bilin m₁) m₂\n[PROOFSTEP]\nrw [evenToNeg_ι, map_neg, evenToNeg_ι, neg_neg]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.CliffordAlgebra.EvenEquiv", "llama_tokens": 23647, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8175744673038222, "lm_q2_score": 0.6926419894793246, "lm_q1q2_score": 0.5662864055808184}} {"text": "[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Mul M\ninst✝ : ContinuousMul M\na b : M\n⊢ 𝓝 a * 𝓝 b ≤ 𝓝 (a * b)\n[PROOFSTEP]\nrw [← map₂_mul, ← map_uncurry_prod, ← nhds_prod_eq]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Mul M\ninst✝ : ContinuousMul M\na b : M\n⊢ map (Function.uncurry fun x x_1 => x * x_1) (𝓝 (a, b)) ≤ 𝓝 (a * b)\n[PROOFSTEP]\nexact continuous_mul.tendsto _\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁸ : TopologicalSpace X\ninst✝⁷ : TopologicalSpace M\ninst✝⁶ : Mul M\ninst✝⁵ : ContinuousMul M\ninst✝⁴ : TopologicalSpace N\ninst✝³ : Monoid N\ninst✝² : ContinuousMul N\ninst✝¹ : T2Space N\nf : ι → Nˣ\nr₁ r₂ : N\nl : Filter ι\ninst✝ : NeBot l\nh₁ : Tendsto (fun x => ↑(f x)) l (𝓝 r₁)\nh₂ : Tendsto (fun x => ↑(f x)⁻¹) l (𝓝 r₂)\n⊢ r₁ * r₂ = 1\n[PROOFSTEP]\nsymm\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁸ : TopologicalSpace X\ninst✝⁷ : TopologicalSpace M\ninst✝⁶ : Mul M\ninst✝⁵ : ContinuousMul M\ninst✝⁴ : TopologicalSpace N\ninst✝³ : Monoid N\ninst✝² : ContinuousMul N\ninst✝¹ : T2Space N\nf : ι → Nˣ\nr₁ r₂ : N\nl : Filter ι\ninst✝ : NeBot l\nh₁ : Tendsto (fun x => ↑(f x)) l (𝓝 r₁)\nh₂ : Tendsto (fun x => ↑(f x)⁻¹) l (𝓝 r₂)\n⊢ 1 = r₁ * r₂\n[PROOFSTEP]\nsimpa using h₁.mul h₂\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁸ : TopologicalSpace X\ninst✝⁷ : TopologicalSpace M\ninst✝⁶ : Mul M\ninst✝⁵ : ContinuousMul M\ninst✝⁴ : TopologicalSpace N\ninst✝³ : Monoid N\ninst✝² : ContinuousMul N\ninst✝¹ : T2Space N\nf : ι → Nˣ\nr₁ r₂ : N\nl : Filter ι\ninst✝ : NeBot l\nh₁ : Tendsto (fun x => ↑(f x)) l (𝓝 r₁)\nh₂ : Tendsto (fun x => ↑(f x)⁻¹) l (𝓝 r₂)\n⊢ r₂ * r₁ = 1\n[PROOFSTEP]\nsymm\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁸ : TopologicalSpace X\ninst✝⁷ : TopologicalSpace M\ninst✝⁶ : Mul M\ninst✝⁵ : ContinuousMul M\ninst✝⁴ : TopologicalSpace N\ninst✝³ : Monoid N\ninst✝² : ContinuousMul N\ninst✝¹ : T2Space N\nf : ι → Nˣ\nr₁ r₂ : N\nl : Filter ι\ninst✝ : NeBot l\nh₁ : Tendsto (fun x => ↑(f x)) l (𝓝 r₁)\nh₂ : Tendsto (fun x => ↑(f x)⁻¹) l (𝓝 r₂)\n⊢ 1 = r₂ * r₁\n[PROOFSTEP]\nsimpa using h₂.mul h₁\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace M✝\ninst✝³ : Mul M✝\ninst✝² : ContinuousMul M✝\nM : Type u\ninst✝¹ : Monoid M\ninst✝ : TopologicalSpace M\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nhleft : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1)\nhright : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x * x₀) (𝓝 1)\n⊢ Continuous fun p => p.fst * p.snd\n[PROOFSTEP]\nrw [continuous_iff_continuousAt]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace M✝\ninst✝³ : Mul M✝\ninst✝² : ContinuousMul M✝\nM : Type u\ninst✝¹ : Monoid M\ninst✝ : TopologicalSpace M\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nhleft : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1)\nhright : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x * x₀) (𝓝 1)\n⊢ ∀ (x : M × M), ContinuousAt (fun p => p.fst * p.snd) x\n[PROOFSTEP]\nrintro ⟨x₀, y₀⟩\n[GOAL]\ncase mk\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace M✝\ninst✝³ : Mul M✝\ninst✝² : ContinuousMul M✝\nM : Type u\ninst✝¹ : Monoid M\ninst✝ : TopologicalSpace M\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nhleft : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1)\nhright : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x * x₀) (𝓝 1)\nx₀ y₀ : M\n⊢ ContinuousAt (fun p => p.fst * p.snd) (x₀, y₀)\n[PROOFSTEP]\nhave key : (fun p : M × M => x₀ * p.1 * (p.2 * y₀)) = ((fun x => x₀ * x) ∘ fun x => x * y₀) ∘ uncurry (· * ·) :=\n by\n ext p\n simp [uncurry, mul_assoc]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace M✝\ninst✝³ : Mul M✝\ninst✝² : ContinuousMul M✝\nM : Type u\ninst✝¹ : Monoid M\ninst✝ : TopologicalSpace M\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nhleft : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1)\nhright : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x * x₀) (𝓝 1)\nx₀ y₀ : M\n⊢ (fun p => x₀ * p.fst * (p.snd * y₀)) = ((fun x => x₀ * x) ∘ fun x => x * y₀) ∘ uncurry fun x x_1 => x * x_1\n[PROOFSTEP]\next p\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace M✝\ninst✝³ : Mul M✝\ninst✝² : ContinuousMul M✝\nM : Type u\ninst✝¹ : Monoid M\ninst✝ : TopologicalSpace M\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nhleft : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1)\nhright : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x * x₀) (𝓝 1)\nx₀ y₀ : M\np : M × M\n⊢ x₀ * p.fst * (p.snd * y₀) = (((fun x => x₀ * x) ∘ fun x => x * y₀) ∘ uncurry fun x x_1 => x * x_1) p\n[PROOFSTEP]\nsimp [uncurry, mul_assoc]\n[GOAL]\ncase mk\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace M✝\ninst✝³ : Mul M✝\ninst✝² : ContinuousMul M✝\nM : Type u\ninst✝¹ : Monoid M\ninst✝ : TopologicalSpace M\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nhleft : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1)\nhright : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x * x₀) (𝓝 1)\nx₀ y₀ : M\nkey : (fun p => x₀ * p.fst * (p.snd * y₀)) = ((fun x => x₀ * x) ∘ fun x => x * y₀) ∘ uncurry fun x x_1 => x * x_1\n⊢ ContinuousAt (fun p => p.fst * p.snd) (x₀, y₀)\n[PROOFSTEP]\nhave key₂ : ((fun x => x₀ * x) ∘ fun x => y₀ * x) = fun x => x₀ * y₀ * x :=\n by\n ext x\n simp [mul_assoc]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace M✝\ninst✝³ : Mul M✝\ninst✝² : ContinuousMul M✝\nM : Type u\ninst✝¹ : Monoid M\ninst✝ : TopologicalSpace M\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nhleft : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1)\nhright : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x * x₀) (𝓝 1)\nx₀ y₀ : M\nkey : (fun p => x₀ * p.fst * (p.snd * y₀)) = ((fun x => x₀ * x) ∘ fun x => x * y₀) ∘ uncurry fun x x_1 => x * x_1\n⊢ ((fun x => x₀ * x) ∘ fun x => y₀ * x) = fun x => x₀ * y₀ * x\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace M✝\ninst✝³ : Mul M✝\ninst✝² : ContinuousMul M✝\nM : Type u\ninst✝¹ : Monoid M\ninst✝ : TopologicalSpace M\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nhleft : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1)\nhright : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x * x₀) (𝓝 1)\nx₀ y₀ : M\nkey : (fun p => x₀ * p.fst * (p.snd * y₀)) = ((fun x => x₀ * x) ∘ fun x => x * y₀) ∘ uncurry fun x x_1 => x * x_1\nx : M\n⊢ ((fun x => x₀ * x) ∘ fun x => y₀ * x) x = x₀ * y₀ * x\n[PROOFSTEP]\nsimp [mul_assoc]\n[GOAL]\ncase mk\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace M✝\ninst✝³ : Mul M✝\ninst✝² : ContinuousMul M✝\nM : Type u\ninst✝¹ : Monoid M\ninst✝ : TopologicalSpace M\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nhleft : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1)\nhright : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x * x₀) (𝓝 1)\nx₀ y₀ : M\nkey : (fun p => x₀ * p.fst * (p.snd * y₀)) = ((fun x => x₀ * x) ∘ fun x => x * y₀) ∘ uncurry fun x x_1 => x * x_1\nkey₂ : ((fun x => x₀ * x) ∘ fun x => y₀ * x) = fun x => x₀ * y₀ * x\n⊢ ContinuousAt (fun p => p.fst * p.snd) (x₀, y₀)\n[PROOFSTEP]\ncalc\n map (uncurry (· * ·)) (𝓝 (x₀, y₀)) = map (uncurry (· * ·)) (𝓝 x₀ ×ˢ 𝓝 y₀) := by rw [nhds_prod_eq]\n _ = map (fun p : M × M => x₀ * p.1 * (p.2 * y₀)) (𝓝 1 ×ˢ 𝓝 1) :=\n -- Porting note: `rw` was able to prove this\n -- Now it fails with `failed to rewrite using equation theorems for 'Function.uncurry'`\n -- and `failed to rewrite using equation theorems for 'Function.comp'`.\n -- Removing those two lemmas, the `rw` would succeed, but then needs a `rfl`.by\n simp_rw [uncurry, hleft x₀, hright y₀, prod_map_map_eq, Filter.map_map, Function.comp]\n _ = map ((fun x => x₀ * x) ∘ fun x => x * y₀) (map (uncurry (· * ·)) (𝓝 1 ×ˢ 𝓝 1)) := by rw [key, ← Filter.map_map]\n _ ≤ map ((fun x : M => x₀ * x) ∘ fun x => x * y₀) (𝓝 1) := (map_mono hmul)\n _ = 𝓝 (x₀ * y₀) := by rw [← Filter.map_map, ← hright, hleft y₀, Filter.map_map, key₂, ← hleft]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace M✝\ninst✝³ : Mul M✝\ninst✝² : ContinuousMul M✝\nM : Type u\ninst✝¹ : Monoid M\ninst✝ : TopologicalSpace M\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nhleft : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1)\nhright : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x * x₀) (𝓝 1)\nx₀ y₀ : M\nkey : (fun p => x₀ * p.fst * (p.snd * y₀)) = ((fun x => x₀ * x) ∘ fun x => x * y₀) ∘ uncurry fun x x_1 => x * x_1\nkey₂ : ((fun x => x₀ * x) ∘ fun x => y₀ * x) = fun x => x₀ * y₀ * x\n⊢ map (uncurry fun x x_1 => x * x_1) (𝓝 (x₀, y₀)) = map (uncurry fun x x_1 => x * x_1) (𝓝 x₀ ×ˢ 𝓝 y₀)\n[PROOFSTEP]\nrw [nhds_prod_eq]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace M✝\ninst✝³ : Mul M✝\ninst✝² : ContinuousMul M✝\nM : Type u\ninst✝¹ : Monoid M\ninst✝ : TopologicalSpace M\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nhleft : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1)\nhright : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x * x₀) (𝓝 1)\nx₀ y₀ : M\nkey : (fun p => x₀ * p.fst * (p.snd * y₀)) = ((fun x => x₀ * x) ∘ fun x => x * y₀) ∘ uncurry fun x x_1 => x * x_1\nkey₂ : ((fun x => x₀ * x) ∘ fun x => y₀ * x) = fun x => x₀ * y₀ * x\n⊢ map (uncurry fun x x_1 => x * x_1) (𝓝 x₀ ×ˢ 𝓝 y₀) = map (fun p => x₀ * p.fst * (p.snd * y₀)) (𝓝 1 ×ˢ 𝓝 1)\n[PROOFSTEP]\nsimp_rw [uncurry, hleft x₀, hright y₀, prod_map_map_eq, Filter.map_map, Function.comp]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace M✝\ninst✝³ : Mul M✝\ninst✝² : ContinuousMul M✝\nM : Type u\ninst✝¹ : Monoid M\ninst✝ : TopologicalSpace M\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nhleft : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1)\nhright : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x * x₀) (𝓝 1)\nx₀ y₀ : M\nkey : (fun p => x₀ * p.fst * (p.snd * y₀)) = ((fun x => x₀ * x) ∘ fun x => x * y₀) ∘ uncurry fun x x_1 => x * x_1\nkey₂ : ((fun x => x₀ * x) ∘ fun x => y₀ * x) = fun x => x₀ * y₀ * x\n⊢ map (fun p => x₀ * p.fst * (p.snd * y₀)) (𝓝 1 ×ˢ 𝓝 1) =\n map ((fun x => x₀ * x) ∘ fun x => x * y₀) (map (uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1))\n[PROOFSTEP]\nrw [key, ← Filter.map_map]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace M✝\ninst✝³ : Mul M✝\ninst✝² : ContinuousMul M✝\nM : Type u\ninst✝¹ : Monoid M\ninst✝ : TopologicalSpace M\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nhleft : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1)\nhright : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x * x₀) (𝓝 1)\nx₀ y₀ : M\nkey : (fun p => x₀ * p.fst * (p.snd * y₀)) = ((fun x => x₀ * x) ∘ fun x => x * y₀) ∘ uncurry fun x x_1 => x * x_1\nkey₂ : ((fun x => x₀ * x) ∘ fun x => y₀ * x) = fun x => x₀ * y₀ * x\n⊢ map ((fun x => x₀ * x) ∘ fun x => x * y₀) (𝓝 1) = 𝓝 (x₀ * y₀)\n[PROOFSTEP]\nrw [← Filter.map_map, ← hright, hleft y₀, Filter.map_map, key₂, ← hleft]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace M✝\ninst✝³ : Mul M✝\ninst✝² : ContinuousMul M✝\nM : Type u\ninst✝¹ : CommMonoid M\ninst✝ : TopologicalSpace M\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nhleft : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1)\n⊢ ContinuousMul M\n[PROOFSTEP]\napply ContinuousMul.of_nhds_one hmul hleft\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace M✝\ninst✝³ : Mul M✝\ninst✝² : ContinuousMul M✝\nM : Type u\ninst✝¹ : CommMonoid M\ninst✝ : TopologicalSpace M\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nhleft : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1)\n⊢ ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x * x₀) (𝓝 1)\n[PROOFSTEP]\nintro x₀\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace M✝\ninst✝³ : Mul M✝\ninst✝² : ContinuousMul M✝\nM : Type u\ninst✝¹ : CommMonoid M\ninst✝ : TopologicalSpace M\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nhleft : ∀ (x₀ : M), 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1)\nx₀ : M\n⊢ 𝓝 x₀ = map (fun x => x * x₀) (𝓝 1)\n[PROOFSTEP]\nsimp_rw [mul_comm, hleft x₀]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝⁴ : TopologicalSpace M₂\ninst✝³ : T2Space M₂\ninst✝² : Mul M₁\ninst✝¹ : Mul M₂\ninst✝ : ContinuousMul M₂\n⊢ IsClosed {f | ∀ (x y : M₁), f (x * y) = f x * f y}\n[PROOFSTEP]\nsimp only [setOf_forall]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝⁴ : TopologicalSpace M₂\ninst✝³ : T2Space M₂\ninst✝² : Mul M₁\ninst✝¹ : Mul M₂\ninst✝ : ContinuousMul M₂\n⊢ IsClosed (⋂ (i : M₁) (i_1 : M₁), {x | x (i * i_1) = x i * x i_1})\n[PROOFSTEP]\nexact\n isClosed_iInter fun x =>\n isClosed_iInter fun y =>\n isClosed_eq\n (continuous_apply _)\n -- Porting note: proof was:\n -- `((continuous_apply _).mul (continuous_apply _))`\n (by continuity)\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : TopologicalSpace X\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝⁴ : TopologicalSpace M₂\ninst✝³ : T2Space M₂\ninst✝² : Mul M₁\ninst✝¹ : Mul M₂\ninst✝ : ContinuousMul M₂\nx y : M₁\n⊢ Continuous fun x_1 => x_1 x * x_1 y\n[PROOFSTEP]\ncontinuity\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN✝ : Type u_5\ninst✝⁶ : TopologicalSpace X\nM : Type u_6\nN : Type u_7\nF : Type u_8\ninst✝⁵ : Mul M\ninst✝⁴ : Mul N\ninst✝³ : MulHomClass F M N\ninst✝² : TopologicalSpace M\ninst✝¹ : TopologicalSpace N\ninst✝ : ContinuousMul N\nf : F\nhf : Inducing ↑f\n⊢ Continuous (↑f ∘ fun p => p.fst * p.snd)\n[PROOFSTEP]\nsimpa only [(· ∘ ·), map_mul f] using hf.continuous.fst'.mul hf.continuous.snd'\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\ns : Set M\nhs : s ∈ 𝓝 1\n⊢ ∃ V, IsOpen V ∧ 1 ∈ V ∧ ∀ (v : M), v ∈ V → ∀ (w : M), w ∈ V → v * w ∈ s\n[PROOFSTEP]\nhave : (fun a : M × M => a.1 * a.2) ⁻¹' s ∈ 𝓝 ((1, 1) : M × M) := tendsto_mul (by simpa only [one_mul] using hs)\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\ns : Set M\nhs : s ∈ 𝓝 1\n⊢ s ∈ 𝓝 (1 * 1)\n[PROOFSTEP]\nsimpa only [one_mul] using hs\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\ns : Set M\nhs : s ∈ 𝓝 1\nthis : (fun a => a.fst * a.snd) ⁻¹' s ∈ 𝓝 (1, 1)\n⊢ ∃ V, IsOpen V ∧ 1 ∈ V ∧ ∀ (v : M), v ∈ V → ∀ (w : M), w ∈ V → v * w ∈ s\n[PROOFSTEP]\nsimpa only [prod_subset_iff] using exists_nhds_square this\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nu : Set M\nhu : u ∈ 𝓝 1\n⊢ ∃ V, V ∈ 𝓝 1 ∧ ∀ {v w s t : M}, v ∈ V → w ∈ V → s ∈ V → t ∈ V → v * w * s * t ∈ u\n[PROOFSTEP]\nrcases exists_nhds_one_split hu with ⟨W, W1, h⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nu : Set M\nhu : u ∈ 𝓝 1\nW : Set M\nW1 : W ∈ 𝓝 1\nh : ∀ (v : M), v ∈ W → ∀ (w : M), w ∈ W → v * w ∈ u\n⊢ ∃ V, V ∈ 𝓝 1 ∧ ∀ {v w s t : M}, v ∈ V → w ∈ V → s ∈ V → t ∈ V → v * w * s * t ∈ u\n[PROOFSTEP]\nrcases exists_nhds_one_split W1 with ⟨V, V1, h'⟩\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nu : Set M\nhu : u ∈ 𝓝 1\nW : Set M\nW1 : W ∈ 𝓝 1\nh : ∀ (v : M), v ∈ W → ∀ (w : M), w ∈ W → v * w ∈ u\nV : Set M\nV1 : V ∈ 𝓝 1\nh' : ∀ (v : M), v ∈ V → ∀ (w : M), w ∈ V → v * w ∈ W\n⊢ ∃ V, V ∈ 𝓝 1 ∧ ∀ {v w s t : M}, v ∈ V → w ∈ V → s ∈ V → t ∈ V → v * w * s * t ∈ u\n[PROOFSTEP]\nuse V, V1\n[GOAL]\ncase right\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nu : Set M\nhu : u ∈ 𝓝 1\nW : Set M\nW1 : W ∈ 𝓝 1\nh : ∀ (v : M), v ∈ W → ∀ (w : M), w ∈ W → v * w ∈ u\nV : Set M\nV1 : V ∈ 𝓝 1\nh' : ∀ (v : M), v ∈ V → ∀ (w : M), w ∈ V → v * w ∈ W\n⊢ ∀ {v w s t : M}, v ∈ V → w ∈ V → s ∈ V → t ∈ V → v * w * s * t ∈ u\n[PROOFSTEP]\nintro v w s t v_in w_in s_in t_in\n[GOAL]\ncase right\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nu : Set M\nhu : u ∈ 𝓝 1\nW : Set M\nW1 : W ∈ 𝓝 1\nh : ∀ (v : M), v ∈ W → ∀ (w : M), w ∈ W → v * w ∈ u\nV : Set M\nV1 : V ∈ 𝓝 1\nh' : ∀ (v : M), v ∈ V → ∀ (w : M), w ∈ V → v * w ∈ W\nv w s t : M\nv_in : v ∈ V\nw_in : w ∈ V\ns_in : s ∈ V\nt_in : t ∈ V\n⊢ v * w * s * t ∈ u\n[PROOFSTEP]\nsimpa only [mul_assoc] using h _ (h' v v_in w w_in) _ (h' s s_in t t_in)\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nU : Set M\nhU : U ∈ 𝓝 1\n⊢ ∃ V, IsOpen V ∧ 1 ∈ V ∧ V * V ⊆ U\n[PROOFSTEP]\nrcases exists_open_nhds_one_split hU with ⟨V, Vo, V1, hV⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nU : Set M\nhU : U ∈ 𝓝 1\nV : Set M\nVo : IsOpen V\nV1 : 1 ∈ V\nhV : ∀ (v : M), v ∈ V → ∀ (w : M), w ∈ V → v * w ∈ U\n⊢ ∃ V, IsOpen V ∧ 1 ∈ V ∧ V * V ⊆ U\n[PROOFSTEP]\nuse V, Vo, V1\n[GOAL]\ncase right\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nU : Set M\nhU : U ∈ 𝓝 1\nV : Set M\nVo : IsOpen V\nV1 : 1 ∈ V\nhV : ∀ (v : M), v ∈ V → ∀ (w : M), w ∈ V → v * w ∈ U\n⊢ V * V ⊆ U\n[PROOFSTEP]\nrintro _ ⟨x, y, hx, hy, rfl⟩\n[GOAL]\ncase right.intro.intro.intro.intro\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nU : Set M\nhU : U ∈ 𝓝 1\nV : Set M\nVo : IsOpen V\nV1 : 1 ∈ V\nhV : ∀ (v : M), v ∈ V → ∀ (w : M), w ∈ V → v * w ∈ U\nx y : M\nhx : x ∈ V\nhy : y ∈ V\n⊢ (fun x x_1 => x * x_1) x y ∈ U\n[PROOFSTEP]\nexact hV _ hx _ hy\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\ns t : Set M\nhs : IsCompact s\nht : IsCompact t\n⊢ IsCompact (s * t)\n[PROOFSTEP]\nrw [← image_mul_prod]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\ns t : Set M\nhs : IsCompact s\nht : IsCompact t\n⊢ IsCompact ((fun x => x.fst * x.snd) '' s ×ˢ t)\n[PROOFSTEP]\nexact (hs.prod ht).image continuous_mul\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nf : ι → α → M\nx : Filter α\na : ι → M\nx✝ : ∀ (i : ι), i ∈ [] → Tendsto (f i) x (𝓝 (a i))\n⊢ Tendsto (fun b => List.prod (List.map (fun c => f c b) [])) x (𝓝 (List.prod (List.map a [])))\n[PROOFSTEP]\nsimp [tendsto_const_nhds]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nf✝ : ι → α → M\nx : Filter α\na : ι → M\nf : ι\nl : List ι\nh : ∀ (i : ι), i ∈ f :: l → Tendsto (f✝ i) x (𝓝 (a i))\n⊢ Tendsto (fun b => List.prod (List.map (fun c => f✝ c b) (f :: l))) x (𝓝 (List.prod (List.map a (f :: l))))\n[PROOFSTEP]\nsimp only [List.map_cons, List.prod_cons]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nf✝ : ι → α → M\nx : Filter α\na : ι → M\nf : ι\nl : List ι\nh : ∀ (i : ι), i ∈ f :: l → Tendsto (f✝ i) x (𝓝 (a i))\n⊢ Tendsto (fun b => f✝ f b * List.prod (List.map (fun c => f✝ c b) l)) x (𝓝 (a f * List.prod (List.map a l)))\n[PROOFSTEP]\nexact (h f (List.mem_cons_self _ _)).mul (tendsto_list_prod l fun c hc => h c (List.mem_cons_of_mem _ hc))\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nf : ι → X → M\nl : List ι\nt : Set X\nh : ∀ (i : ι), i ∈ l → ContinuousOn (f i) t\n⊢ ContinuousOn (fun a => List.prod (List.map (fun i => f i a) l)) t\n[PROOFSTEP]\nintro x hx\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nf : ι → X → M\nl : List ι\nt : Set X\nh : ∀ (i : ι), i ∈ l → ContinuousOn (f i) t\nx : X\nhx : x ∈ t\n⊢ ContinuousWithinAt (fun a => List.prod (List.map (fun i => f i a) l)) t x\n[PROOFSTEP]\nrw [continuousWithinAt_iff_continuousAt_restrict _ hx]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nf : ι → X → M\nl : List ι\nt : Set X\nh : ∀ (i : ι), i ∈ l → ContinuousOn (f i) t\nx : X\nhx : x ∈ t\n⊢ ContinuousAt (restrict t fun a => List.prod (List.map (fun i => f i a) l)) { val := x, property := hx }\n[PROOFSTEP]\nrefine' tendsto_list_prod _ fun i hi => _\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nf : ι → X → M\nl : List ι\nt : Set X\nh : ∀ (i : ι), i ∈ l → ContinuousOn (f i) t\nx : X\nhx : x ∈ t\ni : ι\nhi : i ∈ l\n⊢ Tendsto (fun b => f i ↑b) (𝓝 { val := x, property := hx }) (𝓝 (f i ↑{ val := x, property := hx }))\n[PROOFSTEP]\nspecialize h i hi x hx\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nf : ι → X → M\nl : List ι\nt : Set X\nx : X\nhx : x ∈ t\ni : ι\nhi : i ∈ l\nh : ContinuousWithinAt (f i) t x\n⊢ Tendsto (fun b => f i ↑b) (𝓝 { val := x, property := hx }) (𝓝 (f i ↑{ val := x, property := hx }))\n[PROOFSTEP]\nrw [continuousWithinAt_iff_continuousAt_restrict _ hx] at h \n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nf : ι → X → M\nl : List ι\nt : Set X\nx : X\nhx : x ∈ t\ni : ι\nhi : i ∈ l\nh : ContinuousAt (restrict t (f i)) { val := x, property := hx }\n⊢ Tendsto (fun b => f i ↑b) (𝓝 { val := x, property := hx }) (𝓝 (f i ↑{ val := x, property := hx }))\n[PROOFSTEP]\nexact h\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\n⊢ Continuous fun a => a ^ 0\n[PROOFSTEP]\nsimpa using continuous_const\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nk : ℕ\n⊢ Continuous fun a => a ^ (k + 1)\n[PROOFSTEP]\nsimp only [pow_succ]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\nk : ℕ\n⊢ Continuous fun a => a * a ^ k\n[PROOFSTEP]\nexact continuous_id.mul (continuous_pow _)\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\na b : M\nha : b * a = 1\n⊢ Tendsto (fun x => a * x) (cocompact M) (cocompact M)\n[PROOFSTEP]\nrefine Filter.Tendsto.of_tendsto_comp ?_ (Filter.comap_cocompact_le (continuous_mul_left b))\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\na b : M\nha : b * a = 1\n⊢ Tendsto ((fun b_1 => b * b_1) ∘ fun x => a * x) (cocompact M) (cocompact M)\n[PROOFSTEP]\nsimp only [comp_mul_left, ha, one_mul]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\na b : M\nha : b * a = 1\n⊢ Tendsto (fun x => x) (cocompact M) (cocompact M)\n[PROOFSTEP]\nexact Filter.tendsto_id\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\na b : M\nha : a * b = 1\n⊢ Tendsto (fun x => x * a) (cocompact M) (cocompact M)\n[PROOFSTEP]\nrefine Filter.Tendsto.of_tendsto_comp ?_ (Filter.comap_cocompact_le (continuous_mul_right b))\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\na b : M\nha : a * b = 1\n⊢ Tendsto ((fun b_1 => b_1 * b) ∘ fun x => x * a) (cocompact M) (cocompact M)\n[PROOFSTEP]\nsimp only [comp_mul_right, ha, mul_one]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : Monoid M\ninst✝ : ContinuousMul M\na b : M\nha : a * b = 1\n⊢ Tendsto (fun x => x) (cocompact M) (cocompact M)\n[PROOFSTEP]\nexact Filter.tendsto_id\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁸ : TopologicalSpace X\ninst✝⁷ : TopologicalSpace M\ninst✝⁶ : Monoid M\ninst✝⁵ : ContinuousMul M\nR : Type u_6\nA : Type u_7\ninst✝⁴ : Monoid A\ninst✝³ : SMul R A\ninst✝² : IsScalarTower R A A\ninst✝¹ : TopologicalSpace A\ninst✝ : ContinuousMul A\nq : R\n⊢ Continuous fun x => q • x\n[PROOFSTEP]\nsimp (config := { singlePass := true }) only [← smul_one_mul q (_ : A)]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁸ : TopologicalSpace X\ninst✝⁷ : TopologicalSpace M\ninst✝⁶ : Monoid M\ninst✝⁵ : ContinuousMul M\nR : Type u_6\nA : Type u_7\ninst✝⁴ : Monoid A\ninst✝³ : SMul R A\ninst✝² : IsScalarTower R A A\ninst✝¹ : TopologicalSpace A\ninst✝ : ContinuousMul A\nq : R\n⊢ Continuous fun x => q • 1 * x\n[PROOFSTEP]\nexact continuous_const.mul continuous_id\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁸ : TopologicalSpace X\ninst✝⁷ : TopologicalSpace M\ninst✝⁶ : Monoid M\ninst✝⁵ : ContinuousMul M\nR : Type u_6\nA : Type u_7\ninst✝⁴ : Monoid A\ninst✝³ : SMul R A\ninst✝² : SMulCommClass R A A\ninst✝¹ : TopologicalSpace A\ninst✝ : ContinuousMul A\nq : R\n⊢ Continuous fun x => q • x\n[PROOFSTEP]\nsimp (config := { singlePass := true }) only [← mul_smul_one q (_ : A)]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁸ : TopologicalSpace X\ninst✝⁷ : TopologicalSpace M\ninst✝⁶ : Monoid M\ninst✝⁵ : ContinuousMul M\nR : Type u_6\nA : Type u_7\ninst✝⁴ : Monoid A\ninst✝³ : SMul R A\ninst✝² : SMulCommClass R A A\ninst✝¹ : TopologicalSpace A\ninst✝ : ContinuousMul A\nq : R\n⊢ Continuous fun x => x * q • 1\n[PROOFSTEP]\nexact continuous_id.mul continuous_const\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : CommMonoid M\ninst✝ : ContinuousMul M\nf : ι → α → M\nx : Filter α\na : ι → M\ns : Multiset ι\n⊢ (∀ (i : ι), i ∈ s → Tendsto (f i) x (𝓝 (a i))) →\n Tendsto (fun b => Multiset.prod (Multiset.map (fun c => f c b) s)) x (𝓝 (Multiset.prod (Multiset.map a s)))\n[PROOFSTEP]\nrcases s with ⟨l⟩\n[GOAL]\ncase mk\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : CommMonoid M\ninst✝ : ContinuousMul M\nf : ι → α → M\nx : Filter α\na : ι → M\ns : Multiset ι\nl : List ι\n⊢ (∀ (i : ι), i ∈ Quot.mk Setoid.r l → Tendsto (f i) x (𝓝 (a i))) →\n Tendsto (fun b => Multiset.prod (Multiset.map (fun c => f c b) (Quot.mk Setoid.r l))) x\n (𝓝 (Multiset.prod (Multiset.map a (Quot.mk Setoid.r l))))\n[PROOFSTEP]\nsimpa using tendsto_list_prod l\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : CommMonoid M\ninst✝ : ContinuousMul M\nf : ι → X → M\ns : Multiset ι\n⊢ (∀ (i : ι), i ∈ s → Continuous (f i)) → Continuous fun a => Multiset.prod (Multiset.map (fun i => f i a) s)\n[PROOFSTEP]\nrcases s with ⟨l⟩\n[GOAL]\ncase mk\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : CommMonoid M\ninst✝ : ContinuousMul M\nf : ι → X → M\ns : Multiset ι\nl : List ι\n⊢ (∀ (i : ι), i ∈ Quot.mk Setoid.r l → Continuous (f i)) →\n Continuous fun a => Multiset.prod (Multiset.map (fun i => f i a) (Quot.mk Setoid.r l))\n[PROOFSTEP]\nsimpa using continuous_list_prod l\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : CommMonoid M\ninst✝ : ContinuousMul M\nf : ι → X → M\ns : Multiset ι\nt : Set X\n⊢ (∀ (i : ι), i ∈ s → ContinuousOn (f i) t) → ContinuousOn (fun a => Multiset.prod (Multiset.map (fun i => f i a) s)) t\n[PROOFSTEP]\nrcases s with ⟨l⟩\n[GOAL]\ncase mk\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : CommMonoid M\ninst✝ : ContinuousMul M\nf : ι → X → M\ns : Multiset ι\nt : Set X\nl : List ι\n⊢ (∀ (i : ι), i ∈ Quot.mk Setoid.r l → ContinuousOn (f i) t) →\n ContinuousOn (fun a => Multiset.prod (Multiset.map (fun i => f i a) (Quot.mk Setoid.r l))) t\n[PROOFSTEP]\nsimpa using continuousOn_list_prod l\n[GOAL]\nι : Type u_1\nα : Type u_2\nX✝ : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁴ : TopologicalSpace X✝\ninst✝³ : TopologicalSpace M✝\ninst✝² : CommMonoid M✝\ninst✝¹ : ContinuousMul M✝\nX : Type u_6\nM : Type u_7\ninst✝ : CommMonoid M\ns : Finset ι\nl : Filter X\nf g : ι → X → M\nhs : ∀ (i : ι), i ∈ s → f i =ᶠ[l] g i\n⊢ ∏ i in s, f i =ᶠ[l] ∏ i in s, g i\n[PROOFSTEP]\nreplace hs : ∀ᶠ x in l, ∀ i ∈ s, f i x = g i x\n[GOAL]\ncase hs\nι : Type u_1\nα : Type u_2\nX✝ : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁴ : TopologicalSpace X✝\ninst✝³ : TopologicalSpace M✝\ninst✝² : CommMonoid M✝\ninst✝¹ : ContinuousMul M✝\nX : Type u_6\nM : Type u_7\ninst✝ : CommMonoid M\ns : Finset ι\nl : Filter X\nf g : ι → X → M\nhs : ∀ (i : ι), i ∈ s → f i =ᶠ[l] g i\n⊢ ∀ᶠ (x : X) in l, ∀ (i : ι), i ∈ s → f i x = g i x\n[PROOFSTEP]\nrwa [eventually_all_finset]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX✝ : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁴ : TopologicalSpace X✝\ninst✝³ : TopologicalSpace M✝\ninst✝² : CommMonoid M✝\ninst✝¹ : ContinuousMul M✝\nX : Type u_6\nM : Type u_7\ninst✝ : CommMonoid M\ns : Finset ι\nl : Filter X\nf g : ι → X → M\nhs : ∀ᶠ (x : X) in l, ∀ (i : ι), i ∈ s → f i x = g i x\n⊢ ∏ i in s, f i =ᶠ[l] ∏ i in s, g i\n[PROOFSTEP]\nfilter_upwards [hs] with x hx\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nX✝ : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁴ : TopologicalSpace X✝\ninst✝³ : TopologicalSpace M✝\ninst✝² : CommMonoid M✝\ninst✝¹ : ContinuousMul M✝\nX : Type u_6\nM : Type u_7\ninst✝ : CommMonoid M\ns : Finset ι\nl : Filter X\nf g : ι → X → M\nhs : ∀ᶠ (x : X) in l, ∀ (i : ι), i ∈ s → f i x = g i x\nx : X\nhx : ∀ (i : ι), i ∈ s → f i x = g i x\n⊢ Finset.prod s (fun i => f i) x = Finset.prod s (fun i => g i) x\n[PROOFSTEP]\nsimp only [Finset.prod_apply, Finset.prod_congr rfl hx]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁴ : TopologicalSpace X\ninst✝³ : TopologicalSpace M✝\ninst✝² : CommMonoid M✝\ninst✝¹ : ContinuousMul M✝\nM : Type u_6\ninst✝ : CommMonoid M\nf : ι → X → M\nhf : LocallyFinite fun i => mulSupport (f i)\nx₀ : X\n⊢ ∃ I, ∀ᶠ (x : X) in 𝓝 x₀, (mulSupport fun i => f i x) ⊆ ↑I\n[PROOFSTEP]\nrcases hf x₀ with ⟨U, hxU, hUf⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁴ : TopologicalSpace X\ninst✝³ : TopologicalSpace M✝\ninst✝² : CommMonoid M✝\ninst✝¹ : ContinuousMul M✝\nM : Type u_6\ninst✝ : CommMonoid M\nf : ι → X → M\nhf : LocallyFinite fun i => mulSupport (f i)\nx₀ : X\nU : Set X\nhxU : U ∈ 𝓝 x₀\nhUf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ U)}\n⊢ ∃ I, ∀ᶠ (x : X) in 𝓝 x₀, (mulSupport fun i => f i x) ⊆ ↑I\n[PROOFSTEP]\nrefine' ⟨hUf.toFinset, mem_of_superset hxU fun y hy i hi => _⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁴ : TopologicalSpace X\ninst✝³ : TopologicalSpace M✝\ninst✝² : CommMonoid M✝\ninst✝¹ : ContinuousMul M✝\nM : Type u_6\ninst✝ : CommMonoid M\nf : ι → X → M\nhf : LocallyFinite fun i => mulSupport (f i)\nx₀ : X\nU : Set X\nhxU : U ∈ 𝓝 x₀\nhUf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ U)}\ny : X\nhy : y ∈ U\ni : ι\nhi : i ∈ mulSupport fun i => f i y\n⊢ i ∈ ↑(Finite.toFinset hUf)\n[PROOFSTEP]\nrw [hUf.coe_toFinset]\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁴ : TopologicalSpace X\ninst✝³ : TopologicalSpace M✝\ninst✝² : CommMonoid M✝\ninst✝¹ : ContinuousMul M✝\nM : Type u_6\ninst✝ : CommMonoid M\nf : ι → X → M\nhf : LocallyFinite fun i => mulSupport (f i)\nx₀ : X\nU : Set X\nhxU : U ∈ 𝓝 x₀\nhUf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ U)}\ny : X\nhy : y ∈ U\ni : ι\nhi : i ∈ mulSupport fun i => f i y\n⊢ i ∈ {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ U)}\n[PROOFSTEP]\nexact ⟨y, hi, hy⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : CommMonoid M\ninst✝ : ContinuousMul M\nf : ι → X → M\nhc : ∀ (i : ι), Continuous (f i)\nhf : LocallyFinite fun i => mulSupport (f i)\n⊢ Continuous fun x => ∏ᶠ (i : ι), f i x\n[PROOFSTEP]\nrefine' continuous_iff_continuousAt.2 fun x => _\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : CommMonoid M\ninst✝ : ContinuousMul M\nf : ι → X → M\nhc : ∀ (i : ι), Continuous (f i)\nhf : LocallyFinite fun i => mulSupport (f i)\nx : X\n⊢ ContinuousAt (fun x => ∏ᶠ (i : ι), f i x) x\n[PROOFSTEP]\nrcases finprod_eventually_eq_prod hf x with ⟨s, hs⟩\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : CommMonoid M\ninst✝ : ContinuousMul M\nf : ι → X → M\nhc : ∀ (i : ι), Continuous (f i)\nhf : LocallyFinite fun i => mulSupport (f i)\nx : X\ns : Finset ι\nhs : ∀ᶠ (y : X) in 𝓝 x, ∏ᶠ (i : ι), f i y = ∏ i in s, f i y\n⊢ ContinuousAt (fun x => ∏ᶠ (i : ι), f i x) x\n[PROOFSTEP]\nrefine' ContinuousAt.congr _ (EventuallyEq.symm hs)\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : CommMonoid M\ninst✝ : ContinuousMul M\nf : ι → X → M\nhc : ∀ (i : ι), Continuous (f i)\nhf : LocallyFinite fun i => mulSupport (f i)\nx : X\ns : Finset ι\nhs : ∀ᶠ (y : X) in 𝓝 x, ∏ᶠ (i : ι), f i y = ∏ i in s, f i y\n⊢ ContinuousAt (fun x => ∏ i in s, f i x) x\n[PROOFSTEP]\nexact tendsto_finset_prod _ fun i _ => (hc i).continuousAt\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : CommMonoid M\ninst✝ : ContinuousMul M\nf : ι → X → M\np : ι → Prop\nhc : ∀ (i : ι), p i → Continuous (f i)\nhf : LocallyFinite fun i => mulSupport (f i)\n⊢ Continuous fun x => ∏ᶠ (i : ι) (_ : p i), f i x\n[PROOFSTEP]\nsimp only [← finprod_subtype_eq_finprod_cond]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace M\ninst✝¹ : CommMonoid M\ninst✝ : ContinuousMul M\nf : ι → X → M\np : ι → Prop\nhc : ∀ (i : ι), p i → Continuous (f i)\nhf : LocallyFinite fun i => mulSupport (f i)\n⊢ Continuous fun x => ∏ᶠ (j : { i // p i }), f (↑j) x\n[PROOFSTEP]\nexact continuous_finprod (fun i => hc i i.2) (hf.comp_injective Subtype.coe_injective)\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝¹ : TopologicalSpace X\nι' : Sort u_6\ninst✝ : Mul M\nts : ι' → TopologicalSpace M\nh' : ∀ (i : ι'), ContinuousMul M\n⊢ ContinuousMul M\n[PROOFSTEP]\nrw [← sInf_range]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝¹ : TopologicalSpace X\nι' : Sort u_6\ninst✝ : Mul M\nts : ι' → TopologicalSpace M\nh' : ∀ (i : ι'), ContinuousMul M\n⊢ ContinuousMul M\n[PROOFSTEP]\nexact continuousMul_sInf (Set.forall_range_iff.mpr h')\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝¹ : TopologicalSpace X\nι' : Sort u_6\ninst✝ : Mul M\nt₁ t₂ : TopologicalSpace M\nh₁ : ContinuousMul M\nh₂ : ContinuousMul M\n⊢ ContinuousMul M\n[PROOFSTEP]\nrw [inf_eq_iInf]\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝¹ : TopologicalSpace X\nι' : Sort u_6\ninst✝ : Mul M\nt₁ t₂ : TopologicalSpace M\nh₁ : ContinuousMul M\nh₂ : ContinuousMul M\n⊢ ContinuousMul M\n[PROOFSTEP]\nrefine' continuousMul_iInf fun b => _\n[GOAL]\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝¹ : TopologicalSpace X\nι' : Sort u_6\ninst✝ : Mul M\nt₁ t₂ : TopologicalSpace M\nh₁ : ContinuousMul M\nh₂ : ContinuousMul M\nb : Bool\n⊢ ContinuousMul M\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝¹ : TopologicalSpace X\nι' : Sort u_6\ninst✝ : Mul M\nt₁ t₂ : TopologicalSpace M\nh₁ : ContinuousMul M\nh₂ : ContinuousMul M\n⊢ ContinuousMul M\n[PROOFSTEP]\nassumption\n[GOAL]\ncase true\nι : Type u_1\nα : Type u_2\nX : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝¹ : TopologicalSpace X\nι' : Sort u_6\ninst✝ : Mul M\nt₁ t₂ : TopologicalSpace M\nh₁ : ContinuousMul M\nh₂ : ContinuousMul M\n⊢ ContinuousMul M\n[PROOFSTEP]\nassumption\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Monoid", "llama_tokens": 19925, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8376199714402812, "lm_q2_score": 0.6757646140788307, "lm_q1q2_score": 0.5660339367450629}} {"text": "[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\n⊢ a * a = 0 ↔\n ∀ (x y : R),\n ↑(↑(LinearEquiv.toEquiv (LinearEquiv.symm (LinearMap.ringLmapEquivSelf R ℕ A))) a) x *\n ↑(↑(LinearEquiv.toEquiv (LinearEquiv.symm (LinearMap.ringLmapEquivSelf R ℕ A))) a) y =\n 0\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\n⊢ a * a = 0 ↔ ∀ (x y : R), x • a * y • a = 0\n[PROOFSTEP]\nsimp_rw [smul_mul_smul]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\n⊢ a * a = 0 ↔ ∀ (x y : R), (x * y) • (a * a) = 0\n[PROOFSTEP]\nrefine' ⟨fun h x y => h.symm ▸ smul_zero _, fun h => by simpa using h 1 1⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nh : ∀ (x y : R), (x * y) • (a * a) = 0\n⊢ a * a = 0\n[PROOFSTEP]\nsimpa using h 1 1\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\ne : { e // e * e = 0 }\n⊢ ↑(↑lift e) ε = ↑e\n[PROOFSTEP]\nsimp only [lift_apply_apply, fst_eps, map_zero, snd_eps, one_smul, zero_add]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.DualNumber", "llama_tokens": 617, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8418256472515684, "lm_q2_score": 0.6723316926137812, "lm_q1q2_score": 0.5659860623023389}} {"text": "[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\n⊢ count p 0 = 0\n[PROOFSTEP]\nrw [count, List.range_zero, List.countp, List.countp.go]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\n⊢ Fintype { i // i < n ∧ p i }\n[PROOFSTEP]\napply Fintype.ofFinset ((Finset.range n).filter p)\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\n⊢ ∀ (x : ℕ), x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x\n[PROOFSTEP]\nintro x\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nn x : ℕ\n⊢ x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x\n[PROOFSTEP]\nrw [mem_filter, mem_range]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nn x : ℕ\n⊢ x < n ∧ p x ↔ x ∈ fun x => x < n ∧ p x\n[PROOFSTEP]\nrfl\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\n⊢ count p n = card (filter p (range n))\n[PROOFSTEP]\nrw [count, List.countp_eq_length_filter]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\n⊢ List.length (List.filter (fun b => decide (p b)) (List.range n)) = card (filter p (range n))\n[PROOFSTEP]\nrfl\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\n⊢ count p n = Fintype.card { k // k < n ∧ p k }\n[PROOFSTEP]\nrw [count_eq_card_filter_range, ← Fintype.card_ofFinset, ← CountSet.fintype]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\n⊢ (Fintype.card ↑fun x => x < n ∧ p x) = Fintype.card { k // k < n ∧ p k }\n[PROOFSTEP]\nrfl\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\n⊢ count p (n + 1) = count p n + if p n then 1 else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\nh : p n\n⊢ count p (n + 1) = count p n + 1\n[PROOFSTEP]\nsimp [count, List.range_succ, h]\n[GOAL]\ncase neg\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\nh : ¬p n\n⊢ count p (n + 1) = count p n + 0\n[PROOFSTEP]\nsimp [count, List.range_succ, h]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\n⊢ count p n ≤ count p (n + 1)\n[PROOFSTEP]\nby_cases h : p n\n[GOAL]\ncase pos\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\nh : p n\n⊢ count p n ≤ count p (n + 1)\n[PROOFSTEP]\nsimp [count_succ, h]\n[GOAL]\ncase neg\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\nh : ¬p n\n⊢ count p n ≤ count p (n + 1)\n[PROOFSTEP]\nsimp [count_succ, h]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\na b : ℕ\n⊢ count p (a + b) = count p a + count (fun k => p (a + k)) b\n[PROOFSTEP]\nhave : Disjoint ((range a).filter p) (((range b).map <| addLeftEmbedding a).filter p) :=\n by\n apply disjoint_filter_filter\n rw [Finset.disjoint_left]\n simp_rw [mem_map, mem_range, addLeftEmbedding_apply]\n rintro x hx ⟨c, _, rfl⟩\n exact (self_le_add_right _ _).not_lt hx\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\na b : ℕ\n⊢ Disjoint (filter p (range a)) (filter p (map (addLeftEmbedding a) (range b)))\n[PROOFSTEP]\napply disjoint_filter_filter\n[GOAL]\ncase a\np : ℕ → Prop\ninst✝ : DecidablePred p\na b : ℕ\n⊢ Disjoint (range a) (map (addLeftEmbedding a) (range b))\n[PROOFSTEP]\nrw [Finset.disjoint_left]\n[GOAL]\ncase a\np : ℕ → Prop\ninst✝ : DecidablePred p\na b : ℕ\n⊢ ∀ ⦃a_1 : ℕ⦄, a_1 ∈ range a → ¬a_1 ∈ map (addLeftEmbedding a) (range b)\n[PROOFSTEP]\nsimp_rw [mem_map, mem_range, addLeftEmbedding_apply]\n[GOAL]\ncase a\np : ℕ → Prop\ninst✝ : DecidablePred p\na b : ℕ\n⊢ ∀ ⦃a_1 : ℕ⦄, a_1 < a → ¬∃ a_3, a_3 < b ∧ a + a_3 = a_1\n[PROOFSTEP]\nrintro x hx ⟨c, _, rfl⟩\n[GOAL]\ncase a.intro.intro\np : ℕ → Prop\ninst✝ : DecidablePred p\na b c : ℕ\nleft✝ : c < b\nhx : a + c < a\n⊢ False\n[PROOFSTEP]\nexact (self_le_add_right _ _).not_lt hx\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\na b : ℕ\nthis : Disjoint (filter p (range a)) (filter p (map (addLeftEmbedding a) (range b)))\n⊢ count p (a + b) = count p a + count (fun k => p (a + k)) b\n[PROOFSTEP]\nsimp_rw [count_eq_card_filter_range, range_add, filter_union, card_disjoint_union this, filter_map, addLeftEmbedding,\n card_map]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\na b : ℕ\nthis : Disjoint (filter p (range a)) (filter p (map (addLeftEmbedding a) (range b)))\n⊢ card (filter p (range a)) +\n card\n (filter (p ∘ ↑{ toFun := fun h => a + h, inj' := (_ : Function.Injective ((fun x x_1 => x + x_1) a)) })\n (range b)) =\n card (filter p (range a)) + card (filter (fun k => p (a + k)) (range b))\n[PROOFSTEP]\nrfl\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\na b : ℕ\n⊢ count p (a + b) = count (fun k => p (k + b)) a + count p b\n[PROOFSTEP]\nrw [add_comm, count_add, add_comm]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\na b : ℕ\n⊢ count (fun k => p (b + k)) a + count p b = count (fun k => p (k + b)) a + count p b\n[PROOFSTEP]\nsimp_rw [add_comm b]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\n⊢ count p 1 = if p 0 then 1 else 0\n[PROOFSTEP]\nsimp [count_succ]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\n⊢ count p (n + 1) = count (fun k => p (k + 1)) n + if p 0 then 1 else 0\n[PROOFSTEP]\nrw [count_add', count_one]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\n⊢ count p n < count p (n + 1) ↔ p n\n[PROOFSTEP]\nby_cases h : p n\n[GOAL]\ncase pos\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\nh : p n\n⊢ count p n < count p (n + 1) ↔ p n\n[PROOFSTEP]\nsimp [count_succ, h]\n[GOAL]\ncase neg\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\nh : ¬p n\n⊢ count p n < count p (n + 1) ↔ p n\n[PROOFSTEP]\nsimp [count_succ, h]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\n⊢ count p (n + 1) = count p n + 1 ↔ p n\n[PROOFSTEP]\nby_cases h : p n\n[GOAL]\ncase pos\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\nh : p n\n⊢ count p (n + 1) = count p n + 1 ↔ p n\n[PROOFSTEP]\nsimp [h, count_succ]\n[GOAL]\ncase neg\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\nh : ¬p n\n⊢ count p (n + 1) = count p n + 1 ↔ p n\n[PROOFSTEP]\nsimp [h, count_succ]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\n⊢ count p (n + 1) = count p n ↔ ¬p n\n[PROOFSTEP]\nby_cases h : p n\n[GOAL]\ncase pos\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\nh : p n\n⊢ count p (n + 1) = count p n ↔ ¬p n\n[PROOFSTEP]\nsimp [h, count_succ]\n[GOAL]\ncase neg\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\nh : ¬p n\n⊢ count p (n + 1) = count p n ↔ ¬p n\n[PROOFSTEP]\nsimp [h, count_succ]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\n⊢ ↑(count p n) ≤ Cardinal.mk ↑{k | p k}\n[PROOFSTEP]\nrw [count_eq_card_fintype, ← Cardinal.mk_fintype]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nn : ℕ\n⊢ Cardinal.mk { k // k < n ∧ p k } ≤ Cardinal.mk ↑{k | p k}\n[PROOFSTEP]\nexact Cardinal.mk_subtype_mono fun x hx ↦ hx.2\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nm n : ℕ\nhm : p m\nhn : p n\nheq : count p m = count p n\n⊢ m = n\n[PROOFSTEP]\nby_contra' h : m ≠ n\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nm n : ℕ\nhm : p m\nhn : p n\nheq : count p m = count p n\nh : m ≠ n\n⊢ False\n[PROOFSTEP]\nwlog hmn : m < n\n[GOAL]\ncase inr\np : ℕ → Prop\ninst✝ : DecidablePred p\nm n : ℕ\nhm : p m\nhn : p n\nheq : count p m = count p n\nh : m ≠ n\nthis : ∀ {p : ℕ → Prop} [inst : DecidablePred p] {m n : ℕ}, p m → p n → count p m = count p n → m ≠ n → m < n → False\nhmn : ¬m < n\n⊢ False\n[PROOFSTEP]\nexact this hn hm heq.symm h.symm (h.lt_or_lt.resolve_left hmn)\n[GOAL]\np✝ : ℕ → Prop\ninst✝¹ : DecidablePred p✝\np : ℕ → Prop\ninst✝ : DecidablePred p\nm n : ℕ\nhm : p m\nhn : p n\nheq : count p m = count p n\nh : m ≠ n\nhmn : m < n\n⊢ False\n[PROOFSTEP]\nsimpa [heq] using count_strict_mono hm hmn\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nhp : Set.Finite (setOf p)\nn : ℕ\n⊢ count p n ≤ card (Set.Finite.toFinset hp)\n[PROOFSTEP]\nrw [count_eq_card_filter_range]\n[GOAL]\np : ℕ → Prop\ninst✝ : DecidablePred p\nhp : Set.Finite (setOf p)\nn : ℕ\n⊢ card (filter p (range n)) ≤ card (Set.Finite.toFinset hp)\n[PROOFSTEP]\nexact Finset.card_mono fun x hx ↦ hp.mem_toFinset.2 (mem_filter.1 hx).2\n[GOAL]\np : ℕ → Prop\ninst✝¹ : DecidablePred p\nq : ℕ → Prop\ninst✝ : DecidablePred q\nn : ℕ\nhpq : ∀ (k : ℕ), p k → q k\n⊢ count p n ≤ count q n\n[PROOFSTEP]\nsimp only [count_eq_card_filter_range]\n[GOAL]\np : ℕ → Prop\ninst✝¹ : DecidablePred p\nq : ℕ → Prop\ninst✝ : DecidablePred q\nn : ℕ\nhpq : ∀ (k : ℕ), p k → q k\n⊢ card (filter p (range n)) ≤ card (filter q (range n))\n[PROOFSTEP]\nexact card_le_of_subset ((range n).monotone_filter_right hpq)\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Count", "llama_tokens": 3893, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7981867777396212, "lm_q2_score": 0.7090191276365462, "lm_q1q2_score": 0.565929692843972}} {"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : PartialOrder β\nf g : C(α, β)\nx✝ : (fun f => f.toFun) f = (fun f => f.toFun) g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : PartialOrder β\ng : C(α, β)\ntoFun✝ : α → β\ncontinuous_toFun✝ : Continuous toFun✝\nx✝ : (fun f => f.toFun) (mk toFun✝) = (fun f => f.toFun) g\n⊢ mk toFun✝ = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : PartialOrder β\ntoFun✝¹ : α → β\ncontinuous_toFun✝¹ : Continuous toFun✝¹\ntoFun✝ : α → β\ncontinuous_toFun✝ : Continuous toFun✝\nx✝ : (fun f => f.toFun) (mk toFun✝¹) = (fun f => f.toFun) (mk toFun✝)\n⊢ mk toFun✝¹ = mk toFun✝\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : LinearOrder β\ninst✝ : OrderClosedTopology β\nsrc✝¹ : PartialOrder C(α, β) := partialOrder\nsrc✝ : Sup C(α, β) := sup\nf g : C(α, β)\n⊢ ∀ (a : α), ↑f a ≤ ↑(f ⊔ g) a\n[PROOFSTEP]\nsimp [le_refl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : LinearOrder β\ninst✝ : OrderClosedTopology β\nsrc✝¹ : PartialOrder C(α, β) := partialOrder\nsrc✝ : Sup C(α, β) := sup\nf g : C(α, β)\n⊢ ∀ (a : α), ↑g a ≤ ↑(f ⊔ g) a\n[PROOFSTEP]\nsimp [le_refl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : LinearOrder β\ninst✝ : OrderClosedTopology β\nsrc✝¹ : PartialOrder C(α, β) := partialOrder\nsrc✝ : Sup C(α, β) := sup\nf₁ f₂ g : C(α, β)\nw₁ : f₁ ≤ g\nw₂ : f₂ ≤ g\na : α\n⊢ ↑(f₁ ⊔ f₂) a ≤ ↑g a\n[PROOFSTEP]\nsimp [le_def.mp w₁ a, le_def.mp w₂ a]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : LinearOrder β\ninst✝ : OrderClosedTopology β\nsrc✝¹ : PartialOrder C(α, β) := partialOrder\nsrc✝ : Inf C(α, β) := inf\nf g : C(α, β)\n⊢ ∀ (a : α), ↑(f ⊓ g) a ≤ ↑f a\n[PROOFSTEP]\nsimp [le_refl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : LinearOrder β\ninst✝ : OrderClosedTopology β\nsrc✝¹ : PartialOrder C(α, β) := partialOrder\nsrc✝ : Inf C(α, β) := inf\nf g : C(α, β)\n⊢ ∀ (a : α), ↑(f ⊓ g) a ≤ ↑g a\n[PROOFSTEP]\nsimp [le_refl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : LinearOrder β\ninst✝ : OrderClosedTopology β\nsrc✝¹ : PartialOrder C(α, β) := partialOrder\nsrc✝ : Inf C(α, β) := inf\nf₁ f₂ g : C(α, β)\nw₁ : f₁ ≤ f₂\nw₂ : f₁ ≤ g\na : α\n⊢ ↑f₁ a ≤ ↑(f₂ ⊓ g) a\n[PROOFSTEP]\nsimp [le_def.mp w₁ a, le_def.mp w₂ a]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : LinearOrder γ\ninst✝ : OrderClosedTopology γ\nι : Type u_4\ns : Finset ι\nH : Finset.Nonempty s\nf : ι → C(β, γ)\n⊢ ↑(Finset.sup' s H f) = Finset.sup' s H fun a => ↑(f a)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : LinearOrder γ\ninst✝ : OrderClosedTopology γ\nι : Type u_4\ns : Finset ι\nH : Finset.Nonempty s\nf : ι → C(β, γ)\nx✝ : β\n⊢ ↑(Finset.sup' s H f) x✝ = Finset.sup' s H (fun a => ↑(f a)) x✝\n[PROOFSTEP]\nsimp [sup'_apply]\n", "meta": {"mathlib_filename": "Mathlib.Topology.ContinuousFunction.Ordered", "llama_tokens": 1951, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8688267728417087, "lm_q2_score": 0.6513548714339145, "lm_q1q2_score": 0.565914550922654}} {"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nf : α ≃o β\ns : Set α\nx : β\nh : IsLUB (↑f '' s) x\n⊢ ∀ {x y : α}, ↑f x ≤ ↑f y ↔ x ≤ y\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nf : α ≃o β\ns : Set α\nx : β\nh : IsLUB s (↑(symm f) x)\n⊢ ∀ {x y : β}, ↑(symm f) x ≤ ↑(symm f) y ↔ x ≤ y\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nf : α ≃o β\ns : Set α\nx : α\n⊢ IsLUB (↑f '' s) (↑f x) ↔ IsLUB s x\n[PROOFSTEP]\nrw [isLUB_image, f.symm_apply_apply]\n[GOAL]\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nf : α ≃o β\ns : Set β\nx : α\n⊢ IsLUB (↑f ⁻¹' s) x ↔ IsLUB s (↑f x)\n[PROOFSTEP]\nrw [← f.symm_symm, ← image_eq_preimage, isLUB_image]\n[GOAL]\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nf : α ≃o β\ns : Set β\nx : β\n⊢ IsLUB (↑f ⁻¹' s) (↑(symm f) x) ↔ IsLUB s x\n[PROOFSTEP]\nrw [isLUB_preimage, f.apply_symm_apply]\n", "meta": {"mathlib_filename": "Mathlib.Order.Bounds.OrderIso", "llama_tokens": 562, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.800691997339971, "lm_q2_score": 0.7057850340255386, "lm_q1q2_score": 0.5651164285865679}} {"text": "[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\n⊢ centerMass ∅ w z = 0\n[PROOFSTEP]\nsimp only [centerMass, sum_empty, smul_zero]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nhne : i ≠ j\n⊢ centerMass {i, j} w z = (w i / (w i + w j)) • z i + (w j / (w i + w j)) • z j\n[PROOFSTEP]\nsimp only [centerMass, sum_pair hne, smul_add, (mul_smul _ _ _).symm, div_eq_inv_mul]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nha : ¬i ∈ t\nhw : ∑ j in t, w j ≠ 0\n⊢ centerMass (insert i t) w z =\n (w i / (w i + ∑ j in t, w j)) • z i + ((∑ j in t, w j) / (w i + ∑ j in t, w j)) • centerMass t w z\n[PROOFSTEP]\nsimp only [centerMass, sum_insert ha, smul_add, (mul_smul _ _ _).symm, ← div_eq_inv_mul]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nha : ¬i ∈ t\nhw : ∑ j in t, w j ≠ 0\n⊢ (w i / (w i + ∑ i in t, w i)) • z i + (w i + ∑ i in t, w i)⁻¹ • ∑ i in t, w i • z i =\n (w i / (w i + ∑ i in t, w i)) • z i +\n ((∑ i in t, w i) / (w i + ∑ i in t, w i) * (∑ i in t, w i)⁻¹) • ∑ i in t, w i • z i\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase e_a.e_a\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nha : ¬i ∈ t\nhw : ∑ j in t, w j ≠ 0\n⊢ (w i + ∑ i in t, w i)⁻¹ = (∑ i in t, w i) / (w i + ∑ i in t, w i) * (∑ i in t, w i)⁻¹\n[PROOFSTEP]\nrw [div_mul_eq_mul_div, mul_inv_cancel hw, one_div]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nhw : w i ≠ 0\n⊢ centerMass {i} w z = z i\n[PROOFSTEP]\nrw [centerMass, sum_singleton, sum_singleton, ← mul_smul, inv_mul_cancel hw, one_smul]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nhw : ∑ i in t, w i = 1\n⊢ centerMass t w z = ∑ i in t, w i • z i\n[PROOFSTEP]\nsimp only [Finset.centerMass, hw, inv_one, one_smul]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\n⊢ (centerMass t w fun i => c • z i) = c • centerMass t w z\n[PROOFSTEP]\nsimp only [Finset.centerMass, Finset.smul_sum, (mul_smul _ _ _).symm, mul_comm c, mul_assoc]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\ns : Finset ι\nt : Finset ι'\nws : ι → R\nzs : ι → E\nwt : ι' → R\nzt : ι' → E\nhws : ∑ i in s, ws i = 1\nhwt : ∑ i in t, wt i = 1\na b : R\nhab : a + b = 1\n⊢ a • centerMass s ws zs + b • centerMass t wt zt =\n centerMass (disjSum s t) (Sum.elim (fun i => a * ws i) fun j => b * wt j) (Sum.elim zs zt)\n[PROOFSTEP]\nrw [s.centerMass_eq_of_sum_1 _ hws, t.centerMass_eq_of_sum_1 _ hwt, smul_sum, smul_sum, ← Finset.sum_sum_elim,\n Finset.centerMass_eq_of_sum_1]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\ns : Finset ι\nt : Finset ι'\nws : ι → R\nzs : ι → E\nwt : ι' → R\nzt : ι' → E\nhws : ∑ i in s, ws i = 1\nhwt : ∑ i in t, wt i = 1\na b : R\nhab : a + b = 1\n⊢ ∑ x in disjSum s t, Sum.elim (fun x => a • ws x • zs x) (fun x => b • wt x • zt x) x =\n ∑ i in disjSum s t, Sum.elim (fun i => a * ws i) (fun j => b * wt j) i • Sum.elim zs zt i\n[PROOFSTEP]\ncongr with ⟨⟩\n[GOAL]\ncase e_f.h.inl\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\ns : Finset ι\nt : Finset ι'\nws : ι → R\nzs : ι → E\nwt : ι' → R\nzt : ι' → E\nhws : ∑ i in s, ws i = 1\nhwt : ∑ i in t, wt i = 1\na b : R\nhab : a + b = 1\nval✝ : ι\n⊢ Sum.elim (fun x => a • ws x • zs x) (fun x => b • wt x • zt x) (Sum.inl val✝) =\n Sum.elim (fun i => a * ws i) (fun j => b * wt j) (Sum.inl val✝) • Sum.elim zs zt (Sum.inl val✝)\n[PROOFSTEP]\nsimp only [Sum.elim_inl, Sum.elim_inr, mul_smul]\n[GOAL]\ncase e_f.h.inr\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\ns : Finset ι\nt : Finset ι'\nws : ι → R\nzs : ι → E\nwt : ι' → R\nzt : ι' → E\nhws : ∑ i in s, ws i = 1\nhwt : ∑ i in t, wt i = 1\na b : R\nhab : a + b = 1\nval✝ : ι'\n⊢ Sum.elim (fun x => a • ws x • zs x) (fun x => b • wt x • zt x) (Sum.inr val✝) =\n Sum.elim (fun i => a * ws i) (fun j => b * wt j) (Sum.inr val✝) • Sum.elim zs zt (Sum.inr val✝)\n[PROOFSTEP]\nsimp only [Sum.elim_inl, Sum.elim_inr, mul_smul]\n[GOAL]\ncase hw\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\ns : Finset ι\nt : Finset ι'\nws : ι → R\nzs : ι → E\nwt : ι' → R\nzt : ι' → E\nhws : ∑ i in s, ws i = 1\nhwt : ∑ i in t, wt i = 1\na b : R\nhab : a + b = 1\n⊢ ∑ i in disjSum s t, Sum.elim (fun i => a * ws i) (fun j => b * wt j) i = 1\n[PROOFSTEP]\nrw [sum_sum_elim, ← mul_sum, ← mul_sum, hws, hwt, mul_one, mul_one, hab]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz✝ : ι → E\ns : Finset ι\nw₁ w₂ : ι → R\nz : ι → E\nhw₁ : ∑ i in s, w₁ i = 1\nhw₂ : ∑ i in s, w₂ i = 1\na b : R\nhab : a + b = 1\n⊢ a • centerMass s w₁ z + b • centerMass s w₂ z = centerMass s (fun i => a * w₁ i + b * w₂ i) z\n[PROOFSTEP]\nhave hw : (∑ i in s, (a * w₁ i + b * w₂ i)) = 1 := by simp only [mul_sum.symm, sum_add_distrib, mul_one, *]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz✝ : ι → E\ns : Finset ι\nw₁ w₂ : ι → R\nz : ι → E\nhw₁ : ∑ i in s, w₁ i = 1\nhw₂ : ∑ i in s, w₂ i = 1\na b : R\nhab : a + b = 1\n⊢ ∑ i in s, (a * w₁ i + b * w₂ i) = 1\n[PROOFSTEP]\nsimp only [mul_sum.symm, sum_add_distrib, mul_one, *]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz✝ : ι → E\ns : Finset ι\nw₁ w₂ : ι → R\nz : ι → E\nhw₁ : ∑ i in s, w₁ i = 1\nhw₂ : ∑ i in s, w₂ i = 1\na b : R\nhab : a + b = 1\nhw : ∑ i in s, (a * w₁ i + b * w₂ i) = 1\n⊢ a • centerMass s w₁ z + b • centerMass s w₂ z = centerMass s (fun i => a * w₁ i + b * w₂ i) z\n[PROOFSTEP]\nsimp only [Finset.centerMass_eq_of_sum_1, Finset.centerMass_eq_of_sum_1 _ _ hw, smul_sum, sum_add_distrib, add_smul,\n mul_smul, *]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nhi : i ∈ t\n⊢ centerMass t (fun j => if i = j then 1 else 0) z = z i\n[PROOFSTEP]\nrw [Finset.centerMass_eq_of_sum_1]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nhi : i ∈ t\n⊢ ∑ i_1 in t, (if i = i_1 then 1 else 0) • z i_1 = z i\ncase hw\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nhi : i ∈ t\n⊢ (∑ i_1 in t, if i = i_1 then 1 else 0) = 1\n[PROOFSTEP]\ntrans ∑ j in t, if i = j then z i else 0\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nhi : i ∈ t\n⊢ ∑ i_1 in t, (if i = i_1 then 1 else 0) • z i_1 = ∑ j in t, if i = j then z i else 0\n[PROOFSTEP]\ncongr with i\n[GOAL]\ncase e_f.h\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nhi : i✝ ∈ t\ni : ι\n⊢ (if i✝ = i then 1 else 0) • z i = if i✝ = i then z i✝ else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nhi : i✝ ∈ t\ni : ι\nh : i✝ = i\n⊢ 1 • z i = z i✝\ncase neg\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nhi : i✝ ∈ t\ni : ι\nh : ¬i✝ = i\n⊢ 0 • z i = 0\n[PROOFSTEP]\nexacts [h ▸ one_smul _ _, zero_smul _ _]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nhi : i ∈ t\n⊢ (∑ j in t, if i = j then z i else 0) = z i\n[PROOFSTEP]\nrw [sum_ite_eq, if_pos hi]\n[GOAL]\ncase hw\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nhi : i ∈ t\n⊢ (∑ i_1 in t, if i = i_1 then 1 else 0) = 1\n[PROOFSTEP]\nrw [sum_ite_eq, if_pos hi]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nt' : Finset ι\nht : t ⊆ t'\nh : ∀ (i : ι), i ∈ t' → ¬i ∈ t → w i = 0\n⊢ centerMass t w z = centerMass t' w z\n[PROOFSTEP]\nrw [centerMass, sum_subset ht h, smul_sum, centerMass, smul_sum]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nt' : Finset ι\nht : t ⊆ t'\nh : ∀ (i : ι), i ∈ t' → ¬i ∈ t → w i = 0\n⊢ ∑ x in t, (∑ x in t', w x)⁻¹ • w x • z x = ∑ x in t', (∑ i in t', w i)⁻¹ • w x • z x\n[PROOFSTEP]\napply sum_subset ht\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nt' : Finset ι\nht : t ⊆ t'\nh : ∀ (i : ι), i ∈ t' → ¬i ∈ t → w i = 0\n⊢ ∀ (x : ι), x ∈ t' → ¬x ∈ t → (∑ x in t', w x)⁻¹ • w x • z x = 0\n[PROOFSTEP]\nintro i hit' hit\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nt' : Finset ι\nht : t ⊆ t'\nh : ∀ (i : ι), i ∈ t' → ¬i ∈ t → w i = 0\ni : ι\nhit' : i ∈ t'\nhit : ¬i ∈ t\n⊢ (∑ x in t', w x)⁻¹ • w i • z i = 0\n[PROOFSTEP]\nrw [h i hit' hit, zero_smul, smul_zero]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ni : ι\nhit : i ∈ t\nhit' : ¬i ∈ filter (fun i => w i ≠ 0) t\n⊢ w i = 0\n[PROOFSTEP]\nsimpa only [hit, mem_filter, true_and_iff, Ne.def, Classical.not_not] using hit'\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz : ι → E\ns : Finset ι\nf : ι → α\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : 0 < ∑ i in s, w i\n⊢ s ≠ ∅\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz : ι → E\nf : ι → α\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ ∅ → 0 ≤ w i\nhw₁ : 0 < ∑ i in ∅, w i\n⊢ False\n[PROOFSTEP]\nsimp at hw₁ \n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz : ι → E\ns : Finset ι\nf : ι → α\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : 0 < ∑ i in s, w i\n⊢ centerMass s w f ≤ sup' s (_ : Finset.Nonempty s) f\n[PROOFSTEP]\nrw [centerMass, inv_smul_le_iff hw₁, sum_smul]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz : ι → E\ns : Finset ι\nf : ι → α\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : 0 < ∑ i in s, w i\n⊢ ∑ i in s, w i • f i ≤ ∑ i in s, w i • sup' s (_ : Finset.Nonempty s) f\n[PROOFSTEP]\nexact sum_le_sum fun i hi => smul_le_smul_of_nonneg (le_sup' _ hi) <| hw₀ i hi\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz : ι → E\ns : Finset ι\nf : ι → α\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : 0 < ∑ i in s, w i\n⊢ s ≠ ∅\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz : ι → E\nf : ι → α\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ ∅ → 0 ≤ w i\nhw₁ : 0 < ∑ i in ∅, w i\n⊢ False\n[PROOFSTEP]\nsimp at hw₁ \n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\n⊢ (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\n[PROOFSTEP]\ninduction' t using Finset.induction with i t hi ht\n[GOAL]\ncase empty\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\n⊢ (∀ (i : ι), i ∈ ∅ → 0 ≤ w i) → 0 < ∑ i in ∅, w i → (∀ (i : ι), i ∈ ∅ → z i ∈ s) → centerMass ∅ w z ∈ s\n[PROOFSTEP]\nsimp [lt_irrefl]\n[GOAL]\ncase insert\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\ni : ι\nt : Finset ι\nhi : ¬i ∈ t\nht : (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\n⊢ (∀ (i_1 : ι), i_1 ∈ insert i t → 0 ≤ w i_1) →\n 0 < ∑ i in insert i t, w i → (∀ (i_1 : ι), i_1 ∈ insert i t → z i_1 ∈ s) → centerMass (insert i t) w z ∈ s\n[PROOFSTEP]\nintro h₀ hpos hmem\n[GOAL]\ncase insert\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\ni : ι\nt : Finset ι\nhi : ¬i ∈ t\nht : (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\nh₀ : ∀ (i_1 : ι), i_1 ∈ insert i t → 0 ≤ w i_1\nhpos : 0 < ∑ i in insert i t, w i\nhmem : ∀ (i_1 : ι), i_1 ∈ insert i t → z i_1 ∈ s\n⊢ centerMass (insert i t) w z ∈ s\n[PROOFSTEP]\nhave zi : z i ∈ s := hmem _ (mem_insert_self _ _)\n[GOAL]\ncase insert\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\ni : ι\nt : Finset ι\nhi : ¬i ∈ t\nht : (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\nh₀ : ∀ (i_1 : ι), i_1 ∈ insert i t → 0 ≤ w i_1\nhpos : 0 < ∑ i in insert i t, w i\nhmem : ∀ (i_1 : ι), i_1 ∈ insert i t → z i_1 ∈ s\nzi : z i ∈ s\n⊢ centerMass (insert i t) w z ∈ s\n[PROOFSTEP]\nhave hs₀ : ∀ j ∈ t, 0 ≤ w j := fun j hj => h₀ j <| mem_insert_of_mem hj\n[GOAL]\ncase insert\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\ni : ι\nt : Finset ι\nhi : ¬i ∈ t\nht : (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\nh₀ : ∀ (i_1 : ι), i_1 ∈ insert i t → 0 ≤ w i_1\nhpos : 0 < ∑ i in insert i t, w i\nhmem : ∀ (i_1 : ι), i_1 ∈ insert i t → z i_1 ∈ s\nzi : z i ∈ s\nhs₀ : ∀ (j : ι), j ∈ t → 0 ≤ w j\n⊢ centerMass (insert i t) w z ∈ s\n[PROOFSTEP]\nrw [sum_insert hi] at hpos \n[GOAL]\ncase insert\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\ni : ι\nt : Finset ι\nhi : ¬i ∈ t\nht : (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\nh₀ : ∀ (i_1 : ι), i_1 ∈ insert i t → 0 ≤ w i_1\nhpos : 0 < w i + ∑ x in t, w x\nhmem : ∀ (i_1 : ι), i_1 ∈ insert i t → z i_1 ∈ s\nzi : z i ∈ s\nhs₀ : ∀ (j : ι), j ∈ t → 0 ≤ w j\n⊢ centerMass (insert i t) w z ∈ s\n[PROOFSTEP]\nby_cases hsum_t : ∑ j in t, w j = 0\n[GOAL]\ncase pos\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\ni : ι\nt : Finset ι\nhi : ¬i ∈ t\nht : (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\nh₀ : ∀ (i_1 : ι), i_1 ∈ insert i t → 0 ≤ w i_1\nhpos : 0 < w i + ∑ x in t, w x\nhmem : ∀ (i_1 : ι), i_1 ∈ insert i t → z i_1 ∈ s\nzi : z i ∈ s\nhs₀ : ∀ (j : ι), j ∈ t → 0 ≤ w j\nhsum_t : ∑ j in t, w j = 0\n⊢ centerMass (insert i t) w z ∈ s\n[PROOFSTEP]\nhave ws : ∀ j ∈ t, w j = 0 := (sum_eq_zero_iff_of_nonneg hs₀).1 hsum_t\n[GOAL]\ncase pos\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\ni : ι\nt : Finset ι\nhi : ¬i ∈ t\nht : (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\nh₀ : ∀ (i_1 : ι), i_1 ∈ insert i t → 0 ≤ w i_1\nhpos : 0 < w i + ∑ x in t, w x\nhmem : ∀ (i_1 : ι), i_1 ∈ insert i t → z i_1 ∈ s\nzi : z i ∈ s\nhs₀ : ∀ (j : ι), j ∈ t → 0 ≤ w j\nhsum_t : ∑ j in t, w j = 0\nws : ∀ (j : ι), j ∈ t → w j = 0\n⊢ centerMass (insert i t) w z ∈ s\n[PROOFSTEP]\nhave wz : ∑ j in t, w j • z j = 0 := sum_eq_zero fun i hi => by simp [ws i hi]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝¹ j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\ni✝ : ι\nt : Finset ι\nhi✝ : ¬i✝ ∈ t\nht : (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\nh₀ : ∀ (i : ι), i ∈ insert i✝ t → 0 ≤ w i\nhpos : 0 < w i✝ + ∑ x in t, w x\nhmem : ∀ (i : ι), i ∈ insert i✝ t → z i ∈ s\nzi : z i✝ ∈ s\nhs₀ : ∀ (j : ι), j ∈ t → 0 ≤ w j\nhsum_t : ∑ j in t, w j = 0\nws : ∀ (j : ι), j ∈ t → w j = 0\ni : ι\nhi : i ∈ t\n⊢ w i • z i = 0\n[PROOFSTEP]\nsimp [ws i hi]\n[GOAL]\ncase pos\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\ni : ι\nt : Finset ι\nhi : ¬i ∈ t\nht : (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\nh₀ : ∀ (i_1 : ι), i_1 ∈ insert i t → 0 ≤ w i_1\nhpos : 0 < w i + ∑ x in t, w x\nhmem : ∀ (i_1 : ι), i_1 ∈ insert i t → z i_1 ∈ s\nzi : z i ∈ s\nhs₀ : ∀ (j : ι), j ∈ t → 0 ≤ w j\nhsum_t : ∑ j in t, w j = 0\nws : ∀ (j : ι), j ∈ t → w j = 0\nwz : ∑ j in t, w j • z j = 0\n⊢ centerMass (insert i t) w z ∈ s\n[PROOFSTEP]\nsimp only [centerMass, sum_insert hi, wz, hsum_t, add_zero]\n[GOAL]\ncase pos\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\ni : ι\nt : Finset ι\nhi : ¬i ∈ t\nht : (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\nh₀ : ∀ (i_1 : ι), i_1 ∈ insert i t → 0 ≤ w i_1\nhpos : 0 < w i + ∑ x in t, w x\nhmem : ∀ (i_1 : ι), i_1 ∈ insert i t → z i_1 ∈ s\nzi : z i ∈ s\nhs₀ : ∀ (j : ι), j ∈ t → 0 ≤ w j\nhsum_t : ∑ j in t, w j = 0\nws : ∀ (j : ι), j ∈ t → w j = 0\nwz : ∑ j in t, w j • z j = 0\n⊢ (w i)⁻¹ • w i • z i ∈ s\n[PROOFSTEP]\nsimp only [hsum_t, add_zero] at hpos \n[GOAL]\ncase pos\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\ni : ι\nt : Finset ι\nhi : ¬i ∈ t\nht : (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\nh₀ : ∀ (i_1 : ι), i_1 ∈ insert i t → 0 ≤ w i_1\nhmem : ∀ (i_1 : ι), i_1 ∈ insert i t → z i_1 ∈ s\nzi : z i ∈ s\nhs₀ : ∀ (j : ι), j ∈ t → 0 ≤ w j\nhsum_t : ∑ j in t, w j = 0\nws : ∀ (j : ι), j ∈ t → w j = 0\nwz : ∑ j in t, w j • z j = 0\nhpos : 0 < w i\n⊢ (w i)⁻¹ • w i • z i ∈ s\n[PROOFSTEP]\nrw [← mul_smul, inv_mul_cancel (ne_of_gt hpos), one_smul]\n[GOAL]\ncase pos\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\ni : ι\nt : Finset ι\nhi : ¬i ∈ t\nht : (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\nh₀ : ∀ (i_1 : ι), i_1 ∈ insert i t → 0 ≤ w i_1\nhmem : ∀ (i_1 : ι), i_1 ∈ insert i t → z i_1 ∈ s\nzi : z i ∈ s\nhs₀ : ∀ (j : ι), j ∈ t → 0 ≤ w j\nhsum_t : ∑ j in t, w j = 0\nws : ∀ (j : ι), j ∈ t → w j = 0\nwz : ∑ j in t, w j • z j = 0\nhpos : 0 < w i\n⊢ z i ∈ s\n[PROOFSTEP]\nexact zi\n[GOAL]\ncase neg\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\ni : ι\nt : Finset ι\nhi : ¬i ∈ t\nht : (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\nh₀ : ∀ (i_1 : ι), i_1 ∈ insert i t → 0 ≤ w i_1\nhpos : 0 < w i + ∑ x in t, w x\nhmem : ∀ (i_1 : ι), i_1 ∈ insert i t → z i_1 ∈ s\nzi : z i ∈ s\nhs₀ : ∀ (j : ι), j ∈ t → 0 ≤ w j\nhsum_t : ¬∑ j in t, w j = 0\n⊢ centerMass (insert i t) w z ∈ s\n[PROOFSTEP]\nrw [Finset.centerMass_insert _ _ _ hi hsum_t]\n[GOAL]\ncase neg\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\ni : ι\nt : Finset ι\nhi : ¬i ∈ t\nht : (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\nh₀ : ∀ (i_1 : ι), i_1 ∈ insert i t → 0 ≤ w i_1\nhpos : 0 < w i + ∑ x in t, w x\nhmem : ∀ (i_1 : ι), i_1 ∈ insert i t → z i_1 ∈ s\nzi : z i ∈ s\nhs₀ : ∀ (j : ι), j ∈ t → 0 ≤ w j\nhsum_t : ¬∑ j in t, w j = 0\n⊢ (w i / (w i + ∑ j in t, w j)) • z i + ((∑ j in t, w j) / (w i + ∑ j in t, w j)) • centerMass t (fun j => w j) z ∈ s\n[PROOFSTEP]\nrefine' convex_iff_div.1 hs zi (ht hs₀ _ _) _ (sum_nonneg hs₀) hpos\n[GOAL]\ncase neg.refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\ni : ι\nt : Finset ι\nhi : ¬i ∈ t\nht : (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\nh₀ : ∀ (i_1 : ι), i_1 ∈ insert i t → 0 ≤ w i_1\nhpos : 0 < w i + ∑ x in t, w x\nhmem : ∀ (i_1 : ι), i_1 ∈ insert i t → z i_1 ∈ s\nzi : z i ∈ s\nhs₀ : ∀ (j : ι), j ∈ t → 0 ≤ w j\nhsum_t : ¬∑ j in t, w j = 0\n⊢ 0 < ∑ i in t, w i\n[PROOFSTEP]\nexact lt_of_le_of_ne (sum_nonneg hs₀) (Ne.symm hsum_t)\n[GOAL]\ncase neg.refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\ni : ι\nt : Finset ι\nhi : ¬i ∈ t\nht : (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\nh₀ : ∀ (i_1 : ι), i_1 ∈ insert i t → 0 ≤ w i_1\nhpos : 0 < w i + ∑ x in t, w x\nhmem : ∀ (i_1 : ι), i_1 ∈ insert i t → z i_1 ∈ s\nzi : z i ∈ s\nhs₀ : ∀ (j : ι), j ∈ t → 0 ≤ w j\nhsum_t : ¬∑ j in t, w j = 0\n⊢ ∀ (i : ι), i ∈ t → z i ∈ s\n[PROOFSTEP]\nintro j hj\n[GOAL]\ncase neg.refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j✝ : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\ni : ι\nt : Finset ι\nhi : ¬i ∈ t\nht : (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\nh₀ : ∀ (i_1 : ι), i_1 ∈ insert i t → 0 ≤ w i_1\nhpos : 0 < w i + ∑ x in t, w x\nhmem : ∀ (i_1 : ι), i_1 ∈ insert i t → z i_1 ∈ s\nzi : z i ∈ s\nhs₀ : ∀ (j : ι), j ∈ t → 0 ≤ w j\nhsum_t : ¬∑ j in t, w j = 0\nj : ι\nhj : j ∈ t\n⊢ z j ∈ s\n[PROOFSTEP]\nexact hmem j (mem_insert_of_mem hj)\n[GOAL]\ncase neg.refine'_3\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\ni : ι\nt : Finset ι\nhi : ¬i ∈ t\nht : (∀ (i : ι), i ∈ t → 0 ≤ w i) → 0 < ∑ i in t, w i → (∀ (i : ι), i ∈ t → z i ∈ s) → centerMass t w z ∈ s\nh₀ : ∀ (i_1 : ι), i_1 ∈ insert i t → 0 ≤ w i_1\nhpos : 0 < w i + ∑ x in t, w x\nhmem : ∀ (i_1 : ι), i_1 ∈ insert i t → z i_1 ∈ s\nzi : z i ∈ s\nhs₀ : ∀ (j : ι), j ∈ t → 0 ≤ w j\nhsum_t : ¬∑ j in t, w j = 0\n⊢ 0 ≤ w i\n[PROOFSTEP]\nexact h₀ _ (mem_insert_self _ _)\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nhs : Convex R s\nh₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nh₁ : ∑ i in t, w i = 1\nhz : ∀ (i : ι), i ∈ t → z i ∈ s\n⊢ ∑ i in t, w i • z i ∈ s\n[PROOFSTEP]\nsimpa only [h₁, centerMass, inv_one, one_smul] using hs.centerMass_mem h₀ (h₁.symm ▸ zero_lt_one) hz\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw✝ : ι✝ → R\nz✝ : ι✝ → E\nι : Sort u_7\nw : ι → R\nz : ι → E\ns : Set E\nhs : Convex R s\nh₀ : ∀ (i : ι), 0 ≤ w i\nh₁ : ∑ᶠ (i : ι), w i = 1\nhz : ∀ (i : ι), w i ≠ 0 → z i ∈ s\n⊢ ∑ᶠ (i : ι), w i • z i ∈ s\n[PROOFSTEP]\nhave hfin_w : (support (w ∘ PLift.down)).Finite := by\n by_contra H\n rw [finsum, dif_neg H] at h₁ \n exact zero_ne_one h₁\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw✝ : ι✝ → R\nz✝ : ι✝ → E\nι : Sort u_7\nw : ι → R\nz : ι → E\ns : Set E\nhs : Convex R s\nh₀ : ∀ (i : ι), 0 ≤ w i\nh₁ : ∑ᶠ (i : ι), w i = 1\nhz : ∀ (i : ι), w i ≠ 0 → z i ∈ s\n⊢ Set.Finite (support (w ∘ PLift.down))\n[PROOFSTEP]\nby_contra H\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw✝ : ι✝ → R\nz✝ : ι✝ → E\nι : Sort u_7\nw : ι → R\nz : ι → E\ns : Set E\nhs : Convex R s\nh₀ : ∀ (i : ι), 0 ≤ w i\nh₁ : ∑ᶠ (i : ι), w i = 1\nhz : ∀ (i : ι), w i ≠ 0 → z i ∈ s\nH : ¬Set.Finite (support (w ∘ PLift.down))\n⊢ False\n[PROOFSTEP]\nrw [finsum, dif_neg H] at h₁ \n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw✝ : ι✝ → R\nz✝ : ι✝ → E\nι : Sort u_7\nw : ι → R\nz : ι → E\ns : Set E\nhs : Convex R s\nh₀ : ∀ (i : ι), 0 ≤ w i\nh₁ : 0 = 1\nhz : ∀ (i : ι), w i ≠ 0 → z i ∈ s\nH : ¬Set.Finite (support (w ∘ PLift.down))\n⊢ False\n[PROOFSTEP]\nexact zero_ne_one h₁\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw✝ : ι✝ → R\nz✝ : ι✝ → E\nι : Sort u_7\nw : ι → R\nz : ι → E\ns : Set E\nhs : Convex R s\nh₀ : ∀ (i : ι), 0 ≤ w i\nh₁ : ∑ᶠ (i : ι), w i = 1\nhz : ∀ (i : ι), w i ≠ 0 → z i ∈ s\nhfin_w : Set.Finite (support (w ∘ PLift.down))\n⊢ ∑ᶠ (i : ι), w i • z i ∈ s\n[PROOFSTEP]\nhave hsub : support ((fun i => w i • z i) ∘ PLift.down) ⊆ hfin_w.toFinset :=\n (support_smul_subset_left _ _).trans hfin_w.coe_toFinset.ge\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw✝ : ι✝ → R\nz✝ : ι✝ → E\nι : Sort u_7\nw : ι → R\nz : ι → E\ns : Set E\nhs : Convex R s\nh₀ : ∀ (i : ι), 0 ≤ w i\nh₁ : ∑ᶠ (i : ι), w i = 1\nhz : ∀ (i : ι), w i ≠ 0 → z i ∈ s\nhfin_w : Set.Finite (support (w ∘ PLift.down))\nhsub : support ((fun i => w i • z i) ∘ PLift.down) ⊆ ↑(Finite.toFinset hfin_w)\n⊢ ∑ᶠ (i : ι), w i • z i ∈ s\n[PROOFSTEP]\nrw [finsum_eq_sum_pLift_of_support_subset hsub]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw✝ : ι✝ → R\nz✝ : ι✝ → E\nι : Sort u_7\nw : ι → R\nz : ι → E\ns : Set E\nhs : Convex R s\nh₀ : ∀ (i : ι), 0 ≤ w i\nh₁ : ∑ᶠ (i : ι), w i = 1\nhz : ∀ (i : ι), w i ≠ 0 → z i ∈ s\nhfin_w : Set.Finite (support (w ∘ PLift.down))\nhsub : support ((fun i => w i • z i) ∘ PLift.down) ⊆ ↑(Finite.toFinset hfin_w)\n⊢ ∑ i in Finite.toFinset hfin_w, w i.down • z i.down ∈ s\n[PROOFSTEP]\nrefine' hs.sum_mem (fun _ _ => h₀ _) _ fun i hi => hz _ _\n[GOAL]\ncase refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw✝ : ι✝ → R\nz✝ : ι✝ → E\nι : Sort u_7\nw : ι → R\nz : ι → E\ns : Set E\nhs : Convex R s\nh₀ : ∀ (i : ι), 0 ≤ w i\nh₁ : ∑ᶠ (i : ι), w i = 1\nhz : ∀ (i : ι), w i ≠ 0 → z i ∈ s\nhfin_w : Set.Finite (support (w ∘ PLift.down))\nhsub : support ((fun i => w i • z i) ∘ PLift.down) ⊆ ↑(Finite.toFinset hfin_w)\n⊢ ∑ i in Finite.toFinset hfin_w, w i.down = 1\n[PROOFSTEP]\nrwa [finsum, dif_pos hfin_w] at h₁ \n[GOAL]\ncase refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι✝\nc : R\nt : Finset ι✝\nw✝ : ι✝ → R\nz✝ : ι✝ → E\nι : Sort u_7\nw : ι → R\nz : ι → E\ns : Set E\nhs : Convex R s\nh₀ : ∀ (i : ι), 0 ≤ w i\nh₁ : ∑ᶠ (i : ι), w i = 1\nhz : ∀ (i : ι), w i ≠ 0 → z i ∈ s\nhfin_w : Set.Finite (support (w ∘ PLift.down))\nhsub : support ((fun i => w i • z i) ∘ PLift.down) ⊆ ↑(Finite.toFinset hfin_w)\ni : PLift ι\nhi : i ∈ Finite.toFinset hfin_w\n⊢ w i.down ≠ 0\n[PROOFSTEP]\nrwa [hfin_w.mem_toFinset] at hi \n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\n⊢ Convex R s ↔\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\n[PROOFSTEP]\nrefine' ⟨fun hs t w hw₀ hw₁ hts => hs.sum_mem hw₀ hw₁ hts, _⟩\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\n⊢ (∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s) →\n Convex R s\n[PROOFSTEP]\nintro h x hx y hy a b ha hb hab\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nh :\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\nx : E\nhx : x ∈ s\ny : E\nhy : y ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ a • x + b • y ∈ s\n[PROOFSTEP]\nby_cases h_cases : x = y\n[GOAL]\ncase pos\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nh :\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\nx : E\nhx : x ∈ s\ny : E\nhy : y ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nh_cases : x = y\n⊢ a • x + b • y ∈ s\n[PROOFSTEP]\nrw [h_cases, ← add_smul, hab, one_smul]\n[GOAL]\ncase pos\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nh :\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\nx : E\nhx : x ∈ s\ny : E\nhy : y ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nh_cases : x = y\n⊢ y ∈ s\n[PROOFSTEP]\nexact hy\n[GOAL]\ncase neg\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nh :\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\nx : E\nhx : x ∈ s\ny : E\nhy : y ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nh_cases : ¬x = y\n⊢ a • x + b • y ∈ s\n[PROOFSTEP]\nconvert\n h { x, y } (fun z => if z = y then b else a) _ _\n _\n -- Porting note: Original proof had 2 `simp_intro i hi`\n[GOAL]\ncase h.e'_4\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nh :\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\nx : E\nhx : x ∈ s\ny : E\nhy : y ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nh_cases : ¬x = y\n⊢ a • x + b • y = ∑ x in {x, y}, (if x = y then b else a) • x\n[PROOFSTEP]\nsimp only [sum_pair h_cases, if_neg h_cases, if_pos trivial]\n[GOAL]\ncase neg.convert_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nh :\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\nx : E\nhx : x ∈ s\ny : E\nhy : y ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nh_cases : ¬x = y\n⊢ ∀ (i : E), i ∈ {x, y} → 0 ≤ (fun z => if z = y then b else a) i\n[PROOFSTEP]\nintro i _\n[GOAL]\ncase neg.convert_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nh :\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\nx : E\nhx : x ∈ s\ny : E\nhy : y ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nh_cases : ¬x = y\ni : E\na✝ : i ∈ {x, y}\n⊢ 0 ≤ (fun z => if z = y then b else a) i\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase neg.convert_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nh :\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\nx : E\nhx : x ∈ s\ny : E\nhy : y ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nh_cases : ¬x = y\ni : E\na✝ : i ∈ {x, y}\n⊢ 0 ≤ if i = y then b else a\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nh :\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\nx : E\nhx : x ∈ s\ny : E\nhy : y ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nh_cases : ¬x = y\ni : E\na✝ : i ∈ {x, y}\nh✝ : i = y\n⊢ 0 ≤ b\n[PROOFSTEP]\nassumption\n[GOAL]\ncase neg\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nh :\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\nx : E\nhx : x ∈ s\ny : E\nhy : y ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nh_cases : ¬x = y\ni : E\na✝ : i ∈ {x, y}\nh✝ : ¬i = y\n⊢ 0 ≤ a\n[PROOFSTEP]\nassumption\n[GOAL]\ncase neg.convert_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nh :\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\nx : E\nhx : x ∈ s\ny : E\nhy : y ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nh_cases : ¬x = y\n⊢ ∑ i in {x, y}, (fun z => if z = y then b else a) i = 1\n[PROOFSTEP]\nsimp only [sum_pair h_cases, if_neg h_cases, if_pos trivial, hab]\n[GOAL]\ncase neg.convert_3\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nh :\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\nx : E\nhx : x ∈ s\ny : E\nhy : y ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nh_cases : ¬x = y\n⊢ ∀ (x_1 : E), x_1 ∈ {x, y} → x_1 ∈ s\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase neg.convert_3\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nh :\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\nx : E\nhx : x ∈ s\ny : E\nhy : y ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nh_cases : ¬x = y\ni : E\nhi : i ∈ {x, y}\n⊢ i ∈ s\n[PROOFSTEP]\nsimp only [Finset.mem_singleton, Finset.mem_insert] at hi \n[GOAL]\ncase neg.convert_3\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nh :\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\nx : E\nhx : x ∈ s\ny : E\nhy : y ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nh_cases : ¬x = y\ni : E\nhi : i = x ∨ i = y\n⊢ i ∈ s\n[PROOFSTEP]\ncases hi\n[GOAL]\ncase neg.convert_3.inl\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nh :\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\nx : E\nhx : x ∈ s\ny : E\nhy : y ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nh_cases : ¬x = y\ni : E\nh✝ : i = x\n⊢ i ∈ s\n[PROOFSTEP]\nsubst i\n[GOAL]\ncase neg.convert_3.inr\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nh :\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\nx : E\nhx : x ∈ s\ny : E\nhy : y ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nh_cases : ¬x = y\ni : E\nh✝ : i = y\n⊢ i ∈ s\n[PROOFSTEP]\nsubst i\n[GOAL]\ncase neg.convert_3.inl\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nh :\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\nx : E\nhx : x ∈ s\ny : E\nhy : y ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nh_cases : ¬x = y\n⊢ x ∈ s\n[PROOFSTEP]\nassumption\n[GOAL]\ncase neg.convert_3.inr\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\nh :\n ∀ (t : Finset E) (w : E → R),\n (∀ (i : E), i ∈ t → 0 ≤ w i) → ∑ i in t, w i = 1 → (∀ (x : E), x ∈ t → x ∈ s) → ∑ x in t, w x • x ∈ s\nx : E\nhx : x ∈ s\ny : E\nhy : y ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nh_cases : ¬x = y\n⊢ y ∈ s\n[PROOFSTEP]\nassumption\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nι : Type u_7\nt : Finset ι\np : ι → E\nw : ι → R\nhw₂ : ∑ i in t, w i = 1\n⊢ ↑(affineCombination R t p) w = centerMass t w p\n[PROOFSTEP]\nrw [affineCombination_eq_weightedVSubOfPoint_vadd_of_sum_eq_one _ w _ hw₂ (0 : E), Finset.weightedVSubOfPoint_apply,\n vadd_eq_add, add_zero, t.centerMass_eq_of_sum_1 _ hw₂]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nι : Type u_7\nt : Finset ι\np : ι → E\nw : ι → R\nhw₂ : ∑ i in t, w i = 1\n⊢ ∑ i in t, w i • (p i -ᵥ 0) = ∑ i in t, w i • p i\n[PROOFSTEP]\nsimp_rw [vsub_eq_sub, sub_zero]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz : ι → E\ns : Finset ι\nv : ι → E\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\n⊢ ↑(affineCombination R s v) w ∈ ↑(convexHull R) (Set.range v)\n[PROOFSTEP]\nrw [affineCombination_eq_centerMass hw₁]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz : ι → E\ns : Finset ι\nv : ι → E\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\n⊢ centerMass s (fun i => w i) v ∈ ↑(convexHull R) (Set.range v)\n[PROOFSTEP]\napply s.centerMass_mem_convexHull hw₀\n[GOAL]\ncase hws\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz : ι → E\ns : Finset ι\nv : ι → E\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\n⊢ 0 < ∑ i in s, w i\n[PROOFSTEP]\nsimp [hw₁]\n[GOAL]\ncase hz\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz : ι → E\ns : Finset ι\nv : ι → E\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\n⊢ ∀ (i : ι), i ∈ s → v i ∈ Set.range v\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nhs : Finset.Nonempty s\n⊢ centroid R s id ∈ ↑(convexHull R) ↑s\n[PROOFSTEP]\nrw [s.centroid_eq_centerMass hs]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nhs : Finset.Nonempty s\n⊢ centerMass s (centroidWeights R s) id ∈ ↑(convexHull R) ↑s\n[PROOFSTEP]\napply s.centerMass_id_mem_convexHull\n[GOAL]\ncase hw₀\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nhs : Finset.Nonempty s\n⊢ ∀ (i : E), i ∈ s → 0 ≤ centroidWeights R s i\n[PROOFSTEP]\nsimp only [inv_nonneg, imp_true_iff, Nat.cast_nonneg, Finset.centroidWeights_apply]\n[GOAL]\ncase hws\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nhs : Finset.Nonempty s\n⊢ 0 < ∑ i in s, centroidWeights R s i\n[PROOFSTEP]\nhave hs_card : (s.card : R) ≠ 0 := by simp [Finset.nonempty_iff_ne_empty.mp hs]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nhs : Finset.Nonempty s\n⊢ ↑(card s) ≠ 0\n[PROOFSTEP]\nsimp [Finset.nonempty_iff_ne_empty.mp hs]\n[GOAL]\ncase hws\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nhs : Finset.Nonempty s\nhs_card : ↑(card s) ≠ 0\n⊢ 0 < ∑ i in s, centroidWeights R s i\n[PROOFSTEP]\nsimp only [hs_card, Finset.sum_const, nsmul_eq_mul, mul_inv_cancel, Ne.def, not_false_iff, Finset.centroidWeights_apply,\n zero_lt_one]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz v : ι → E\n⊢ ↑(convexHull R) (Set.range v) = {x | ∃ s w x_1 x_2, ↑(affineCombination R s v) w = x}\n[PROOFSTEP]\nrefine' Subset.antisymm (convexHull_min _ _) _\n[GOAL]\ncase refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz v : ι → E\n⊢ Set.range v ⊆ {x | ∃ s w x_1 x_2, ↑(affineCombination R s v) w = x}\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz v : ι → E\nx : E\nhx : x ∈ Set.range v\n⊢ x ∈ {x | ∃ s w x_1 x_2, ↑(affineCombination R s v) w = x}\n[PROOFSTEP]\nobtain ⟨i, hi⟩ := Set.mem_range.mp hx\n[GOAL]\ncase refine'_1.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz v : ι → E\nx : E\nhx : x ∈ Set.range v\ni : ι\nhi : v i = x\n⊢ x ∈ {x | ∃ s w x_1 x_2, ↑(affineCombination R s v) w = x}\n[PROOFSTEP]\nrefine' ⟨{ i }, Function.const ι (1 : R), by simp, by simp, by simp [hi]⟩\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz v : ι → E\nx : E\nhx : x ∈ Set.range v\ni : ι\nhi : v i = x\n⊢ ∀ (i_1 : ι), i_1 ∈ {i} → 0 ≤ const ι 1 i_1\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz v : ι → E\nx : E\nhx : x ∈ Set.range v\ni : ι\nhi : v i = x\n⊢ Finset.sum {i} (const ι 1) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz v : ι → E\nx : E\nhx : x ∈ Set.range v\ni : ι\nhi : v i = x\n⊢ ↑(affineCombination R {i} v) (const ι 1) = x\n[PROOFSTEP]\nsimp [hi]\n[GOAL]\ncase refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz v : ι → E\n⊢ Convex R {x | ∃ s w x_1 x_2, ↑(affineCombination R s v) w = x}\n[PROOFSTEP]\nrintro x ⟨s, w, hw₀, hw₁, rfl⟩ y ⟨s', w', hw₀', hw₁', rfl⟩ a b ha hb hab\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ a • ↑(affineCombination R s v) w + b • ↑(affineCombination R s' v) w' ∈\n {x | ∃ s w x_1 x_2, ↑(affineCombination R s v) w = x}\n[PROOFSTEP]\nlet W : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\n⊢ a • ↑(affineCombination R s v) w + b • ↑(affineCombination R s' v) w' ∈\n {x | ∃ s w x_1 x_2, ↑(affineCombination R s v) w = x}\n[PROOFSTEP]\nhave hW₁ : (s ∪ s').sum W = 1 := by\n rw [sum_add_distrib, ← sum_subset (subset_union_left s s'), ← sum_subset (subset_union_right s s'),\n sum_ite_of_true _ _ fun i hi => hi, sum_ite_of_true _ _ fun i hi => hi, ← mul_sum, ← mul_sum, hw₁, hw₁', ←\n add_mul, hab, mul_one] <;>\n intro i _ hi' <;>\n simp [hi']\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\n⊢ Finset.sum (s ∪ s') W = 1\n[PROOFSTEP]\nrw [sum_add_distrib, ← sum_subset (subset_union_left s s'), ← sum_subset (subset_union_right s s'),\n sum_ite_of_true _ _ fun i hi => hi, sum_ite_of_true _ _ fun i hi => hi, ← mul_sum, ← mul_sum, hw₁, hw₁', ← add_mul,\n hab, mul_one]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\n⊢ ∀ (x : ι), x ∈ s ∪ s' → ¬x ∈ s' → (if x ∈ s' then b * w' x else 0) = 0\n[PROOFSTEP]\nintro i _ hi'\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\n⊢ ∀ (x : ι), x ∈ s ∪ s' → ¬x ∈ s → (if x ∈ s then a * w x else 0) = 0\n[PROOFSTEP]\nintro i _ hi'\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\ni : ι\na✝ : i ∈ s ∪ s'\nhi' : ¬i ∈ s'\n⊢ (if i ∈ s' then b * w' i else 0) = 0\n[PROOFSTEP]\nsimp [hi']\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\ni : ι\na✝ : i ∈ s ∪ s'\nhi' : ¬i ∈ s\n⊢ (if i ∈ s then a * w i else 0) = 0\n[PROOFSTEP]\nsimp [hi']\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\nhW₁ : Finset.sum (s ∪ s') W = 1\n⊢ a • ↑(affineCombination R s v) w + b • ↑(affineCombination R s' v) w' ∈\n {x | ∃ s w x_1 x_2, ↑(affineCombination R s v) w = x}\n[PROOFSTEP]\nrefine' ⟨s ∪ s', W, _, hW₁, _⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\nhW₁ : Finset.sum (s ∪ s') W = 1\n⊢ ∀ (i : ι), i ∈ s ∪ s' → 0 ≤ W i\n[PROOFSTEP]\nrintro i -\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\nhW₁ : Finset.sum (s ∪ s') W = 1\ni : ι\n⊢ 0 ≤ W i\n[PROOFSTEP]\nby_cases hi : i ∈ s\n[GOAL]\ncase pos\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\nhW₁ : Finset.sum (s ∪ s') W = 1\ni : ι\nhi : i ∈ s\n⊢ 0 ≤ W i\n[PROOFSTEP]\nby_cases hi' : i ∈ s'\n[GOAL]\ncase neg\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\nhW₁ : Finset.sum (s ∪ s') W = 1\ni : ι\nhi : ¬i ∈ s\n⊢ 0 ≤ W i\n[PROOFSTEP]\nby_cases hi' : i ∈ s'\n[GOAL]\ncase pos\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\nhW₁ : Finset.sum (s ∪ s') W = 1\ni : ι\nhi : i ∈ s\nhi' : i ∈ s'\n⊢ 0 ≤ W i\n[PROOFSTEP]\nsimp [hi, hi', add_nonneg, mul_nonneg ha (hw₀ i _), mul_nonneg hb (hw₀' i _)]\n[GOAL]\ncase neg\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\nhW₁ : Finset.sum (s ∪ s') W = 1\ni : ι\nhi : i ∈ s\nhi' : ¬i ∈ s'\n⊢ 0 ≤ W i\n[PROOFSTEP]\nsimp [hi, hi', add_nonneg, mul_nonneg ha (hw₀ i _), mul_nonneg hb (hw₀' i _)]\n[GOAL]\ncase pos\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\nhW₁ : Finset.sum (s ∪ s') W = 1\ni : ι\nhi : ¬i ∈ s\nhi' : i ∈ s'\n⊢ 0 ≤ W i\n[PROOFSTEP]\nsimp [hi, hi', add_nonneg, mul_nonneg ha (hw₀ i _), mul_nonneg hb (hw₀' i _)]\n[GOAL]\ncase neg\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\nhW₁ : Finset.sum (s ∪ s') W = 1\ni : ι\nhi : ¬i ∈ s\nhi' : ¬i ∈ s'\n⊢ 0 ≤ W i\n[PROOFSTEP]\nsimp [hi, hi', add_nonneg, mul_nonneg ha (hw₀ i _), mul_nonneg hb (hw₀' i _)]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\nhW₁ : Finset.sum (s ∪ s') W = 1\n⊢ ↑(affineCombination R (s ∪ s') v) W = a • ↑(affineCombination R s v) w + b • ↑(affineCombination R s' v) w'\n[PROOFSTEP]\nsimp_rw [affineCombination_eq_linear_combination (s ∪ s') v _ hW₁, affineCombination_eq_linear_combination s v w hw₁,\n affineCombination_eq_linear_combination s' v w' hw₁', add_smul, sum_add_distrib]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\nhW₁ : Finset.sum (s ∪ s') W = 1\n⊢ ∑ x in s ∪ s', (if x ∈ s then a * w x else 0) • v x + ∑ x in s ∪ s', (if x ∈ s' then b * w' x else 0) • v x =\n a • ∑ i in s, w i • v i + b • ∑ i in s', w' i • v i\n[PROOFSTEP]\nrw [← sum_subset (subset_union_left s s'), ← sum_subset (subset_union_right s s')]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\nhW₁ : Finset.sum (s ∪ s') W = 1\n⊢ ∑ x in s, (if x ∈ s then a * w x else 0) • v x + ∑ x in s', (if x ∈ s' then b * w' x else 0) • v x =\n a • ∑ i in s, w i • v i + b • ∑ i in s', w' i • v i\n[PROOFSTEP]\nsimp only [ite_smul, sum_ite_of_true _ _ fun _ hi => hi, mul_smul, ← smul_sum]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\nhW₁ : Finset.sum (s ∪ s') W = 1\n⊢ ∀ (x : ι), x ∈ s ∪ s' → ¬x ∈ s' → (if x ∈ s' then b * w' x else 0) • v x = 0\n[PROOFSTEP]\nintro i _ hi'\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\nhW₁ : Finset.sum (s ∪ s') W = 1\ni : ι\na✝ : i ∈ s ∪ s'\nhi' : ¬i ∈ s'\n⊢ (if i ∈ s' then b * w' i else 0) • v i = 0\n[PROOFSTEP]\nsimp [hi']\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\nhW₁ : Finset.sum (s ∪ s') W = 1\n⊢ ∀ (x : ι), x ∈ s ∪ s' → ¬x ∈ s → (if x ∈ s then a * w x else 0) • v x = 0\n[PROOFSTEP]\nintro i _ hi'\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ns' : Finset ι\nw' : ι → R\nhw₀' : ∀ (i : ι), i ∈ s' → 0 ≤ w' i\nhw₁' : Finset.sum s' w' = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nW : ι → R := fun i => (if i ∈ s then a * w i else 0) + if i ∈ s' then b * w' i else 0\nhW₁ : Finset.sum (s ∪ s') W = 1\ni : ι\na✝ : i ∈ s ∪ s'\nhi' : ¬i ∈ s\n⊢ (if i ∈ s then a * w i else 0) • v i = 0\n[PROOFSTEP]\nsimp [hi']\n[GOAL]\ncase refine'_3\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz v : ι → E\n⊢ {x | ∃ s w x_1 x_2, ↑(affineCombination R s v) w = x} ⊆ ↑(convexHull R) (Set.range v)\n[PROOFSTEP]\nrintro x ⟨s, w, hw₀, hw₁, rfl⟩\n[GOAL]\ncase refine'_3.intro.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz v : ι → E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\n⊢ ↑(affineCombination R s v) w ∈ ↑(convexHull R) (Set.range v)\n[PROOFSTEP]\nexact affineCombination_mem_convexHull hw₀ hw₁\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Set E\n⊢ ↑(convexHull R) s = {x | ∃ ι t w z x_1 x_2 x_3, centerMass t w z = x}\n[PROOFSTEP]\nrefine' Subset.antisymm (convexHull_min _ _) _\n[GOAL]\ncase refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Set E\n⊢ s ⊆ {x | ∃ ι t w z x_1 x_2 x_3, centerMass t w z = x}\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Set E\nx : E\nhx : x ∈ s\n⊢ x ∈ {x | ∃ ι t w z x_1 x_2 x_3, centerMass t w z = x}\n[PROOFSTEP]\nuse PUnit, { PUnit.unit }, fun _ => 1, fun _ => x, fun _ _ => zero_le_one, Finset.sum_singleton, fun _ _ => hx\n[GOAL]\ncase h\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Set E\nx : E\nhx : x ∈ s\n⊢ (centerMass {PUnit.unit} (fun x => 1) fun x_1 => x) = x\n[PROOFSTEP]\nsimp only [Finset.centerMass, Finset.sum_singleton, inv_one, one_smul]\n[GOAL]\ncase refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Set E\n⊢ Convex R {x | ∃ ι t w z x_1 x_2 x_3, centerMass t w z = x}\n[PROOFSTEP]\nrintro x ⟨ι, sx, wx, zx, hwx₀, hwx₁, hzx, rfl⟩ y ⟨ι', sy, wy, zy, hwy₀, hwy₁, hzy, rfl⟩ a b ha hb hab\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι'✝ : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ns : Set E\nι : Type\nsx : Finset ι\nwx : ι → R\nzx : ι → E\nhwx₀ : ∀ (i : ι), i ∈ sx → 0 ≤ wx i\nhwx₁ : ∑ i in sx, wx i = 1\nhzx : ∀ (i : ι), i ∈ sx → zx i ∈ s\nι' : Type\nsy : Finset ι'\nwy : ι' → R\nzy : ι' → E\nhwy₀ : ∀ (i : ι'), i ∈ sy → 0 ≤ wy i\nhwy₁ : ∑ i in sy, wy i = 1\nhzy : ∀ (i : ι'), i ∈ sy → zy i ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ a • centerMass sx wx zx + b • centerMass sy wy zy ∈ {x | ∃ ι t w z x_1 x_2 x_3, centerMass t w z = x}\n[PROOFSTEP]\nrw [Finset.centerMass_segment' _ _ _ _ _ _ hwx₁ hwy₁ _ _ hab]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι'✝ : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ns : Set E\nι : Type\nsx : Finset ι\nwx : ι → R\nzx : ι → E\nhwx₀ : ∀ (i : ι), i ∈ sx → 0 ≤ wx i\nhwx₁ : ∑ i in sx, wx i = 1\nhzx : ∀ (i : ι), i ∈ sx → zx i ∈ s\nι' : Type\nsy : Finset ι'\nwy : ι' → R\nzy : ι' → E\nhwy₀ : ∀ (i : ι'), i ∈ sy → 0 ≤ wy i\nhwy₁ : ∑ i in sy, wy i = 1\nhzy : ∀ (i : ι'), i ∈ sy → zy i ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ centerMass (disjSum sx sy) (Sum.elim (fun i => a * wx i) fun j => b * wy j) (Sum.elim zx zy) ∈\n {x | ∃ ι t w z x_1 x_2 x_3, centerMass t w z = x}\n[PROOFSTEP]\nrefine' ⟨_, _, _, _, _, _, _, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι'✝ : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ns : Set E\nι : Type\nsx : Finset ι\nwx : ι → R\nzx : ι → E\nhwx₀ : ∀ (i : ι), i ∈ sx → 0 ≤ wx i\nhwx₁ : ∑ i in sx, wx i = 1\nhzx : ∀ (i : ι), i ∈ sx → zx i ∈ s\nι' : Type\nsy : Finset ι'\nwy : ι' → R\nzy : ι' → E\nhwy₀ : ∀ (i : ι'), i ∈ sy → 0 ≤ wy i\nhwy₁ : ∑ i in sy, wy i = 1\nhzy : ∀ (i : ι'), i ∈ sy → zy i ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ ∀ (i : ι ⊕ ι'), i ∈ disjSum sx sy → 0 ≤ Sum.elim (fun i => a * wx i) (fun j => b * wy j) i\n[PROOFSTEP]\nrintro i hi\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι'✝ : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ns : Set E\nι : Type\nsx : Finset ι\nwx : ι → R\nzx : ι → E\nhwx₀ : ∀ (i : ι), i ∈ sx → 0 ≤ wx i\nhwx₁ : ∑ i in sx, wx i = 1\nhzx : ∀ (i : ι), i ∈ sx → zx i ∈ s\nι' : Type\nsy : Finset ι'\nwy : ι' → R\nzy : ι' → E\nhwy₀ : ∀ (i : ι'), i ∈ sy → 0 ≤ wy i\nhwy₁ : ∑ i in sy, wy i = 1\nhzy : ∀ (i : ι'), i ∈ sy → zy i ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\ni : ι ⊕ ι'\nhi : i ∈ disjSum sx sy\n⊢ 0 ≤ Sum.elim (fun i => a * wx i) (fun j => b * wy j) i\n[PROOFSTEP]\nrw [Finset.mem_disjSum] at hi \n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι'✝ : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ns : Set E\nι : Type\nsx : Finset ι\nwx : ι → R\nzx : ι → E\nhwx₀ : ∀ (i : ι), i ∈ sx → 0 ≤ wx i\nhwx₁ : ∑ i in sx, wx i = 1\nhzx : ∀ (i : ι), i ∈ sx → zx i ∈ s\nι' : Type\nsy : Finset ι'\nwy : ι' → R\nzy : ι' → E\nhwy₀ : ∀ (i : ι'), i ∈ sy → 0 ≤ wy i\nhwy₁ : ∑ i in sy, wy i = 1\nhzy : ∀ (i : ι'), i ∈ sy → zy i ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\ni : ι ⊕ ι'\nhi : (∃ a, a ∈ sx ∧ Sum.inl a = i) ∨ ∃ b, b ∈ sy ∧ Sum.inr b = i\n⊢ 0 ≤ Sum.elim (fun i => a * wx i) (fun j => b * wy j) i\n[PROOFSTEP]\nrcases hi with (⟨j, hj, rfl⟩ | ⟨j, hj, rfl⟩)\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1.inl.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι'✝ : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j✝ : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ns : Set E\nι : Type\nsx : Finset ι\nwx : ι → R\nzx : ι → E\nhwx₀ : ∀ (i : ι), i ∈ sx → 0 ≤ wx i\nhwx₁ : ∑ i in sx, wx i = 1\nhzx : ∀ (i : ι), i ∈ sx → zx i ∈ s\nι' : Type\nsy : Finset ι'\nwy : ι' → R\nzy : ι' → E\nhwy₀ : ∀ (i : ι'), i ∈ sy → 0 ≤ wy i\nhwy₁ : ∑ i in sy, wy i = 1\nhzy : ∀ (i : ι'), i ∈ sy → zy i ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nj : ι\nhj : j ∈ sx\n⊢ 0 ≤ Sum.elim (fun i => a * wx i) (fun j => b * wy j) (Sum.inl j)\n[PROOFSTEP]\nsimp only [Sum.elim_inl, Sum.elim_inr]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1.inr.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι'✝ : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j✝ : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ns : Set E\nι : Type\nsx : Finset ι\nwx : ι → R\nzx : ι → E\nhwx₀ : ∀ (i : ι), i ∈ sx → 0 ≤ wx i\nhwx₁ : ∑ i in sx, wx i = 1\nhzx : ∀ (i : ι), i ∈ sx → zx i ∈ s\nι' : Type\nsy : Finset ι'\nwy : ι' → R\nzy : ι' → E\nhwy₀ : ∀ (i : ι'), i ∈ sy → 0 ≤ wy i\nhwy₁ : ∑ i in sy, wy i = 1\nhzy : ∀ (i : ι'), i ∈ sy → zy i ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nj : ι'\nhj : j ∈ sy\n⊢ 0 ≤ Sum.elim (fun i => a * wx i) (fun j => b * wy j) (Sum.inr j)\n[PROOFSTEP]\nsimp only [Sum.elim_inl, Sum.elim_inr]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1.inl.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι'✝ : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j✝ : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ns : Set E\nι : Type\nsx : Finset ι\nwx : ι → R\nzx : ι → E\nhwx₀ : ∀ (i : ι), i ∈ sx → 0 ≤ wx i\nhwx₁ : ∑ i in sx, wx i = 1\nhzx : ∀ (i : ι), i ∈ sx → zx i ∈ s\nι' : Type\nsy : Finset ι'\nwy : ι' → R\nzy : ι' → E\nhwy₀ : ∀ (i : ι'), i ∈ sy → 0 ≤ wy i\nhwy₁ : ∑ i in sy, wy i = 1\nhzy : ∀ (i : ι'), i ∈ sy → zy i ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nj : ι\nhj : j ∈ sx\n⊢ 0 ≤ a * wx j\n[PROOFSTEP]\napply_rules [mul_nonneg, hwx₀, hwy₀]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1.inr.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι'✝ : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j✝ : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ns : Set E\nι : Type\nsx : Finset ι\nwx : ι → R\nzx : ι → E\nhwx₀ : ∀ (i : ι), i ∈ sx → 0 ≤ wx i\nhwx₁ : ∑ i in sx, wx i = 1\nhzx : ∀ (i : ι), i ∈ sx → zx i ∈ s\nι' : Type\nsy : Finset ι'\nwy : ι' → R\nzy : ι' → E\nhwy₀ : ∀ (i : ι'), i ∈ sy → 0 ≤ wy i\nhwy₁ : ∑ i in sy, wy i = 1\nhzy : ∀ (i : ι'), i ∈ sy → zy i ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nj : ι'\nhj : j ∈ sy\n⊢ 0 ≤ b * wy j\n[PROOFSTEP]\napply_rules [mul_nonneg, hwx₀, hwy₀]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι'✝ : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ns : Set E\nι : Type\nsx : Finset ι\nwx : ι → R\nzx : ι → E\nhwx₀ : ∀ (i : ι), i ∈ sx → 0 ≤ wx i\nhwx₁ : ∑ i in sx, wx i = 1\nhzx : ∀ (i : ι), i ∈ sx → zx i ∈ s\nι' : Type\nsy : Finset ι'\nwy : ι' → R\nzy : ι' → E\nhwy₀ : ∀ (i : ι'), i ∈ sy → 0 ≤ wy i\nhwy₁ : ∑ i in sy, wy i = 1\nhzy : ∀ (i : ι'), i ∈ sy → zy i ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ ∑ i in disjSum sx sy, Sum.elim (fun i => a * wx i) (fun j => b * wy j) i = 1\n[PROOFSTEP]\nsimp [Finset.sum_sum_elim, Finset.mul_sum.symm, *]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι'✝ : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ns : Set E\nι : Type\nsx : Finset ι\nwx : ι → R\nzx : ι → E\nhwx₀ : ∀ (i : ι), i ∈ sx → 0 ≤ wx i\nhwx₁ : ∑ i in sx, wx i = 1\nhzx : ∀ (i : ι), i ∈ sx → zx i ∈ s\nι' : Type\nsy : Finset ι'\nwy : ι' → R\nzy : ι' → E\nhwy₀ : ∀ (i : ι'), i ∈ sy → 0 ≤ wy i\nhwy₁ : ∑ i in sy, wy i = 1\nhzy : ∀ (i : ι'), i ∈ sy → zy i ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ ∀ (i : ι ⊕ ι'), i ∈ disjSum sx sy → Sum.elim zx zy i ∈ s\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι'✝ : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ns : Set E\nι : Type\nsx : Finset ι\nwx : ι → R\nzx : ι → E\nhwx₀ : ∀ (i : ι), i ∈ sx → 0 ≤ wx i\nhwx₁ : ∑ i in sx, wx i = 1\nhzx : ∀ (i : ι), i ∈ sx → zx i ∈ s\nι' : Type\nsy : Finset ι'\nwy : ι' → R\nzy : ι' → E\nhwy₀ : ∀ (i : ι'), i ∈ sy → 0 ≤ wy i\nhwy₁ : ∑ i in sy, wy i = 1\nhzy : ∀ (i : ι'), i ∈ sy → zy i ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\ni : ι ⊕ ι'\nhi : i ∈ disjSum sx sy\n⊢ Sum.elim zx zy i ∈ s\n[PROOFSTEP]\nrw [Finset.mem_disjSum] at hi \n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι'✝ : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ns : Set E\nι : Type\nsx : Finset ι\nwx : ι → R\nzx : ι → E\nhwx₀ : ∀ (i : ι), i ∈ sx → 0 ≤ wx i\nhwx₁ : ∑ i in sx, wx i = 1\nhzx : ∀ (i : ι), i ∈ sx → zx i ∈ s\nι' : Type\nsy : Finset ι'\nwy : ι' → R\nzy : ι' → E\nhwy₀ : ∀ (i : ι'), i ∈ sy → 0 ≤ wy i\nhwy₁ : ∑ i in sy, wy i = 1\nhzy : ∀ (i : ι'), i ∈ sy → zy i ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\ni : ι ⊕ ι'\nhi : (∃ a, a ∈ sx ∧ Sum.inl a = i) ∨ ∃ b, b ∈ sy ∧ Sum.inr b = i\n⊢ Sum.elim zx zy i ∈ s\n[PROOFSTEP]\nrcases hi with (⟨j, hj, rfl⟩ | ⟨j, hj, rfl⟩)\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.inl.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι'✝ : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j✝ : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ns : Set E\nι : Type\nsx : Finset ι\nwx : ι → R\nzx : ι → E\nhwx₀ : ∀ (i : ι), i ∈ sx → 0 ≤ wx i\nhwx₁ : ∑ i in sx, wx i = 1\nhzx : ∀ (i : ι), i ∈ sx → zx i ∈ s\nι' : Type\nsy : Finset ι'\nwy : ι' → R\nzy : ι' → E\nhwy₀ : ∀ (i : ι'), i ∈ sy → 0 ≤ wy i\nhwy₁ : ∑ i in sy, wy i = 1\nhzy : ∀ (i : ι'), i ∈ sy → zy i ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nj : ι\nhj : j ∈ sx\n⊢ Sum.elim zx zy (Sum.inl j) ∈ s\n[PROOFSTEP]\napply_rules [hzx, hzy]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.inr.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι'✝ : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j✝ : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ns : Set E\nι : Type\nsx : Finset ι\nwx : ι → R\nzx : ι → E\nhwx₀ : ∀ (i : ι), i ∈ sx → 0 ≤ wx i\nhwx₁ : ∑ i in sx, wx i = 1\nhzx : ∀ (i : ι), i ∈ sx → zx i ∈ s\nι' : Type\nsy : Finset ι'\nwy : ι' → R\nzy : ι' → E\nhwy₀ : ∀ (i : ι'), i ∈ sy → 0 ≤ wy i\nhwy₁ : ∑ i in sy, wy i = 1\nhzy : ∀ (i : ι'), i ∈ sy → zy i ∈ s\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nj : ι'\nhj : j ∈ sy\n⊢ Sum.elim zx zy (Sum.inr j) ∈ s\n[PROOFSTEP]\napply_rules [hzx, hzy]\n[GOAL]\ncase refine'_3\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Set E\n⊢ {x | ∃ ι t w z x_1 x_2 x_3, centerMass t w z = x} ⊆ ↑(convexHull R) s\n[PROOFSTEP]\nrintro _ ⟨ι, t, w, z, hw₀, hw₁, hz, rfl⟩\n[GOAL]\ncase refine'_3.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz✝ : ι✝ → E\ns : Set E\nι : Type\nt : Finset ι\nw : ι → R\nz : ι → E\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : ∑ i in t, w i = 1\nhz : ∀ (i : ι), i ∈ t → z i ∈ s\n⊢ centerMass t w z ∈ ↑(convexHull R) s\n[PROOFSTEP]\nexact t.centerMass_mem_convexHull hw₀ (hw₁.symm ▸ zero_lt_one) hz\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\n⊢ ↑(convexHull R) ↑s = {x | ∃ w x_1 x_2, centerMass s w id = x}\n[PROOFSTEP]\nrefine' Set.Subset.antisymm (convexHull_min _ _) _\n[GOAL]\ncase refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\n⊢ ↑s ⊆ {x | ∃ w x_1 x_2, centerMass s w id = x}\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nx : E\nhx : x ∈ ↑s\n⊢ x ∈ {x | ∃ w x_1 x_2, centerMass s w id = x}\n[PROOFSTEP]\nrw [Finset.mem_coe] at hx \n[GOAL]\ncase refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nx : E\nhx : x ∈ s\n⊢ x ∈ {x | ∃ w x_1 x_2, centerMass s w id = x}\n[PROOFSTEP]\nrefine' ⟨_, _, _, Finset.centerMass_ite_eq _ _ _ hx⟩\n[GOAL]\ncase refine'_1.refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nx : E\nhx : x ∈ s\n⊢ ∀ (y : E), y ∈ s → 0 ≤ if x = y then 1 else 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1.refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nx : E\nhx : x ∈ s\ny✝ : E\na✝ : y✝ ∈ s\n⊢ 0 ≤ if x = y✝ then 1 else 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nx : E\nhx : x ∈ s\ny✝ : E\na✝ : y✝ ∈ s\nh✝ : x = y✝\n⊢ 0 ≤ 1\ncase neg\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nx : E\nhx : x ∈ s\ny✝ : E\na✝ : y✝ ∈ s\nh✝ : ¬x = y✝\n⊢ 0 ≤ 0\n[PROOFSTEP]\nexacts [zero_le_one, le_refl 0]\n[GOAL]\ncase refine'_1.refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nx : E\nhx : x ∈ s\n⊢ (∑ y in s, if x = y then 1 else 0) = 1\n[PROOFSTEP]\nrw [Finset.sum_ite_eq, if_pos hx]\n[GOAL]\ncase refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\n⊢ Convex R {x | ∃ w x_1 x_2, centerMass s w id = x}\n[PROOFSTEP]\nrintro x ⟨wx, hwx₀, hwx₁, rfl⟩ y ⟨wy, hwy₀, hwy₁, rfl⟩ a b ha hb hab\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nwx : E → R\nhwx₀ : ∀ (y : E), y ∈ s → 0 ≤ wx y\nhwx₁ : ∑ y in s, wx y = 1\nwy : E → R\nhwy₀ : ∀ (y : E), y ∈ s → 0 ≤ wy y\nhwy₁ : ∑ y in s, wy y = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ a • centerMass s wx id + b • centerMass s wy id ∈ {x | ∃ w x_1 x_2, centerMass s w id = x}\n[PROOFSTEP]\nrw [Finset.centerMass_segment _ _ _ _ hwx₁ hwy₁ _ _ hab]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nwx : E → R\nhwx₀ : ∀ (y : E), y ∈ s → 0 ≤ wx y\nhwx₁ : ∑ y in s, wx y = 1\nwy : E → R\nhwy₀ : ∀ (y : E), y ∈ s → 0 ≤ wy y\nhwy₁ : ∑ y in s, wy y = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ centerMass s (fun i => a * wx i + b * wy i) id ∈ {x | ∃ w x_1 x_2, centerMass s w id = x}\n[PROOFSTEP]\nrefine' ⟨_, _, _, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nwx : E → R\nhwx₀ : ∀ (y : E), y ∈ s → 0 ≤ wx y\nhwx₁ : ∑ y in s, wx y = 1\nwy : E → R\nhwy₀ : ∀ (y : E), y ∈ s → 0 ≤ wy y\nhwy₁ : ∑ y in s, wy y = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ ∀ (y : E), y ∈ s → 0 ≤ a * wx y + b * wy y\n[PROOFSTEP]\nrintro i hi\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nwx : E → R\nhwx₀ : ∀ (y : E), y ∈ s → 0 ≤ wx y\nhwx₁ : ∑ y in s, wx y = 1\nwy : E → R\nhwy₀ : ∀ (y : E), y ∈ s → 0 ≤ wy y\nhwy₁ : ∑ y in s, wy y = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\ni : E\nhi : i ∈ s\n⊢ 0 ≤ a * wx i + b * wy i\n[PROOFSTEP]\napply_rules [add_nonneg, mul_nonneg, hwx₀, hwy₀]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nwx : E → R\nhwx₀ : ∀ (y : E), y ∈ s → 0 ≤ wx y\nhwx₁ : ∑ y in s, wx y = 1\nwy : E → R\nhwy₀ : ∀ (y : E), y ∈ s → 0 ≤ wy y\nhwy₁ : ∑ y in s, wy y = 1\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ ∑ y in s, (a * wx y + b * wy y) = 1\n[PROOFSTEP]\nsimp only [Finset.sum_add_distrib, Finset.mul_sum.symm, mul_one, *]\n[GOAL]\ncase refine'_3\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\n⊢ {x | ∃ w x_1 x_2, centerMass s w id = x} ⊆ ↑(convexHull R) ↑s\n[PROOFSTEP]\nrintro _ ⟨w, hw₀, hw₁, rfl⟩\n[GOAL]\ncase refine'_3.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz : ι → E\ns : Finset E\nw : E → R\nhw₀ : ∀ (y : E), y ∈ s → 0 ≤ w y\nhw₁ : ∑ y in s, w y = 1\n⊢ centerMass s w id ∈ ↑(convexHull R) ↑s\n[PROOFSTEP]\nexact s.centerMass_mem_convexHull (fun x hx => hw₀ _ hx) (hw₁.symm ▸ zero_lt_one) fun x hx => hx\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Finset E\nx : E\n⊢ x ∈ ↑(convexHull R) ↑s ↔ ∃ w x_1 x_2, centerMass s w id = x\n[PROOFSTEP]\nrw [Finset.convexHull_eq, Set.mem_setOf_eq]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Set E\nhs : Set.Finite s\n⊢ ↑(convexHull R) s = {x | ∃ w x_1 x_2, centerMass (Finite.toFinset hs) w id = x}\n[PROOFSTEP]\nsimpa only [Set.Finite.coe_toFinset, Set.Finite.mem_toFinset, exists_prop] using hs.toFinset.convexHull_eq\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Set E\n⊢ ↑(convexHull R) s = ⋃ (t : Finset E) (_ : ↑t ⊆ s), ↑(convexHull R) ↑t\n[PROOFSTEP]\nrefine' Subset.antisymm _ _\n[GOAL]\ncase refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Set E\n⊢ ↑(convexHull R) s ⊆ ⋃ (t : Finset E) (_ : ↑t ⊆ s), ↑(convexHull R) ↑t\n[PROOFSTEP]\nrw [_root_.convexHull_eq]\n[GOAL]\ncase refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Set E\n⊢ {x | ∃ ι t w z x_1 x_2 x_3, centerMass t w z = x} ⊆ ⋃ (t : Finset E) (_ : ↑t ⊆ s), ↑(convexHull R) ↑t\n[PROOFSTEP]\nrintro x ⟨ι, t, w, z, hw₀, hw₁, hz, rfl⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz✝ : ι✝ → E\ns : Set E\nι : Type\nt : Finset ι\nw : ι → R\nz : ι → E\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : ∑ i in t, w i = 1\nhz : ∀ (i : ι), i ∈ t → z i ∈ s\n⊢ centerMass t w z ∈ ⋃ (t : Finset E) (_ : ↑t ⊆ s), ↑(convexHull R) ↑t\n[PROOFSTEP]\nsimp only [mem_iUnion]\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz✝ : ι✝ → E\ns : Set E\nι : Type\nt : Finset ι\nw : ι → R\nz : ι → E\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : ∑ i in t, w i = 1\nhz : ∀ (i : ι), i ∈ t → z i ∈ s\n⊢ ∃ i i_1, centerMass t w z ∈ ↑(convexHull R) ↑i\n[PROOFSTEP]\nrefine' ⟨t.image z, _, _⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro.intro.refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz✝ : ι✝ → E\ns : Set E\nι : Type\nt : Finset ι\nw : ι → R\nz : ι → E\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : ∑ i in t, w i = 1\nhz : ∀ (i : ι), i ∈ t → z i ∈ s\n⊢ ↑(Finset.image z t) ⊆ s\n[PROOFSTEP]\nrw [coe_image, Set.image_subset_iff]\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro.intro.refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz✝ : ι✝ → E\ns : Set E\nι : Type\nt : Finset ι\nw : ι → R\nz : ι → E\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : ∑ i in t, w i = 1\nhz : ∀ (i : ι), i ∈ t → z i ∈ s\n⊢ ↑t ⊆ z ⁻¹' s\n[PROOFSTEP]\nexact hz\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro.intro.refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz✝ : ι✝ → E\ns : Set E\nι : Type\nt : Finset ι\nw : ι → R\nz : ι → E\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : ∑ i in t, w i = 1\nhz : ∀ (i : ι), i ∈ t → z i ∈ s\n⊢ centerMass t w z ∈ ↑(convexHull R) ↑(Finset.image z t)\n[PROOFSTEP]\napply t.centerMass_mem_convexHull hw₀\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro.intro.refine'_2.hws\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz✝ : ι✝ → E\ns : Set E\nι : Type\nt : Finset ι\nw : ι → R\nz : ι → E\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : ∑ i in t, w i = 1\nhz : ∀ (i : ι), i ∈ t → z i ∈ s\n⊢ 0 < ∑ i in t, w i\n[PROOFSTEP]\nsimp only [hw₁, zero_lt_one]\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro.intro.refine'_2.hz\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz✝ : ι✝ → E\ns : Set E\nι : Type\nt : Finset ι\nw : ι → R\nz : ι → E\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : ∑ i in t, w i = 1\nhz : ∀ (i : ι), i ∈ t → z i ∈ s\n⊢ ∀ (i : ι), i ∈ t → z i ∈ ↑(Finset.image z t)\n[PROOFSTEP]\nexact fun i hi => Finset.mem_coe.2 (Finset.mem_image_of_mem _ hi)\n[GOAL]\ncase refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ns : Set E\n⊢ ⋃ (t : Finset E) (_ : ↑t ⊆ s), ↑(convexHull R) ↑t ⊆ ↑(convexHull R) s\n[PROOFSTEP]\nexact iUnion_subset fun i => iUnion_subset convexHull_mono\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nt : Set F\nx : E\ny : F\nhx : x ∈ ↑(convexHull R) s\nhy : y ∈ ↑(convexHull R) t\n⊢ (x, y) ∈ ↑(convexHull R) (s ×ˢ t)\n[PROOFSTEP]\nrw [_root_.convexHull_eq] at hx hy ⊢\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\nt : Set F\nx : E\ny : F\nhx : x ∈ {x | ∃ ι t w z x_1 x_2 x_3, centerMass t w z = x}\nhy : y ∈ {x | ∃ ι t_1 w z x_1 x_2 x_3, centerMass t_1 w z = x}\n⊢ (x, y) ∈ {x | ∃ ι t_1 w z x_1 x_2 x_3, centerMass t_1 w z = x}\n[PROOFSTEP]\nobtain ⟨ι, a, w, S, hw, hw', hS, hSp⟩ := hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nhy : y ∈ {x | ∃ ι t_1 w z x_1 x_2 x_3, centerMass t_1 w z = x}\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\n⊢ (x, y) ∈ {x | ∃ ι t_1 w z x_1 x_2 x_3, centerMass t_1 w z = x}\n[PROOFSTEP]\nobtain ⟨κ, b, v, T, hv, hv', hT, hTp⟩ := hy\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\n⊢ (x, y) ∈ {x | ∃ ι t_1 w z x_1 x_2 x_3, centerMass t_1 w z = x}\n[PROOFSTEP]\nhave h_sum : ∑ i : ι × κ in a ×ˢ b, w i.fst * v i.snd = 1 :=\n by\n rw [Finset.sum_product, ← hw']\n congr\n ext i\n have : ∑ y : κ in b, w i * v y = ∑ y : κ in b, v y * w i :=\n by\n congr\n ext\n simp [mul_comm]\n rw [this, ← Finset.sum_mul, hv']\n simp\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\n⊢ ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\n[PROOFSTEP]\nrw [Finset.sum_product, ← hw']\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\n⊢ ∑ x in a, ∑ y in b, w (x, y).fst * v (x, y).snd = ∑ i in a, w i\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\n⊢ (fun x => ∑ y in b, w (x, y).fst * v (x, y).snd) = fun i => w i\n[PROOFSTEP]\next i\n[GOAL]\ncase e_f.h\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\ni : ι\n⊢ ∑ y in b, w (i, y).fst * v (i, y).snd = w i\n[PROOFSTEP]\nhave : ∑ y : κ in b, w i * v y = ∑ y : κ in b, v y * w i :=\n by\n congr\n ext\n simp [mul_comm]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\ni : ι\n⊢ ∑ y in b, w i * v y = ∑ y in b, v y * w i\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\ni : ι\n⊢ (fun y => w i * v y) = fun y => v y * w i\n[PROOFSTEP]\next\n[GOAL]\ncase e_f.h\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\ni : ι\nx✝ : κ\n⊢ w i * v x✝ = v x✝ * w i\n[PROOFSTEP]\nsimp [mul_comm]\n[GOAL]\ncase e_f.h\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\ni : ι\nthis : ∑ y in b, w i * v y = ∑ y in b, v y * w i\n⊢ ∑ y in b, w (i, y).fst * v (i, y).snd = w i\n[PROOFSTEP]\nrw [this, ← Finset.sum_mul, hv']\n[GOAL]\ncase e_f.h\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\ni : ι\nthis : ∑ y in b, w i * v y = ∑ y in b, v y * w i\n⊢ 1 * w i = w i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\n⊢ (x, y) ∈ {x | ∃ ι t_1 w z x_1 x_2 x_3, centerMass t_1 w z = x}\n[PROOFSTEP]\nrefine' ⟨ι × κ, a ×ˢ b, fun p => w p.1 * v p.2, fun p => (S p.1, T p.2), fun p hp => _, h_sum, fun p hp => _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\np : ι × κ\nhp : p ∈ a ×ˢ b\n⊢ 0 ≤ (fun p => w p.fst * v p.snd) p\n[PROOFSTEP]\nrw [mem_product] at hp \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\np : ι × κ\nhp : p.fst ∈ a ∧ p.snd ∈ b\n⊢ 0 ≤ (fun p => w p.fst * v p.snd) p\n[PROOFSTEP]\nexact mul_nonneg (hw p.1 hp.1) (hv p.2 hp.2)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\np : ι × κ\nhp : p ∈ a ×ˢ b\n⊢ (fun p => (S p.fst, T p.snd)) p ∈ s ×ˢ t\n[PROOFSTEP]\nrw [mem_product] at hp \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\np : ι × κ\nhp : p.fst ∈ a ∧ p.snd ∈ b\n⊢ (fun p => (S p.fst, T p.snd)) p ∈ s ×ˢ t\n[PROOFSTEP]\nexact ⟨hS p.1 hp.1, hT p.2 hp.2⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\n⊢ (centerMass (a ×ˢ b) (fun p => w p.fst * v p.snd) fun p => (S p.fst, T p.snd)) = (x, y)\n[PROOFSTEP]\next\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.h₁\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\n⊢ (centerMass (a ×ˢ b) (fun p => w p.fst * v p.snd) fun p => (S p.fst, T p.snd)).fst = (x, y).fst\n[PROOFSTEP]\nrw [← hSp, Finset.centerMass_eq_of_sum_1 _ _ hw', Finset.centerMass_eq_of_sum_1 _ _ h_sum]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.h₁\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\n⊢ (∑ i in a ×ˢ b, (w i.fst * v i.snd) • (S i.fst, T i.snd)).fst = (∑ i in a, w i • S i, y).fst\n[PROOFSTEP]\nsimp_rw [Prod.fst_sum, Prod.smul_mk]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.h₁\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\n⊢ ∑ x in a ×ˢ b, (w x.fst * v x.snd) • S x.fst = ∑ i in a, w i • S i\n[PROOFSTEP]\nrw [Finset.sum_product]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.h₁\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\n⊢ ∑ x in a, ∑ y in b, (w (x, y).fst * v (x, y).snd) • S (x, y).fst = ∑ i in a, w i • S i\n[PROOFSTEP]\ncongr\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.h₁.e_f\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\n⊢ (fun x => ∑ y in b, (w (x, y).fst * v (x, y).snd) • S (x, y).fst) = fun i => w i • S i\n[PROOFSTEP]\next i\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.h₁.e_f.h\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\ni : ι\n⊢ ∑ y in b, (w (i, y).fst * v (i, y).snd) • S (i, y).fst = w i • S i\n[PROOFSTEP]\nhave : (∑ j : κ in b, (w i * v j) • S i) = ∑ j : κ in b, v j • w i • S i :=\n by\n congr\n ext\n rw [mul_smul, smul_comm]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\ni : ι\n⊢ ∑ j in b, (w i * v j) • S i = ∑ j in b, v j • w i • S i\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\ni : ι\n⊢ (fun j => (w i * v j) • S i) = fun j => v j • w i • S i\n[PROOFSTEP]\next\n[GOAL]\ncase e_f.h\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\ni : ι\nx✝ : κ\n⊢ (w i * v x✝) • S i = v x✝ • w i • S i\n[PROOFSTEP]\nrw [mul_smul, smul_comm]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.h₁.e_f.h\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni✝ j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\ni : ι\nthis : ∑ j in b, (w i * v j) • S i = ∑ j in b, v j • w i • S i\n⊢ ∑ y in b, (w (i, y).fst * v (i, y).snd) • S (i, y).fst = w i • S i\n[PROOFSTEP]\nrw [this, ← Finset.sum_smul, hv', one_smul]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.h₂\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\n⊢ (centerMass (a ×ˢ b) (fun p => w p.fst * v p.snd) fun p => (S p.fst, T p.snd)).snd = (x, y).snd\n[PROOFSTEP]\nrw [← hTp, Finset.centerMass_eq_of_sum_1 _ _ hv', Finset.centerMass_eq_of_sum_1 _ _ h_sum]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.h₂\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\n⊢ (∑ i in a ×ˢ b, (w i.fst * v i.snd) • (S i.fst, T i.snd)).snd = (x, ∑ i in b, v i • T i).snd\n[PROOFSTEP]\nsimp_rw [Prod.snd_sum, Prod.smul_mk]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.h₂\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\n⊢ ∑ x in a ×ˢ b, (w x.fst * v x.snd) • T x.snd = ∑ i in b, v i • T i\n[PROOFSTEP]\nrw [Finset.sum_product, Finset.sum_comm]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.h₂\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\n⊢ ∑ y in b, ∑ x in a, (w (x, y).fst * v (x, y).snd) • T (x, y).snd = ∑ i in b, v i • T i\n[PROOFSTEP]\ncongr\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.h₂.e_f\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\n⊢ (fun y => ∑ x in a, (w (x, y).fst * v (x, y).snd) • T (x, y).snd) = fun i => v i • T i\n[PROOFSTEP]\next j\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.h₂.e_f.h\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j✝ : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\nj : κ\n⊢ ∑ x in a, (w (x, j).fst * v (x, j).snd) • T (x, j).snd = v j • T j\n[PROOFSTEP]\nsimp_rw [mul_smul]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.h₂.e_f.h\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns : Set E\ni j✝ : ι✝\nc : R\nt✝ : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\nt : Set F\nx : E\ny : F\nι : Type\na : Finset ι\nw : ι → R\nS : ι → E\nhw : ∀ (i : ι), i ∈ a → 0 ≤ w i\nhw' : ∑ i in a, w i = 1\nhS : ∀ (i : ι), i ∈ a → S i ∈ s\nhSp : centerMass a w S = x\nκ : Type\nb : Finset κ\nv : κ → R\nT : κ → F\nhv : ∀ (i : κ), i ∈ b → 0 ≤ v i\nhv' : ∑ i in b, v i = 1\nhT : ∀ (i : κ), i ∈ b → T i ∈ t\nhTp : centerMass b v T = y\nh_sum : ∑ i in a ×ˢ b, w i.fst * v i.snd = 1\nj : κ\n⊢ ∑ x in a, w x • v j • T j = v j • T j\n[PROOFSTEP]\nrw [← Finset.sum_smul, hw', one_smul]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\ns t : Set E\n⊢ ↑(convexHull R) (s + t) = ↑(convexHull R) s + ↑(convexHull R) t\n[PROOFSTEP]\nsimp_rw [← image2_add, ← image_prod, IsLinearMap.isLinearMap_add.convexHull_image, convexHull_prod]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁷ : LinearOrderedField R\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : LinearOrderedAddCommGroup α\ninst✝³ : Module R E\ninst✝² : Module R F\ninst✝¹ : Module R α\ninst✝ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt✝ : Finset ι\nw : ι → R\nz : ι → E\ns t : Set E\n⊢ ↑(convexHull R) (s - t) = ↑(convexHull R) s - ↑(convexHull R) t\n[PROOFSTEP]\nsimp_rw [sub_eq_add_neg, convexHull_add, convexHull_neg]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ninst✝ : Fintype ι\nf : ι → R\n⊢ ↑(convexHull R) (Set.range fun i j => if i = j then 1 else 0) = stdSimplex R ι\n[PROOFSTEP]\nrefine' Subset.antisymm (convexHull_min _ (convex_stdSimplex R ι)) _\n[GOAL]\ncase refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ninst✝ : Fintype ι\nf : ι → R\n⊢ (Set.range fun i j => if i = j then 1 else 0) ⊆ stdSimplex R ι\n[PROOFSTEP]\nrintro _ ⟨i, rfl⟩\n[GOAL]\ncase refine'_1.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns : Set E\ni✝ j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ninst✝ : Fintype ι\nf : ι → R\ni : ι\n⊢ (fun i j => if i = j then 1 else 0) i ∈ stdSimplex R ι\n[PROOFSTEP]\nexact ite_eq_mem_stdSimplex R i\n[GOAL]\ncase refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ninst✝ : Fintype ι\nf : ι → R\n⊢ stdSimplex R ι ⊆ ↑(convexHull R) (Set.range fun i j => if i = j then 1 else 0)\n[PROOFSTEP]\nrintro w ⟨hw₀, hw₁⟩\n[GOAL]\ncase refine'_2.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz : ι → E\ninst✝ : Fintype ι\nf w : ι → R\nhw₀ : ∀ (x : ι), 0 ≤ w x\nhw₁ : ∑ x : ι, w x = 1\n⊢ w ∈ ↑(convexHull R) (Set.range fun i j => if i = j then 1 else 0)\n[PROOFSTEP]\nrw [pi_eq_sum_univ w, ← Finset.univ.centerMass_eq_of_sum_1 _ hw₁]\n[GOAL]\ncase refine'_2.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns : Set E\ni j : ι\nc : R\nt : Finset ι\nw✝ : ι → R\nz : ι → E\ninst✝ : Fintype ι\nf w : ι → R\nhw₀ : ∀ (x : ι), 0 ≤ w x\nhw₁ : ∑ x : ι, w x = 1\n⊢ (centerMass Finset.univ (fun i => w i) fun i j => if i = j then 1 else 0) ∈\n ↑(convexHull R) (Set.range fun i j => if i = j then 1 else 0)\n[PROOFSTEP]\nexact Finset.univ.centerMass_mem_convexHull (fun i _ => hw₀ i) (hw₁.symm ▸ zero_lt_one) fun i _ => mem_range_self i\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ninst✝ : Fintype ι\nf : ι → R\ns : Set E\nhs : Set.Finite s\n⊢ ↑(convexHull R) s = ↑(∑ x : ↑s, LinearMap.smulRight (LinearMap.proj x) ↑x) '' stdSimplex R ↑s\n[PROOFSTEP]\nrw [← @convexHull_basis_eq_stdSimplex _ _ _ hs.fintype, ← LinearMap.convexHull_image, ← Set.range_comp]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ninst✝ : Fintype ι\nf : ι → R\ns : Set E\nhs : Set.Finite s\n⊢ ↑(convexHull R) s =\n ↑(convexHull R) (range (↑(∑ x : ↑s, LinearMap.smulRight (LinearMap.proj x) ↑x) ∘ fun i j => if i = j then 1 else 0))\n[PROOFSTEP]\nsimp_rw [Function.comp]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ninst✝ : Fintype ι\nf : ι → R\ns : Set E\nhs : Set.Finite s\n⊢ ↑(convexHull R) s =\n ↑(convexHull R)\n (range fun x => ↑(∑ x : ↑s, LinearMap.smulRight (LinearMap.proj x) ↑x) fun j => if x = j then 1 else 0)\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ninst✝ : Fintype ι\nf : ι → R\ns : Set E\nhs : Set.Finite s\n⊢ s = range fun x => ↑(∑ x : ↑s, LinearMap.smulRight (LinearMap.proj x) ↑x) fun j => if x = j then 1 else 0\n[PROOFSTEP]\nconvert Subtype.range_coe.symm\n[GOAL]\ncase h.e'_3.h.e'_3.h\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns✝ : Set E\ni j : ι\nc : R\nt : Finset ι\nw : ι → R\nz : ι → E\ninst✝ : Fintype ι\nf : ι → R\ns : Set E\nhs : Set.Finite s\nx✝ : ↑s\n⊢ (↑(∑ x : ↑s, LinearMap.smulRight (LinearMap.proj x) ↑x) fun j => if x✝ = j then 1 else 0) = ↑x✝\n[PROOFSTEP]\nsimp [LinearMap.sum_apply, ite_smul _ (1 : R), Finset.filter_eq, @Finset.mem_univ _ hs.fintype _]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ninst✝ : Fintype ι✝\nf : ι✝ → R\nι : Type u_7\nb : AffineBasis ι R E\n⊢ ↑(convexHull R) (Set.range ↑b) = {x | ∀ (i : ι), 0 ≤ ↑(coord b i) x}\n[PROOFSTEP]\nrw [convexHull_range_eq_exists_affineCombination]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ninst✝ : Fintype ι✝\nf : ι✝ → R\nι : Type u_7\nb : AffineBasis ι R E\n⊢ {x | ∃ s w x_1 x_2, ↑(affineCombination R s ↑b) w = x} = {x | ∀ (i : ι), 0 ≤ ↑(coord b i) x}\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ninst✝ : Fintype ι✝\nf : ι✝ → R\nι : Type u_7\nb : AffineBasis ι R E\nx : E\n⊢ x ∈ {x | ∃ s w x_1 x_2, ↑(affineCombination R s ↑b) w = x} ↔ x ∈ {x | ∀ (i : ι), 0 ≤ ↑(coord b i) x}\n[PROOFSTEP]\nrefine' ⟨_, fun hx => _⟩\n[GOAL]\ncase h.refine'_1\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ninst✝ : Fintype ι✝\nf : ι✝ → R\nι : Type u_7\nb : AffineBasis ι R E\nx : E\n⊢ x ∈ {x | ∃ s w x_1 x_2, ↑(affineCombination R s ↑b) w = x} → x ∈ {x | ∀ (i : ι), 0 ≤ ↑(coord b i) x}\n[PROOFSTEP]\nrintro ⟨s, w, hw₀, hw₁, rfl⟩ i\n[GOAL]\ncase h.refine'_1.intro.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι✝\nc : R\nt : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\ninst✝ : Fintype ι✝\nf : ι✝ → R\nι : Type u_7\nb : AffineBasis ι R E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ni : ι\n⊢ 0 ≤ ↑(coord b i) (↑(affineCombination R s ↑b) w)\n[PROOFSTEP]\nby_cases hi : i ∈ s\n[GOAL]\ncase pos\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι✝\nc : R\nt : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\ninst✝ : Fintype ι✝\nf : ι✝ → R\nι : Type u_7\nb : AffineBasis ι R E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ni : ι\nhi : i ∈ s\n⊢ 0 ≤ ↑(coord b i) (↑(affineCombination R s ↑b) w)\n[PROOFSTEP]\nrw [b.coord_apply_combination_of_mem hi hw₁]\n[GOAL]\ncase pos\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι✝\nc : R\nt : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\ninst✝ : Fintype ι✝\nf : ι✝ → R\nι : Type u_7\nb : AffineBasis ι R E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ni : ι\nhi : i ∈ s\n⊢ 0 ≤ w i\n[PROOFSTEP]\nexact hw₀ i hi\n[GOAL]\ncase neg\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι✝\nc : R\nt : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\ninst✝ : Fintype ι✝\nf : ι✝ → R\nι : Type u_7\nb : AffineBasis ι R E\ns : Finset ι\nw : ι → R\nhw₀ : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw₁ : Finset.sum s w = 1\ni : ι\nhi : ¬i ∈ s\n⊢ 0 ≤ ↑(coord b i) (↑(affineCombination R s ↑b) w)\n[PROOFSTEP]\nrw [b.coord_apply_combination_of_not_mem hi hw₁]\n[GOAL]\ncase h.refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ninst✝ : Fintype ι✝\nf : ι✝ → R\nι : Type u_7\nb : AffineBasis ι R E\nx : E\nhx : x ∈ {x | ∀ (i : ι), 0 ≤ ↑(coord b i) x}\n⊢ x ∈ {x | ∃ s w x_1 x_2, ↑(affineCombination R s ↑b) w = x}\n[PROOFSTEP]\nhave hx' : x ∈ affineSpan R (range b) := by\n rw [b.tot]\n exact AffineSubspace.mem_top R E x\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ninst✝ : Fintype ι✝\nf : ι✝ → R\nι : Type u_7\nb : AffineBasis ι R E\nx : E\nhx : x ∈ {x | ∀ (i : ι), 0 ≤ ↑(coord b i) x}\n⊢ x ∈ affineSpan R (Set.range ↑b)\n[PROOFSTEP]\nrw [b.tot]\n[GOAL]\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ninst✝ : Fintype ι✝\nf : ι✝ → R\nι : Type u_7\nb : AffineBasis ι R E\nx : E\nhx : x ∈ {x | ∀ (i : ι), 0 ≤ ↑(coord b i) x}\n⊢ x ∈ ⊤\n[PROOFSTEP]\nexact AffineSubspace.mem_top R E x\n[GOAL]\ncase h.refine'_2\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw : ι✝ → R\nz : ι✝ → E\ninst✝ : Fintype ι✝\nf : ι✝ → R\nι : Type u_7\nb : AffineBasis ι R E\nx : E\nhx : x ∈ {x | ∀ (i : ι), 0 ≤ ↑(coord b i) x}\nhx' : x ∈ affineSpan R (Set.range ↑b)\n⊢ x ∈ {x | ∃ s w x_1 x_2, ↑(affineCombination R s ↑b) w = x}\n[PROOFSTEP]\nobtain ⟨s, w, hw₁, rfl⟩ := (mem_affineSpan_iff_eq_affineCombination R E).mp hx'\n[GOAL]\ncase h.refine'_2.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\ninst✝ : Fintype ι✝\nf : ι✝ → R\nι : Type u_7\nb : AffineBasis ι R E\ns : Finset ι\nw : ι → R\nhw₁ : ∑ i in s, w i = 1\nhx : ↑(affineCombination R s ↑b) w ∈ {x | ∀ (i : ι), 0 ≤ ↑(coord b i) x}\nhx' : ↑(affineCombination R s ↑b) w ∈ affineSpan R (Set.range ↑b)\n⊢ ↑(affineCombination R s ↑b) w ∈ {x | ∃ s w x_1 x_2, ↑(affineCombination R s ↑b) w = x}\n[PROOFSTEP]\nrefine' ⟨s, w, _, hw₁, rfl⟩\n[GOAL]\ncase h.refine'_2.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns✝ : Set E\ni j : ι✝\nc : R\nt : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\ninst✝ : Fintype ι✝\nf : ι✝ → R\nι : Type u_7\nb : AffineBasis ι R E\ns : Finset ι\nw : ι → R\nhw₁ : ∑ i in s, w i = 1\nhx : ↑(affineCombination R s ↑b) w ∈ {x | ∀ (i : ι), 0 ≤ ↑(coord b i) x}\nhx' : ↑(affineCombination R s ↑b) w ∈ affineSpan R (Set.range ↑b)\n⊢ ∀ (i : ι), i ∈ s → 0 ≤ w i\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h.refine'_2.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι✝\nc : R\nt : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\ninst✝ : Fintype ι✝\nf : ι✝ → R\nι : Type u_7\nb : AffineBasis ι R E\ns : Finset ι\nw : ι → R\nhw₁ : ∑ i in s, w i = 1\nhx : ↑(affineCombination R s ↑b) w ∈ {x | ∀ (i : ι), 0 ≤ ↑(coord b i) x}\nhx' : ↑(affineCombination R s ↑b) w ∈ affineSpan R (Set.range ↑b)\ni : ι\nhi : i ∈ s\n⊢ 0 ≤ w i\n[PROOFSTEP]\nspecialize hx i\n[GOAL]\ncase h.refine'_2.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι✝\nc : R\nt : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\ninst✝ : Fintype ι✝\nf : ι✝ → R\nι : Type u_7\nb : AffineBasis ι R E\ns : Finset ι\nw : ι → R\nhw₁ : ∑ i in s, w i = 1\nhx' : ↑(affineCombination R s ↑b) w ∈ affineSpan R (Set.range ↑b)\ni : ι\nhi : i ∈ s\nhx : 0 ≤ ↑(coord b i) (↑(affineCombination R s ↑b) w)\n⊢ 0 ≤ w i\n[PROOFSTEP]\nrw [b.coord_apply_combination_of_mem hi hw₁] at hx \n[GOAL]\ncase h.refine'_2.intro.intro.intro\nR : Type u_1\nE : Type u_2\nF : Type u_3\nι✝ : Type u_4\nι' : Type u_5\nα : Type u_6\ninst✝⁸ : LinearOrderedField R\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : LinearOrderedAddCommGroup α\ninst✝⁴ : Module R E\ninst✝³ : Module R F\ninst✝² : Module R α\ninst✝¹ : OrderedSMul R α\ns✝ : Set E\ni✝ j : ι✝\nc : R\nt : Finset ι✝\nw✝ : ι✝ → R\nz : ι✝ → E\ninst✝ : Fintype ι✝\nf : ι✝ → R\nι : Type u_7\nb : AffineBasis ι R E\ns : Finset ι\nw : ι → R\nhw₁ : ∑ i in s, w i = 1\nhx' : ↑(affineCombination R s ↑b) w ∈ affineSpan R (Set.range ↑b)\ni : ι\nhi : i ∈ s\nhx : 0 ≤ w i\n⊢ 0 ≤ w i\n[PROOFSTEP]\nexact hx\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.Combination", "llama_tokens": 93746, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7662936324115011, "lm_q2_score": 0.7371581684030623, "lm_q1q2_score": 0.5648796105273916}} {"text": "[GOAL]\n⊢ ConcreteCategory MeasCat\n[PROOFSTEP]\nunfold MeasCat\n[GOAL]\n⊢ ConcreteCategory (Bundled MeasurableSpace)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nμ : MeasureTheory.Measure (MeasureTheory.Measure ℝ≥0∞)\n⊢ ∫⁻ (x : ℝ≥0∞), x ∂Measure.join μ = ∫⁻ (x : ℝ≥0∞), x ∂Measure.map (fun m => ∫⁻ (x : ℝ≥0∞), x ∂m) μ\n[PROOFSTEP]\nrw [Measure.lintegral_join, lintegral_map]\n[GOAL]\ncase hf\nμ : MeasureTheory.Measure (MeasureTheory.Measure ℝ≥0∞)\n⊢ Measurable fun x => x\n[PROOFSTEP]\napply_rules [measurable_id, Measure.measurable_lintegral]\n[GOAL]\ncase hg\nμ : MeasureTheory.Measure (MeasureTheory.Measure ℝ≥0∞)\n⊢ Measurable fun m => ∫⁻ (x : ℝ≥0∞), x ∂m\n[PROOFSTEP]\napply_rules [measurable_id, Measure.measurable_lintegral]\n[GOAL]\nμ : MeasureTheory.Measure (MeasureTheory.Measure ℝ≥0∞)\n⊢ Measurable fun x => x\n[PROOFSTEP]\napply_rules [measurable_id, Measure.measurable_lintegral]\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Category.MeasCat", "llama_tokens": 401, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8670357460591569, "lm_q2_score": 0.6513548714339145, "lm_q1q2_score": 0.5647479569029702}} {"text": "[GOAL]\nα : Type u\ninst✝ : Monoid α\nv i₁ : α\nvi₁ : v * i₁ = 1\niv₁ : i₁ * v = 1\nv' i₂ : α\nvi₂ : v' * i₂ = 1\niv₂ : i₂ * v' = 1\ne : ↑{ val := v, inv := i₁, val_inv := vi₁, inv_val := iv₁ } = ↑{ val := v', inv := i₂, val_inv := vi₂, inv_val := iv₂ }\n⊢ { val := v, inv := i₁, val_inv := vi₁, inv_val := iv₁ } = { val := v', inv := i₂, val_inv := vi₂, inv_val := iv₂ }\n[PROOFSTEP]\nsimp only at e \n[GOAL]\nα : Type u\ninst✝ : Monoid α\nv i₁ : α\nvi₁ : v * i₁ = 1\niv₁ : i₁ * v = 1\nv' i₂ : α\nvi₂ : v' * i₂ = 1\niv₂ : i₂ * v' = 1\ne : v = v'\n⊢ { val := v, inv := i₁, val_inv := vi₁, inv_val := iv₁ } = { val := v', inv := i₂, val_inv := vi₂, inv_val := iv₂ }\n[PROOFSTEP]\nsubst v'\n[GOAL]\nα : Type u\ninst✝ : Monoid α\nv i₁ : α\nvi₁ : v * i₁ = 1\niv₁ : i₁ * v = 1\ni₂ : α\nvi₂ : v * i₂ = 1\niv₂ : i₂ * v = 1\n⊢ { val := v, inv := i₁, val_inv := vi₁, inv_val := iv₁ } = { val := v, inv := i₂, val_inv := vi₂, inv_val := iv₂ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_inv\nα : Type u\ninst✝ : Monoid α\nv i₁ : α\nvi₁ : v * i₁ = 1\niv₁ : i₁ * v = 1\ni₂ : α\nvi₂ : v * i₂ = 1\niv₂ : i₂ * v = 1\n⊢ i₁ = i₂\n[PROOFSTEP]\nsimpa only [iv₂, vi₁, one_mul, mul_one] using mul_assoc i₂ v i₁\n[GOAL]\nα : Type u\ninst✝ : Monoid α\nu₁ u₂ : αˣ\n⊢ ↑u₁ * ↑u₂ * (u₂.inv * u₁.inv) = 1\n[PROOFSTEP]\nrw [mul_assoc, ← mul_assoc u₂.val, val_inv, one_mul, val_inv]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\nu₁ u₂ : αˣ\n⊢ u₂.inv * u₁.inv * (↑u₁ * ↑u₂) = 1\n[PROOFSTEP]\nrw [mul_assoc, ← mul_assoc u₁.inv, inv_val, one_mul, inv_val]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b c u a : αˣ\n⊢ ↑a = 1 ↔ a = 1\n[PROOFSTEP]\nrw [← Units.val_one, eq_iff]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b c u : αˣ\na : α\nh : ↑u = a\n⊢ ↑u⁻¹ * a = 1\n[PROOFSTEP]\nrw [← h, u.inv_mul]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b c u : αˣ\na : α\nh : ↑u = a\n⊢ a * ↑u⁻¹ = 1\n[PROOFSTEP]\nrw [← h, u.mul_inv]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b✝ c u a : αˣ\nb : α\n⊢ ↑a * (↑a⁻¹ * b) = b\n[PROOFSTEP]\nrw [← mul_assoc, mul_inv, one_mul]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b✝ c u a : αˣ\nb : α\n⊢ ↑a⁻¹ * (↑a * b) = b\n[PROOFSTEP]\nrw [← mul_assoc, inv_mul, one_mul]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b✝ c u : αˣ\na : α\nb : αˣ\n⊢ a * ↑b * ↑b⁻¹ = a\n[PROOFSTEP]\nrw [mul_assoc, mul_inv, mul_one]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b✝ c u : αˣ\na : α\nb : αˣ\n⊢ a * ↑b⁻¹ * ↑b = a\n[PROOFSTEP]\nrw [mul_assoc, inv_mul, mul_one]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b✝ c✝ u a : αˣ\nb c : α\nh : ↑a * b = ↑a * c\n⊢ b = c\n[PROOFSTEP]\nsimpa only [inv_mul_cancel_left] using congr_arg (fun x : α => ↑(a⁻¹ : αˣ) * x) h\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b✝ c✝ u a : αˣ\nb c : α\nh : b * ↑a = c * ↑a\n⊢ b = c\n[PROOFSTEP]\nsimpa only [mul_inv_cancel_right] using congr_arg (fun x : α => x * ↑(a⁻¹ : αˣ)) h\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b✝ c u : αˣ\na b : α\nh : a = b * ↑c⁻¹\n⊢ a * ↑c = b\n[PROOFSTEP]\nrw [h, inv_mul_cancel_right]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b✝ c u : αˣ\na b : α\nh : a * ↑c = b\n⊢ a = b * ↑c⁻¹\n[PROOFSTEP]\nrw [← h, mul_inv_cancel_right]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b c✝ u : αˣ\na c : α\nh : a = ↑b⁻¹ * c\n⊢ ↑b * a = c\n[PROOFSTEP]\nrw [h, mul_inv_cancel_left]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b c✝ u : αˣ\na c : α\nh : ↑b * a = c\n⊢ a = ↑b⁻¹ * c\n[PROOFSTEP]\nrw [← h, inv_mul_cancel_left]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na b✝ c✝ u : αˣ\nb c : α\nh : ↑a⁻¹ * b = c\n⊢ b = ↑a * c\n[PROOFSTEP]\nrw [← h, mul_inv_cancel_left]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na b✝ c✝ u : αˣ\nb c : α\nh : b = ↑a * c\n⊢ ↑a⁻¹ * b = c\n[PROOFSTEP]\nrw [h, inv_mul_cancel_left]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b c✝ u : αˣ\na c : α\nh : a * ↑b⁻¹ = c\n⊢ a = c * ↑b\n[PROOFSTEP]\nrw [← h, inv_mul_cancel_right]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b c✝ u : αˣ\na c : α\nh : a = c * ↑b\n⊢ a * ↑b⁻¹ = c\n[PROOFSTEP]\nrw [h, mul_inv_cancel_right]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b c u : αˣ\na : α\nh : a * ↑u = 1\n⊢ ↑u⁻¹ = 1 * ↑u⁻¹\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b c u : αˣ\na : α\nh : a * ↑u = 1\n⊢ 1 * ↑u⁻¹ = a\n[PROOFSTEP]\nrw [← h, mul_inv_cancel_right]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b c u : αˣ\na : α\nh : ↑u * a = 1\n⊢ ↑u⁻¹ = ↑u⁻¹ * 1\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b c u : αˣ\na : α\nh : ↑u * a = 1\n⊢ ↑u⁻¹ * 1 = a\n[PROOFSTEP]\nrw [← h, inv_mul_cancel_left]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b c u : αˣ\na : α\n⊢ a * ↑u = 1 ↔ a = ↑u⁻¹\n[PROOFSTEP]\nrw [← mul_inv_eq_one, inv_inv]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b c u : αˣ\na : α\n⊢ ↑u * a = 1 ↔ ↑u⁻¹ = a\n[PROOFSTEP]\nrw [← inv_mul_eq_one, inv_inv]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na b c u u₁ u₂ : αˣ\nh : ↑u₁ = ↑u₂\n⊢ ↑u₁ * ↑u₂⁻¹ = 1\n[PROOFSTEP]\nrw [h, u₂.mul_inv]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b c a : α\nu : αˣ\n⊢ a * (↑u⁻¹ * ↑u) = a\n[PROOFSTEP]\nrw [Units.inv_mul, mul_one]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b c a : α\nu : αˣ\n⊢ a * (↑u * ↑u⁻¹) = a\n[PROOFSTEP]\nrw [Units.mul_inv, mul_one]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na b c x : α\nu₁ u₂ : αˣ\n⊢ x /ₚ u₁ /ₚ u₂ = x /ₚ (u₂ * u₁)\n[PROOFSTEP]\nsimp only [divp, mul_inv_rev, Units.val_mul, mul_assoc]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na b c x : α\nu : αˣ\ny : α\n⊢ x /ₚ u * ↑u = y * ↑u ↔ y * ↑u = x\n[PROOFSTEP]\nrw [divp_mul_cancel]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na b c x : α\nu : αˣ\ny : α\n⊢ x = y * ↑u ↔ y * ↑u = x\n[PROOFSTEP]\nexact ⟨Eq.symm, Eq.symm⟩\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na b c x : α\nu : αˣ\ny : α\n⊢ x = y /ₚ u ↔ x * ↑u = y\n[PROOFSTEP]\nrw [eq_comm, divp_eq_iff_mul_eq]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na✝ b c a : α\nu : αˣ\n⊢ a /ₚ u * ↑u = 1 * ↑u ↔ a = ↑u\n[PROOFSTEP]\nrw [divp_mul_cancel, one_mul]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na b c : α\nu : αˣ\n⊢ ↑u⁻¹ = 1 /ₚ u\n[PROOFSTEP]\nrw [one_divp]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na b c : α\nu : αˣ\n⊢ ↑(1 / u) = 1 /ₚ u\n[PROOFSTEP]\nrw [one_div, one_divp]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\na b c : α\nu₁ u₂ : αˣ\n⊢ ↑(u₁ / u₂) = ↑u₁ /ₚ u₂\n[PROOFSTEP]\nrw [divp, division_def, Units.val_mul]\n[GOAL]\nα : Type u\ninst✝ : CommMonoid α\nx y : α\nu : αˣ\n⊢ x /ₚ u * y = x * y /ₚ u\n[PROOFSTEP]\nrw [divp, divp, mul_right_comm]\n[GOAL]\nα : Type u\ninst✝ : CommMonoid α\nx y : α\nux uy : αˣ\n⊢ x /ₚ ux = y /ₚ uy ↔ x * ↑uy = y * ↑ux\n[PROOFSTEP]\nrw [divp_eq_iff_mul_eq, divp_mul_eq_mul_divp, divp_eq_iff_mul_eq]\n[GOAL]\nα : Type u\ninst✝ : CommMonoid α\nx y : α\nux uy : αˣ\n⊢ x /ₚ ux * (y /ₚ uy) = x * y /ₚ (ux * uy)\n[PROOFSTEP]\nrw [divp_mul_eq_mul_divp, divp_assoc', divp_divp_eq_divp_mul]\n[GOAL]\nα : Type u\ninst✝¹ : CommMonoid α\ninst✝ : Subsingleton αˣ\na b : α\nh : a * b = 1\n⊢ b * a = 1\n[PROOFSTEP]\nrwa [mul_comm]\n[GOAL]\nα : Type u\ninst✝¹ : CommMonoid α\ninst✝ : Subsingleton αˣ\na b : α\nh : a * b = 1\n⊢ b * a = 1\n[PROOFSTEP]\nrwa [mul_comm]\n[GOAL]\nα : Type u\ninst✝¹ : CommMonoid α\ninst✝ : Subsingleton αˣ\na b : α\n⊢ a = 1 ∧ b = 1 → a * b = 1\n[PROOFSTEP]\nrintro ⟨rfl, rfl⟩\n[GOAL]\ncase intro\nα : Type u\ninst✝¹ : CommMonoid α\ninst✝ : Subsingleton αˣ\n⊢ 1 * 1 = 1\n[PROOFSTEP]\nexact mul_one _\n[GOAL]\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : Monoid M\na : M\nh : IsUnit a\n⊢ ∃ b, a * b = 1\n[PROOFSTEP]\nrcases h with ⟨⟨a, b, hab, _⟩, rfl⟩\n[GOAL]\ncase intro.mk\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : Monoid M\na b : M\nhab : a * b = 1\ninv_val✝ : b * a = 1\n⊢ ∃ b_1, ↑{ val := a, inv := b, val_inv := hab, inv_val := inv_val✝ } * b_1 = 1\n[PROOFSTEP]\nexact ⟨b, hab⟩\n[GOAL]\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : Monoid M\na : M\nh : IsUnit a\n⊢ ∃ b, b * a = 1\n[PROOFSTEP]\nrcases h with ⟨⟨a, b, _, hba⟩, rfl⟩\n[GOAL]\ncase intro.mk\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : Monoid M\na b : M\nval_inv✝ : a * b = 1\nhba : b * a = 1\n⊢ ∃ b_1, b_1 * ↑{ val := a, inv := b, val_inv := val_inv✝, inv_val := hba } = 1\n[PROOFSTEP]\nexact ⟨b, hba⟩\n[GOAL]\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : CommMonoid M\na : M\n⊢ IsUnit a ↔ ∃ b, b * a = 1\n[PROOFSTEP]\nsimp [isUnit_iff_exists_inv, mul_comm]\n[GOAL]\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : Monoid M\nx y : M\n⊢ IsUnit x → IsUnit y → IsUnit (x * y)\n[PROOFSTEP]\nrintro ⟨x, rfl⟩ ⟨y, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : Monoid M\nx y : Mˣ\n⊢ IsUnit (↑x * ↑y)\n[PROOFSTEP]\nexact ⟨x * y, Units.val_mul _ _⟩\n[GOAL]\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : Monoid M\na : M\nu : Mˣ\nx✝ : IsUnit (a * ↑u)\nv : Mˣ\nhv : ↑v = a * ↑u\n⊢ IsUnit a\n[PROOFSTEP]\nhave : IsUnit (a * ↑u * ↑u⁻¹) := by exists v * u⁻¹; rw [← hv, Units.val_mul]\n[GOAL]\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : Monoid M\na : M\nu : Mˣ\nx✝ : IsUnit (a * ↑u)\nv : Mˣ\nhv : ↑v = a * ↑u\n⊢ IsUnit (a * ↑u * ↑u⁻¹)\n[PROOFSTEP]\nexists v * u⁻¹\n[GOAL]\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : Monoid M\na : M\nu : Mˣ\nx✝ : IsUnit (a * ↑u)\nv : Mˣ\nhv : ↑v = a * ↑u\n⊢ ↑(v * u⁻¹) = a * ↑u * ↑u⁻¹\n[PROOFSTEP]\nrw [← hv, Units.val_mul]\n[GOAL]\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : Monoid M\na : M\nu : Mˣ\nx✝ : IsUnit (a * ↑u)\nv : Mˣ\nhv : ↑v = a * ↑u\nthis : IsUnit (a * ↑u * ↑u⁻¹)\n⊢ IsUnit a\n[PROOFSTEP]\nrwa [mul_assoc, Units.mul_inv, mul_one] at this \n[GOAL]\nα : Type u\nM✝ : Type u_1\nN : Type u_2\nM : Type u_3\ninst✝ : Monoid M\nu : Mˣ\na : M\nx✝ : IsUnit (↑u * a)\nv : Mˣ\nhv : ↑v = ↑u * a\n⊢ IsUnit a\n[PROOFSTEP]\nhave : IsUnit (↑u⁻¹ * (↑u * a)) := by exists u⁻¹ * v; rw [← hv, Units.val_mul]\n[GOAL]\nα : Type u\nM✝ : Type u_1\nN : Type u_2\nM : Type u_3\ninst✝ : Monoid M\nu : Mˣ\na : M\nx✝ : IsUnit (↑u * a)\nv : Mˣ\nhv : ↑v = ↑u * a\n⊢ IsUnit (↑u⁻¹ * (↑u * a))\n[PROOFSTEP]\nexists u⁻¹ * v\n[GOAL]\nα : Type u\nM✝ : Type u_1\nN : Type u_2\nM : Type u_3\ninst✝ : Monoid M\nu : Mˣ\na : M\nx✝ : IsUnit (↑u * a)\nv : Mˣ\nhv : ↑v = ↑u * a\n⊢ ↑(u⁻¹ * v) = ↑u⁻¹ * (↑u * a)\n[PROOFSTEP]\nrw [← hv, Units.val_mul]\n[GOAL]\nα : Type u\nM✝ : Type u_1\nN : Type u_2\nM : Type u_3\ninst✝ : Monoid M\nu : Mˣ\na : M\nx✝ : IsUnit (↑u * a)\nv : Mˣ\nhv : ↑v = ↑u * a\nthis : IsUnit (↑u⁻¹ * (↑u * a))\n⊢ IsUnit a\n[PROOFSTEP]\nrwa [← mul_assoc, Units.inv_mul, one_mul] at this \n[GOAL]\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : CommMonoid M\nx y : M\nhu : IsUnit (x * y)\nz : M\nhz : x * y * z = 1\n⊢ x * (y * z) = 1\n[PROOFSTEP]\nrwa [← mul_assoc]\n[GOAL]\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : CommMonoid M\nx y : M\nhu : IsUnit (x * y)\n⊢ IsUnit (y * x)\n[PROOFSTEP]\nrwa [mul_comm]\n[GOAL]\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : Monoid M\na b c : M\nh : IsUnit a\n⊢ a * ↑(IsUnit.unit h)⁻¹ = 1\n[PROOFSTEP]\nrw [← h.unit.mul_inv]\n[GOAL]\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : Monoid M\na b c : M\nh : IsUnit a\n⊢ a * ↑(IsUnit.unit h)⁻¹ = ↑(IsUnit.unit h) * ↑(IsUnit.unit h)⁻¹\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : DivisionMonoid M\na : M\n⊢ IsUnit a → a⁻¹ * a = 1\n[PROOFSTEP]\nrintro ⟨u, rfl⟩\n[GOAL]\ncase intro\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : DivisionMonoid M\nu : Mˣ\n⊢ (↑u)⁻¹ * ↑u = 1\n[PROOFSTEP]\nrw [← Units.val_inv_eq_inv_val, Units.inv_mul]\n[GOAL]\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : DivisionMonoid M\na : M\n⊢ IsUnit a → a * a⁻¹ = 1\n[PROOFSTEP]\nrintro ⟨u, rfl⟩\n[GOAL]\ncase intro\nα : Type u\nM : Type u_1\nN : Type u_2\ninst✝ : DivisionMonoid M\nu : Mˣ\n⊢ ↑u * (↑u)⁻¹ = 1\n[PROOFSTEP]\nrw [← Units.val_inv_eq_inv_val, Units.mul_inv]\n[GOAL]\nα : Type u\nM : Type u_1\nhM : Monoid M\nh : ∀ (a : M), IsUnit a\na : M\n⊢ a⁻¹ * a = 1\n[PROOFSTEP]\nchange ↑(h a).unit⁻¹ * a = 1\n[GOAL]\nα : Type u\nM : Type u_1\nhM : Monoid M\nh : ∀ (a : M), IsUnit a\na : M\n⊢ ↑(IsUnit.unit (_ : IsUnit a))⁻¹ * a = 1\n[PROOFSTEP]\nrw [Units.inv_mul_eq_iff_eq_mul, (h a).unit_spec, mul_one]\n[GOAL]\nα : Type u\nM : Type u_1\nhM : CommMonoid M\nh : ∀ (a : M), IsUnit a\na : M\n⊢ a⁻¹ * a = 1\n[PROOFSTEP]\nchange ↑(h a).unit⁻¹ * a = 1\n[GOAL]\nα : Type u\nM : Type u_1\nhM : CommMonoid M\nh : ∀ (a : M), IsUnit a\na : M\n⊢ ↑(IsUnit.unit (_ : IsUnit a))⁻¹ * a = 1\n[PROOFSTEP]\nrw [Units.inv_mul_eq_iff_eq_mul, (h a).unit_spec, mul_one]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Group.Units", "llama_tokens": 6715, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8311430436757312, "lm_q2_score": 0.6791786926816161, "lm_q1q2_score": 0.5644946458351024}} {"text": "[GOAL]\nm✝ n✝ m n : ℕ\nh : m ≤ n\n⊢ m ! ∣ n !\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nm✝ n✝ m n : ℕ\nh✝ : m ≤ n\nh : m ≤ zero\n⊢ m ! ∣ zero !\n[PROOFSTEP]\nsimp [Nat.eq_zero_of_le_zero h]\n[GOAL]\ncase succ\nm✝ n✝¹ m n✝ : ℕ\nh✝ : m ≤ n✝\nn : ℕ\nIH : m ≤ n → m ! ∣ n !\nh : m ≤ succ n\n⊢ m ! ∣ (succ n)!\n[PROOFSTEP]\nobtain rfl | hl := h.eq_or_lt\n[GOAL]\ncase succ.inl\nm n✝¹ n✝ n : ℕ\nh✝ : succ n ≤ n✝\nIH : succ n ≤ n → (succ n)! ∣ n !\nh : succ n ≤ succ n\n⊢ (succ n)! ∣ (succ n)!\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.inr\nm✝ n✝¹ m n✝ : ℕ\nh✝ : m ≤ n✝\nn : ℕ\nIH : m ≤ n → m ! ∣ n !\nh : m ≤ succ n\nhl : m < succ n\n⊢ m ! ∣ (succ n)!\n[PROOFSTEP]\nexact (IH (le_of_lt_succ hl)).mul_left _\n[GOAL]\nm✝ n m : ℕ\n⊢ m ! * succ m ^ 0 ≤ (m + 0)!\n[PROOFSTEP]\nsimp\n[GOAL]\nm✝ n✝ m n : ℕ\n⊢ m ! * succ m ^ (n + 1) ≤ (m + (n + 1))!\n[PROOFSTEP]\nrw [← add_assoc, ← Nat.succ_eq_add_one (m + n), Nat.factorial_succ, pow_succ', mul_comm (_ + 1), mul_comm (succ m), ←\n mul_assoc]\n[GOAL]\nm✝ n✝ m n : ℕ\n⊢ m ! * succ m ^ n * succ m ≤ (m + n)! * (m + n + 1)\n[PROOFSTEP]\nexact\n mul_le_mul factorial_mul_pow_le_factorial (Nat.succ_le_succ (Nat.le_add_right _ _)) (Nat.zero_le _) (Nat.zero_le _)\n[GOAL]\nm n : ℕ\nhn : 0 < n\n⊢ n ! < m ! ↔ n < m\n[PROOFSTEP]\nrefine' ⟨fun h => not_le.mp fun hmn => not_le_of_lt h (factorial_le hmn), fun h => _⟩\n[GOAL]\nm n : ℕ\nhn : 0 < n\nh : n < m\n⊢ n ! < m !\n[PROOFSTEP]\nhave : ∀ {n}, 0 < n → n ! < n.succ ! := by\n intro k hk\n rw [factorial_succ, succ_mul, lt_add_iff_pos_left]\n exact mul_pos hk k.factorial_pos\n[GOAL]\nm n : ℕ\nhn : 0 < n\nh : n < m\n⊢ ∀ {n : ℕ}, 0 < n → n ! < (succ n)!\n[PROOFSTEP]\nintro k hk\n[GOAL]\nm n : ℕ\nhn : 0 < n\nh : n < m\nk : ℕ\nhk : 0 < k\n⊢ k ! < (succ k)!\n[PROOFSTEP]\nrw [factorial_succ, succ_mul, lt_add_iff_pos_left]\n[GOAL]\nm n : ℕ\nhn : 0 < n\nh : n < m\nk : ℕ\nhk : 0 < k\n⊢ 0 < k * k !\n[PROOFSTEP]\nexact mul_pos hk k.factorial_pos\n[GOAL]\nm n : ℕ\nhn : 0 < n\nh : n < m\nthis : ∀ {n : ℕ}, 0 < n → n ! < (succ n)!\n⊢ n ! < m !\n[PROOFSTEP]\ninduction' h with k hnk ih generalizing hn\n[GOAL]\ncase refl\nm n : ℕ\nhn✝ : 0 < n\nthis : ∀ {n : ℕ}, 0 < n → n ! < (succ n)!\nhn : 0 < n\n⊢ n ! < (succ n)!\n[PROOFSTEP]\nexact this hn\n[GOAL]\ncase step\nm n : ℕ\nhn✝ : 0 < n\nthis : ∀ {n : ℕ}, 0 < n → n ! < (succ n)!\nk : ℕ\nhnk : Nat.le (succ n) k\nih : 0 < n → n ! < k !\nhn : 0 < n\n⊢ n ! < (succ k)!\n[PROOFSTEP]\nexact (ih hn).trans (this <| hn.trans <| lt_of_succ_le hnk)\n[GOAL]\nm n : ℕ\n⊢ n ! = 1 ↔ n ≤ 1\n[PROOFSTEP]\napply Iff.intro\n[GOAL]\ncase mp\nm n : ℕ\n⊢ n ! = 1 → n ≤ 1\n[PROOFSTEP]\nintro\n[GOAL]\ncase mpr\nm n : ℕ\n⊢ n ≤ 1 → n ! = 1\n[PROOFSTEP]\nintro\n[GOAL]\ncase mp\nm n : ℕ\na✝ : n ! = 1\n⊢ n ≤ 1\n[PROOFSTEP]\nrw [← not_lt, ← one_lt_factorial, ‹n ! = 1›]\n[GOAL]\ncase mp\nm n : ℕ\na✝ : n ! = 1\n⊢ ¬1 < 1\n[PROOFSTEP]\napply lt_irrefl\n[GOAL]\ncase mpr\nm n : ℕ\na✝ : n ≤ 1\n⊢ n ! = 1\n[PROOFSTEP]\ncases ‹n ≤ 1›\n[GOAL]\ncase mpr.refl\nm : ℕ\n⊢ 1! = 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr.step\nm n : ℕ\na✝ : Nat.le n 0\n⊢ n ! = 1\n[PROOFSTEP]\ncases ‹n ≤ 0›\n[GOAL]\ncase mpr.step.refl\nm : ℕ\n⊢ 0! = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nm n : ℕ\nhn : 1 < n !\n⊢ n ! = m ! ↔ n = m\n[PROOFSTEP]\nrefine' ⟨fun h => _, congr_arg _⟩\n[GOAL]\nm n : ℕ\nhn : 1 < n !\nh : n ! = m !\n⊢ n = m\n[PROOFSTEP]\nobtain hnm | rfl | hnm := lt_trichotomy n m\n[GOAL]\ncase inl\nm n : ℕ\nhn : 1 < n !\nh : n ! = m !\nhnm : n < m\n⊢ n = m\n[PROOFSTEP]\nrw [← factorial_lt <| pos_of_gt <| one_lt_factorial.mp hn, h] at hnm \n[GOAL]\ncase inl\nm n : ℕ\nhn : 1 < n !\nh : n ! = m !\nhnm : m ! < m !\n⊢ n = m\n[PROOFSTEP]\ncases lt_irrefl _ hnm\n[GOAL]\ncase inr.inl\nn : ℕ\nhn : 1 < n !\nh : n ! = n !\n⊢ n = n\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr.inr\nm n : ℕ\nhn : 1 < n !\nh : n ! = m !\nhnm : m < n\n⊢ n = m\n[PROOFSTEP]\nrw [h, one_lt_factorial] at hn \n[GOAL]\ncase inr.inr\nm n : ℕ\nhn : 1 < m\nh : n ! = m !\nhnm : m < n\n⊢ n = m\n[PROOFSTEP]\nrw [← factorial_lt (lt_trans one_pos hn), h] at hnm \n[GOAL]\ncase inr.inr\nm n : ℕ\nhn : 1 < m\nh : n ! = m !\nhnm : m ! < m !\n⊢ n = m\n[PROOFSTEP]\ncases lt_irrefl _ hnm\n[GOAL]\nm n✝ n : ℕ\nhi : 3 ≤ n\n⊢ n < n !\n[PROOFSTEP]\nhave : 0 < n := (by decide : 0 < 2).trans (succ_le_iff.mp hi)\n[GOAL]\nm n✝ n : ℕ\nhi : 3 ≤ n\n⊢ 0 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\nm n✝ n : ℕ\nhi : 3 ≤ n\nthis : 0 < n\n⊢ n < n !\n[PROOFSTEP]\nhave : 1 < pred n := le_pred_of_lt (succ_le_iff.mp hi)\n[GOAL]\nm n✝ n : ℕ\nhi : 3 ≤ n\nthis✝ : 0 < n\nthis : 1 < pred n\n⊢ n < n !\n[PROOFSTEP]\nrw [← succ_pred_eq_of_pos ‹0 < n›, factorial_succ]\n[GOAL]\nm n✝ n : ℕ\nhi : 3 ≤ n\nthis✝ : 0 < n\nthis : 1 < pred n\n⊢ succ (pred n) < (pred n + 1) * (pred n)!\n[PROOFSTEP]\nexact lt_mul_of_one_lt_right (pred n).succ_pos ((‹1 < pred n›).trans_le (self_le_factorial _))\n[GOAL]\nm n✝ i n : ℕ\nhi : 2 ≤ i\n⊢ i + (n + 1)! < (i + n + 1)!\n[PROOFSTEP]\nrw [← Nat.succ_eq_add_one (i + _), factorial_succ (i + _), add_mul, one_mul]\n[GOAL]\nm n✝ i n : ℕ\nhi : 2 ≤ i\n⊢ i + (n + 1)! < (i + n) * (i + n)! + (i + n)!\n[PROOFSTEP]\nhave : i ≤ i + n := le.intro rfl\n[GOAL]\nm n✝ i n : ℕ\nhi : 2 ≤ i\nthis : i ≤ i + n\n⊢ i + (n + 1)! < (i + n) * (i + n)! + (i + n)!\n[PROOFSTEP]\nexact\n add_lt_add_of_lt_of_le\n (this.trans_lt\n ((lt_mul_iff_one_lt_right ((by decide : 0 < 2).trans_le (hi.trans this))).mpr\n (lt_iff_le_and_ne.mpr\n ⟨(i + n).factorial_pos, fun g =>\n Nat.not_succ_le_self 1 ((hi.trans this).trans (factorial_eq_one.mp g.symm))⟩)))\n (factorial_le ((le_of_eq (add_comm n 1)).trans ((add_le_add_iff_right n).mpr ((by decide : 1 ≤ 2).trans hi))))\n[GOAL]\nm n✝ i n : ℕ\nhi : 2 ≤ i\nthis : i ≤ i + n\n⊢ 0 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\nm n✝ i n : ℕ\nhi : 2 ≤ i\nthis : i ≤ i + n\n⊢ 1 ≤ 2\n[PROOFSTEP]\ndecide\n[GOAL]\nm n✝ i n : ℕ\nhi : 2 ≤ i\nhn : 1 ≤ n\n⊢ i + n ! < (i + n)!\n[PROOFSTEP]\ncases hn\n[GOAL]\ncase refl\nm n i : ℕ\nhi : 2 ≤ i\n⊢ i + 1! < (i + 1)!\n[PROOFSTEP]\nrw [factorial_one]\n[GOAL]\ncase refl\nm n i : ℕ\nhi : 2 ≤ i\n⊢ i + 1 < (i + 1)!\n[PROOFSTEP]\nexact lt_factorial_self (succ_le_succ hi)\n[GOAL]\ncase step\nm n i : ℕ\nhi : 2 ≤ i\nm✝ : ℕ\na✝ : Nat.le 1 m✝\n⊢ i + (succ m✝)! < (i + succ m✝)!\n[PROOFSTEP]\nexact add_factorial_succ_lt_factorial_add_succ _ hi\n[GOAL]\nm n✝ i n : ℕ\n⊢ i + (n + 1)! ≤ (i + (n + 1))!\n[PROOFSTEP]\ncases (le_or_lt (2 : ℕ) i)\n[GOAL]\ncase inl\nm n✝ i n : ℕ\nh✝ : 2 ≤ i\n⊢ i + (n + 1)! ≤ (i + (n + 1))!\n[PROOFSTEP]\nrw [← add_assoc]\n[GOAL]\ncase inl\nm n✝ i n : ℕ\nh✝ : 2 ≤ i\n⊢ i + (n + 1)! ≤ (i + n + 1)!\n[PROOFSTEP]\napply Nat.le_of_lt\n[GOAL]\ncase inl.h\nm n✝ i n : ℕ\nh✝ : 2 ≤ i\n⊢ i + (n + 1)! < (i + n + 1)!\n[PROOFSTEP]\napply add_factorial_succ_lt_factorial_add_succ\n[GOAL]\ncase inl.h.hi\nm n✝ i n : ℕ\nh✝ : 2 ≤ i\n⊢ 2 ≤ i\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr\nm n✝ i n : ℕ\nh✝ : i < 2\n⊢ i + (n + 1)! ≤ (i + (n + 1))!\n[PROOFSTEP]\nmatch i with\n| 0 => simp\n|\n1 =>\n rw [← add_assoc, ← Nat.succ_eq_add_one (1 + n), factorial_succ (1 + n), add_mul, one_mul, add_comm 1 n,\n add_le_add_iff_right]\n apply one_le_mul\n · apply Nat.le_add_left\n · apply factorial_pos\n| succ (succ n) => contradiction\n[GOAL]\nm n✝ i n : ℕ\nh✝ : 0 < 2\n⊢ 0 + (n + 1)! ≤ (0 + (n + 1))!\n[PROOFSTEP]\nsimp\n[GOAL]\nm n✝ i n : ℕ\nh✝ : 1 < 2\n⊢ 1 + (n + 1)! ≤ (1 + (n + 1))!\n[PROOFSTEP]\nrw [← add_assoc, ← Nat.succ_eq_add_one (1 + n), factorial_succ (1 + n), add_mul, one_mul, add_comm 1 n,\n add_le_add_iff_right]\n[GOAL]\nm n✝ i n : ℕ\nh✝ : 1 < 2\n⊢ 1 ≤ (n + 1) * (n + 1)!\n[PROOFSTEP]\napply one_le_mul\n[GOAL]\ncase ha\nm n✝ i n : ℕ\nh✝ : 1 < 2\n⊢ 1 ≤ n + 1\n[PROOFSTEP]\napply Nat.le_add_left\n[GOAL]\ncase hb\nm n✝ i n : ℕ\nh✝ : 1 < 2\n⊢ 1 ≤ (n + 1)!\n[PROOFSTEP]\napply factorial_pos\n[GOAL]\nm n✝¹ i n✝ n : ℕ\nh✝ : succ (succ n) < 2\n⊢ succ (succ n) + (n✝ + 1)! ≤ (succ (succ n) + (n✝ + 1))!\n[PROOFSTEP]\ncontradiction\n[GOAL]\nm n✝ i n : ℕ\nn1 : 1 ≤ n\n⊢ i + n ! ≤ (i + n)!\n[PROOFSTEP]\ncases' n1 with h\n[GOAL]\ncase refl\nm n i : ℕ\n⊢ i + 1! ≤ (i + 1)!\n[PROOFSTEP]\nexact self_le_factorial _\n[GOAL]\ncase step\nm n i h : ℕ\na✝ : Nat.le 1 h\n⊢ i + (succ h)! ≤ (i + succ h)!\n[PROOFSTEP]\nexact add_factorial_succ_le_factorial_add_succ i h\n[GOAL]\nm✝ n✝ n m : ℕ\nhnm : n ≤ m\n⊢ n ! * n ^ (m - n) ≤ m !\n[PROOFSTEP]\nsuffices n ! * (n + 1) ^ (m - n) ≤ m ! from by\n apply LE.le.trans _ this\n apply mul_le_mul_left\n apply pow_le_pow_of_le_left (le_succ n)\n[GOAL]\nm✝ n✝ n m : ℕ\nhnm : n ≤ m\nthis : n ! * (n + 1) ^ (m - n) ≤ m !\n⊢ n ! * n ^ (m - n) ≤ m !\n[PROOFSTEP]\napply LE.le.trans _ this\n[GOAL]\nm✝ n✝ n m : ℕ\nhnm : n ≤ m\nthis : n ! * (n + 1) ^ (m - n) ≤ m !\n⊢ n ! * n ^ (m - n) ≤ n ! * (n + 1) ^ (m - n)\n[PROOFSTEP]\napply mul_le_mul_left\n[GOAL]\ncase h\nm✝ n✝ n m : ℕ\nhnm : n ≤ m\nthis : n ! * (n + 1) ^ (m - n) ≤ m !\n⊢ n ^ (m - n) ≤ (n + 1) ^ (m - n)\n[PROOFSTEP]\napply pow_le_pow_of_le_left (le_succ n)\n[GOAL]\nm✝ n✝ n m : ℕ\nhnm : n ≤ m\n⊢ n ! * (n + 1) ^ (m - n) ≤ m !\n[PROOFSTEP]\nhave := @Nat.factorial_mul_pow_le_factorial n (m - n)\n[GOAL]\nm✝ n✝ n m : ℕ\nhnm : n ≤ m\nthis : n ! * succ n ^ (m - n) ≤ (n + (m - n))!\n⊢ n ! * (n + 1) ^ (m - n) ≤ m !\n[PROOFSTEP]\nsimp [hnm] at this \n[GOAL]\nm✝ n✝ n m : ℕ\nhnm : n ≤ m\nthis : n ! * succ n ^ (m - n) ≤ m !\n⊢ n ! * (n + 1) ^ (m - n) ≤ m !\n[PROOFSTEP]\nexact this\n[GOAL]\nk : ℕ\n⊢ ascFactorial 0 k = k !\n[PROOFSTEP]\ninduction' k with t ht\n[GOAL]\ncase zero\n⊢ ascFactorial 0 zero = zero !\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nt : ℕ\nht : ascFactorial 0 t = t !\n⊢ ascFactorial 0 (succ t) = (succ t)!\n[PROOFSTEP]\nrw [ascFactorial, ht, zero_add, Nat.factorial_succ]\n[GOAL]\nn : ℕ\n⊢ (n + 1) * ascFactorial (succ n) 0 = (n + 0 + 1) * ascFactorial n 0\n[PROOFSTEP]\nrw [add_zero, ascFactorial_zero, ascFactorial_zero]\n[GOAL]\nn k : ℕ\n⊢ (n + 1) * ascFactorial (succ n) (k + 1) = (n + (k + 1) + 1) * ascFactorial n (k + 1)\n[PROOFSTEP]\nrw [ascFactorial, mul_left_comm, succ_ascFactorial n k, ascFactorial, succ_add, ← add_assoc, succ_eq_add_one]\n[GOAL]\nn : ℕ\n⊢ n ! * ascFactorial n 0 = (n + 0)!\n[PROOFSTEP]\nrw [ascFactorial, add_zero, mul_one]\n[GOAL]\nn k : ℕ\n⊢ n ! * ascFactorial n (k + 1) = (n + (k + 1))!\n[PROOFSTEP]\nrw [ascFactorial_succ, mul_left_comm, factorial_mul_ascFactorial n k, ← add_assoc, ← Nat.succ_eq_add_one (n + k),\n factorial]\n[GOAL]\nn k : ℕ\n⊢ ascFactorial n k = (n + k)! / n !\n[PROOFSTEP]\napply mul_left_cancel₀ n.factorial_ne_zero\n[GOAL]\nn k : ℕ\n⊢ n ! * ascFactorial n k = n ! * ((n + k)! / n !)\n[PROOFSTEP]\nrw [factorial_mul_ascFactorial]\n[GOAL]\nn k : ℕ\n⊢ (n + k)! = n ! * ((n + k)! / n !)\n[PROOFSTEP]\nexact (Nat.mul_div_cancel' <| factorial_dvd_factorial <| le.intro rfl).symm\n[GOAL]\nn k : ℕ\nh : k < n\n⊢ (n - k) * ascFactorial (n - k) k = ascFactorial (n - (k + 1)) (k + 1)\n[PROOFSTEP]\nlet t := n - k.succ\n[GOAL]\nn k : ℕ\nh : k < n\nt : ℕ := n - succ k\n⊢ (n - k) * ascFactorial (n - k) k = ascFactorial (n - (k + 1)) (k + 1)\n[PROOFSTEP]\nlet ht : t = n - k.succ := rfl\n[GOAL]\nn k : ℕ\nh : k < n\nt : ℕ := n - succ k\nht : t = n - succ k := rfl\n⊢ (n - k) * ascFactorial (n - k) k = ascFactorial (n - (k + 1)) (k + 1)\n[PROOFSTEP]\nsuffices h' : n - k = t.succ\n[GOAL]\nn k : ℕ\nh : k < n\nt : ℕ := n - succ k\nht : t = n - succ k := rfl\nh' : n - k = succ t\n⊢ (n - k) * ascFactorial (n - k) k = ascFactorial (n - (k + 1)) (k + 1)\n[PROOFSTEP]\nrw [← ht, h', succ_ascFactorial, ascFactorial_succ]\n[GOAL]\ncase h'\nn k : ℕ\nh : k < n\nt : ℕ := n - succ k\nht : t = n - succ k := rfl\n⊢ n - k = succ t\n[PROOFSTEP]\nrw [ht, succ_eq_add_one, ← tsub_tsub_assoc (succ_le_of_lt h) (succ_pos _), succ_sub_one]\n[GOAL]\nn : ℕ\n⊢ (n + 1) ^ 0 ≤ ascFactorial n 0\n[PROOFSTEP]\nrw [ascFactorial_zero, pow_zero]\n[GOAL]\nn k : ℕ\n⊢ (n + 1) ^ (k + 1) ≤ ascFactorial n (k + 1)\n[PROOFSTEP]\nrw [pow_succ, mul_comm]\n[GOAL]\nn k : ℕ\n⊢ (n + 1) * (n + 1) ^ k ≤ ascFactorial n (k + 1)\n[PROOFSTEP]\nexact Nat.mul_le_mul (Nat.add_le_add_right le_self_add _) (pow_succ_le_ascFactorial _ k)\n[GOAL]\nn k : ℕ\n⊢ (n + 1) ^ (k + 2) < ascFactorial n (k + 2)\n[PROOFSTEP]\nrw [pow_succ, ascFactorial, mul_comm]\n[GOAL]\nn k : ℕ\n⊢ (n + 1) * (n + 1) ^ (k + 1) < (n + (k + 1) + 1) * ascFactorial n (k + 1)\n[PROOFSTEP]\nexact\n Nat.mul_lt_mul (Nat.add_lt_add_right (Nat.lt_add_of_pos_right succ_pos') 1) (pow_succ_le_ascFactorial n _)\n (pow_pos succ_pos' _)\n[GOAL]\nn : ℕ\n⊢ 2 ≤ 0 → (n + 1) ^ 0 < ascFactorial n 0\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\nn : ℕ\n⊢ 2 ≤ 1 → (n + 1) ^ 1 < ascFactorial n 1\n[PROOFSTEP]\nintro\n[GOAL]\nn : ℕ\na✝ : 2 ≤ 1\n⊢ (n + 1) ^ 1 < ascFactorial n 1\n[PROOFSTEP]\ncontradiction\n[GOAL]\nn : ℕ\n⊢ ascFactorial n 0 ≤ (n + 0) ^ 0\n[PROOFSTEP]\nrw [ascFactorial_zero, pow_zero]\n[GOAL]\nn k : ℕ\n⊢ ascFactorial n (k + 1) ≤ (n + (k + 1)) ^ (k + 1)\n[PROOFSTEP]\nrw [ascFactorial_succ, pow_succ, ← add_assoc, ← Nat.succ_eq_add_one (n + k), mul_comm _ (succ (n + k))]\n[GOAL]\nn k : ℕ\n⊢ succ (n + k) * ascFactorial n k ≤ succ (n + k) * succ (n + k) ^ k\n[PROOFSTEP]\nexact Nat.mul_le_mul_of_nonneg_left ((ascFactorial_le_pow_add _ k).trans (Nat.pow_le_pow_of_le_left (le_succ _) _))\n[GOAL]\nn : ℕ\n⊢ 2 ≤ 0 → ascFactorial n 0 < (n + 0) ^ 0\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\nn : ℕ\n⊢ 2 ≤ 1 → ascFactorial n 1 < (n + 1) ^ 1\n[PROOFSTEP]\nintro\n[GOAL]\nn : ℕ\na✝ : 2 ≤ 1\n⊢ ascFactorial n 1 < (n + 1) ^ 1\n[PROOFSTEP]\ncontradiction\n[GOAL]\nn k : ℕ\nx✝ : 2 ≤ k + 2\n⊢ ascFactorial n (k + 2) < (n + (k + 2)) ^ (k + 2)\n[PROOFSTEP]\nrw [ascFactorial_succ, pow_succ]\n[GOAL]\nn k : ℕ\nx✝ : 2 ≤ k + 2\n⊢ (n + (k + 1) + 1) * ascFactorial n (k + 1) < (n + (k + 2)) ^ (k + 1) * (n + (k + 2))\n[PROOFSTEP]\nrw [add_assoc n (k + 1) 1, mul_comm <| (n + (k + 2)) ^ (k + 1)]\n[GOAL]\nn k : ℕ\nx✝ : 2 ≤ k + 2\n⊢ (n + (k + 1 + 1)) * ascFactorial n (k + 1) < (n + (k + 2)) * (n + (k + 2)) ^ (k + 1)\n[PROOFSTEP]\nrefine'\n Nat.mul_lt_mul' le_rfl ((ascFactorial_le_pow_add n _).trans_lt (pow_lt_pow_of_lt_left (lt_add_one _) (succ_pos _)))\n (succ_pos _)\n[GOAL]\nk : ℕ\n⊢ descFactorial 0 (succ k) = 0\n[PROOFSTEP]\nrw [descFactorial_succ, zero_tsub, zero_mul]\n[GOAL]\nn : ℕ\n⊢ descFactorial n 1 = n\n[PROOFSTEP]\nrw [descFactorial_succ, descFactorial_zero, mul_one, tsub_zero]\n[GOAL]\nn : ℕ\n⊢ descFactorial (n + 1) (0 + 1) = (n + 1) * descFactorial n 0\n[PROOFSTEP]\nrw [descFactorial_zero, descFactorial_one, mul_one]\n[GOAL]\nn k : ℕ\n⊢ descFactorial (n + 1) (succ k + 1) = (n + 1) * descFactorial n (succ k)\n[PROOFSTEP]\nrw [descFactorial_succ, succ_descFactorial_succ _ k, descFactorial_succ, succ_sub_succ, mul_left_comm]\n[GOAL]\nn : ℕ\n⊢ (n + 1 - 0) * descFactorial (n + 1) 0 = (n + 1) * descFactorial n 0\n[PROOFSTEP]\nrw [tsub_zero, descFactorial_zero, descFactorial_zero]\n[GOAL]\nn k : ℕ\n⊢ (n + 1 - (k + 1)) * descFactorial (n + 1) (k + 1) = (n + 1) * descFactorial n (k + 1)\n[PROOFSTEP]\nrw [descFactorial, succ_descFactorial _ k, descFactorial_succ, succ_sub_succ, mul_left_comm]\n[GOAL]\n⊢ descFactorial 0 0 = 0!\n[PROOFSTEP]\nrw [descFactorial_zero, factorial_zero]\n[GOAL]\nn : ℕ\n⊢ descFactorial (succ n) (succ n) = (succ n)!\n[PROOFSTEP]\nrw [succ_descFactorial_succ, descFactorial_self n, factorial_succ]\n[GOAL]\nn : ℕ\n⊢ descFactorial n 0 = 0 ↔ n < 0\n[PROOFSTEP]\nsimp only [descFactorial_zero, Nat.one_ne_zero, Nat.not_lt_zero]\n[GOAL]\nn k : ℕ\n⊢ descFactorial n (succ k) = 0 ↔ n < succ k\n[PROOFSTEP]\nrw [descFactorial_succ, mul_eq_zero, descFactorial_eq_zero_iff_lt, lt_succ_iff, tsub_eq_zero_iff_le, lt_iff_le_and_ne,\n or_iff_left_iff_imp, and_imp]\n[GOAL]\nn k : ℕ\n⊢ n ≤ k → n ≠ k → n ≤ k\n[PROOFSTEP]\nexact fun h _ => h\n[GOAL]\nn : ℕ\n⊢ descFactorial (n + 0) 0 = ascFactorial n 0\n[PROOFSTEP]\nrw [ascFactorial_zero, descFactorial_zero]\n[GOAL]\nn k : ℕ\n⊢ descFactorial (n + succ k) (succ k) = ascFactorial n (succ k)\n[PROOFSTEP]\nrw [Nat.add_succ, Nat.succ_eq_add_one, Nat.succ_eq_add_one, succ_descFactorial_succ, ascFactorial_succ,\n add_descFactorial_eq_ascFactorial _ k]\n[GOAL]\nn : ℕ\nx✝ : 0 ≤ n\n⊢ (n - 0)! * descFactorial n 0 = n !\n[PROOFSTEP]\nrw [descFactorial_zero, mul_one, tsub_zero]\n[GOAL]\nk : ℕ\nh : succ k ≤ 0\n⊢ (0 - succ k)! * descFactorial 0 (succ k) = 0!\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase h\nk : ℕ\nh : succ k ≤ 0\n⊢ False\n[PROOFSTEP]\nexact not_succ_le_zero k h\n[GOAL]\nn k : ℕ\nh : succ k ≤ succ n\n⊢ (succ n - succ k)! * descFactorial (succ n) (succ k) = (succ n)!\n[PROOFSTEP]\nrw [succ_descFactorial_succ, succ_sub_succ, ← mul_assoc, mul_comm (n - k)!, mul_assoc,\n factorial_mul_descFactorial (Nat.succ_le_succ_iff.1 h), factorial_succ]\n[GOAL]\nn k : ℕ\nh : k ≤ n\n⊢ descFactorial n k = n ! / (n - k)!\n[PROOFSTEP]\napply mul_left_cancel₀ (factorial_ne_zero (n - k))\n[GOAL]\nn k : ℕ\nh : k ≤ n\n⊢ (n - k)! * descFactorial n k = (n - k)! * (n ! / (n - k)!)\n[PROOFSTEP]\nrw [factorial_mul_descFactorial h]\n[GOAL]\nn k : ℕ\nh : k ≤ n\n⊢ n ! = (n - k)! * (n ! / (n - k)!)\n[PROOFSTEP]\nexact (Nat.mul_div_cancel' <| factorial_dvd_factorial <| Nat.sub_le n k).symm\n[GOAL]\nn : ℕ\n⊢ (n + 1 - 0) ^ 0 ≤ descFactorial n 0\n[PROOFSTEP]\nrw [descFactorial_zero, pow_zero]\n[GOAL]\nn k : ℕ\n⊢ (n + 1 - (k + 1)) ^ (k + 1) ≤ descFactorial n (k + 1)\n[PROOFSTEP]\nrw [descFactorial_succ, pow_succ, succ_sub_succ, mul_comm]\n[GOAL]\nn k : ℕ\n⊢ (n - k) * (n - k) ^ k ≤ (n - k) * descFactorial n k\n[PROOFSTEP]\napply Nat.mul_le_mul_of_nonneg_left\n[GOAL]\ncase h₁\nn k : ℕ\n⊢ (n - k) ^ k ≤ descFactorial n k\n[PROOFSTEP]\nexact (le_trans (Nat.pow_le_pow_of_le_left (tsub_le_tsub_right (le_succ _) _) k) (pow_sub_le_descFactorial n k))\n[GOAL]\nn : ℕ\nh : 0 + 2 ≤ n\n⊢ (n - (0 + 1)) ^ (0 + 2) < descFactorial n (0 + 2)\n[PROOFSTEP]\nrw [descFactorial_succ, pow_succ, pow_one, descFactorial_one]\n[GOAL]\nn : ℕ\nh : 0 + 2 ≤ n\n⊢ (n - (0 + 1)) * (n - (0 + 1)) < (n - 1) * n\n[PROOFSTEP]\nexact Nat.mul_lt_mul_of_pos_left (tsub_lt_self (lt_of_lt_of_le zero_lt_two h) zero_lt_one) (tsub_pos_of_lt h)\n[GOAL]\nn k : ℕ\nh : k + 1 + 2 ≤ n\n⊢ (n - (k + 1 + 1)) ^ (k + 1 + 2) < descFactorial n (k + 1 + 2)\n[PROOFSTEP]\nrw [descFactorial_succ, pow_succ, mul_comm]\n[GOAL]\nn k : ℕ\nh : k + 1 + 2 ≤ n\n⊢ (n - (k + 1 + 1)) * (n - (k + 1 + 1)) ^ (k + 2) < (n - (k + 2)) * descFactorial n (k + 2)\n[PROOFSTEP]\napply Nat.mul_lt_mul_of_pos_left\n[GOAL]\ncase h\nn k : ℕ\nh : k + 1 + 2 ≤ n\n⊢ (n - (k + 1 + 1)) ^ (k + 2) < descFactorial n (k + 2)\n[PROOFSTEP]\nrefine' ((Nat.pow_le_pow_of_le_left (tsub_le_tsub_right (le_succ n) _) _).trans_lt _)\n[GOAL]\ncase h\nn k : ℕ\nh : k + 1 + 2 ≤ n\n⊢ (succ n - (k + 1 + 1)) ^ (k + 2) < descFactorial n (k + 2)\n[PROOFSTEP]\nrw [succ_sub_succ]\n[GOAL]\ncase h\nn k : ℕ\nh : k + 1 + 2 ≤ n\n⊢ (n - (k + 1)) ^ (k + 2) < descFactorial n (k + 2)\n[PROOFSTEP]\nexact pow_sub_lt_descFactorial' ((le_succ _).trans h)\n[GOAL]\ncase hk\nn k : ℕ\nh : k + 1 + 2 ≤ n\n⊢ n - (k + 1 + 1) > 0\n[PROOFSTEP]\napply tsub_pos_of_lt\n[GOAL]\ncase hk.h\nn k : ℕ\nh : k + 1 + 2 ≤ n\n⊢ k + 1 + 1 < n\n[PROOFSTEP]\napply h\n[GOAL]\nn : ℕ\n⊢ 2 ≤ 0 → 0 ≤ n → (n + 1 - 0) ^ 0 < descFactorial n 0\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\nn : ℕ\n⊢ 2 ≤ 1 → 1 ≤ n → (n + 1 - 1) ^ 1 < descFactorial n 1\n[PROOFSTEP]\nintro\n[GOAL]\nn : ℕ\na✝ : 2 ≤ 1\n⊢ 1 ≤ n → (n + 1 - 1) ^ 1 < descFactorial n 1\n[PROOFSTEP]\ncontradiction\n[GOAL]\nn k : ℕ\nx✝ : 2 ≤ k + 2\nh : k + 2 ≤ n\n⊢ (n + 1 - (k + 2)) ^ (k + 2) < descFactorial n (k + 2)\n[PROOFSTEP]\nrw [succ_sub_succ]\n[GOAL]\nn k : ℕ\nx✝ : 2 ≤ k + 2\nh : k + 2 ≤ n\n⊢ (n - (k + 1)) ^ (k + 2) < descFactorial n (k + 2)\n[PROOFSTEP]\nexact pow_sub_lt_descFactorial' h\n[GOAL]\nn : ℕ\n⊢ descFactorial n 0 ≤ n ^ 0\n[PROOFSTEP]\nrw [descFactorial_zero, pow_zero]\n[GOAL]\nn k : ℕ\n⊢ descFactorial n (k + 1) ≤ n ^ (k + 1)\n[PROOFSTEP]\nrw [descFactorial_succ, pow_succ, mul_comm _ n]\n[GOAL]\nn k : ℕ\n⊢ (n - k) * descFactorial n k ≤ n * n ^ k\n[PROOFSTEP]\nexact Nat.mul_le_mul (Nat.sub_le _ _) (descFactorial_le_pow _ k)\n[GOAL]\nn : ℕ\nhn : 1 ≤ n\n⊢ 2 ≤ 0 → descFactorial n 0 < n ^ 0\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\nn : ℕ\nhn : 1 ≤ n\n⊢ 2 ≤ 1 → descFactorial n 1 < n ^ 1\n[PROOFSTEP]\nintro\n[GOAL]\nn : ℕ\nhn : 1 ≤ n\na✝ : 2 ≤ 1\n⊢ descFactorial n 1 < n ^ 1\n[PROOFSTEP]\ncontradiction\n[GOAL]\nn : ℕ\nhn : 1 ≤ n\nk : ℕ\nx✝ : 2 ≤ k + 2\n⊢ descFactorial n (k + 2) < n ^ (k + 2)\n[PROOFSTEP]\nrw [descFactorial_succ, pow_succ', mul_comm, mul_comm n]\n[GOAL]\nn : ℕ\nhn : 1 ≤ n\nk : ℕ\nx✝ : 2 ≤ k + 2\n⊢ descFactorial n (k + 1) * (n - (k + 1)) < n ^ (k + 1) * n\n[PROOFSTEP]\nexact Nat.mul_lt_mul' (descFactorial_le_pow _ _) (tsub_lt_self hn k.zero_lt_succ) (pow_pos (Nat.lt_of_succ_le hn) _)\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Factorial.Basic", "llama_tokens": 11088, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.831143031127974, "lm_q2_score": 0.679178699175393, "lm_q1q2_score": 0.5644946427101906}} {"text": "[GOAL]\nα : Type u_1\ninst✝ : CommRing α\nn1 n2 k e1 e2 t1 t2 : α\nh1 : n1 * e1 = t1\nh2 : n2 * e2 = t2\nh3 : n1 * n2 = k\n⊢ k * (e1 * e2) = t1 * t2\n[PROOFSTEP]\nrw [← h3, mul_comm n1, mul_assoc n2, ← mul_assoc n1, h1, ← mul_assoc n2, mul_comm n2, mul_assoc, h2]\n[GOAL]\nα : Type u_1\ninst✝ : Field α\nn1 n2 k e1 e2 t1 : α\nh1 : n1 * e1 = t1\nh2 : n2 / e2 = 1\nh3 : n1 * n2 = k\n⊢ k * (e1 / e2) = t1\n[PROOFSTEP]\nrw [← h3, mul_assoc, mul_div_left_comm, h2, ← mul_assoc, h1, mul_comm, one_mul]\n[GOAL]\nα : Type u_1\ninst✝ : Field α\nn e e' : α\nh : n * e = e'\nh2 : n ≠ 0\n⊢ e * n = e'\n[PROOFSTEP]\nrwa [mul_comm] at h \n[GOAL]\nα : Type u_1\ninst✝ : Ring α\nn e1 e2 t1 t2 : α\nh1 : n * e1 = t1\nh2 : n * e2 = t2\n⊢ n * (e1 + e2) = t1 + t2\n[PROOFSTEP]\nsimp [left_distrib, *]\n[GOAL]\nα : Type u_1\ninst✝ : Ring α\nn e1 e2 t1 t2 : α\nh1 : n * e1 = t1\nh2 : n * e2 = t2\n⊢ n * (e1 - e2) = t1 - t2\n[PROOFSTEP]\nsimp [left_distrib, *, sub_eq_add_neg]\n[GOAL]\nα : Type u_1\ninst✝ : Ring α\nn e t : α\nh1 : n * e = t\n⊢ n * -e = -t\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : 0 < ad\nhbd : 0 < bd\nhgcd : 0 < gcd\n⊢ (a < b) = (1 / gcd * (bd * a') < 1 / gcd * (ad * b'))\n[PROOFSTEP]\nrw [mul_lt_mul_left, ← ha, ← hb, ← mul_assoc, ← mul_assoc, mul_comm bd, mul_lt_mul_left]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : 0 < ad\nhbd : 0 < bd\nhgcd : 0 < gcd\n⊢ 0 < ad * bd\n[PROOFSTEP]\nexact mul_pos had hbd\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : 0 < ad\nhbd : 0 < bd\nhgcd : 0 < gcd\n⊢ 0 < 1 / gcd\n[PROOFSTEP]\nexact one_div_pos.2 hgcd\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : 0 < ad\nhbd : 0 < bd\nhgcd : 0 < gcd\n⊢ (a ≤ b) = (1 / gcd * (bd * a') ≤ 1 / gcd * (ad * b'))\n[PROOFSTEP]\nrw [mul_le_mul_left, ← ha, ← hb, ← mul_assoc, ← mul_assoc, mul_comm bd, mul_le_mul_left]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : 0 < ad\nhbd : 0 < bd\nhgcd : 0 < gcd\n⊢ 0 < ad * bd\n[PROOFSTEP]\nexact mul_pos had hbd\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : 0 < ad\nhbd : 0 < bd\nhgcd : 0 < gcd\n⊢ 0 < 1 / gcd\n[PROOFSTEP]\nexact one_div_pos.2 hgcd\n[GOAL]\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\n⊢ (a = b) = (1 / gcd * (bd * a') = 1 / gcd * (ad * b'))\n[PROOFSTEP]\nrw [← ha, ← hb, ← mul_assoc bd, ← mul_assoc ad, mul_comm bd]\n[GOAL]\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\n⊢ (a = b) = (1 / gcd * (ad * bd * a) = 1 / gcd * (ad * bd * b))\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\n⊢ a = b ↔ 1 / gcd * (ad * bd * a) = 1 / gcd * (ad * bd * b)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mp\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\n⊢ a = b → 1 / gcd * (ad * bd * a) = 1 / gcd * (ad * bd * b)\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase a.mp\nα : Type u_1\ninst✝ : Field α\na ad bd a' b' gcd : α\nha : ad * a = a'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\nhb : bd * a = b'\n⊢ 1 / gcd * (ad * bd * a) = 1 / gcd * (ad * bd * a)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.mpr\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\n⊢ 1 / gcd * (ad * bd * a) = 1 / gcd * (ad * bd * b) → a = b\n[PROOFSTEP]\nintro h\n[GOAL]\ncase a.mpr\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\nh : 1 / gcd * (ad * bd * a) = 1 / gcd * (ad * bd * b)\n⊢ a = b\n[PROOFSTEP]\nsimp only [← mul_assoc] at h \n[GOAL]\ncase a.mpr\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\nh : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b\n⊢ a = b\n[PROOFSTEP]\nrefine' mul_left_cancel₀ (mul_ne_zero _ _) h\n[GOAL]\ncase a.mpr.refine'_1\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\nh : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b\n⊢ 1 / gcd * ad ≠ 0\ncase a.mpr.refine'_2\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\nh : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b\n⊢ bd ≠ 0\n[PROOFSTEP]\napply mul_ne_zero\n[GOAL]\ncase a.mpr.refine'_1.ha\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\nh : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b\n⊢ 1 / gcd ≠ 0\ncase a.mpr.refine'_1.hb\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\nh : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b\n⊢ ad ≠ 0\ncase a.mpr.refine'_2\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\nh : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b\n⊢ bd ≠ 0\n[PROOFSTEP]\napply div_ne_zero\n[GOAL]\ncase a.mpr.refine'_1.ha.ha\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\nh : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b\n⊢ 1 ≠ 0\ncase a.mpr.refine'_1.ha.hb\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\nh : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b\n⊢ gcd ≠ 0\ncase a.mpr.refine'_1.hb\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\nh : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b\n⊢ ad ≠ 0\ncase a.mpr.refine'_2\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\nh : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b\n⊢ bd ≠ 0\n[PROOFSTEP]\nexact one_ne_zero\n[GOAL]\ncase a.mpr.refine'_1.ha.hb\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\nh : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b\n⊢ gcd ≠ 0\ncase a.mpr.refine'_1.hb\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\nh : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b\n⊢ ad ≠ 0\ncase a.mpr.refine'_2\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\nh : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b\n⊢ bd ≠ 0\n[PROOFSTEP]\nall_goals assumption\n[GOAL]\ncase a.mpr.refine'_1.ha.hb\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\nh : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b\n⊢ gcd ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase a.mpr.refine'_1.hb\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\nh : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b\n⊢ ad ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase a.mpr.refine'_2\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\nh : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b\n⊢ bd ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\n⊢ (a ≠ b) = (1 / gcd * (bd * a') ≠ 1 / gcd * (ad * b'))\n[PROOFSTEP]\nclassical rw [eq_iff_iff, not_iff_not, cancel_factors_eq ha hb had hbd hgcd]\n[GOAL]\nα : Type u_1\ninst✝ : Field α\na b ad bd a' b' gcd : α\nha : ad * a = a'\nhb : bd * b = b'\nhad : ad ≠ 0\nhbd : bd ≠ 0\nhgcd : gcd ≠ 0\n⊢ (a ≠ b) = (1 / gcd * (bd * a') ≠ 1 / gcd * (ad * b'))\n[PROOFSTEP]\nrw [eq_iff_iff, not_iff_not, cancel_factors_eq ha hb had hbd hgcd]\n", "meta": {"mathlib_filename": "Mathlib.Tactic.CancelDenoms", "llama_tokens": 4813, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7956580903722561, "lm_q2_score": 0.7090191399336402, "lm_q1q2_score": 0.5641368149169795}} {"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nx✝ : Set C(α, β)\n⊢ x✝ ∈ {m | ∃ s x u x, m = CompactOpen.gen s u} ↔ x✝ ∈ image2 CompactOpen.gen {s | IsCompact s} {t | IsOpen t}\n[PROOFSTEP]\nsimp [eq_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nhs : IsCompact s\nu : Set β\nhu : IsOpen u\n⊢ CompactOpen.gen s u ∈ {m | ∃ s x u x, m = CompactOpen.gen s u}\n[PROOFSTEP]\ndsimp [mem_setOf_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nhs : IsCompact s\nu : Set β\nhu : IsOpen u\n⊢ ∃ s_1 x u_1 x, CompactOpen.gen s u = CompactOpen.gen s_1 u_1\n[PROOFSTEP]\ntauto\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ng : C(β, γ)\ns : Set α\nu : Set γ\n⊢ comp g ⁻¹' CompactOpen.gen s u = CompactOpen.gen s (↑g ⁻¹' u)\n[PROOFSTEP]\next ⟨f, _⟩\n[GOAL]\ncase h.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ng : C(β, γ)\ns : Set α\nu : Set γ\nf : α → β\ncontinuous_toFun✝ : Continuous f\n⊢ mk f ∈ comp g ⁻¹' CompactOpen.gen s u ↔ mk f ∈ CompactOpen.gen s (↑g ⁻¹' u)\n[PROOFSTEP]\nchange g ∘ f '' s ⊆ u ↔ f '' s ⊆ g ⁻¹' u\n[GOAL]\ncase h.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ng : C(β, γ)\ns : Set α\nu : Set γ\nf : α → β\ncontinuous_toFun✝ : Continuous f\n⊢ ↑g ∘ f '' s ⊆ u ↔ f '' s ⊆ ↑g ⁻¹' u\n[PROOFSTEP]\nrw [image_comp, image_subset_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ng : C(β, γ)\nm : Set C(α, γ)\nx✝ : m ∈ {m | ∃ s x u x, m = CompactOpen.gen s u}\ns : Set α\nhs : IsCompact s\nu : Set γ\nhu : IsOpen u\nhm : m = CompactOpen.gen s u\n⊢ IsOpen (comp g ⁻¹' m)\n[PROOFSTEP]\nrw [hm, preimage_gen g]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ng : C(β, γ)\nm : Set C(α, γ)\nx✝ : m ∈ {m | ∃ s x u x, m = CompactOpen.gen s u}\ns : Set α\nhs : IsCompact s\nu : Set γ\nhu : IsOpen u\nhm : m = CompactOpen.gen s u\n⊢ IsOpen (CompactOpen.gen s (↑g ⁻¹' u))\n[PROOFSTEP]\nexact ContinuousMap.isOpen_gen hs (hu.preimage g.2)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ng : C(β, γ)\nhg : Inducing ↑g\n⊢ compactOpen = TopologicalSpace.induced (comp g) compactOpen\n[PROOFSTEP]\nsimp only [compactOpen_eq, induced_generateFrom_eq, image_image2, preimage_gen, hg.setOf_isOpen, image2_image_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\ns : Set α\nx✝¹ : IsCompact s\nu : Set γ\nx✝ : IsOpen u\n⊢ (fun g => comp g f) ⁻¹' CompactOpen.gen s u = CompactOpen.gen (↑f '' s) u\n[PROOFSTEP]\next ⟨g, _⟩\n[GOAL]\ncase h.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ng✝ : C(β, γ)\nf : C(α, β)\ns : Set α\nx✝¹ : IsCompact s\nu : Set γ\nx✝ : IsOpen u\ng : β → γ\ncontinuous_toFun✝ : Continuous g\n⊢ mk g ∈ (fun g => comp g f) ⁻¹' CompactOpen.gen s u ↔ mk g ∈ CompactOpen.gen (↑f '' s) u\n[PROOFSTEP]\nchange g ∘ f '' s ⊆ u ↔ g '' (f '' s) ⊆ u\n[GOAL]\ncase h.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ng✝ : C(β, γ)\nf : C(α, β)\ns : Set α\nx✝¹ : IsCompact s\nu : Set γ\nx✝ : IsOpen u\ng : β → γ\ncontinuous_toFun✝ : Continuous g\n⊢ g ∘ ↑f '' s ⊆ u ↔ g '' (↑f '' s) ⊆ u\n[PROOFSTEP]\nrw [Set.image_comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\nm : Set C(α, γ)\nx✝ : m ∈ {m | ∃ s x u x, m = CompactOpen.gen s u}\ns : Set α\nhs : IsCompact s\nu : Set γ\nhu : IsOpen u\nhm : m = CompactOpen.gen s u\n⊢ IsOpen ((fun g => comp g f) ⁻¹' m)\n[PROOFSTEP]\nrw [hm, image_gen f hs hu]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\nm : Set C(α, γ)\nx✝ : m ∈ {m | ∃ s x u x, m = CompactOpen.gen s u}\ns : Set α\nhs : IsCompact s\nu : Set γ\nhu : IsOpen u\nhm : m = CompactOpen.gen s u\n⊢ IsOpen (CompactOpen.gen (↑f '' s) u)\n[PROOFSTEP]\nexact ContinuousMap.isOpen_gen (hs.image f.2) hu\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\ninst✝ : LocallyCompactSpace β\n⊢ ∀ (s : Set C(α, γ)), s ∈ {m | ∃ s x u x, m = CompactOpen.gen s u} → IsOpen ((fun x => comp x.snd x.fst) ⁻¹' s)\n[PROOFSTEP]\nrintro M ⟨K, hK, U, hU, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\ninst✝ : LocallyCompactSpace β\nK : Set α\nhK : IsCompact K\nU : Set γ\nhU : IsOpen U\n⊢ IsOpen ((fun x => comp x.snd x.fst) ⁻¹' CompactOpen.gen K U)\n[PROOFSTEP]\nconv =>\n congr\n rw [CompactOpen.gen, preimage_setOf_eq]\n --congr\n ext; dsimp [setOf]\n rw [image_comp, image_subset_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\ninst✝ : LocallyCompactSpace β\nK : Set α\nhK : IsCompact K\nU : Set γ\nhU : IsOpen U\n| IsOpen ((fun x => comp x.snd x.fst) ⁻¹' CompactOpen.gen K U)\n[PROOFSTEP]\n congr\n rw [CompactOpen.gen, preimage_setOf_eq]\n --congr\n ext; dsimp [setOf]\n rw [image_comp, image_subset_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\ninst✝ : LocallyCompactSpace β\nK : Set α\nhK : IsCompact K\nU : Set γ\nhU : IsOpen U\n| IsOpen ((fun x => comp x.snd x.fst) ⁻¹' CompactOpen.gen K U)\n[PROOFSTEP]\n congr\n rw [CompactOpen.gen, preimage_setOf_eq]\n --congr\n ext; dsimp [setOf]\n rw [image_comp, image_subset_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\ninst✝ : LocallyCompactSpace β\nK : Set α\nhK : IsCompact K\nU : Set γ\nhU : IsOpen U\n| IsOpen ((fun x => comp x.snd x.fst) ⁻¹' CompactOpen.gen K U)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\ninst✝ : LocallyCompactSpace β\nK : Set α\nhK : IsCompact K\nU : Set γ\nhU : IsOpen U\n| (fun x => comp x.snd x.fst) ⁻¹' CompactOpen.gen K U\n[PROOFSTEP]\nrw [CompactOpen.gen, preimage_setOf_eq]\n --congr\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\ninst✝ : LocallyCompactSpace β\nK : Set α\nhK : IsCompact K\nU : Set γ\nhU : IsOpen U\n| {a | ↑(comp a.snd a.fst) '' K ⊆ U}\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\ninst✝ : LocallyCompactSpace β\nK : Set α\nhK : IsCompact K\nU : Set γ\nhU : IsOpen U\nx✝ : C(α, β) × C(β, γ)\n| setOf (fun a => ↑(comp a.snd a.fst) '' K ⊆ U) x✝\n[PROOFSTEP]\ndsimp [setOf]\n[GOAL]\ncase a.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\ninst✝ : LocallyCompactSpace β\nK : Set α\nhK : IsCompact K\nU : Set γ\nhU : IsOpen U\nx✝ : C(α, β) × C(β, γ)\n| ↑x✝.snd ∘ ↑x✝.fst '' K ⊆ U\n[PROOFSTEP]\nrw [image_comp, image_subset_iff]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\ninst✝ : LocallyCompactSpace β\nK : Set α\nhK : IsCompact K\nU : Set γ\nhU : IsOpen U\n⊢ IsOpen fun x => ↑x.fst '' K ⊆ ↑x.snd ⁻¹' U\n[PROOFSTEP]\nrw [isOpen_iff_forall_mem_open]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\ninst✝ : LocallyCompactSpace β\nK : Set α\nhK : IsCompact K\nU : Set γ\nhU : IsOpen U\n⊢ ∀ (x : C(α, β) × C(β, γ)),\n (x ∈ fun x => ↑x.fst '' K ⊆ ↑x.snd ⁻¹' U) → ∃ t, (t ⊆ fun x => ↑x.fst '' K ⊆ ↑x.snd ⁻¹' U) ∧ IsOpen t ∧ x ∈ t\n[PROOFSTEP]\nrintro ⟨φ₀, ψ₀⟩ H\n[GOAL]\ncase intro.intro.intro.intro.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\ninst✝ : LocallyCompactSpace β\nK : Set α\nhK : IsCompact K\nU : Set γ\nhU : IsOpen U\nφ₀ : C(α, β)\nψ₀ : C(β, γ)\nH : (φ₀, ψ₀) ∈ fun x => ↑x.fst '' K ⊆ ↑x.snd ⁻¹' U\n⊢ ∃ t, (t ⊆ fun x => ↑x.fst '' K ⊆ ↑x.snd ⁻¹' U) ∧ IsOpen t ∧ (φ₀, ψ₀) ∈ t\n[PROOFSTEP]\nobtain ⟨L, hL, hKL, hLU⟩ := exists_compact_between (hK.image φ₀.2) (hU.preimage ψ₀.2) H\n[GOAL]\ncase intro.intro.intro.intro.mk.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\ninst✝ : LocallyCompactSpace β\nK : Set α\nhK : IsCompact K\nU : Set γ\nhU : IsOpen U\nφ₀ : C(α, β)\nψ₀ : C(β, γ)\nH : (φ₀, ψ₀) ∈ fun x => ↑x.fst '' K ⊆ ↑x.snd ⁻¹' U\nL : Set β\nhL : IsCompact L\nhKL : φ₀.toFun '' K ⊆ interior L\nhLU : L ⊆ ψ₀.toFun ⁻¹' U\n⊢ ∃ t, (t ⊆ fun x => ↑x.fst '' K ⊆ ↑x.snd ⁻¹' U) ∧ IsOpen t ∧ (φ₀, ψ₀) ∈ t\n[PROOFSTEP]\nuse{φ : C(α, β) | φ '' K ⊆ interior L} ×ˢ\n {ψ : C(β, γ) | ψ '' L ⊆ U}\n -- porting note: typing hint `: φ '' K ⊆ interior L` wasn't previously required\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\ninst✝ : LocallyCompactSpace β\nK : Set α\nhK : IsCompact K\nU : Set γ\nhU : IsOpen U\nφ₀ : C(α, β)\nψ₀ : C(β, γ)\nH : (φ₀, ψ₀) ∈ fun x => ↑x.fst '' K ⊆ ↑x.snd ⁻¹' U\nL : Set β\nhL : IsCompact L\nhKL : φ₀.toFun '' K ⊆ interior L\nhLU : L ⊆ ψ₀.toFun ⁻¹' U\n⊢ ({φ | ↑φ '' K ⊆ interior L} ×ˢ {ψ | ↑ψ '' L ⊆ U} ⊆ fun x => ↑x.fst '' K ⊆ ↑x.snd ⁻¹' U) ∧\n IsOpen ({φ | ↑φ '' K ⊆ interior L} ×ˢ {ψ | ↑ψ '' L ⊆ U}) ∧\n (φ₀, ψ₀) ∈ {φ | ↑φ '' K ⊆ interior L} ×ˢ {ψ | ↑ψ '' L ⊆ U}\n[PROOFSTEP]\nuse fun ⟨φ, ψ⟩ ⟨(hφ : φ '' K ⊆ interior L), hψ⟩ => subset_trans hφ (interior_subset.trans <| image_subset_iff.mp hψ)\n[GOAL]\ncase right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\ninst✝ : LocallyCompactSpace β\nK : Set α\nhK : IsCompact K\nU : Set γ\nhU : IsOpen U\nφ₀ : C(α, β)\nψ₀ : C(β, γ)\nH : (φ₀, ψ₀) ∈ fun x => ↑x.fst '' K ⊆ ↑x.snd ⁻¹' U\nL : Set β\nhL : IsCompact L\nhKL : φ₀.toFun '' K ⊆ interior L\nhLU : L ⊆ ψ₀.toFun ⁻¹' U\n⊢ IsOpen ({φ | ↑φ '' K ⊆ interior L} ×ˢ {ψ | ↑ψ '' L ⊆ U}) ∧ (φ₀, ψ₀) ∈ {φ | ↑φ '' K ⊆ interior L} ×ˢ {ψ | ↑ψ '' L ⊆ U}\n[PROOFSTEP]\nuse(ContinuousMap.isOpen_gen hK isOpen_interior).prod (ContinuousMap.isOpen_gen hL hU)\n[GOAL]\ncase right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ng : C(β, γ)\nf : C(α, β)\ninst✝ : LocallyCompactSpace β\nK : Set α\nhK : IsCompact K\nU : Set γ\nhU : IsOpen U\nφ₀ : C(α, β)\nψ₀ : C(β, γ)\nH : (φ₀, ψ₀) ∈ fun x => ↑x.fst '' K ⊆ ↑x.snd ⁻¹' U\nL : Set β\nhL : IsCompact L\nhKL : φ₀.toFun '' K ⊆ interior L\nhLU : L ⊆ ψ₀.toFun ⁻¹' U\n⊢ (φ₀, ψ₀) ∈ {φ | ↑φ '' K ⊆ interior L} ×ˢ {ψ | ↑ψ '' L ⊆ U}\n[PROOFSTEP]\nexact mem_prod.mpr ⟨hKL, image_subset_iff.mpr hLU⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : LocallyCompactSpace α\nx✝ : C(α, β) × α\nn : Set β\nf : C(α, β)\nx : α\nhn : n ∈ 𝓝 (↑(f, x).fst (f, x).snd)\nv : Set β\nvn : v ⊆ n\nvo : IsOpen v\nfxv : ↑(f, x).fst (f, x).snd ∈ v\nthis✝² : v ∈ 𝓝 (↑f x)\ns : Set α\nhs : s ∈ 𝓝 x\nsv : s ⊆ ↑f ⁻¹' v\nsc : IsCompact s\nu : Set α\nus : u ⊆ s\nuo : IsOpen u\nxu : x ∈ u\nw : Set (C(α, β) × α) := CompactOpen.gen s v ×ˢ u\nthis✝¹ : w ⊆ (fun p => ↑p.fst p.snd) ⁻¹' n\nthis✝ : IsOpen w\nthis : (f, x) ∈ w\n⊢ w ⊆ (fun p => ↑p.fst p.snd) ⁻¹' n\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : LocallyCompactSpace α\nx✝ : C(α, β) × α\nn : Set β\nf : C(α, β)\nx : α\nhn : n ∈ 𝓝 (↑(f, x).fst (f, x).snd)\nv : Set β\nvn : v ⊆ n\nvo : IsOpen v\nfxv : ↑(f, x).fst (f, x).snd ∈ v\nthis✝² : v ∈ 𝓝 (↑f x)\ns : Set α\nhs : s ∈ 𝓝 x\nsv : s ⊆ ↑f ⁻¹' v\nsc : IsCompact s\nu : Set α\nus : u ⊆ s\nuo : IsOpen u\nxu : x ∈ u\nw : Set (C(α, β) × α) := CompactOpen.gen s v ×ˢ u\nthis✝¹ : w ⊆ (fun p => ↑p.fst p.snd) ⁻¹' n\nthis✝ : IsOpen w\nthis : (f, x) ∈ w\n⊢ IsOpen w\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : LocallyCompactSpace α\nx✝ : C(α, β) × α\nn : Set β\nf : C(α, β)\nx : α\nhn : n ∈ 𝓝 (↑(f, x).fst (f, x).snd)\nv : Set β\nvn : v ⊆ n\nvo : IsOpen v\nfxv : ↑(f, x).fst (f, x).snd ∈ v\nthis✝² : v ∈ 𝓝 (↑f x)\ns : Set α\nhs : s ∈ 𝓝 x\nsv : s ⊆ ↑f ⁻¹' v\nsc : IsCompact s\nu : Set α\nus : u ⊆ s\nuo : IsOpen u\nxu : x ∈ u\nw : Set (C(α, β) × α) := CompactOpen.gen s v ×ˢ u\nthis✝¹ : w ⊆ (fun p => ↑p.fst p.snd) ⁻¹' n\nthis✝ : IsOpen w\nthis : (f, x) ∈ w\n⊢ (f, x) ∈ w\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\na : α\n⊢ Continuous fun f => ↑f a\n[PROOFSTEP]\nrefine continuous_def.2 fun U hU ↦ ?_\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\na : α\nU : Set ((fun x => β) a)\nhU : IsOpen U\n⊢ IsOpen ((fun f => ↑f a) ⁻¹' U)\n[PROOFSTEP]\nconvert ContinuousMap.isOpen_gen (isCompact_singleton (a := a)) hU using 1\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\na : α\nU : Set ((fun x => β) a)\nhU : IsOpen U\n⊢ (fun f => ↑f a) ⁻¹' U = CompactOpen.gen {a} U\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_3.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\na : α\nU : Set ((fun x => β) a)\nhU : IsOpen U\nx✝ : C(α, β)\n⊢ x✝ ∈ (fun f => ↑f a) ⁻¹' U ↔ x✝ ∈ CompactOpen.gen {a} U\n[PROOFSTEP]\nsimp [CompactOpen.gen]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\n⊢ compactOpen ≤ TopologicalSpace.induced (restrict s) compactOpen\n[PROOFSTEP]\nsimp only [induced_generateFrom_eq, ContinuousMap.compactOpen]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\n⊢ TopologicalSpace.generateFrom {m | ∃ s x u x, m = CompactOpen.gen s u} ≤\n TopologicalSpace.generateFrom (preimage (restrict s) '' {m | ∃ s_1 x u x, m = CompactOpen.gen s_1 u})\n[PROOFSTEP]\napply TopologicalSpace.generateFrom_anti\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\n⊢ preimage (restrict s) '' {m | ∃ s_1 x u x, m = CompactOpen.gen s_1 u} ⊆ {m | ∃ s x u x, m = CompactOpen.gen s u}\n[PROOFSTEP]\nrintro b ⟨a, ⟨c, hc, u, hu, rfl⟩, rfl⟩\n[GOAL]\ncase h.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nc : Set ↑s\nhc : IsCompact c\nu : Set β\nhu : IsOpen u\n⊢ restrict s ⁻¹' CompactOpen.gen c u ∈ {m | ∃ s x u x, m = CompactOpen.gen s u}\n[PROOFSTEP]\nrefine' ⟨(↑) '' c, hc.image continuous_subtype_val, u, hu, _⟩\n[GOAL]\ncase h.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nc : Set ↑s\nhc : IsCompact c\nu : Set β\nhu : IsOpen u\n⊢ restrict s ⁻¹' CompactOpen.gen c u = CompactOpen.gen (Subtype.val '' c) u\n[PROOFSTEP]\next f\n[GOAL]\ncase h.intro.intro.intro.intro.intro.intro.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nc : Set ↑s\nhc : IsCompact c\nu : Set β\nhu : IsOpen u\nf : C(α, β)\n⊢ f ∈ restrict s ⁻¹' CompactOpen.gen c u ↔ f ∈ CompactOpen.gen (Subtype.val '' c) u\n[PROOFSTEP]\nsimp only [CompactOpen.gen, mem_setOf_eq, mem_preimage, ContinuousMap.coe_restrict]\n[GOAL]\ncase h.intro.intro.intro.intro.intro.intro.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nc : Set ↑s\nhc : IsCompact c\nu : Set β\nhu : IsOpen u\nf : C(α, β)\n⊢ (fun a => (↑f ∘ Subtype.val) a) '' c ⊆ u ↔ (fun a => ↑f a) '' (Subtype.val '' c) ⊆ u\n[PROOFSTEP]\nrw [image_comp f ((↑) : s → α)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\n⊢ compactOpen = ⨅ (s : Set α) (_ : IsCompact s), TopologicalSpace.induced (restrict s) compactOpen\n[PROOFSTEP]\nrefine' le_antisymm _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\n⊢ compactOpen ≤ ⨅ (s : Set α) (_ : IsCompact s), TopologicalSpace.induced (restrict s) compactOpen\n[PROOFSTEP]\nrefine' le_iInf₂ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\n⊢ ∀ (i : Set α), IsCompact i → compactOpen ≤ TopologicalSpace.induced (restrict i) compactOpen\n[PROOFSTEP]\nexact fun s _ => compactOpen_le_induced s\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\n⊢ ⨅ (s : Set α) (_ : IsCompact s), TopologicalSpace.induced (restrict s) compactOpen ≤ compactOpen\n[PROOFSTEP]\nsimp only [← generateFrom_iUnion, induced_generateFrom_eq, ContinuousMap.compactOpen]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\n⊢ TopologicalSpace.generateFrom\n (⋃ (i : Set α) (_ : IsCompact i), preimage (restrict i) '' {m | ∃ s x u x, m = CompactOpen.gen s u}) ≤\n TopologicalSpace.generateFrom {m | ∃ s x u x, m = CompactOpen.gen s u}\n[PROOFSTEP]\napply TopologicalSpace.generateFrom_anti\n[GOAL]\ncase refine'_2.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\n⊢ {m | ∃ s x u x, m = CompactOpen.gen s u} ⊆\n ⋃ (i : Set α) (_ : IsCompact i), preimage (restrict i) '' {m | ∃ s x u x, m = CompactOpen.gen s u}\n[PROOFSTEP]\nrintro _ ⟨s, hs, u, hu, rfl⟩\n[GOAL]\ncase refine'_2.h.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nhs : IsCompact s\nu : Set β\nhu : IsOpen u\n⊢ CompactOpen.gen s u ∈\n ⋃ (i : Set α) (_ : IsCompact i), preimage (restrict i) '' {m | ∃ s x u x, m = CompactOpen.gen s u}\n[PROOFSTEP]\nrw [mem_iUnion₂]\n[GOAL]\ncase refine'_2.h.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nhs : IsCompact s\nu : Set β\nhu : IsOpen u\n⊢ ∃ i j, CompactOpen.gen s u ∈ preimage (restrict i) '' {m | ∃ s x u x, m = CompactOpen.gen s u}\n[PROOFSTEP]\nrefine' ⟨s, hs, _, ⟨univ, isCompact_iff_isCompact_univ.mp hs, u, hu, rfl⟩, _⟩\n[GOAL]\ncase refine'_2.h.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nhs : IsCompact s\nu : Set β\nhu : IsOpen u\n⊢ restrict s ⁻¹' CompactOpen.gen univ u = CompactOpen.gen s u\n[PROOFSTEP]\next f\n[GOAL]\ncase refine'_2.h.intro.intro.intro.intro.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nhs : IsCompact s\nu : Set β\nhu : IsOpen u\nf : C(α, β)\n⊢ f ∈ restrict s ⁻¹' CompactOpen.gen univ u ↔ f ∈ CompactOpen.gen s u\n[PROOFSTEP]\nsimp only [CompactOpen.gen, mem_setOf_eq, mem_preimage, ContinuousMap.coe_restrict]\n[GOAL]\ncase refine'_2.h.intro.intro.intro.intro.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nhs : IsCompact s\nu : Set β\nhu : IsOpen u\nf : C(α, β)\n⊢ (fun a => (↑f ∘ Subtype.val) a) '' univ ⊆ u ↔ (fun a => ↑f a) '' s ⊆ u\n[PROOFSTEP]\nrw [image_comp f ((↑) : s → α)]\n[GOAL]\ncase refine'_2.h.intro.intro.intro.intro.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nhs : IsCompact s\nu : Set β\nhu : IsOpen u\nf : C(α, β)\n⊢ ↑f '' (Subtype.val '' univ) ⊆ u ↔ (fun a => ↑f a) '' s ⊆ u\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\n⊢ Continuous fun F => restrict s F\n[PROOFSTEP]\nrw [continuous_iff_le_induced]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\n⊢ compactOpen ≤ TopologicalSpace.induced (fun F => restrict s F) compactOpen\n[PROOFSTEP]\nexact compactOpen_le_induced s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : C(α, β)\n⊢ 𝓝 f = ⨅ (s : Set α) (_ : IsCompact s), Filter.comap (restrict s) (𝓝 (restrict s f))\n[PROOFSTEP]\nrw [compactOpen_eq_sInf_induced]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : C(α, β)\n⊢ 𝓝 f = ⨅ (s : Set α) (_ : IsCompact s), Filter.comap (restrict s) (𝓝 (restrict s f))\n[PROOFSTEP]\nsimp [nhds_iInf, nhds_induced]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nι : Type u_4\nl : Filter ι\nF : ι → C(α, β)\nf : C(α, β)\n⊢ Filter.Tendsto F l (𝓝 f) ↔\n ∀ (s : Set α), IsCompact s → Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (restrict s f))\n[PROOFSTEP]\nrw [compactOpen_eq_sInf_induced]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nι : Type u_4\nl : Filter ι\nF : ι → C(α, β)\nf : C(α, β)\n⊢ Filter.Tendsto F l (𝓝 f) ↔\n ∀ (s : Set α), IsCompact s → Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (restrict s f))\n[PROOFSTEP]\nsimp [nhds_iInf, nhds_induced, Filter.tendsto_comap_iff, Function.comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\n⊢ (∃ f, Filter.Tendsto F l (𝓝 f)) ↔ ∀ (s : Set α), IsCompact s → ∃ f, Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 f)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\n⊢ (∃ f, Filter.Tendsto F l (𝓝 f)) → ∀ (s : Set α), IsCompact s → ∃ f, Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 f)\n[PROOFSTEP]\nrintro ⟨f, hf⟩ s _\n[GOAL]\ncase mp.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nf : C(α, β)\nhf : Filter.Tendsto F l (𝓝 f)\ns : Set α\nhs✝ : IsCompact s\n⊢ ∃ f, Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 f)\n[PROOFSTEP]\nexact ⟨f.restrict s, tendsto_compactOpen_restrict hf s⟩\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\n⊢ (∀ (s : Set α), IsCompact s → ∃ f, Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 f)) → ∃ f, Filter.Tendsto F l (𝓝 f)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nh : ∀ (s : Set α), IsCompact s → ∃ f, Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 f)\n⊢ ∃ f, Filter.Tendsto F l (𝓝 f)\n[PROOFSTEP]\nchoose f hf using h\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nf : (s : Set α) → IsCompact s → C(↑s, β)\nhf : ∀ (s : Set α) (hs : IsCompact s), Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (f s hs))\n⊢ ∃ f, Filter.Tendsto F l (𝓝 f)\n[PROOFSTEP]\nhave h :\n ∀ (s₁) (hs₁ : IsCompact s₁) (s₂) (hs₂ : IsCompact s₂) (x : α) (hxs₁ : x ∈ s₁) (hxs₂ : x ∈ s₂),\n f s₁ hs₁ ⟨x, hxs₁⟩ = f s₂ hs₂ ⟨x, hxs₂⟩ :=\n by\n rintro s₁ hs₁ s₂ hs₂ x hxs₁ hxs₂\n haveI := isCompact_iff_compactSpace.mp hs₁\n haveI := isCompact_iff_compactSpace.mp hs₂\n have h₁ := (continuous_eval_const (⟨x, hxs₁⟩ : s₁)).continuousAt.tendsto.comp (hf s₁ hs₁)\n have h₂ := (continuous_eval_const (⟨x, hxs₂⟩ : s₂)).continuousAt.tendsto.comp (hf s₂ hs₂)\n exact tendsto_nhds_unique h₁ h₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nf : (s : Set α) → IsCompact s → C(↑s, β)\nhf : ∀ (s : Set α) (hs : IsCompact s), Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (f s hs))\n⊢ ∀ (s₁ : Set α) (hs₁ : IsCompact s₁) (s₂ : Set α) (hs₂ : IsCompact s₂) (x : α) (hxs₁ : x ∈ s₁) (hxs₂ : x ∈ s₂),\n ↑(f s₁ hs₁) { val := x, property := hxs₁ } = ↑(f s₂ hs₂) { val := x, property := hxs₂ }\n[PROOFSTEP]\nrintro s₁ hs₁ s₂ hs₂ x hxs₁ hxs₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nf : (s : Set α) → IsCompact s → C(↑s, β)\nhf : ∀ (s : Set α) (hs : IsCompact s), Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (f s hs))\ns₁ : Set α\nhs₁ : IsCompact s₁\ns₂ : Set α\nhs₂ : IsCompact s₂\nx : α\nhxs₁ : x ∈ s₁\nhxs₂ : x ∈ s₂\n⊢ ↑(f s₁ hs₁) { val := x, property := hxs₁ } = ↑(f s₂ hs₂) { val := x, property := hxs₂ }\n[PROOFSTEP]\nhaveI := isCompact_iff_compactSpace.mp hs₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nf : (s : Set α) → IsCompact s → C(↑s, β)\nhf : ∀ (s : Set α) (hs : IsCompact s), Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (f s hs))\ns₁ : Set α\nhs₁ : IsCompact s₁\ns₂ : Set α\nhs₂ : IsCompact s₂\nx : α\nhxs₁ : x ∈ s₁\nhxs₂ : x ∈ s₂\nthis : CompactSpace ↑s₁\n⊢ ↑(f s₁ hs₁) { val := x, property := hxs₁ } = ↑(f s₂ hs₂) { val := x, property := hxs₂ }\n[PROOFSTEP]\nhaveI := isCompact_iff_compactSpace.mp hs₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nf : (s : Set α) → IsCompact s → C(↑s, β)\nhf : ∀ (s : Set α) (hs : IsCompact s), Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (f s hs))\ns₁ : Set α\nhs₁ : IsCompact s₁\ns₂ : Set α\nhs₂ : IsCompact s₂\nx : α\nhxs₁ : x ∈ s₁\nhxs₂ : x ∈ s₂\nthis✝ : CompactSpace ↑s₁\nthis : CompactSpace ↑s₂\n⊢ ↑(f s₁ hs₁) { val := x, property := hxs₁ } = ↑(f s₂ hs₂) { val := x, property := hxs₂ }\n[PROOFSTEP]\nhave h₁ := (continuous_eval_const (⟨x, hxs₁⟩ : s₁)).continuousAt.tendsto.comp (hf s₁ hs₁)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nf : (s : Set α) → IsCompact s → C(↑s, β)\nhf : ∀ (s : Set α) (hs : IsCompact s), Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (f s hs))\ns₁ : Set α\nhs₁ : IsCompact s₁\ns₂ : Set α\nhs₂ : IsCompact s₂\nx : α\nhxs₁ : x ∈ s₁\nhxs₂ : x ∈ s₂\nthis✝ : CompactSpace ↑s₁\nthis : CompactSpace ↑s₂\nh₁ :\n Filter.Tendsto ((fun f => ↑f { val := x, property := hxs₁ }) ∘ fun i => restrict s₁ (F i)) l\n (𝓝 (↑(f s₁ hs₁) { val := x, property := hxs₁ }))\n⊢ ↑(f s₁ hs₁) { val := x, property := hxs₁ } = ↑(f s₂ hs₂) { val := x, property := hxs₂ }\n[PROOFSTEP]\nhave h₂ := (continuous_eval_const (⟨x, hxs₂⟩ : s₂)).continuousAt.tendsto.comp (hf s₂ hs₂)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nf : (s : Set α) → IsCompact s → C(↑s, β)\nhf : ∀ (s : Set α) (hs : IsCompact s), Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (f s hs))\ns₁ : Set α\nhs₁ : IsCompact s₁\ns₂ : Set α\nhs₂ : IsCompact s₂\nx : α\nhxs₁ : x ∈ s₁\nhxs₂ : x ∈ s₂\nthis✝ : CompactSpace ↑s₁\nthis : CompactSpace ↑s₂\nh₁ :\n Filter.Tendsto ((fun f => ↑f { val := x, property := hxs₁ }) ∘ fun i => restrict s₁ (F i)) l\n (𝓝 (↑(f s₁ hs₁) { val := x, property := hxs₁ }))\nh₂ :\n Filter.Tendsto ((fun f => ↑f { val := x, property := hxs₂ }) ∘ fun i => restrict s₂ (F i)) l\n (𝓝 (↑(f s₂ hs₂) { val := x, property := hxs₂ }))\n⊢ ↑(f s₁ hs₁) { val := x, property := hxs₁ } = ↑(f s₂ hs₂) { val := x, property := hxs₂ }\n[PROOFSTEP]\nexact tendsto_nhds_unique h₁ h₂\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nf : (s : Set α) → IsCompact s → C(↑s, β)\nhf : ∀ (s : Set α) (hs : IsCompact s), Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (f s hs))\nh :\n ∀ (s₁ : Set α) (hs₁ : IsCompact s₁) (s₂ : Set α) (hs₂ : IsCompact s₂) (x : α) (hxs₁ : x ∈ s₁) (hxs₂ : x ∈ s₂),\n ↑(f s₁ hs₁) { val := x, property := hxs₁ } = ↑(f s₂ hs₂) { val := x, property := hxs₂ }\n⊢ ∃ f, Filter.Tendsto F l (𝓝 f)\n[PROOFSTEP]\nhave hs : ∀ x : α, ∃ (s : _), IsCompact s ∧ s ∈ 𝓝 x := by\n intro x\n obtain ⟨s, hs, hs'⟩ := exists_compact_mem_nhds x\n exact ⟨s, hs, hs'⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nf : (s : Set α) → IsCompact s → C(↑s, β)\nhf : ∀ (s : Set α) (hs : IsCompact s), Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (f s hs))\nh :\n ∀ (s₁ : Set α) (hs₁ : IsCompact s₁) (s₂ : Set α) (hs₂ : IsCompact s₂) (x : α) (hxs₁ : x ∈ s₁) (hxs₂ : x ∈ s₂),\n ↑(f s₁ hs₁) { val := x, property := hxs₁ } = ↑(f s₂ hs₂) { val := x, property := hxs₂ }\n⊢ ∀ (x : α), ∃ s, IsCompact s ∧ s ∈ 𝓝 x\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nf : (s : Set α) → IsCompact s → C(↑s, β)\nhf : ∀ (s : Set α) (hs : IsCompact s), Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (f s hs))\nh :\n ∀ (s₁ : Set α) (hs₁ : IsCompact s₁) (s₂ : Set α) (hs₂ : IsCompact s₂) (x : α) (hxs₁ : x ∈ s₁) (hxs₂ : x ∈ s₂),\n ↑(f s₁ hs₁) { val := x, property := hxs₁ } = ↑(f s₂ hs₂) { val := x, property := hxs₂ }\nx : α\n⊢ ∃ s, IsCompact s ∧ s ∈ 𝓝 x\n[PROOFSTEP]\nobtain ⟨s, hs, hs'⟩ := exists_compact_mem_nhds x\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nf : (s : Set α) → IsCompact s → C(↑s, β)\nhf : ∀ (s : Set α) (hs : IsCompact s), Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (f s hs))\nh :\n ∀ (s₁ : Set α) (hs₁ : IsCompact s₁) (s₂ : Set α) (hs₂ : IsCompact s₂) (x : α) (hxs₁ : x ∈ s₁) (hxs₂ : x ∈ s₂),\n ↑(f s₁ hs₁) { val := x, property := hxs₁ } = ↑(f s₂ hs₂) { val := x, property := hxs₂ }\nx : α\ns : Set α\nhs : IsCompact s\nhs' : s ∈ 𝓝 x\n⊢ ∃ s, IsCompact s ∧ s ∈ 𝓝 x\n[PROOFSTEP]\nexact ⟨s, hs, hs'⟩\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nf : (s : Set α) → IsCompact s → C(↑s, β)\nhf : ∀ (s : Set α) (hs : IsCompact s), Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (f s hs))\nh :\n ∀ (s₁ : Set α) (hs₁ : IsCompact s₁) (s₂ : Set α) (hs₂ : IsCompact s₂) (x : α) (hxs₁ : x ∈ s₁) (hxs₂ : x ∈ s₂),\n ↑(f s₁ hs₁) { val := x, property := hxs₁ } = ↑(f s₂ hs₂) { val := x, property := hxs₂ }\nhs : ∀ (x : α), ∃ s, IsCompact s ∧ s ∈ 𝓝 x\n⊢ ∃ f, Filter.Tendsto F l (𝓝 f)\n[PROOFSTEP]\nrefine ⟨liftCover' _ _ h hs, ?_⟩\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nf : (s : Set α) → IsCompact s → C(↑s, β)\nhf : ∀ (s : Set α) (hs : IsCompact s), Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (f s hs))\nh :\n ∀ (s₁ : Set α) (hs₁ : IsCompact s₁) (s₂ : Set α) (hs₂ : IsCompact s₂) (x : α) (hxs₁ : x ∈ s₁) (hxs₂ : x ∈ s₂),\n ↑(f s₁ hs₁) { val := x, property := hxs₁ } = ↑(f s₂ hs₂) { val := x, property := hxs₂ }\nhs : ∀ (x : α), ∃ s, IsCompact s ∧ s ∈ 𝓝 x\n⊢ Filter.Tendsto F l\n (𝓝\n (liftCover'\n (fun s => ∀ ⦃f : Filter α⦄ [inst : Filter.NeBot f], f ≤ Filter.principal s → ∃ a, a ∈ s ∧ ClusterPt a f)\n (fun s hs => f s hs) h hs))\n[PROOFSTEP]\nrw [tendsto_compactOpen_iff_forall]\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nf : (s : Set α) → IsCompact s → C(↑s, β)\nhf : ∀ (s : Set α) (hs : IsCompact s), Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (f s hs))\nh :\n ∀ (s₁ : Set α) (hs₁ : IsCompact s₁) (s₂ : Set α) (hs₂ : IsCompact s₂) (x : α) (hxs₁ : x ∈ s₁) (hxs₂ : x ∈ s₂),\n ↑(f s₁ hs₁) { val := x, property := hxs₁ } = ↑(f s₂ hs₂) { val := x, property := hxs₂ }\nhs : ∀ (x : α), ∃ s, IsCompact s ∧ s ∈ 𝓝 x\n⊢ ∀ (s : Set α),\n IsCompact s →\n Filter.Tendsto (fun i => restrict s (F i)) l\n (𝓝\n (restrict s\n (liftCover'\n (fun s => ∀ ⦃f : Filter α⦄ [inst : Filter.NeBot f], f ≤ Filter.principal s → ∃ a, a ∈ s ∧ ClusterPt a f)\n (fun s hs => f s hs) h hs)))\n[PROOFSTEP]\nintro s hs\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nf : (s : Set α) → IsCompact s → C(↑s, β)\nhf : ∀ (s : Set α) (hs : IsCompact s), Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (f s hs))\nh :\n ∀ (s₁ : Set α) (hs₁ : IsCompact s₁) (s₂ : Set α) (hs₂ : IsCompact s₂) (x : α) (hxs₁ : x ∈ s₁) (hxs₂ : x ∈ s₂),\n ↑(f s₁ hs₁) { val := x, property := hxs₁ } = ↑(f s₂ hs₂) { val := x, property := hxs₂ }\nhs✝ : ∀ (x : α), ∃ s, IsCompact s ∧ s ∈ 𝓝 x\ns : Set α\nhs : IsCompact s\n⊢ Filter.Tendsto (fun i => restrict s (F i)) l\n (𝓝\n (restrict s\n (liftCover'\n (fun s => ∀ ⦃f : Filter α⦄ [inst : Filter.NeBot f], f ≤ Filter.principal s → ∃ a, a ∈ s ∧ ClusterPt a f)\n (fun s hs => f s hs) h hs✝)))\n[PROOFSTEP]\nrw [liftCover_restrict']\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nf : (s : Set α) → IsCompact s → C(↑s, β)\nhf : ∀ (s : Set α) (hs : IsCompact s), Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (f s hs))\nh :\n ∀ (s₁ : Set α) (hs₁ : IsCompact s₁) (s₂ : Set α) (hs₂ : IsCompact s₂) (x : α) (hxs₁ : x ∈ s₁) (hxs₂ : x ∈ s₂),\n ↑(f s₁ hs₁) { val := x, property := hxs₁ } = ↑(f s₂ hs₂) { val := x, property := hxs₂ }\nhs✝ : ∀ (x : α), ∃ s, IsCompact s ∧ s ∈ 𝓝 x\ns : Set α\nhs : IsCompact s\n⊢ Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (f s ?m.52935))\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : LocallyCompactSpace α\ninst✝¹ : T2Space β\nι : Type u_4\nl : Filter ι\ninst✝ : Filter.NeBot l\nF : ι → C(α, β)\nf : (s : Set α) → IsCompact s → C(↑s, β)\nhf : ∀ (s : Set α) (hs : IsCompact s), Filter.Tendsto (fun i => restrict s (F i)) l (𝓝 (f s hs))\nh :\n ∀ (s₁ : Set α) (hs₁ : IsCompact s₁) (s₂ : Set α) (hs₂ : IsCompact s₂) (x : α) (hxs₁ : x ∈ s₁) (hxs₂ : x ∈ s₂),\n ↑(f s₁ hs₁) { val := x, property := hxs₁ } = ↑(f s₂ hs₂) { val := x, property := hxs₂ }\nhs✝ : ∀ (x : α), ∃ s, IsCompact s ∧ s ∈ 𝓝 x\ns : Set α\nhs : IsCompact s\n⊢ s ∈ fun s => ∀ ⦃f : Filter α⦄ [inst : Filter.NeBot f], f ≤ Filter.principal s → ∃ a, a ∈ s ∧ ClusterPt a f\n[PROOFSTEP]\nexact hf s hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ny : β\ns : Set α\n⊢ ↑(coev α β y) '' s = {y} ×ˢ s\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\n⊢ ∀ (s : Set C(α, β × α)), s ∈ {m | ∃ s x u x, m = CompactOpen.gen s u} → IsOpen (coev α β ⁻¹' s)\n[PROOFSTEP]\nrintro _ ⟨s, sc, u, uo, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nsc : IsCompact s\nu : Set (β × α)\nuo : IsOpen u\n⊢ IsOpen (coev α β ⁻¹' CompactOpen.gen s u)\n[PROOFSTEP]\nrw [isOpen_iff_forall_mem_open]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nsc : IsCompact s\nu : Set (β × α)\nuo : IsOpen u\n⊢ ∀ (x : β), x ∈ coev α β ⁻¹' CompactOpen.gen s u → ∃ t, t ⊆ coev α β ⁻¹' CompactOpen.gen s u ∧ IsOpen t ∧ x ∈ t\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nsc : IsCompact s\nu : Set (β × α)\nuo : IsOpen u\ny : β\nhy : y ∈ coev α β ⁻¹' CompactOpen.gen s u\n⊢ ∃ t, t ⊆ coev α β ⁻¹' CompactOpen.gen s u ∧ IsOpen t ∧ y ∈ t\n[PROOFSTEP]\nhave hy' : (↑(coev α β y) '' s ⊆ u) := hy\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nsc : IsCompact s\nu : Set (β × α)\nuo : IsOpen u\ny : β\nhy : y ∈ coev α β ⁻¹' CompactOpen.gen s u\nhy' : ↑(coev α β y) '' s ⊆ u\n⊢ ∃ t, t ⊆ coev α β ⁻¹' CompactOpen.gen s u ∧ IsOpen t ∧ y ∈ t\n[PROOFSTEP]\nrw [image_coev s] at hy' \n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nsc : IsCompact s\nu : Set (β × α)\nuo : IsOpen u\ny : β\nhy : y ∈ coev α β ⁻¹' CompactOpen.gen s u\nhy' : {y} ×ˢ s ⊆ u\n⊢ ∃ t, t ⊆ coev α β ⁻¹' CompactOpen.gen s u ∧ IsOpen t ∧ y ∈ t\n[PROOFSTEP]\nrcases generalized_tube_lemma isCompact_singleton sc uo hy' with ⟨v, w, vo, _, yv, sw, vwu⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nsc : IsCompact s\nu : Set (β × α)\nuo : IsOpen u\ny : β\nhy : y ∈ coev α β ⁻¹' CompactOpen.gen s u\nhy' : {y} ×ˢ s ⊆ u\nv : Set β\nw : Set α\nvo : IsOpen v\nleft✝ : IsOpen w\nyv : {y} ⊆ v\nsw : s ⊆ w\nvwu : v ×ˢ w ⊆ u\n⊢ ∃ t, t ⊆ coev α β ⁻¹' CompactOpen.gen s u ∧ IsOpen t ∧ y ∈ t\n[PROOFSTEP]\nrefine' ⟨v, _, vo, singleton_subset_iff.mp yv⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nsc : IsCompact s\nu : Set (β × α)\nuo : IsOpen u\ny : β\nhy : y ∈ coev α β ⁻¹' CompactOpen.gen s u\nhy' : {y} ×ˢ s ⊆ u\nv : Set β\nw : Set α\nvo : IsOpen v\nleft✝ : IsOpen w\nyv : {y} ⊆ v\nsw : s ⊆ w\nvwu : v ×ˢ w ⊆ u\n⊢ v ⊆ coev α β ⁻¹' CompactOpen.gen s u\n[PROOFSTEP]\nintro y' hy'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nsc : IsCompact s\nu : Set (β × α)\nuo : IsOpen u\ny : β\nhy : y ∈ coev α β ⁻¹' CompactOpen.gen s u\nhy'✝ : {y} ×ˢ s ⊆ u\nv : Set β\nw : Set α\nvo : IsOpen v\nleft✝ : IsOpen w\nyv : {y} ⊆ v\nsw : s ⊆ w\nvwu : v ×ˢ w ⊆ u\ny' : β\nhy' : y' ∈ v\n⊢ y' ∈ coev α β ⁻¹' CompactOpen.gen s u\n[PROOFSTEP]\nchange coev α β y' '' s ⊆ u\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nsc : IsCompact s\nu : Set (β × α)\nuo : IsOpen u\ny : β\nhy : y ∈ coev α β ⁻¹' CompactOpen.gen s u\nhy'✝ : {y} ×ˢ s ⊆ u\nv : Set β\nw : Set α\nvo : IsOpen v\nleft✝ : IsOpen w\nyv : {y} ⊆ v\nsw : s ⊆ w\nvwu : v ×ˢ w ⊆ u\ny' : β\nhy' : y' ∈ v\n⊢ ↑(coev α β y') '' s ⊆ u\n[PROOFSTEP]\nrw [image_coev s]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nsc : IsCompact s\nu : Set (β × α)\nuo : IsOpen u\ny : β\nhy : y ∈ coev α β ⁻¹' CompactOpen.gen s u\nhy'✝ : {y} ×ˢ s ⊆ u\nv : Set β\nw : Set α\nvo : IsOpen v\nleft✝ : IsOpen w\nyv : {y} ⊆ v\nsw : s ⊆ w\nvwu : v ×ˢ w ⊆ u\ny' : β\nhy' : y' ∈ v\n⊢ {y'} ×ˢ s ⊆ u\n[PROOFSTEP]\nexact (prod_mono (singleton_subset_iff.mpr hy') sw).trans vwu\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : C(α × β, γ)\n⊢ curry' f = comp f ∘ coev β α\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : C(α × β, γ)\nx✝ : α\na✝ : β\n⊢ ↑(curry' f x✝) a✝ = ↑((comp f ∘ coev β α) x✝) a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : LocallyCompactSpace (α × β)\n⊢ Continuous curry\n[PROOFSTEP]\napply continuous_of_continuous_uncurry\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : LocallyCompactSpace (α × β)\n⊢ Continuous (Function.uncurry fun x y => ↑(curry x) y)\n[PROOFSTEP]\napply continuous_of_continuous_uncurry\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : LocallyCompactSpace (α × β)\n⊢ Continuous (Function.uncurry fun x y => ↑(Function.uncurry (fun x y => ↑(curry x) y) x) y)\n[PROOFSTEP]\nrw [← (Homeomorph.prodAssoc _ _ _).symm.comp_continuous_iff']\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : LocallyCompactSpace (α × β)\n⊢ Continuous\n ((Function.uncurry fun x y => ↑(Function.uncurry (fun x y => ↑(curry x) y) x) y) ∘\n ↑(Homeomorph.symm (Homeomorph.prodAssoc C(α × β, γ) α β)))\n[PROOFSTEP]\nexact continuous_eval'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : LocallyCompactSpace α\ninst✝ : LocallyCompactSpace β\n⊢ Continuous uncurry\n[PROOFSTEP]\napply continuous_of_continuous_uncurry\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : LocallyCompactSpace α\ninst✝ : LocallyCompactSpace β\n⊢ Continuous (Function.uncurry fun x y => ↑(uncurry x) y)\n[PROOFSTEP]\nrw [← (Homeomorph.prodAssoc _ _ _).comp_continuous_iff']\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : LocallyCompactSpace α\ninst✝ : LocallyCompactSpace β\n⊢ Continuous ((Function.uncurry fun x y => ↑(uncurry x) y) ∘ ↑(Homeomorph.prodAssoc C(α, C(β, γ)) α β))\n[PROOFSTEP]\napply continuous_eval'.comp (continuous_eval'.prod_map continuous_id)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : LocallyCompactSpace α\ninst✝ : LocallyCompactSpace β\n⊢ Function.LeftInverse uncurry ContinuousMap.curry\n[PROOFSTEP]\nintro\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : LocallyCompactSpace α\ninst✝ : LocallyCompactSpace β\nx✝ : C(α × β, γ)\n⊢ uncurry (ContinuousMap.curry x✝) = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : LocallyCompactSpace α\ninst✝ : LocallyCompactSpace β\nx✝ : C(α × β, γ)\na✝ : α × β\n⊢ ↑(uncurry (ContinuousMap.curry x✝)) a✝ = ↑x✝ a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : LocallyCompactSpace α\ninst✝ : LocallyCompactSpace β\n⊢ Function.RightInverse uncurry ContinuousMap.curry\n[PROOFSTEP]\nintro\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : LocallyCompactSpace α\ninst✝ : LocallyCompactSpace β\nx✝ : C(α, C(β, γ))\n⊢ ContinuousMap.curry (uncurry x✝) = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : LocallyCompactSpace α\ninst✝ : LocallyCompactSpace β\nx✝ : C(α, C(β, γ))\na✝¹ : α\na✝ : β\n⊢ ↑(↑(ContinuousMap.curry (uncurry x✝)) a✝¹) a✝ = ↑(↑x✝ a✝¹) a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : Unique α\nf : C(α, β)\n⊢ const α ((fun f => ↑f default) f) = f\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : Unique α\nf : C(α, β)\na : α\n⊢ ↑(const α ((fun f => ↑f default) f)) a = ↑f a\n[PROOFSTEP]\nrw [Unique.eq_default a]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : Unique α\nf : C(α, β)\na : α\n⊢ ↑(const α ((fun f => ↑f default) f)) default = ↑f default\n[PROOFSTEP]\nrfl\n[GOAL]\nX₀ : Type u_1\nX : Type u_2\nY : Type u_3\nZ : Type u_4\ninst✝⁴ : TopologicalSpace X₀\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : LocallyCompactSpace Y\nf : X₀ → X\nhf : QuotientMap f\ng : X × Y → Z\nhg : Continuous fun p => g (f p.fst, p.snd)\n⊢ Continuous g\n[PROOFSTEP]\nlet Gf : C(X₀, C(Y, Z)) := ContinuousMap.curry ⟨_, hg⟩\n[GOAL]\nX₀ : Type u_1\nX : Type u_2\nY : Type u_3\nZ : Type u_4\ninst✝⁴ : TopologicalSpace X₀\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : LocallyCompactSpace Y\nf : X₀ → X\nhf : QuotientMap f\ng : X × Y → Z\nhg : Continuous fun p => g (f p.fst, p.snd)\nGf : C(X₀, C(Y, Z)) := curry (mk fun p => g (f p.fst, p.snd))\n⊢ Continuous g\n[PROOFSTEP]\nhave h : ∀ x : X, Continuous fun y => g (x, y) := by\n intro x\n obtain ⟨x₀, rfl⟩ := hf.surjective x\n exact (Gf x₀).continuous\n[GOAL]\nX₀ : Type u_1\nX : Type u_2\nY : Type u_3\nZ : Type u_4\ninst✝⁴ : TopologicalSpace X₀\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : LocallyCompactSpace Y\nf : X₀ → X\nhf : QuotientMap f\ng : X × Y → Z\nhg : Continuous fun p => g (f p.fst, p.snd)\nGf : C(X₀, C(Y, Z)) := curry (mk fun p => g (f p.fst, p.snd))\n⊢ ∀ (x : X), Continuous fun y => g (x, y)\n[PROOFSTEP]\nintro x\n[GOAL]\nX₀ : Type u_1\nX : Type u_2\nY : Type u_3\nZ : Type u_4\ninst✝⁴ : TopologicalSpace X₀\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : LocallyCompactSpace Y\nf : X₀ → X\nhf : QuotientMap f\ng : X × Y → Z\nhg : Continuous fun p => g (f p.fst, p.snd)\nGf : C(X₀, C(Y, Z)) := curry (mk fun p => g (f p.fst, p.snd))\nx : X\n⊢ Continuous fun y => g (x, y)\n[PROOFSTEP]\nobtain ⟨x₀, rfl⟩ := hf.surjective x\n[GOAL]\ncase intro\nX₀ : Type u_1\nX : Type u_2\nY : Type u_3\nZ : Type u_4\ninst✝⁴ : TopologicalSpace X₀\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : LocallyCompactSpace Y\nf : X₀ → X\nhf : QuotientMap f\ng : X × Y → Z\nhg : Continuous fun p => g (f p.fst, p.snd)\nGf : C(X₀, C(Y, Z)) := curry (mk fun p => g (f p.fst, p.snd))\nx₀ : X₀\n⊢ Continuous fun y => g (f x₀, y)\n[PROOFSTEP]\nexact (Gf x₀).continuous\n[GOAL]\nX₀ : Type u_1\nX : Type u_2\nY : Type u_3\nZ : Type u_4\ninst✝⁴ : TopologicalSpace X₀\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : LocallyCompactSpace Y\nf : X₀ → X\nhf : QuotientMap f\ng : X × Y → Z\nhg : Continuous fun p => g (f p.fst, p.snd)\nGf : C(X₀, C(Y, Z)) := curry (mk fun p => g (f p.fst, p.snd))\nh : ∀ (x : X), Continuous fun y => g (x, y)\n⊢ Continuous g\n[PROOFSTEP]\nlet G : X → C(Y, Z) := fun x => ⟨_, h x⟩\n[GOAL]\nX₀ : Type u_1\nX : Type u_2\nY : Type u_3\nZ : Type u_4\ninst✝⁴ : TopologicalSpace X₀\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : LocallyCompactSpace Y\nf : X₀ → X\nhf : QuotientMap f\ng : X × Y → Z\nhg : Continuous fun p => g (f p.fst, p.snd)\nGf : C(X₀, C(Y, Z)) := curry (mk fun p => g (f p.fst, p.snd))\nh : ∀ (x : X), Continuous fun y => g (x, y)\nG : X → C(Y, Z) := fun x => mk fun y => g (x, y)\n⊢ Continuous g\n[PROOFSTEP]\nhave : Continuous G := by\n rw [hf.continuous_iff]\n exact Gf.continuous\n[GOAL]\nX₀ : Type u_1\nX : Type u_2\nY : Type u_3\nZ : Type u_4\ninst✝⁴ : TopologicalSpace X₀\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : LocallyCompactSpace Y\nf : X₀ → X\nhf : QuotientMap f\ng : X × Y → Z\nhg : Continuous fun p => g (f p.fst, p.snd)\nGf : C(X₀, C(Y, Z)) := curry (mk fun p => g (f p.fst, p.snd))\nh : ∀ (x : X), Continuous fun y => g (x, y)\nG : X → C(Y, Z) := fun x => mk fun y => g (x, y)\n⊢ Continuous G\n[PROOFSTEP]\nrw [hf.continuous_iff]\n[GOAL]\nX₀ : Type u_1\nX : Type u_2\nY : Type u_3\nZ : Type u_4\ninst✝⁴ : TopologicalSpace X₀\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : LocallyCompactSpace Y\nf : X₀ → X\nhf : QuotientMap f\ng : X × Y → Z\nhg : Continuous fun p => g (f p.fst, p.snd)\nGf : C(X₀, C(Y, Z)) := curry (mk fun p => g (f p.fst, p.snd))\nh : ∀ (x : X), Continuous fun y => g (x, y)\nG : X → C(Y, Z) := fun x => mk fun y => g (x, y)\n⊢ Continuous (G ∘ f)\n[PROOFSTEP]\nexact Gf.continuous\n[GOAL]\nX₀ : Type u_1\nX : Type u_2\nY : Type u_3\nZ : Type u_4\ninst✝⁴ : TopologicalSpace X₀\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : LocallyCompactSpace Y\nf : X₀ → X\nhf : QuotientMap f\ng : X × Y → Z\nhg : Continuous fun p => g (f p.fst, p.snd)\nGf : C(X₀, C(Y, Z)) := curry (mk fun p => g (f p.fst, p.snd))\nh : ∀ (x : X), Continuous fun y => g (x, y)\nG : X → C(Y, Z) := fun x => mk fun y => g (x, y)\nthis : Continuous G\n⊢ Continuous g\n[PROOFSTEP]\nexact ContinuousMap.continuous_uncurry_of_continuous ⟨G, this⟩\n[GOAL]\nX₀ : Type u_1\nX : Type u_2\nY : Type u_3\nZ : Type u_4\ninst✝⁴ : TopologicalSpace X₀\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : LocallyCompactSpace Y\nf : X₀ → X\nhf : QuotientMap f\ng : Y × X → Z\nhg : Continuous fun p => g (p.fst, f p.snd)\n⊢ Continuous g\n[PROOFSTEP]\nhave : Continuous fun p : X₀ × Y => g ((Prod.swap p).1, f (Prod.swap p).2) := hg.comp continuous_swap\n[GOAL]\nX₀ : Type u_1\nX : Type u_2\nY : Type u_3\nZ : Type u_4\ninst✝⁴ : TopologicalSpace X₀\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : LocallyCompactSpace Y\nf : X₀ → X\nhf : QuotientMap f\ng : Y × X → Z\nhg : Continuous fun p => g (p.fst, f p.snd)\nthis : Continuous fun p => g ((Prod.swap p).fst, f (Prod.swap p).snd)\n⊢ Continuous g\n[PROOFSTEP]\nhave : Continuous fun p : X₀ × Y => (g ∘ Prod.swap) (f p.1, p.2) := this\n[GOAL]\nX₀ : Type u_1\nX : Type u_2\nY : Type u_3\nZ : Type u_4\ninst✝⁴ : TopologicalSpace X₀\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : LocallyCompactSpace Y\nf : X₀ → X\nhf : QuotientMap f\ng : Y × X → Z\nhg : Continuous fun p => g (p.fst, f p.snd)\nthis✝ : Continuous fun p => g ((Prod.swap p).fst, f (Prod.swap p).snd)\nthis : Continuous fun p => (g ∘ Prod.swap) (f p.fst, p.snd)\n⊢ Continuous g\n[PROOFSTEP]\nexact (hf.continuous_lift_prod_left this).comp continuous_swap\n", "meta": {"mathlib_filename": "Mathlib.Topology.CompactOpen", "llama_tokens": 27184, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8519527982093666, "lm_q2_score": 0.6619228691808012, "lm_q1q2_score": 0.5639270405973561}} {"text": "[GOAL]\nA : Type v\ninst✝ : Ring A\nx✝² x✝¹ x✝ : A\n⊢ ⁅x✝² + x✝¹, x✝⁆ = ⁅x✝², x✝⁆ + ⁅x✝¹, x✝⁆\n[PROOFSTEP]\nsimp only [Ring.lie_def, right_distrib, left_distrib]\n[GOAL]\nA : Type v\ninst✝ : Ring A\nx✝² x✝¹ x✝ : A\n⊢ x✝² * x✝ + x✝¹ * x✝ - (x✝ * x✝² + x✝ * x✝¹) = x✝² * x✝ - x✝ * x✝² + (x✝¹ * x✝ - x✝ * x✝¹)\n[PROOFSTEP]\nabel\n[GOAL]\nA : Type v\ninst✝ : Ring A\nx✝² x✝¹ x✝ : A\n⊢ x✝² * x✝ + x✝¹ * x✝ - (x✝ * x✝² + x✝ * x✝¹) = x✝² * x✝ - x✝ * x✝² + (x✝¹ * x✝ - x✝ * x✝¹)\n[PROOFSTEP]\nabel\n[GOAL]\nA : Type v\ninst✝ : Ring A\nx✝² x✝¹ x✝ : A\n⊢ ⁅x✝², x✝¹ + x✝⁆ = ⁅x✝², x✝¹⁆ + ⁅x✝², x✝⁆\n[PROOFSTEP]\nsimp only [Ring.lie_def, right_distrib, left_distrib]\n[GOAL]\nA : Type v\ninst✝ : Ring A\nx✝² x✝¹ x✝ : A\n⊢ x✝² * x✝¹ + x✝² * x✝ - (x✝¹ * x✝² + x✝ * x✝²) = x✝² * x✝¹ - x✝¹ * x✝² + (x✝² * x✝ - x✝ * x✝²)\n[PROOFSTEP]\nabel\n[GOAL]\nA : Type v\ninst✝ : Ring A\nx✝² x✝¹ x✝ : A\n⊢ x✝² * x✝¹ + x✝² * x✝ - (x✝¹ * x✝² + x✝ * x✝²) = x✝² * x✝¹ - x✝¹ * x✝² + (x✝² * x✝ - x✝ * x✝²)\n[PROOFSTEP]\nabel\n[GOAL]\nA : Type v\ninst✝ : Ring A\n⊢ ∀ (x : A), ⁅x, x⁆ = 0\n[PROOFSTEP]\nsimp only [Ring.lie_def, forall_const, sub_self]\n[GOAL]\nA : Type v\ninst✝ : Ring A\nx✝² x✝¹ x✝ : A\n⊢ ⁅x✝², ⁅x✝¹, x✝⁆⁆ = ⁅⁅x✝², x✝¹⁆, x✝⁆ + ⁅x✝¹, ⁅x✝², x✝⁆⁆\n[PROOFSTEP]\nsimp only [Ring.lie_def, mul_sub_left_distrib, mul_sub_right_distrib, mul_assoc]\n[GOAL]\nA : Type v\ninst✝ : Ring A\nx✝² x✝¹ x✝ : A\n⊢ x✝² * (x✝¹ * x✝) - x✝² * (x✝ * x✝¹) - (x✝¹ * (x✝ * x✝²) - x✝ * (x✝¹ * x✝²)) =\n x✝² * (x✝¹ * x✝) - x✝¹ * (x✝² * x✝) - (x✝ * (x✝² * x✝¹) - x✝ * (x✝¹ * x✝²)) +\n (x✝¹ * (x✝² * x✝) - x✝¹ * (x✝ * x✝²) - (x✝² * (x✝ * x✝¹) - x✝ * (x✝² * x✝¹)))\n[PROOFSTEP]\nabel\n[GOAL]\nA : Type v\ninst✝ : Ring A\nx✝² x✝¹ x✝ : A\n⊢ x✝² * (x✝¹ * x✝) - x✝² * (x✝ * x✝¹) - (x✝¹ * (x✝ * x✝²) - x✝ * (x✝¹ * x✝²)) =\n x✝² * (x✝¹ * x✝) - x✝¹ * (x✝² * x✝) - (x✝ * (x✝² * x✝¹) - x✝ * (x✝¹ * x✝²)) +\n (x✝¹ * (x✝² * x✝) - x✝¹ * (x✝ * x✝²) - (x✝² * (x✝ * x✝¹) - x✝ * (x✝² * x✝¹)))\n[PROOFSTEP]\nabel\n[GOAL]\nA : Type v\ninst✝² : Ring A\nM : Type w\ninst✝¹ : AddCommGroup M\ninst✝ : Module A M\n⊢ ∀ (x y : A) (m : M), ⁅x, ⁅y, m⁆⁆ = ⁅⁅x, y⁆, m⁆ + ⁅y, ⁅x, m⁆⁆\n[PROOFSTEP]\nsimp [LieRing.of_associative_ring_bracket, sub_smul, mul_smul, sub_add_cancel]\n[GOAL]\nA : Type v\ninst✝² : Ring A\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : Algebra R A\nt : R\nx y : A\n⊢ ⁅x, t • y⁆ = t • ⁅x, y⁆\n[PROOFSTEP]\nrw [LieRing.of_associative_ring_bracket, LieRing.of_associative_ring_bracket, Algebra.mul_smul_comm,\n Algebra.smul_mul_assoc, smul_sub]\n[GOAL]\nA : Type v\ninst✝⁶ : Ring A\nR : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : Algebra R A\nB : Type w\nC : Type w₁\ninst✝³ : Ring B\ninst✝² : Ring C\ninst✝¹ : Algebra R B\ninst✝ : Algebra R C\nf : A →ₐ[R] B\ng : B →ₐ[R] C\nsrc✝ : A →ₗ[R] B := toLinearMap f\nx✝¹ x✝ : A\n⊢ AddHom.toFun\n { toAddHom := src✝.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : A),\n AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n ⁅x✝¹, x✝⁆ =\n ⁅AddHom.toFun\n { toAddHom := src✝.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : A),\n AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n x✝¹,\n AddHom.toFun\n { toAddHom := src✝.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R) (x : A),\n AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n x✝⁆\n[PROOFSTEP]\nsimp [LieRing.of_associative_ring_bracket]\n[GOAL]\nA : Type v\ninst✝⁶ : Ring A\nR : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : Algebra R A\nB : Type w\nC : Type w₁\ninst✝³ : Ring B\ninst✝² : Ring C\ninst✝¹ : Algebra R B\ninst✝ : Algebra R C\nf✝ : A →ₐ[R] B\ng✝ : B →ₐ[R] C\nf g : A →ₐ[R] B\nh : toLieHom f = toLieHom g\n⊢ f = g\n[PROOFSTEP]\next a\n[GOAL]\ncase H\nA : Type v\ninst✝⁶ : Ring A\nR : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : Algebra R A\nB : Type w\nC : Type w₁\ninst✝³ : Ring B\ninst✝² : Ring C\ninst✝¹ : Algebra R B\ninst✝ : Algebra R C\nf✝ : A →ₐ[R] B\ng✝ : B →ₐ[R] C\nf g : A →ₐ[R] B\nh : toLieHom f = toLieHom g\na : A\n⊢ ↑f a = ↑g a\n[PROOFSTEP]\nexact LieHom.congr_fun h a\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx y : L\n⊢ (fun x =>\n { toAddHom := { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n { toAddHom := { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n { toAddHom := { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n y\n[PROOFSTEP]\next m\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx y : L\nm : M\n⊢ ↑((fun x =>\n { toAddHom := { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y))\n m =\n ↑((fun x =>\n { toAddHom := { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n { toAddHom := { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n y)\n m\n[PROOFSTEP]\napply add_lie\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nt : R\nx : L\n⊢ AddHom.toFun\n {\n toFun := fun x =>\n { toAddHom := { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n y) }\n (t • x) =\n ↑(RingHom.id R) t •\n AddHom.toFun\n {\n toFun := fun x =>\n { toAddHom := { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n y) }\n x\n[PROOFSTEP]\next m\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nt : R\nx : L\nm : M\n⊢ ↑(AddHom.toFun\n {\n toFun := fun x =>\n { toAddHom := { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n y) }\n (t • x))\n m =\n ↑(↑(RingHom.id R) t •\n AddHom.toFun\n {\n toFun := fun x =>\n { toAddHom := { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n y) }\n x)\n m\n[PROOFSTEP]\napply smul_lie\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx y : L\n⊢ AddHom.toFun\n {\n toAddHom :=\n {\n toFun := fun x =>\n { toAddHom := { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n y) },\n map_smul' :=\n (_ :\n ∀ (t : R) (x : L),\n AddHom.toFun\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, 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 => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n y) }\n x) }.toAddHom\n ⁅x, y⁆ =\n ⁅AddHom.toFun\n {\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n y) },\n map_smul' :=\n (_ :\n ∀ (t : R) (x : L),\n AddHom.toFun\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, 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 => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n y) }\n x) }.toAddHom\n x,\n AddHom.toFun\n {\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n y) },\n map_smul' :=\n (_ :\n ∀ (t : R) (x : L),\n AddHom.toFun\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, 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 => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n y) }\n x) }.toAddHom\n y⁆\n[PROOFSTEP]\next m\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx y : L\nm : M\n⊢ ↑(AddHom.toFun\n {\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n y) },\n map_smul' :=\n (_ :\n ∀ (t : R) (x : L),\n AddHom.toFun\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, 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 => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n y) }\n x) }.toAddHom\n ⁅x, y⁆)\n m =\n ↑⁅AddHom.toFun\n {\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n y) },\n map_smul' :=\n (_ :\n ∀ (t : R) (x : L),\n AddHom.toFun\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, 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 => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n y) }\n x) }.toAddHom\n x,\n AddHom.toFun\n {\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆, map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n y) },\n map_smul' :=\n (_ :\n ∀ (t : R) (x : L),\n AddHom.toFun\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, 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 => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) },\n map_add' :=\n (_ :\n ∀ (x y : L),\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n (x + y) =\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n x +\n (fun x =>\n {\n toAddHom :=\n { toFun := fun m => ⁅x, m⁆,\n map_add' := (_ : ∀ (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆) },\n map_smul' := (_ : ∀ (t : R) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆) })\n y) }\n x) }.toAddHom\n y⁆\n m\n[PROOFSTEP]\napply lie_lie\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\n⊢ toEndomorphism R (Module.End R M) M = LieHom.id\n[PROOFSTEP]\next g m\n[GOAL]\ncase h.h\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\ng : Module.End R M\nm : M\n⊢ ↑(↑(toEndomorphism R (Module.End R M) M) g) m = ↑(↑LieHom.id g) m\n[PROOFSTEP]\nsimp [lie_eq_smul]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN : LieSubmodule R L M\nx : L\n⊢ Submodule.map (↑(toEndomorphism R L M) x) ↑N ≤ ↑N\n[PROOFSTEP]\nrintro n ⟨m, hm, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN : LieSubmodule R L M\nx : L\nm : M\nhm : m ∈ ↑↑N\n⊢ ↑(↑(toEndomorphism R L M) x) m ∈ ↑N\n[PROOFSTEP]\nexact N.lie_mem hm\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN : LieSubmodule R L M\nx : L\nm : M\nhm : m ∈ ↑N\n⊢ ↑(LinearMap.comp (↑(toEndomorphism R L M) x) (Submodule.subtype ↑N)) { val := m, property := hm } ∈ ↑N\n[PROOFSTEP]\nsimpa using N.lie_mem hm\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN : LieSubmodule R L M\nx : L\nh :\n optParam\n (∀ (m : M) (hm : m ∈ ↑N),\n ↑(LinearMap.comp (↑(toEndomorphism R L M) x) (Submodule.subtype ↑N)) { val := m, property := hm } ∈ ↑N)\n (_ :\n ∀ (m : M) (hm : m ∈ ↑N),\n ↑(LinearMap.comp (↑(toEndomorphism R L M) x) (Submodule.subtype ↑N)) { val := m, property := hm } ∈ ↑N)\n⊢ LinearMap.restrict (↑(toEndomorphism R L M) x) h = ↑(toEndomorphism R L { x // x ∈ ↑N }) x\n[PROOFSTEP]\next\n[GOAL]\ncase h.a\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN : LieSubmodule R L M\nx : L\nh :\n optParam\n (∀ (m : M) (hm : m ∈ ↑N),\n ↑(LinearMap.comp (↑(toEndomorphism R L M) x) (Submodule.subtype ↑N)) { val := m, property := hm } ∈ ↑N)\n (_ :\n ∀ (m : M) (hm : m ∈ ↑N),\n ↑(LinearMap.comp (↑(toEndomorphism R L M) x) (Submodule.subtype ↑N)) { val := m, property := hm } ∈ ↑N)\nx✝ : { x // x ∈ ↑N }\n⊢ ↑(↑(LinearMap.restrict (↑(toEndomorphism R L M) x) h) x✝) = ↑(↑(↑(toEndomorphism R L { x // x ∈ ↑N }) x) x✝)\n[PROOFSTEP]\nsimp [LinearMap.restrict_apply]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\nA : Type v\ninst✝¹ : Ring A\ninst✝ : Algebra R A\n⊢ ↑(ad R A) = LinearMap.mulLeft R - LinearMap.mulRight R\n[PROOFSTEP]\next a b\n[GOAL]\ncase h.h\nR : Type u\nL : Type v\nM : Type w\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\nA : Type v\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na b : A\n⊢ ↑(↑(ad R A) a) b = ↑((LinearMap.mulLeft R - LinearMap.mulRight R) a) b\n[PROOFSTEP]\nsimp [LieRing.of_associative_ring_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nK : LieSubalgebra R L\nx : { x // x ∈ K }\n⊢ LinearMap.comp (↑(ad R L) ↑x) ↑(incl K) = LinearMap.comp (↑(incl K)) (↑(ad R { x // x ∈ K }) x)\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nK : LieSubalgebra R L\nx y : { x // x ∈ K }\n⊢ ↑(LinearMap.comp (↑(ad R L) ↑x) ↑(incl K)) y = ↑(LinearMap.comp (↑(incl K)) (↑(ad R { x // x ∈ K }) x)) y\n[PROOFSTEP]\nsimp only [ad_apply, LieHom.coe_toLinearMap, LieSubalgebra.coe_incl, LinearMap.coe_comp, LieSubalgebra.coe_bracket,\n Function.comp_apply]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nA : Type v\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nA' : Subalgebra R A\nsrc✝ : (fun x => Submodule R A) A' := ↑Subalgebra.toSubmodule A'\nx y : A\nhx :\n x ∈\n { toAddSubmonoid := src✝.toAddSubmonoid,\n smul_mem' :=\n (_ :\n ∀ (c : R) {x : A}, 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 : A}, 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 : A}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n[PROOFSTEP]\nchange ⁅x, y⁆ ∈ A'\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nA : Type v\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nA' : Subalgebra R A\nsrc✝ : (fun x => Submodule R A) A' := ↑Subalgebra.toSubmodule A'\nx y : A\nhx :\n x ∈\n { toAddSubmonoid := src✝.toAddSubmonoid,\n smul_mem' :=\n (_ :\n ∀ (c : R) {x : A}, 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 : A}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n⊢ ⁅x, y⁆ ∈ A'\n[PROOFSTEP]\nchange x ∈ A' at hx \n[GOAL]\nR : Type u\ninst✝² : CommRing R\nA : Type v\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nA' : Subalgebra R A\nsrc✝ : (fun x => Submodule R A) A' := ↑Subalgebra.toSubmodule A'\nx y : A\nhy :\n y ∈\n { toAddSubmonoid := src✝.toAddSubmonoid,\n smul_mem' :=\n (_ :\n ∀ (c : R) {x : A}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\nhx : x ∈ A'\n⊢ ⁅x, y⁆ ∈ A'\n[PROOFSTEP]\nchange y ∈ A' at hy \n[GOAL]\nR : Type u\ninst✝² : CommRing R\nA : Type v\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nA' : Subalgebra R A\nsrc✝ : (fun x => Submodule R A) A' := ↑Subalgebra.toSubmodule A'\nx y : A\nhx : x ∈ A'\nhy : y ∈ A'\n⊢ ⁅x, y⁆ ∈ A'\n[PROOFSTEP]\nrw [LieRing.of_associative_ring_bracket]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nA : Type v\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nA' : Subalgebra R A\nsrc✝ : (fun x => Submodule R A) A' := ↑Subalgebra.toSubmodule A'\nx y : A\nhx : x ∈ A'\nhy : y ∈ A'\n⊢ x * y - y * x ∈ A'\n[PROOFSTEP]\nhave hxy := A'.mul_mem hx hy\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nA : Type v\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nA' : Subalgebra R A\nsrc✝ : (fun x => Submodule R A) A' := ↑Subalgebra.toSubmodule A'\nx y : A\nhx : x ∈ A'\nhy : y ∈ A'\nhxy : x * y ∈ A'\n⊢ x * y - y * x ∈ A'\n[PROOFSTEP]\nhave hyx := A'.mul_mem hy hx\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nA : Type v\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nA' : Subalgebra R A\nsrc✝ : (fun x => Submodule R A) A' := ↑Subalgebra.toSubmodule A'\nx y : A\nhx : x ∈ A'\nhy : y ∈ A'\nhxy : x * y ∈ A'\nhyx : y * x ∈ A'\n⊢ x * y - y * x ∈ A'\n[PROOFSTEP]\nexact Submodule.sub_mem (Subalgebra.toSubmodule A') hxy hyx\n[GOAL]\nR : Type u\nM₁ : Type v\nM₂ : Type w\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommGroup M₂\ninst✝ : Module R M₂\ne : M₁ ≃ₗ[R] M₂\nsrc✝ : Module.End R M₁ ≃ₗ[R] Module.End R M₂ := conj e\nf g : Module.End R M₁\n⊢ ↑(conj e) ⁅f, g⁆ = ⁅↑(conj e) f, ↑(conj e) g⁆\n[PROOFSTEP]\nsimp only [LieRing.of_associative_ring_bracket, LinearMap.mul_eq_comp, e.conj_comp, LinearEquiv.map_sub]\n[GOAL]\nR : Type u\nA₁ : Type v\nA₂ : Type w\ninst✝⁴ : CommRing R\ninst✝³ : Ring A₁\ninst✝² : Ring A₂\ninst✝¹ : Algebra R A₁\ninst✝ : Algebra R A₂\ne : A₁ ≃ₐ[R] A₂\nsrc✝ : A₁ ≃ₗ[R] A₂ := toLinearEquiv e\nx y : A₁\n⊢ AddHom.toFun\n {\n toAddHom :=\n { toFun := e.toFun,\n map_add' :=\n (_ :\n ∀ (x y : A₁),\n AddHom.toFun src✝.toAddHom (x + y) = AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : A₁),\n AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n ⁅x, y⁆ =\n ⁅AddHom.toFun\n {\n toAddHom :=\n { toFun := e.toFun,\n map_add' :=\n (_ :\n ∀ (x y : A₁),\n AddHom.toFun src✝.toAddHom (x + y) =\n AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : A₁),\n AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n x,\n AddHom.toFun\n {\n toAddHom :=\n { toFun := e.toFun,\n map_add' :=\n (_ :\n ∀ (x y : A₁),\n AddHom.toFun src✝.toAddHom (x + y) =\n AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : A₁),\n AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n y⁆\n[PROOFSTEP]\nhave : e.toEquiv.toFun = e := rfl\n[GOAL]\nR : Type u\nA₁ : Type v\nA₂ : Type w\ninst✝⁴ : CommRing R\ninst✝³ : Ring A₁\ninst✝² : Ring A₂\ninst✝¹ : Algebra R A₁\ninst✝ : Algebra R A₂\ne : A₁ ≃ₐ[R] A₂\nsrc✝ : A₁ ≃ₗ[R] A₂ := toLinearEquiv e\nx y : A₁\nthis : e.toFun = ↑e\n⊢ AddHom.toFun\n {\n toAddHom :=\n { toFun := e.toFun,\n map_add' :=\n (_ :\n ∀ (x y : A₁),\n AddHom.toFun src✝.toAddHom (x + y) = AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : A₁),\n AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n ⁅x, y⁆ =\n ⁅AddHom.toFun\n {\n toAddHom :=\n { toFun := e.toFun,\n map_add' :=\n (_ :\n ∀ (x y : A₁),\n AddHom.toFun src✝.toAddHom (x + y) =\n AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : A₁),\n AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n x,\n AddHom.toFun\n {\n toAddHom :=\n { toFun := e.toFun,\n map_add' :=\n (_ :\n ∀ (x y : A₁),\n AddHom.toFun src✝.toAddHom (x + y) =\n AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : A₁),\n AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n y⁆\n[PROOFSTEP]\nsimp_rw [LieRing.of_associative_ring_bracket, this, map_sub, map_mul]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Lie.OfAssociative", "llama_tokens": 24312, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.865224072151174, "lm_q2_score": 0.6513548511303336, "lm_q1q2_score": 0.563567896710409}} {"text": "[GOAL]\n⊢ {x | Liouville x} = ⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b}\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nx : ℝ\n⊢ x ∈ {x | Liouville x} ↔ x ∈ ⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b}\n[PROOFSTEP]\nsimp only [mem_iInter, mem_iUnion, Liouville, mem_setOf_eq, exists_prop, mem_diff, mem_singleton_iff, mem_ball,\n Real.dist_eq, and_comm]\n[GOAL]\n⊢ IsGδ {x | Liouville x}\n[PROOFSTEP]\nrw [setOf_liouville_eq_iInter_iUnion]\n[GOAL]\n⊢ IsGδ (⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b})\n[PROOFSTEP]\nrefine isGδ_iInter fun n => IsOpen.isGδ ?_\n[GOAL]\nn : ℕ\n⊢ IsOpen (⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b})\n[PROOFSTEP]\nrefine isOpen_iUnion fun a => isOpen_iUnion fun b => isOpen_iUnion fun _hb => ?_\n[GOAL]\nn : ℕ\na b : ℤ\n_hb : 1 < b\n⊢ IsOpen (ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b})\n[PROOFSTEP]\nexact isOpen_ball.inter isClosed_singleton.isOpen_compl\n[GOAL]\n⊢ {x | Liouville x} = {x | Irrational x} ∩ ⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n)\n[PROOFSTEP]\nrefine Subset.antisymm ?_ ?_\n[GOAL]\ncase refine_1\n⊢ {x | Liouville x} ⊆ {x | Irrational x} ∩ ⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n)\n[PROOFSTEP]\nrefine subset_inter (fun x hx => hx.irrational) ?_\n[GOAL]\ncase refine_1\n⊢ {x | Liouville x} ⊆ ⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n)\n[PROOFSTEP]\nrw [setOf_liouville_eq_iInter_iUnion]\n[GOAL]\ncase refine_1\n⊢ ⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b} ⊆\n ⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n)\n[PROOFSTEP]\nexact iInter_mono fun n => iUnion₂_mono fun a b => iUnion_mono fun _hb => diff_subset _ _\n[GOAL]\ncase refine_2\n⊢ {x | Irrational x} ∩ ⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) ⊆ {x | Liouville x}\n[PROOFSTEP]\nsimp only [inter_iInter, inter_iUnion, setOf_liouville_eq_iInter_iUnion]\n[GOAL]\ncase refine_2\n⊢ ⋂ (i : ℕ), ⋃ (i_1 : ℤ) (i_2 : ℤ) (_ : 1 < i_2), {x | Irrational x} ∩ ball (↑i_1 / ↑i_2) (1 / ↑i_2 ^ i) ⊆\n ⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b}\n[PROOFSTEP]\nrefine iInter_mono fun n => iUnion₂_mono fun a b => iUnion_mono fun hb => ?_\n[GOAL]\ncase refine_2\nn : ℕ\na b : ℤ\nhb : 1 < b\n⊢ {x | Irrational x} ∩ ball (↑a / ↑b) (1 / ↑b ^ n) ⊆ ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b}\n[PROOFSTEP]\nrw [inter_comm]\n[GOAL]\ncase refine_2\nn : ℕ\na b : ℤ\nhb : 1 < b\n⊢ ball (↑a / ↑b) (1 / ↑b ^ n) ∩ {x | Irrational x} ⊆ ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b}\n[PROOFSTEP]\nexact diff_subset_diff Subset.rfl (singleton_subset_iff.2 ⟨a / b, by norm_cast⟩)\n[GOAL]\nn : ℕ\na b : ℤ\nhb : 1 < b\n⊢ ↑(↑a / ↑b) = ↑a / ↑b\n[PROOFSTEP]\nnorm_cast\n[GOAL]\n⊢ ∀ᶠ (x : ℝ) in residual ℝ, Liouville x\n[PROOFSTEP]\nrw [Filter.Eventually, setOf_liouville_eq_irrational_inter_iInter_iUnion]\n[GOAL]\n⊢ {x | Irrational x} ∩ ⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) ∈ residual ℝ\n[PROOFSTEP]\nrefine eventually_residual_irrational.and ?_\n[GOAL]\n⊢ ∀ᶠ (x : ℝ) in residual ℝ, x ∈ ⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n)\n[PROOFSTEP]\nrefine eventually_residual.2 ⟨_, ?_, Rat.denseEmbedding_coe_real.dense.mono ?_, Subset.rfl⟩\n[GOAL]\ncase refine_1\n⊢ IsGδ (⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n))\n[PROOFSTEP]\nexact\n isGδ_iInter fun n => IsOpen.isGδ <| isOpen_iUnion fun a => isOpen_iUnion fun b => isOpen_iUnion fun _hb => isOpen_ball\n[GOAL]\ncase refine_2\n⊢ range Rat.cast ⊆ ⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n)\n[PROOFSTEP]\nrintro _ ⟨r, rfl⟩\n[GOAL]\ncase refine_2.intro\nr : ℚ\n⊢ ↑r ∈ ⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n)\n[PROOFSTEP]\nsimp only [mem_iInter, mem_iUnion]\n[GOAL]\ncase refine_2.intro\nr : ℚ\n⊢ ∀ (i : ℕ), ∃ i_1 i_2 i_3, ↑r ∈ ball (↑i_1 / ↑i_2) (1 / ↑i_2 ^ i)\n[PROOFSTEP]\nrefine fun n => ⟨r.num * 2, r.den * 2, ?_, ?_⟩\n[GOAL]\ncase refine_2.intro.refine_1\nr : ℚ\nn : ℕ\n⊢ 1 < ↑r.den * 2\n[PROOFSTEP]\nhave := Int.ofNat_le.2 r.pos\n[GOAL]\ncase refine_2.intro.refine_1\nr : ℚ\nn : ℕ\nthis : ↑(Nat.succ 0) ≤ ↑r.den\n⊢ 1 < ↑r.den * 2\n[PROOFSTEP]\nrw [Int.ofNat_one] at this \n[GOAL]\ncase refine_2.intro.refine_1\nr : ℚ\nn : ℕ\nthis : 1 ≤ ↑r.den\n⊢ 1 < ↑r.den * 2\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase refine_2.intro.refine_2\nr : ℚ\nn : ℕ\n⊢ ↑r ∈ ball (↑(r.num * 2) / ↑(↑r.den * 2)) (1 / ↑(↑r.den * 2) ^ n)\n[PROOFSTEP]\nconvert @mem_ball_self ℝ _ (r : ℝ) _ _\n[GOAL]\ncase h.e'_5.h.e'_3\nr : ℚ\nn : ℕ\n⊢ ↑(r.num * 2) / ↑(↑r.den * 2) = ↑r\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_5.h.e'_3\nr : ℚ\nn : ℕ\n⊢ ↑r.num * 2 / (↑r.den * 2) = ↑r\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h.e'_5.h.e'_3\nr : ℚ\nn : ℕ\n⊢ Rat.divInt (r.num * 2) ↑(r.den * 2) = r\n[PROOFSTEP]\nsimp [Rat.divInt_mul_right (two_ne_zero), Rat.mkRat_self]\n[GOAL]\ncase refine_2.intro.refine_2.convert_2\nr : ℚ\nn : ℕ\n⊢ 0 < 1 / ↑(↑r.den * 2) ^ n\n[PROOFSTEP]\nrefine' one_div_pos.2 (pow_pos (Int.cast_pos.2 _) _)\n[GOAL]\ncase refine_2.intro.refine_2.convert_2\nr : ℚ\nn : ℕ\n⊢ 0 < ↑r.den * 2\n[PROOFSTEP]\nexact mul_pos (Int.coe_nat_pos.2 r.pos) zero_lt_two\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.Liouville.Residual", "llama_tokens": 3034, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.817574471748733, "lm_q2_score": 0.6893056231680122, "lm_q1q2_score": 0.5635586807350188}} {"text": "[GOAL]\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\n⊢ restrictScalars F (normalClosure F K L) = ⨆ (x : K), adjoin F (rootSet (minpoly F x) L)\n[PROOFSTEP]\nclassical\nhave hi : ∀ x : K, IsIntegral F x := fun x ↦ (isIntegral_algebraMap_iff (algebraMap K L).injective).mp (h.isIntegral _)\nrefine' le_antisymm (iSup_le _) (iSup_le fun x => adjoin_le_iff.mpr fun y hy => _)\n· rintro f _ ⟨x, rfl⟩\n refine' le_iSup (fun x => adjoin F ((minpoly F x).rootSet L)) x (subset_adjoin F ((minpoly F x).rootSet L) _)\n rw [mem_rootSet_of_ne (minpoly.ne_zero (hi x)), AlgHom.toRingHom_eq_coe, AlgHom.coe_toRingHom,\n Polynomial.aeval_algHom_apply, minpoly.aeval, map_zero]\n· rw [Polynomial.rootSet, Finset.mem_coe, Multiset.mem_toFinset] at hy \n let g := (algHomAdjoinIntegralEquiv F (hi x)).symm ⟨y, hy⟩\n refine'\n le_iSup (fun f : K →ₐ[F] L => f.fieldRange) ((g.liftNormal L).comp (toAlgHom F K L))\n ⟨x, (g.liftNormal_commutes L (AdjoinSimple.gen F x)).trans _⟩\n rw [Algebra.id.map_eq_id, RingHom.id_apply]\n -- Porting note: in mathlib3 this next `apply` closed the goal.\n -- Now it can't find a proof by unification, so we have to do it ourselves.\n apply PowerBasis.lift_gen\n change aeval y (minpoly F (AdjoinSimple.gen F x)) = 0\n exact minpoly_gen (hi x) ▸ aeval_eq_zero_of_mem_rootSet (Multiset.mem_toFinset.mpr hy)\n[GOAL]\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\n⊢ restrictScalars F (normalClosure F K L) = ⨆ (x : K), adjoin F (rootSet (minpoly F x) L)\n[PROOFSTEP]\nhave hi : ∀ x : K, IsIntegral F x := fun x ↦ (isIntegral_algebraMap_iff (algebraMap K L).injective).mp (h.isIntegral _)\n[GOAL]\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\nhi : ∀ (x : K), IsIntegral F x\n⊢ restrictScalars F (normalClosure F K L) = ⨆ (x : K), adjoin F (rootSet (minpoly F x) L)\n[PROOFSTEP]\nrefine' le_antisymm (iSup_le _) (iSup_le fun x => adjoin_le_iff.mpr fun y hy => _)\n[GOAL]\ncase refine'_1\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\nhi : ∀ (x : K), IsIntegral F x\n⊢ ∀ (i : K →ₐ[F] L), AlgHom.fieldRange i ≤ ⨆ (x : K), adjoin F (rootSet (minpoly F x) L)\n[PROOFSTEP]\nrintro f _ ⟨x, rfl⟩\n[GOAL]\ncase refine'_1.intro\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\nhi : ∀ (x : K), IsIntegral F x\nf : K →ₐ[F] L\nx : K\n⊢ ↑↑f x ∈ ⨆ (x : K), adjoin F (rootSet (minpoly F x) L)\n[PROOFSTEP]\nrefine' le_iSup (fun x => adjoin F ((minpoly F x).rootSet L)) x (subset_adjoin F ((minpoly F x).rootSet L) _)\n[GOAL]\ncase refine'_1.intro\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\nhi : ∀ (x : K), IsIntegral F x\nf : K →ₐ[F] L\nx : K\n⊢ ↑↑f x ∈ rootSet (minpoly F x) L\n[PROOFSTEP]\nrw [mem_rootSet_of_ne (minpoly.ne_zero (hi x)), AlgHom.toRingHom_eq_coe, AlgHom.coe_toRingHom,\n Polynomial.aeval_algHom_apply, minpoly.aeval, map_zero]\n[GOAL]\ncase refine'_2\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\nhi : ∀ (x : K), IsIntegral F x\nx : K\ny : L\nhy : y ∈ rootSet (minpoly F x) L\n⊢ y ∈ ↑(restrictScalars F (normalClosure F K L))\n[PROOFSTEP]\nrw [Polynomial.rootSet, Finset.mem_coe, Multiset.mem_toFinset] at hy \n[GOAL]\ncase refine'_2\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\nhi : ∀ (x : K), IsIntegral F x\nx : K\ny : L\nhy : y ∈ roots (Polynomial.map (algebraMap F L) (minpoly F x))\n⊢ y ∈ ↑(restrictScalars F (normalClosure F K L))\n[PROOFSTEP]\nlet g := (algHomAdjoinIntegralEquiv F (hi x)).symm ⟨y, hy⟩\n[GOAL]\ncase refine'_2\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\nhi : ∀ (x : K), IsIntegral F x\nx : K\ny : L\nhy : y ∈ roots (Polynomial.map (algebraMap F L) (minpoly F x))\ng : (fun x_1 => { x_2 // x_2 ∈ F⟮x⟯ } →ₐ[F] L) { val := y, property := hy } :=\n ↑(algHomAdjoinIntegralEquiv F (_ : IsIntegral F x)).symm { val := y, property := hy }\n⊢ y ∈ ↑(restrictScalars F (normalClosure F K L))\n[PROOFSTEP]\nrefine'\n le_iSup (fun f : K →ₐ[F] L => f.fieldRange) ((g.liftNormal L).comp (toAlgHom F K L))\n ⟨x, (g.liftNormal_commutes L (AdjoinSimple.gen F x)).trans _⟩\n[GOAL]\ncase refine'_2\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\nhi : ∀ (x : K), IsIntegral F x\nx : K\ny : L\nhy : y ∈ roots (Polynomial.map (algebraMap F L) (minpoly F x))\ng : (fun x_1 => { x_2 // x_2 ∈ F⟮x⟯ } →ₐ[F] L) { val := y, property := hy } :=\n ↑(algHomAdjoinIntegralEquiv F (_ : IsIntegral F x)).symm { val := y, property := hy }\n⊢ ↑(algebraMap L L) (↑g (AdjoinSimple.gen F x)) = y\n[PROOFSTEP]\nrw [Algebra.id.map_eq_id, RingHom.id_apply]\n -- Porting note: in mathlib3 this next `apply` closed the goal.\n -- Now it can't find a proof by unification, so we have to do it ourselves.\n[GOAL]\ncase refine'_2\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\nhi : ∀ (x : K), IsIntegral F x\nx : K\ny : L\nhy : y ∈ roots (Polynomial.map (algebraMap F L) (minpoly F x))\ng : (fun x_1 => { x_2 // x_2 ∈ F⟮x⟯ } →ₐ[F] L) { val := y, property := hy } :=\n ↑(algHomAdjoinIntegralEquiv F (_ : IsIntegral F x)).symm { val := y, property := hy }\n⊢ ↑g (AdjoinSimple.gen F x) = y\n[PROOFSTEP]\napply PowerBasis.lift_gen\n[GOAL]\ncase refine'_2.hy\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\nhi : ∀ (x : K), IsIntegral F x\nx : K\ny : L\nhy : y ∈ roots (Polynomial.map (algebraMap F L) (minpoly F x))\ng : (fun x_1 => { x_2 // x_2 ∈ F⟮x⟯ } →ₐ[F] L) { val := y, property := hy } :=\n ↑(algHomAdjoinIntegralEquiv F (_ : IsIntegral F x)).symm { val := y, property := hy }\n⊢ ↑(aeval\n ↑(↑(Equiv.subtypeEquiv (Equiv.refl L)\n (_ :\n ∀ (x_1 : L),\n ↑(aeval x_1) (minpoly F (adjoin.powerBasis (_ : IsIntegral F x)).gen) = 0 ↔\n ↑(Equiv.refl L) x_1 ∈\n roots\n (Polynomial.map (algebraMap F L)\n (minpoly F (adjoin.powerBasis (_ : IsIntegral F x)).gen)))).symm\n (↑(Equiv.subtypeEquiv (Equiv.refl L)\n (_ :\n ∀ (x_1 : L),\n x_1 ∈\n roots\n (Polynomial.map (algebraMap F L)\n (minpoly F (adjoin.powerBasis (_ : IsIntegral F x)).gen)) ↔\n ↑(Equiv.refl L) x_1 ∈ roots (Polynomial.map (algebraMap F L) (minpoly F x)))).symm\n { val := y, property := hy })))\n (minpoly F (adjoin.powerBasis (_ : IsIntegral F x)).gen) =\n 0\n[PROOFSTEP]\nchange aeval y (minpoly F (AdjoinSimple.gen F x)) = 0\n[GOAL]\ncase refine'_2.hy\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\nhi : ∀ (x : K), IsIntegral F x\nx : K\ny : L\nhy : y ∈ roots (Polynomial.map (algebraMap F L) (minpoly F x))\ng : (fun x_1 => { x_2 // x_2 ∈ F⟮x⟯ } →ₐ[F] L) { val := y, property := hy } :=\n ↑(algHomAdjoinIntegralEquiv F (_ : IsIntegral F x)).symm { val := y, property := hy }\n⊢ ↑(aeval y) (minpoly F (AdjoinSimple.gen F x)) = 0\n[PROOFSTEP]\nexact minpoly_gen (hi x) ▸ aeval_eq_zero_of_mem_rootSet (Multiset.mem_toFinset.mpr hy)\n[GOAL]\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\n⊢ Normal F { x // x ∈ normalClosure F K L }\n[PROOFSTEP]\nlet ϕ := algebraMap K L\n[GOAL]\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\nϕ : K →+* L := algebraMap K L\n⊢ Normal F { x // x ∈ normalClosure F K L }\n[PROOFSTEP]\nrw [← IntermediateField.restrictScalars_normal, restrictScalars_eq_iSup_adjoin]\n -- Porting note: use the `(_)` trick to obtain an instance by unification.\n[GOAL]\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\nϕ : K →+* L := algebraMap K L\n⊢ Normal F { x // x ∈ ⨆ (x : K), adjoin F (rootSet (minpoly F x) L) }\n[PROOFSTEP]\napply IntermediateField.normal_iSup (h := _)\n[GOAL]\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\nϕ : K →+* L := algebraMap K L\n⊢ ∀ (i : K), Normal F { x // x ∈ adjoin F (rootSet (minpoly F i) L) }\n[PROOFSTEP]\nintro x\n[GOAL]\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\nϕ : K →+* L := algebraMap K L\nx : K\n⊢ Normal F { x_1 // x_1 ∈ adjoin F (rootSet (minpoly F x) L) }\n[PROOFSTEP]\napply Normal.of_isSplittingField (p := minpoly F x) (hFEp := _)\n[GOAL]\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra F K\ninst✝² : Algebra F L\ninst✝¹ : Algebra K L\ninst✝ : IsScalarTower F K L\nh : Normal F L\nϕ : K →+* L := algebraMap K L\nx : K\n⊢ IsSplittingField F { x_1 // x_1 ∈ adjoin F (rootSet (minpoly F x) L) } (minpoly F x)\n[PROOFSTEP]\nexact\n adjoin_rootSet_isSplittingField\n ((minpoly.eq_of_algebraMap_eq ϕ.injective ((isIntegral_algebraMap_iff ϕ.injective).mp (h.isIntegral (ϕ x)))\n rfl).symm ▸\n h.splits _)\n[GOAL]\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁷ : Field F\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra F L\ninst✝² : Algebra K L\ninst✝¹ : IsScalarTower F K L\ninst✝ : FiniteDimensional F K\n⊢ FiniteDimensional F { x // x ∈ normalClosure F K L }\n[PROOFSTEP]\nhaveI : ∀ f : K →ₐ[F] L, FiniteDimensional F f.fieldRange := fun f => f.toLinearMap.finiteDimensional_range\n[GOAL]\nF : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁷ : Field F\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra F L\ninst✝² : Algebra K L\ninst✝¹ : IsScalarTower F K L\ninst✝ : FiniteDimensional F K\nthis : ∀ (f : K →ₐ[F] L), FiniteDimensional F { x // x ∈ AlgHom.fieldRange f }\n⊢ FiniteDimensional F { x // x ∈ normalClosure F K L }\n[PROOFSTEP]\napply IntermediateField.finiteDimensional_iSup_of_finite\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.NormalClosure", "llama_tokens": 5448, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.7981867873410141, "lm_q2_score": 0.7057850340255386, "lm_q1q2_score": 0.563348288862213}} {"text": "[GOAL]\nX : Type u_1\ninst✝ : EMetricSpace X\ns t : Set X\nx✝ y : X\nh : IsMetricSeparated s t\nr : ENNReal\nr0 : r ≠ 0\nhr : ∀ (x : X), x ∈ s → ∀ (y : X), y ∈ t → r ≤ edist x y\nx : X\nhx1 : x ∈ s\nhx2 : x ∈ t\n⊢ r = 0\n[PROOFSTEP]\nsimpa using hr x hx1 x hx2\n[GOAL]\nX : Type u_1\ninst✝ : EMetricSpace X\ns t : Set X\nx y : X\ns' : Set X\nh : IsMetricSeparated s t\nh' : IsMetricSeparated s' t\n⊢ IsMetricSeparated (s ∪ s') t\n[PROOFSTEP]\nrcases h, h' with ⟨⟨r, r0, hr⟩, ⟨r', r0', hr'⟩⟩\n[GOAL]\ncase intro.intro.intro.intro\nX : Type u_1\ninst✝ : EMetricSpace X\ns t : Set X\nx y : X\ns' : Set X\nr : ENNReal\nr0 : r ≠ 0\nhr : ∀ (x : X), x ∈ s → ∀ (y : X), y ∈ t → r ≤ edist x y\nr' : ENNReal\nr0' : r' ≠ 0\nhr' : ∀ (x : X), x ∈ s' → ∀ (y : X), y ∈ t → r' ≤ edist x y\n⊢ IsMetricSeparated (s ∪ s') t\n[PROOFSTEP]\nrefine' ⟨min r r', _, fun x hx y hy => hx.elim _ _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nX : Type u_1\ninst✝ : EMetricSpace X\ns t : Set X\nx y : X\ns' : Set X\nr : ENNReal\nr0 : r ≠ 0\nhr : ∀ (x : X), x ∈ s → ∀ (y : X), y ∈ t → r ≤ edist x y\nr' : ENNReal\nr0' : r' ≠ 0\nhr' : ∀ (x : X), x ∈ s' → ∀ (y : X), y ∈ t → r' ≤ edist x y\n⊢ min r r' ≠ 0\n[PROOFSTEP]\nrw [← pos_iff_ne_zero] at r0 r0' ⊢\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nX : Type u_1\ninst✝ : EMetricSpace X\ns t : Set X\nx y : X\ns' : Set X\nr : ENNReal\nr0 : 0 < r\nhr : ∀ (x : X), x ∈ s → ∀ (y : X), y ∈ t → r ≤ edist x y\nr' : ENNReal\nr0' : 0 < r'\nhr' : ∀ (x : X), x ∈ s' → ∀ (y : X), y ∈ t → r' ≤ edist x y\n⊢ 0 < min r r'\n[PROOFSTEP]\nexact lt_min r0 r0'\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nX : Type u_1\ninst✝ : EMetricSpace X\ns t : Set X\nx✝ y✝ : X\ns' : Set X\nr : ENNReal\nr0 : r ≠ 0\nhr : ∀ (x : X), x ∈ s → ∀ (y : X), y ∈ t → r ≤ edist x y\nr' : ENNReal\nr0' : r' ≠ 0\nhr' : ∀ (x : X), x ∈ s' → ∀ (y : X), y ∈ t → r' ≤ edist x y\nx : X\nhx : x ∈ s ∪ s'\ny : X\nhy : y ∈ t\n⊢ x ∈ s → min r r' ≤ edist x y\n[PROOFSTEP]\nexact fun hx => (min_le_left _ _).trans (hr _ hx _ hy)\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nX : Type u_1\ninst✝ : EMetricSpace X\ns t : Set X\nx✝ y✝ : X\ns' : Set X\nr : ENNReal\nr0 : r ≠ 0\nhr : ∀ (x : X), x ∈ s → ∀ (y : X), y ∈ t → r ≤ edist x y\nr' : ENNReal\nr0' : r' ≠ 0\nhr' : ∀ (x : X), x ∈ s' → ∀ (y : X), y ∈ t → r' ≤ edist x y\nx : X\nhx : x ∈ s ∪ s'\ny : X\nhy : y ∈ t\n⊢ x ∈ s' → min r r' ≤ edist x y\n[PROOFSTEP]\nexact fun hx => (min_le_right _ _).trans (hr' _ hx _ hy)\n[GOAL]\nX : Type u_1\ninst✝ : EMetricSpace X\ns✝ t✝ : Set X\nx y : X\nι : Type u_2\nI : Set ι\nhI : Set.Finite I\ns : ι → Set X\nt : Set X\n⊢ IsMetricSeparated (⋃ (i : ι) (_ : i ∈ I), s i) t ↔ ∀ (i : ι), i ∈ I → IsMetricSeparated (s i) t\n[PROOFSTEP]\nrefine' Finite.induction_on hI (by simp) @fun i I _ _ hI => _\n[GOAL]\nX : Type u_1\ninst✝ : EMetricSpace X\ns✝ t✝ : Set X\nx y : X\nι : Type u_2\nI : Set ι\nhI : Set.Finite I\ns : ι → Set X\nt : Set X\n⊢ IsMetricSeparated (⋃ (i : ι) (_ : i ∈ ∅), s i) t ↔ ∀ (i : ι), i ∈ ∅ → IsMetricSeparated (s i) t\n[PROOFSTEP]\nsimp\n[GOAL]\nX : Type u_1\ninst✝ : EMetricSpace X\ns✝ t✝ : Set X\nx y : X\nι : Type u_2\nI✝ : Set ι\nhI✝ : Set.Finite I✝\ns : ι → Set X\nt : Set X\ni : ι\nI : Set ι\nx✝¹ : ¬i ∈ I\nx✝ : Set.Finite I\nhI : IsMetricSeparated (⋃ (i : ι) (_ : i ∈ I), s i) t ↔ ∀ (i : ι), i ∈ I → IsMetricSeparated (s i) t\n⊢ IsMetricSeparated (⋃ (i_1 : ι) (_ : i_1 ∈ insert i I), s i_1) t ↔\n ∀ (i_1 : ι), i_1 ∈ insert i I → IsMetricSeparated (s i_1) t\n[PROOFSTEP]\nrw [biUnion_insert, ball_insert_iff, union_left_iff, hI]\n[GOAL]\nX : Type u_1\ninst✝ : EMetricSpace X\ns✝ t✝ : Set X\nx y : X\nι : Type u_2\nI : Set ι\nhI : Set.Finite I\ns : Set X\nt : ι → Set X\n⊢ IsMetricSeparated s (⋃ (i : ι) (_ : i ∈ I), t i) ↔ ∀ (i : ι), i ∈ I → IsMetricSeparated s (t i)\n[PROOFSTEP]\nsimpa only [@comm _ _ s] using finite_iUnion_left_iff hI\n", "meta": {"mathlib_filename": "Mathlib.Topology.MetricSpace.MetricSeparated", "llama_tokens": 2065, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7905303186696748, "lm_q2_score": 0.7122321903471563, "lm_q1q2_score": 0.563041140401938}} {"text": "[GOAL]\nA : Type u₁\nB : Type u₂\ninst✝⁷ : Category.{v₁, u₁} A\ninst✝⁶ : Category.{v₂, u₂} B\ninst✝⁵ : HasEqualizers A\ninst✝⁴ : HasImages A\ninst✝³ : StrongEpiCategory B\ninst✝² : HasImages B\nL : A ⥤ B\ninst✝¹ : {X Y Z : A} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PreservesLimit (cospan f g) L\ninst✝ : {X Y Z : A} → (f : X ⟶ Y) → (g : X ⟶ Z) → PreservesColimit (span f g) L\nX Y : A\nf : X ⟶ Y\n⊢ L.map (factorThruImage f) ≫ L.map (image.ι f) = L.map f\n[PROOFSTEP]\nrw [← L.map_comp, Limits.image.fac]\n[GOAL]\nA : Type u₁\nB : Type u₂\ninst✝⁷ : Category.{v₁, u₁} A\ninst✝⁶ : Category.{v₂, u₂} B\ninst✝⁵ : HasEqualizers A\ninst✝⁴ : HasImages A\ninst✝³ : StrongEpiCategory B\ninst✝² : HasImages B\nL : A ⥤ B\ninst✝¹ : {X Y Z : A} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PreservesLimit (cospan f g) L\ninst✝ : {X Y Z : A} → (f : X ⟶ Y) → (g : X ⟶ Z) → PreservesColimit (span f g) L\nX Y : A\nf : X ⟶ Y\n⊢ factorThruImage (L.map f) ≫ (iso L f).hom = L.map (factorThruImage f)\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u₁\nB : Type u₂\ninst✝⁷ : Category.{v₁, u₁} A\ninst✝⁶ : Category.{v₂, u₂} B\ninst✝⁵ : HasEqualizers A\ninst✝⁴ : HasImages A\ninst✝³ : StrongEpiCategory B\ninst✝² : HasImages B\nL : A ⥤ B\ninst✝¹ : {X Y Z : A} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PreservesLimit (cospan f g) L\ninst✝ : {X Y Z : A} → (f : X ⟶ Y) → (g : X ⟶ Z) → PreservesColimit (span f g) L\nX Y : A\nf : X ⟶ Y\n⊢ (iso L f).hom ≫ L.map (image.ι f) = image.ι (L.map f)\n[PROOFSTEP]\nrw [iso_hom, image.lift_fac]\n[GOAL]\nA : Type u₁\nB : Type u₂\ninst✝⁷ : Category.{v₁, u₁} A\ninst✝⁶ : Category.{v₂, u₂} B\ninst✝⁵ : HasEqualizers A\ninst✝⁴ : HasImages A\ninst✝³ : StrongEpiCategory B\ninst✝² : HasImages B\nL : A ⥤ B\ninst✝¹ : {X Y Z : A} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PreservesLimit (cospan f g) L\ninst✝ : {X Y Z : A} → (f : X ⟶ Y) → (g : X ⟶ Z) → PreservesColimit (span f g) L\nX Y : A\nf : X ⟶ Y\n⊢ (iso L f).inv ≫ image.ι (L.map f) = L.map (image.ι f)\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Preserves.Shapes.Images", "llama_tokens": 976, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8596637541053281, "lm_q2_score": 0.6548947290421275, "lm_q1q2_score": 0.562989261312147}} {"text": "[GOAL]\nE : Type u_1\nX : Type u_2\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalSpace X\nf : E → X\ns : Set X\nx : E\nI : Type u_3\ninst✝ : TopologicalSpace I\nh✝ : IsEvenlyCovered f (f x) I\ne : Trivialization I f := Classical.choose (_ : ∃ t, f x ∈ t.baseSet)\nh : f x ∈ (Classical.choose (_ : ∃ t, f x ∈ t.baseSet)).baseSet := Classical.choose_spec h✝.right\nhe : (f x, (↑e x).snd) = ↑e x := Trivialization.mk_proj_snd' e h\n⊢ (f x, (↑e x).snd) ∈ e.target\n[PROOFSTEP]\nrwa [he, e.mem_target, e.coe_fst (e.mem_source.mpr h)]\n[GOAL]\nE : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace E\ninst✝ : TopologicalSpace X\nf : E → X\ns : Set X\nhf : IsCoveringMapOn f s\n⊢ IsLocallyHomeomorphOn f (f ⁻¹' s)\n[PROOFSTEP]\nrefine' IsLocallyHomeomorphOn.mk f (f ⁻¹' s) fun x hx => _\n[GOAL]\nE : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace E\ninst✝ : TopologicalSpace X\nf : E → X\ns : Set X\nhf : IsCoveringMapOn f s\nx : E\nhx : x ∈ f ⁻¹' s\n⊢ ∃ e, x ∈ e.source ∧ ∀ (y : E), y ∈ e.source → f y = ↑e y\n[PROOFSTEP]\nlet e := (hf (f x) hx).toTrivialization\n[GOAL]\nE : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace E\ninst✝ : TopologicalSpace X\nf : E → X\ns : Set X\nhf : IsCoveringMapOn f s\nx : E\nhx : x ∈ f ⁻¹' s\ne : Trivialization (↑(f ⁻¹' {f x})) f := IsEvenlyCovered.toTrivialization (_ : IsEvenlyCovered f (f x) ↑(f ⁻¹' {f x}))\n⊢ ∃ e, x ∈ e.source ∧ ∀ (y : E), y ∈ e.source → f y = ↑e y\n[PROOFSTEP]\nhave h := (hf (f x) hx).mem_toTrivialization_baseSet\n[GOAL]\nE : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace E\ninst✝ : TopologicalSpace X\nf : E → X\ns : Set X\nhf : IsCoveringMapOn f s\nx : E\nhx : x ∈ f ⁻¹' s\ne : Trivialization (↑(f ⁻¹' {f x})) f := IsEvenlyCovered.toTrivialization (_ : IsEvenlyCovered f (f x) ↑(f ⁻¹' {f x}))\nh : f x ∈ (IsEvenlyCovered.toTrivialization (_ : IsEvenlyCovered f (f x) ↑(f ⁻¹' {f x}))).baseSet\n⊢ ∃ e, x ∈ e.source ∧ ∀ (y : E), y ∈ e.source → f y = ↑e y\n[PROOFSTEP]\nlet he := e.mem_source.2 h\n[GOAL]\nE : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace E\ninst✝ : TopologicalSpace X\nf : E → X\ns : Set X\nhf : IsCoveringMapOn f s\nx : E\nhx : x ∈ f ⁻¹' s\ne : Trivialization (↑(f ⁻¹' {f x})) f := IsEvenlyCovered.toTrivialization (_ : IsEvenlyCovered f (f x) ↑(f ⁻¹' {f x}))\nh : f x ∈ (IsEvenlyCovered.toTrivialization (_ : IsEvenlyCovered f (f x) ↑(f ⁻¹' {f x}))).baseSet\nhe : x ∈ e.source := Iff.mpr (Trivialization.mem_source e) h\n⊢ ∃ e, x ∈ e.source ∧ ∀ (y : E), y ∈ e.source → f y = ↑e y\n[PROOFSTEP]\nrefine'\n ⟨e.toLocalHomeomorph.trans\n { toFun := fun p => p.1\n invFun := fun p => ⟨p, x, rfl⟩\n source := e.baseSet ×ˢ ({⟨x, rfl⟩} : Set (f ⁻¹' {f x}))\n target := e.baseSet\n open_source := e.open_baseSet.prod (singletons_open_iff_discrete.2 (hf (f x) hx).1 ⟨x, rfl⟩)\n open_target := e.open_baseSet\n map_source' := fun p => And.left\n map_target' := fun p hp => ⟨hp, rfl⟩\n left_inv' := fun p hp => Prod.ext rfl hp.2.symm\n right_inv' := fun p _ => rfl\n continuous_toFun := continuous_fst.continuousOn\n continuous_invFun := (continuous_id'.prod_mk continuous_const).continuousOn },\n ⟨he, by rwa [e.toLocalHomeomorph.symm_symm, e.proj_toFun x he], (hf (f x) hx).toTrivialization_apply⟩, fun p h =>\n (e.proj_toFun p h.1).symm⟩\n[GOAL]\nE : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace E\ninst✝ : TopologicalSpace X\nf : E → X\ns : Set X\nhf : IsCoveringMapOn f s\nx : E\nhx : x ∈ f ⁻¹' s\ne : Trivialization (↑(f ⁻¹' {f x})) f := IsEvenlyCovered.toTrivialization (_ : IsEvenlyCovered f (f x) ↑(f ⁻¹' {f x}))\nh : f x ∈ (IsEvenlyCovered.toTrivialization (_ : IsEvenlyCovered f (f x) ↑(f ⁻¹' {f x}))).baseSet\nhe : x ∈ e.source := Iff.mpr (Trivialization.mem_source e) h\n⊢ (↑(LocalHomeomorph.symm (LocalHomeomorph.symm e.toLocalHomeomorph)) x).fst ∈ e.baseSet\n[PROOFSTEP]\nrwa [e.toLocalHomeomorph.symm_symm, e.proj_toFun x he]\n[GOAL]\nE : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace E\ninst✝ : TopologicalSpace X\nf : E → X\ns : Set X\n⊢ IsCoveringMap f ↔ IsCoveringMapOn f Set.univ\n[PROOFSTEP]\nsimp only [IsCoveringMap, IsCoveringMapOn, Set.mem_univ, forall_true_left]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Covering", "llama_tokens": 1915, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8006920020959544, "lm_q2_score": 0.7025300698514778, "lm_q1q2_score": 0.5625102081619905}} {"text": "[GOAL]\nn : ℕ\n⊢ LeftMoves (powHalf n) = PUnit\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\n⊢ LeftMoves (powHalf Nat.zero) = PUnit\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nn✝ : ℕ\n⊢ LeftMoves (powHalf (Nat.succ n✝)) = PUnit\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\ni : LeftMoves (powHalf n)\n⊢ moveLeft (powHalf n) i = 0\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\ni : LeftMoves (powHalf Nat.zero)\n⊢ moveLeft (powHalf Nat.zero) i = 0\n[PROOFSTEP]\ncases i\n[GOAL]\ncase succ\nn✝ : ℕ\ni : LeftMoves (powHalf (Nat.succ n✝))\n⊢ moveLeft (powHalf (Nat.succ n✝)) i = 0\n[PROOFSTEP]\ncases i\n[GOAL]\ncase zero.unit\n⊢ moveLeft (powHalf Nat.zero) PUnit.unit = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.unit\nn✝ : ℕ\n⊢ moveLeft (powHalf (Nat.succ n✝)) PUnit.unit = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\n⊢ Unique (LeftMoves (powHalf n))\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\n⊢ Unique (LeftMoves (powHalf Nat.zero))\n[PROOFSTEP]\nexact PUnit.unique\n[GOAL]\ncase succ\nn✝ : ℕ\n⊢ Unique (LeftMoves (powHalf (Nat.succ n✝)))\n[PROOFSTEP]\nexact PUnit.unique\n[GOAL]\n⊢ birthday (powHalf 1) = 2\n[PROOFSTEP]\nrw [birthday_def]\n[GOAL]\n⊢ max (Ordinal.lsub fun i => birthday (moveLeft (powHalf 1) i))\n (Ordinal.lsub fun i => birthday (moveRight (powHalf 1) i)) =\n 2\n[PROOFSTEP]\ndsimp\n[GOAL]\n⊢ max (Ordinal.lsub fun i => birthday (moveLeft (powHalf 1) i)) (Ordinal.lsub fun i => birthday 1) = 2\n[PROOFSTEP]\nsimpa using Order.le_succ (1 : Ordinal)\n[GOAL]\nn : ℕ\n⊢ Numeric (powHalf n)\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\n⊢ Numeric (powHalf Nat.zero)\n[PROOFSTEP]\nexact numeric_one\n[GOAL]\ncase succ\nn : ℕ\nhn : Numeric (powHalf n)\n⊢ Numeric (powHalf (Nat.succ n))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase succ.left\nn : ℕ\nhn : Numeric (powHalf n)\n⊢ ∀ (i j : PUnit), OfNat.ofNat 0 i < (fun x => powHalf n) j\n[PROOFSTEP]\nsimpa using hn.moveLeft_lt default\n[GOAL]\ncase succ.right\nn : ℕ\nhn : Numeric (powHalf n)\n⊢ (∀ (i : PUnit), Numeric (OfNat.ofNat 0 i)) ∧ ∀ (j : PUnit), Numeric ((fun x => powHalf n) j)\n[PROOFSTEP]\nexact ⟨fun _ => numeric_zero, fun _ => hn⟩\n[GOAL]\nn : ℕ\n⊢ powHalf n ≤ 1\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\n⊢ powHalf Nat.zero ≤ 1\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\ncase succ\nn : ℕ\nhn : powHalf n ≤ 1\n⊢ powHalf (Nat.succ n) ≤ 1\n[PROOFSTEP]\nexact (powHalf_succ_le_powHalf n).trans hn\n[GOAL]\nn : ℕ\n⊢ 0 < powHalf n\n[PROOFSTEP]\nrw [← lf_iff_lt numeric_zero (numeric_powHalf n), zero_lf_le]\n[GOAL]\nn : ℕ\n⊢ ∃ i, 0 ≤ moveLeft (powHalf n) i\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ powHalf (n + 1) + powHalf (n + 1) ≈ powHalf n\n[PROOFSTEP]\ninduction' n using Nat.strong_induction_on with n hn\n[GOAL]\ncase h\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ powHalf (n + 1) + powHalf (n + 1) ≈ powHalf n\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ powHalf (n + 1) + powHalf (n + 1) ≤ powHalf n\n[PROOFSTEP]\nrw [le_iff_forall_lf]\n[GOAL]\ncase h.right\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ powHalf n ≤ powHalf (n + 1) + powHalf (n + 1)\n[PROOFSTEP]\nrw [le_iff_forall_lf]\n[GOAL]\ncase h.left\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ (∀ (i : LeftMoves (powHalf (n + 1) + powHalf (n + 1))), moveLeft (powHalf (n + 1) + powHalf (n + 1)) i ⧏ powHalf n) ∧\n ∀ (j : RightMoves (powHalf n)), powHalf (n + 1) + powHalf (n + 1) ⧏ moveRight (powHalf n) j\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.right\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ (∀ (i : LeftMoves (powHalf n)), moveLeft (powHalf n) i ⧏ powHalf (n + 1) + powHalf (n + 1)) ∧\n ∀ (j : RightMoves (powHalf (n + 1) + powHalf (n + 1))), powHalf n ⧏ moveRight (powHalf (n + 1) + powHalf (n + 1)) j\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left.left\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ ∀ (i : LeftMoves (powHalf (n + 1) + powHalf (n + 1))), moveLeft (powHalf (n + 1) + powHalf (n + 1)) i ⧏ powHalf n\n[PROOFSTEP]\nrintro (⟨⟨⟩⟩ | ⟨⟨⟩⟩)\n[GOAL]\ncase h.left.left.inl.unit\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ moveLeft (powHalf (n + 1) + powHalf (n + 1)) (Sum.inl PUnit.unit) ⧏ powHalf n\n[PROOFSTEP]\napply lf_of_lt\n[GOAL]\ncase h.left.left.inr.unit\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ moveLeft (powHalf (n + 1) + powHalf (n + 1)) (Sum.inr PUnit.unit) ⧏ powHalf n\n[PROOFSTEP]\napply lf_of_lt\n[GOAL]\ncase h.left.left.inl.unit.h\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ moveLeft (powHalf (n + 1) + powHalf (n + 1)) (Sum.inl PUnit.unit) < powHalf n\n[PROOFSTEP]\ncalc\n 0 + powHalf n.succ ≈ powHalf n.succ := zero_add_equiv _\n _ < powHalf n := powHalf_succ_lt_powHalf n\n[GOAL]\ncase h.left.left.inr.unit.h\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ moveLeft (powHalf (n + 1) + powHalf (n + 1)) (Sum.inr PUnit.unit) < powHalf n\n[PROOFSTEP]\ncalc\n powHalf n.succ + 0 ≈ powHalf n.succ := add_zero_equiv _\n _ < powHalf n := powHalf_succ_lt_powHalf n\n[GOAL]\ncase h.left.right\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ ∀ (j : RightMoves (powHalf n)), powHalf (n + 1) + powHalf (n + 1) ⧏ moveRight (powHalf n) j\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase h.left.right.zero\nhn : ∀ (m : ℕ), m < Nat.zero → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ ∀ (j : RightMoves (powHalf Nat.zero)),\n powHalf (Nat.zero + 1) + powHalf (Nat.zero + 1) ⧏ moveRight (powHalf Nat.zero) j\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase h.left.right.succ\nn : ℕ\nhn : ∀ (m : ℕ), m < Nat.succ n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ ∀ (j : RightMoves (powHalf (Nat.succ n))),\n powHalf (Nat.succ n + 1) + powHalf (Nat.succ n + 1) ⧏ moveRight (powHalf (Nat.succ n)) j\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase h.left.right.succ.unit\nn : ℕ\nhn : ∀ (m : ℕ), m < Nat.succ n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ powHalf (Nat.succ n + 1) + powHalf (Nat.succ n + 1) ⧏ moveRight (powHalf (Nat.succ n)) PUnit.unit\n[PROOFSTEP]\napply lf_of_moveRight_le\n[GOAL]\ncase h.left.right.succ.unit.h\nn : ℕ\nhn : ∀ (m : ℕ), m < Nat.succ n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ moveRight (powHalf (Nat.succ n + 1) + powHalf (Nat.succ n + 1)) ?h.left.right.succ.unit.j ≤\n moveRight (powHalf (Nat.succ n)) PUnit.unit\ncase h.left.right.succ.unit.j\nn : ℕ\nhn : ∀ (m : ℕ), m < Nat.succ n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ RightMoves (powHalf (Nat.succ n + 1) + powHalf (Nat.succ n + 1))\n[PROOFSTEP]\nswap\n[GOAL]\ncase h.left.right.succ.unit.j\nn : ℕ\nhn : ∀ (m : ℕ), m < Nat.succ n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ RightMoves (powHalf (Nat.succ n + 1) + powHalf (Nat.succ n + 1))\ncase h.left.right.succ.unit.h\nn : ℕ\nhn : ∀ (m : ℕ), m < Nat.succ n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ moveRight (powHalf (Nat.succ n + 1) + powHalf (Nat.succ n + 1)) ?h.left.right.succ.unit.j ≤\n moveRight (powHalf (Nat.succ n)) PUnit.unit\n[PROOFSTEP]\nexact Sum.inl default\n[GOAL]\ncase h.left.right.succ.unit.h\nn : ℕ\nhn : ∀ (m : ℕ), m < Nat.succ n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ moveRight (powHalf (Nat.succ n + 1) + powHalf (Nat.succ n + 1)) (Sum.inl default) ≤\n moveRight (powHalf (Nat.succ n)) PUnit.unit\n[PROOFSTEP]\ncalc\n powHalf n.succ + powHalf (n.succ + 1) ≤ powHalf n.succ + powHalf n.succ :=\n add_le_add_left (powHalf_succ_le_powHalf _) _\n _ ≈ powHalf n := hn _ (Nat.lt_succ_self n)\n[GOAL]\ncase h.right.left\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ ∀ (i : LeftMoves (powHalf n)), moveLeft (powHalf n) i ⧏ powHalf (n + 1) + powHalf (n + 1)\n[PROOFSTEP]\nsimp only [powHalf_moveLeft, forall_const]\n[GOAL]\ncase h.right.left\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ 0 ⧏ powHalf (n + 1) + powHalf (n + 1)\n[PROOFSTEP]\napply lf_of_lt\n[GOAL]\ncase h.right.left.h\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ 0 < powHalf (n + 1) + powHalf (n + 1)\n[PROOFSTEP]\ncalc\n 0 ≈ 0 + 0 := (Equiv.symm (add_zero_equiv 0))\n _ ≤ powHalf n.succ + 0 := (add_le_add_right (zero_le_powHalf _) _)\n _ < powHalf n.succ + powHalf n.succ := add_lt_add_left (powHalf_pos _) _\n[GOAL]\ncase h.right.right\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ ∀ (j : RightMoves (powHalf (n + 1) + powHalf (n + 1))), powHalf n ⧏ moveRight (powHalf (n + 1) + powHalf (n + 1)) j\n[PROOFSTEP]\nrintro (⟨⟨⟩⟩ | ⟨⟨⟩⟩)\n[GOAL]\ncase h.right.right.inl.unit\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ powHalf n ⧏ moveRight (powHalf (n + 1) + powHalf (n + 1)) (Sum.inl PUnit.unit)\n[PROOFSTEP]\napply lf_of_lt\n[GOAL]\ncase h.right.right.inr.unit\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ powHalf n ⧏ moveRight (powHalf (n + 1) + powHalf (n + 1)) (Sum.inr PUnit.unit)\n[PROOFSTEP]\napply lf_of_lt\n[GOAL]\ncase h.right.right.inl.unit.h\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ powHalf n < moveRight (powHalf (n + 1) + powHalf (n + 1)) (Sum.inl PUnit.unit)\n[PROOFSTEP]\ncalc\n powHalf n ≈ powHalf n + 0 := (Equiv.symm (add_zero_equiv _))\n _ < powHalf n + powHalf n.succ := add_lt_add_left (powHalf_pos _) _\n[GOAL]\ncase h.right.right.inr.unit.h\nn : ℕ\nhn : ∀ (m : ℕ), m < n → powHalf (m + 1) + powHalf (m + 1) ≈ powHalf m\n⊢ powHalf n < moveRight (powHalf (n + 1) + powHalf (n + 1)) (Sum.inr PUnit.unit)\n[PROOFSTEP]\ncalc\n powHalf n ≈ 0 + powHalf n := (Equiv.symm (zero_add_equiv _))\n _ < powHalf n.succ + powHalf n := add_lt_add_right (powHalf_pos _) _\n[GOAL]\nn : ℕ\n⊢ 2 • powHalf (Nat.succ n) = powHalf n\n[PROOFSTEP]\nrw [two_nsmul]\n[GOAL]\nn : ℕ\n⊢ powHalf (Nat.succ n) + powHalf (Nat.succ n) = powHalf n\n[PROOFSTEP]\nexact Quotient.sound (PGame.add_powHalf_succ_self_eq_powHalf n)\n[GOAL]\nn : ℕ\n⊢ 2 ^ n • powHalf n = 1\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\n⊢ 2 ^ Nat.zero • powHalf Nat.zero = 1\n[PROOFSTEP]\nsimp only [Nat.zero_eq, pow_zero, powHalf_zero, one_smul]\n[GOAL]\ncase succ\nn : ℕ\nhn : 2 ^ n • powHalf n = 1\n⊢ 2 ^ Nat.succ n • powHalf (Nat.succ n) = 1\n[PROOFSTEP]\nrw [← hn, ← double_powHalf_succ_eq_powHalf n, smul_smul (2 ^ n) 2 (powHalf n.succ), mul_comm, pow_succ]\n[GOAL]\nn k : ℕ\n⊢ 2 ^ n • powHalf (n + k) = powHalf k\n[PROOFSTEP]\ninduction' k with k hk\n[GOAL]\ncase zero\nn : ℕ\n⊢ 2 ^ n • powHalf (n + Nat.zero) = powHalf Nat.zero\n[PROOFSTEP]\nsimp only [add_zero, Surreal.nsmul_pow_two_powHalf, Nat.zero_eq, eq_self_iff_true, Surreal.powHalf_zero]\n[GOAL]\ncase succ\nn k : ℕ\nhk : 2 ^ n • powHalf (n + k) = powHalf k\n⊢ 2 ^ n • powHalf (n + Nat.succ k) = powHalf (Nat.succ k)\n[PROOFSTEP]\nrw [← double_powHalf_succ_eq_powHalf (n + k), ← double_powHalf_succ_eq_powHalf k, smul_algebra_smul_comm] at hk \n[GOAL]\ncase succ\nn k : ℕ\nhk : 2 • 2 ^ n • powHalf (Nat.succ (n + k)) = 2 • powHalf (Nat.succ k)\n⊢ 2 ^ n • powHalf (n + Nat.succ k) = powHalf (Nat.succ k)\n[PROOFSTEP]\nrwa [← zsmul_eq_zsmul_iff' two_ne_zero]\n[GOAL]\nm : ℤ\nn k : ℕ\n⊢ (m * 2 ^ n) • powHalf (n + k) = m • powHalf k\n[PROOFSTEP]\nrw [mul_zsmul]\n[GOAL]\nm : ℤ\nn k : ℕ\n⊢ m • 2 ^ n • powHalf (n + k) = m • powHalf k\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nm : ℤ\nn k : ℕ\n⊢ 2 ^ n • powHalf (n + k) = powHalf k\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase e_a\nm : ℤ\nn k : ℕ\n⊢ 2 ^ n • powHalf (n + k) = powHalf k\n[PROOFSTEP]\nexact nsmul_pow_two_powHalf' n k\n[GOAL]\nm₁ m₂ : ℤ\ny₁ y₂ : ℕ\nh₂ : m₁ * 2 ^ y₁ = m₂ * 2 ^ y₂\n⊢ m₁ • powHalf y₂ = m₂ • powHalf y₁\n[PROOFSTEP]\nrevert m₁ m₂\n[GOAL]\ny₁ y₂ : ℕ\n⊢ ∀ {m₁ m₂ : ℤ}, m₁ * 2 ^ y₁ = m₂ * 2 ^ y₂ → m₁ • powHalf y₂ = m₂ • powHalf y₁\n[PROOFSTEP]\nwlog h : y₁ ≤ y₂\n[GOAL]\ncase inr\ny₁ y₂ : ℕ\nthis : ∀ {y₁ y₂ : ℕ}, y₁ ≤ y₂ → ∀ {m₁ m₂ : ℤ}, m₁ * 2 ^ y₁ = m₂ * 2 ^ y₂ → m₁ • powHalf y₂ = m₂ • powHalf y₁\nh : ¬y₁ ≤ y₂\n⊢ ∀ {m₁ m₂ : ℤ}, m₁ * 2 ^ y₁ = m₂ * 2 ^ y₂ → m₁ • powHalf y₂ = m₂ • powHalf y₁\n[PROOFSTEP]\nintro m₁ m₂ aux\n[GOAL]\ncase inr\ny₁ y₂ : ℕ\nthis : ∀ {y₁ y₂ : ℕ}, y₁ ≤ y₂ → ∀ {m₁ m₂ : ℤ}, m₁ * 2 ^ y₁ = m₂ * 2 ^ y₂ → m₁ • powHalf y₂ = m₂ • powHalf y₁\nh : ¬y₁ ≤ y₂\nm₁ m₂ : ℤ\naux : m₁ * 2 ^ y₁ = m₂ * 2 ^ y₂\n⊢ m₁ • powHalf y₂ = m₂ • powHalf y₁\n[PROOFSTEP]\nexact (this (le_of_not_le h) aux.symm).symm\n[GOAL]\ny₁ y₂ : ℕ\nh : y₁ ≤ y₂\n⊢ ∀ {m₁ m₂ : ℤ}, m₁ * 2 ^ y₁ = m₂ * 2 ^ y₂ → m₁ • powHalf y₂ = m₂ • powHalf y₁\n[PROOFSTEP]\nintro m₁ m₂ h₂\n[GOAL]\ny₁ y₂ : ℕ\nh : y₁ ≤ y₂\nm₁ m₂ : ℤ\nh₂ : m₁ * 2 ^ y₁ = m₂ * 2 ^ y₂\n⊢ m₁ • powHalf y₂ = m₂ • powHalf y₁\n[PROOFSTEP]\nobtain ⟨c, rfl⟩ := le_iff_exists_add.mp h\n[GOAL]\ncase intro\ny₁ : ℕ\nm₁ m₂ : ℤ\nc : ℕ\nh : y₁ ≤ y₁ + c\nh₂ : m₁ * 2 ^ y₁ = m₂ * 2 ^ (y₁ + c)\n⊢ m₁ • powHalf (y₁ + c) = m₂ • powHalf y₁\n[PROOFSTEP]\nrw [add_comm, pow_add, ← mul_assoc, mul_eq_mul_right_iff] at h₂ \n[GOAL]\ncase intro\ny₁ : ℕ\nm₁ m₂ : ℤ\nc : ℕ\nh : y₁ ≤ y₁ + c\nh₂ : m₁ = m₂ * 2 ^ c ∨ 2 ^ y₁ = 0\n⊢ m₁ • powHalf (y₁ + c) = m₂ • powHalf y₁\n[PROOFSTEP]\ncases' h₂ with h₂ h₂\n[GOAL]\ncase intro.inl\ny₁ : ℕ\nm₁ m₂ : ℤ\nc : ℕ\nh : y₁ ≤ y₁ + c\nh₂ : m₁ = m₂ * 2 ^ c\n⊢ m₁ • powHalf (y₁ + c) = m₂ • powHalf y₁\n[PROOFSTEP]\nrw [h₂, add_comm, zsmul_pow_two_powHalf m₂ c y₁]\n[GOAL]\ncase intro.inr\ny₁ : ℕ\nm₁ m₂ : ℤ\nc : ℕ\nh : y₁ ≤ y₁ + c\nh₂ : 2 ^ y₁ = 0\n⊢ m₁ • powHalf (y₁ + c) = m₂ • powHalf y₁\n[PROOFSTEP]\nhave := Nat.one_le_pow y₁ 2 Nat.succ_pos'\n[GOAL]\ncase intro.inr\ny₁ : ℕ\nm₁ m₂ : ℤ\nc : ℕ\nh : y₁ ≤ y₁ + c\nh₂ : 2 ^ y₁ = 0\nthis : 1 ≤ 2 ^ y₁\n⊢ m₁ • powHalf (y₁ + c) = m₂ • powHalf y₁\n[PROOFSTEP]\nnorm_cast at h₂ \n[GOAL]\ncase intro.inr\ny₁ : ℕ\nm₁ m₂ : ℤ\nc : ℕ\nh : y₁ ≤ y₁ + c\nthis : 1 ≤ 2 ^ y₁\nh₂ : 2 ^ y₁ = 0\n⊢ m₁ • powHalf (y₁ + c) = m₂ • powHalf y₁\n[PROOFSTEP]\nlinarith\n[GOAL]\nx : Localization.Away 2\n⊢ ∀ {a c : ℤ} {b d : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (a, b) (c, d) → a • powHalf (Submonoid.log b) = c • powHalf (Submonoid.log d)\n[PROOFSTEP]\nintro m₁ m₂ n₁ n₂ h₁\n[GOAL]\nx : Localization.Away 2\nm₁ m₂ : ℤ\nn₁ n₂ : { x // x ∈ Submonoid.powers 2 }\nh₁ : ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂)\n⊢ m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)\n[PROOFSTEP]\nobtain ⟨⟨n₃, y₃, hn₃⟩, h₂⟩ := Localization.r_iff_exists.mp h₁\n[GOAL]\ncase intro.mk.intro\nx : Localization.Away 2\nm₁ m₂ : ℤ\nn₁ n₂ : { x // x ∈ Submonoid.powers 2 }\nh₁ : ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂)\nn₃ : ℤ\ny₃ : ℕ\nhn₃ : (fun x x_1 => x ^ x_1) 2 y₃ = n₃\nh₂ :\n ↑{ val := n₃, property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = n₃) } * (↑(m₂, n₂).snd * (m₁, n₁).fst) =\n ↑{ val := n₃, property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = n₃) } * (↑(m₁, n₁).snd * (m₂, n₂).fst)\n⊢ m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)\n[PROOFSTEP]\nsimp only [Subtype.coe_mk, mul_eq_mul_left_iff] at h₂ \n[GOAL]\ncase intro.mk.intro\nx : Localization.Away 2\nm₁ m₂ : ℤ\nn₁ n₂ : { x // x ∈ Submonoid.powers 2 }\nh₁ : ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂)\nn₃ : ℤ\ny₃ : ℕ\nhn₃ : (fun x x_1 => x ^ x_1) 2 y₃ = n₃\nh₂ : ↑n₂ * m₁ = ↑n₁ * m₂ ∨ n₃ = 0\n⊢ m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)\n[PROOFSTEP]\ncases h₂\n[GOAL]\ncase intro.mk.intro.inl\nx : Localization.Away 2\nm₁ m₂ : ℤ\nn₁ n₂ : { x // x ∈ Submonoid.powers 2 }\nh₁ : ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂)\nn₃ : ℤ\ny₃ : ℕ\nhn₃ : (fun x x_1 => x ^ x_1) 2 y₃ = n₃\nh✝ : ↑n₂ * m₁ = ↑n₁ * m₂\n⊢ m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)\n[PROOFSTEP]\nobtain ⟨a₁, ha₁⟩ := n₁.prop\n[GOAL]\ncase intro.mk.intro.inl.intro\nx : Localization.Away 2\nm₁ m₂ : ℤ\nn₁ n₂ : { x // x ∈ Submonoid.powers 2 }\nh₁ : ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂)\nn₃ : ℤ\ny₃ : ℕ\nhn₃ : (fun x x_1 => x ^ x_1) 2 y₃ = n₃\nh✝ : ↑n₂ * m₁ = ↑n₁ * m₂\na₁ : ℕ\nha₁ : (fun x x_1 => x ^ x_1) 2 a₁ = ↑n₁\n⊢ m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)\n[PROOFSTEP]\nobtain ⟨a₂, ha₂⟩ := n₂.prop\n[GOAL]\ncase intro.mk.intro.inl.intro.intro\nx : Localization.Away 2\nm₁ m₂ : ℤ\nn₁ n₂ : { x // x ∈ Submonoid.powers 2 }\nh₁ : ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂)\nn₃ : ℤ\ny₃ : ℕ\nhn₃ : (fun x x_1 => x ^ x_1) 2 y₃ = n₃\nh✝ : ↑n₂ * m₁ = ↑n₁ * m₂\na₁ : ℕ\nha₁ : (fun x x_1 => x ^ x_1) 2 a₁ = ↑n₁\na₂ : ℕ\nha₂ : (fun x x_1 => x ^ x_1) 2 a₂ = ↑n₂\n⊢ m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)\n[PROOFSTEP]\nsimp only at ha₁ ha₂ ⊢\n[GOAL]\ncase intro.mk.intro.inl.intro.intro\nx : Localization.Away 2\nm₁ m₂ : ℤ\nn₁ n₂ : { x // x ∈ Submonoid.powers 2 }\nh₁ : ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂)\nn₃ : ℤ\ny₃ : ℕ\nhn₃ : (fun x x_1 => x ^ x_1) 2 y₃ = n₃\nh✝ : ↑n₂ * m₁ = ↑n₁ * m₂\na₁ : ℕ\nha₁ : 2 ^ a₁ = ↑n₁\na₂ : ℕ\nha₂ : 2 ^ a₂ = ↑n₂\n⊢ m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)\n[PROOFSTEP]\nhave hn₁ : n₁ = Submonoid.pow 2 a₁ := Subtype.ext ha₁.symm\n[GOAL]\ncase intro.mk.intro.inl.intro.intro\nx : Localization.Away 2\nm₁ m₂ : ℤ\nn₁ n₂ : { x // x ∈ Submonoid.powers 2 }\nh₁ : ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂)\nn₃ : ℤ\ny₃ : ℕ\nhn₃ : (fun x x_1 => x ^ x_1) 2 y₃ = n₃\nh✝ : ↑n₂ * m₁ = ↑n₁ * m₂\na₁ : ℕ\nha₁ : 2 ^ a₁ = ↑n₁\na₂ : ℕ\nha₂ : 2 ^ a₂ = ↑n₂\nhn₁ : n₁ = Submonoid.pow 2 a₁\n⊢ m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)\n[PROOFSTEP]\nhave hn₂ : n₂ = Submonoid.pow 2 a₂ := Subtype.ext ha₂.symm\n[GOAL]\ncase intro.mk.intro.inl.intro.intro\nx : Localization.Away 2\nm₁ m₂ : ℤ\nn₁ n₂ : { x // x ∈ Submonoid.powers 2 }\nh₁ : ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂)\nn₃ : ℤ\ny₃ : ℕ\nhn₃ : (fun x x_1 => x ^ x_1) 2 y₃ = n₃\nh✝ : ↑n₂ * m₁ = ↑n₁ * m₂\na₁ : ℕ\nha₁ : 2 ^ a₁ = ↑n₁\na₂ : ℕ\nha₂ : 2 ^ a₂ = ↑n₂\nhn₁ : n₁ = Submonoid.pow 2 a₁\nhn₂ : n₂ = Submonoid.pow 2 a₂\n⊢ m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)\n[PROOFSTEP]\nhave h₂ : 1 < (2 : ℤ).natAbs := one_lt_two\n[GOAL]\ncase intro.mk.intro.inl.intro.intro\nx : Localization.Away 2\nm₁ m₂ : ℤ\nn₁ n₂ : { x // x ∈ Submonoid.powers 2 }\nh₁ : ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂)\nn₃ : ℤ\ny₃ : ℕ\nhn₃ : (fun x x_1 => x ^ x_1) 2 y₃ = n₃\nh✝ : ↑n₂ * m₁ = ↑n₁ * m₂\na₁ : ℕ\nha₁ : 2 ^ a₁ = ↑n₁\na₂ : ℕ\nha₂ : 2 ^ a₂ = ↑n₂\nhn₁ : n₁ = Submonoid.pow 2 a₁\nhn₂ : n₂ = Submonoid.pow 2 a₂\nh₂ : 1 < Int.natAbs 2\n⊢ m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)\n[PROOFSTEP]\nrw [hn₁, hn₂, Submonoid.log_pow_int_eq_self h₂, Submonoid.log_pow_int_eq_self h₂]\n[GOAL]\ncase intro.mk.intro.inl.intro.intro\nx : Localization.Away 2\nm₁ m₂ : ℤ\nn₁ n₂ : { x // x ∈ Submonoid.powers 2 }\nh₁ : ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂)\nn₃ : ℤ\ny₃ : ℕ\nhn₃ : (fun x x_1 => x ^ x_1) 2 y₃ = n₃\nh✝ : ↑n₂ * m₁ = ↑n₁ * m₂\na₁ : ℕ\nha₁ : 2 ^ a₁ = ↑n₁\na₂ : ℕ\nha₂ : 2 ^ a₂ = ↑n₂\nhn₁ : n₁ = Submonoid.pow 2 a₁\nhn₂ : n₂ = Submonoid.pow 2 a₂\nh₂ : 1 < Int.natAbs 2\n⊢ m₁ • powHalf a₁ = m₂ • powHalf a₂\n[PROOFSTEP]\napply dyadic_aux\n[GOAL]\ncase intro.mk.intro.inl.intro.intro.h₂\nx : Localization.Away 2\nm₁ m₂ : ℤ\nn₁ n₂ : { x // x ∈ Submonoid.powers 2 }\nh₁ : ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂)\nn₃ : ℤ\ny₃ : ℕ\nhn₃ : (fun x x_1 => x ^ x_1) 2 y₃ = n₃\nh✝ : ↑n₂ * m₁ = ↑n₁ * m₂\na₁ : ℕ\nha₁ : 2 ^ a₁ = ↑n₁\na₂ : ℕ\nha₂ : 2 ^ a₂ = ↑n₂\nhn₁ : n₁ = Submonoid.pow 2 a₁\nhn₂ : n₂ = Submonoid.pow 2 a₂\nh₂ : 1 < Int.natAbs 2\n⊢ m₁ * 2 ^ a₂ = m₂ * 2 ^ a₁\n[PROOFSTEP]\nrwa [ha₁, ha₂, mul_comm, mul_comm m₂]\n[GOAL]\ncase intro.mk.intro.inr\nx : Localization.Away 2\nm₁ m₂ : ℤ\nn₁ n₂ : { x // x ∈ Submonoid.powers 2 }\nh₁ : ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂)\nn₃ : ℤ\ny₃ : ℕ\nhn₃ : (fun x x_1 => x ^ x_1) 2 y₃ = n₃\nh✝ : n₃ = 0\n⊢ m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)\n[PROOFSTEP]\nhave : (1 : ℤ) ≤ 2 ^ y₃ := by exact_mod_cast Nat.one_le_pow y₃ 2 Nat.succ_pos'\n[GOAL]\nx : Localization.Away 2\nm₁ m₂ : ℤ\nn₁ n₂ : { x // x ∈ Submonoid.powers 2 }\nh₁ : ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂)\nn₃ : ℤ\ny₃ : ℕ\nhn₃ : (fun x x_1 => x ^ x_1) 2 y₃ = n₃\nh✝ : n₃ = 0\n⊢ 1 ≤ 2 ^ y₃\n[PROOFSTEP]\nexact_mod_cast Nat.one_le_pow y₃ 2 Nat.succ_pos'\n[GOAL]\ncase intro.mk.intro.inr\nx : Localization.Away 2\nm₁ m₂ : ℤ\nn₁ n₂ : { x // x ∈ Submonoid.powers 2 }\nh₁ : ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂)\nn₃ : ℤ\ny₃ : ℕ\nhn₃ : (fun x x_1 => x ^ x_1) 2 y₃ = n₃\nh✝ : n₃ = 0\nthis : 1 ≤ 2 ^ y₃\n⊢ m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)\n[PROOFSTEP]\nlinarith\n[GOAL]\nx y : Localization.Away 2\n⊢ ∀ (x y : ℤ × { x // x ∈ Submonoid.powers 2 }),\n ZeroHom.toFun\n {\n toFun := fun x =>\n Localization.liftOn x (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)),\n map_zero' :=\n (_ :\n Localization.liftOn 0 (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)) =\n 0 • powHalf (Submonoid.log 1)) }\n (Localization.mk x.fst x.snd + Localization.mk y.fst y.snd) =\n ZeroHom.toFun\n {\n toFun := fun x =>\n Localization.liftOn x (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)),\n map_zero' :=\n (_ :\n Localization.liftOn 0 (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)) =\n 0 • powHalf (Submonoid.log 1)) }\n (Localization.mk x.fst x.snd) +\n ZeroHom.toFun\n {\n toFun := fun x =>\n Localization.liftOn x (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)),\n map_zero' :=\n (_ :\n Localization.liftOn 0 (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)) =\n 0 • powHalf (Submonoid.log 1)) }\n (Localization.mk y.fst y.snd)\n[PROOFSTEP]\nrintro ⟨a, ⟨b, ⟨b', rfl⟩⟩⟩ ⟨c, ⟨d, ⟨d', rfl⟩⟩⟩\n[GOAL]\ncase mk.mk.intro.mk.mk.intro\nx y : Localization.Away 2\na : ℤ\nb' : ℕ\nc : ℤ\nd' : ℕ\n⊢ ZeroHom.toFun\n {\n toFun := fun x =>\n Localization.liftOn x (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)),\n map_zero' :=\n (_ :\n Localization.liftOn 0 (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)) =\n 0 • powHalf (Submonoid.log 1)) }\n (Localization.mk\n (a,\n { val := (fun x x_1 => x ^ x_1) 2 b',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 b') }).fst\n (a,\n { val := (fun x x_1 => x ^ x_1) 2 b',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 b') }).snd +\n Localization.mk\n (c,\n { val := (fun x x_1 => x ^ x_1) 2 d',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 d') }).fst\n (c,\n { val := (fun x x_1 => x ^ x_1) 2 d',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 d') }).snd) =\n ZeroHom.toFun\n {\n toFun := fun x =>\n Localization.liftOn x (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)),\n map_zero' :=\n (_ :\n Localization.liftOn 0 (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)) =\n 0 • powHalf (Submonoid.log 1)) }\n (Localization.mk\n (a,\n { val := (fun x x_1 => x ^ x_1) 2 b',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 b') }).fst\n (a,\n { val := (fun x x_1 => x ^ x_1) 2 b',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 b') }).snd) +\n ZeroHom.toFun\n {\n toFun := fun x =>\n Localization.liftOn x (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)),\n map_zero' :=\n (_ :\n Localization.liftOn 0 (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)) =\n 0 • powHalf (Submonoid.log 1)) }\n (Localization.mk\n (c,\n { val := (fun x x_1 => x ^ x_1) 2 d',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 d') }).fst\n (c,\n { val := (fun x x_1 => x ^ x_1) 2 d',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 d') }).snd)\n[PROOFSTEP]\nhave h₂ : 1 < (2 : ℤ).natAbs := one_lt_two\n[GOAL]\ncase mk.mk.intro.mk.mk.intro\nx y : Localization.Away 2\na : ℤ\nb' : ℕ\nc : ℤ\nd' : ℕ\nh₂ : 1 < Int.natAbs 2\n⊢ ZeroHom.toFun\n {\n toFun := fun x =>\n Localization.liftOn x (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)),\n map_zero' :=\n (_ :\n Localization.liftOn 0 (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)) =\n 0 • powHalf (Submonoid.log 1)) }\n (Localization.mk\n (a,\n { val := (fun x x_1 => x ^ x_1) 2 b',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 b') }).fst\n (a,\n { val := (fun x x_1 => x ^ x_1) 2 b',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 b') }).snd +\n Localization.mk\n (c,\n { val := (fun x x_1 => x ^ x_1) 2 d',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 d') }).fst\n (c,\n { val := (fun x x_1 => x ^ x_1) 2 d',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 d') }).snd) =\n ZeroHom.toFun\n {\n toFun := fun x =>\n Localization.liftOn x (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)),\n map_zero' :=\n (_ :\n Localization.liftOn 0 (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)) =\n 0 • powHalf (Submonoid.log 1)) }\n (Localization.mk\n (a,\n { val := (fun x x_1 => x ^ x_1) 2 b',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 b') }).fst\n (a,\n { val := (fun x x_1 => x ^ x_1) 2 b',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 b') }).snd) +\n ZeroHom.toFun\n {\n toFun := fun x =>\n Localization.liftOn x (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)),\n map_zero' :=\n (_ :\n Localization.liftOn 0 (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)) =\n 0 • powHalf (Submonoid.log 1)) }\n (Localization.mk\n (c,\n { val := (fun x x_1 => x ^ x_1) 2 d',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 d') }).fst\n (c,\n { val := (fun x x_1 => x ^ x_1) 2 d',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 d') }).snd)\n[PROOFSTEP]\nhave hpow₂ := Submonoid.log_pow_int_eq_self h₂\n[GOAL]\ncase mk.mk.intro.mk.mk.intro\nx y : Localization.Away 2\na : ℤ\nb' : ℕ\nc : ℤ\nd' : ℕ\nh₂ : 1 < Int.natAbs 2\nhpow₂ : ∀ (m : ℕ), Submonoid.log (Submonoid.pow 2 m) = m\n⊢ ZeroHom.toFun\n {\n toFun := fun x =>\n Localization.liftOn x (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)),\n map_zero' :=\n (_ :\n Localization.liftOn 0 (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)) =\n 0 • powHalf (Submonoid.log 1)) }\n (Localization.mk\n (a,\n { val := (fun x x_1 => x ^ x_1) 2 b',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 b') }).fst\n (a,\n { val := (fun x x_1 => x ^ x_1) 2 b',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 b') }).snd +\n Localization.mk\n (c,\n { val := (fun x x_1 => x ^ x_1) 2 d',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 d') }).fst\n (c,\n { val := (fun x x_1 => x ^ x_1) 2 d',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 d') }).snd) =\n ZeroHom.toFun\n {\n toFun := fun x =>\n Localization.liftOn x (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)),\n map_zero' :=\n (_ :\n Localization.liftOn 0 (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)) =\n 0 • powHalf (Submonoid.log 1)) }\n (Localization.mk\n (a,\n { val := (fun x x_1 => x ^ x_1) 2 b',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 b') }).fst\n (a,\n { val := (fun x x_1 => x ^ x_1) 2 b',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 b') }).snd) +\n ZeroHom.toFun\n {\n toFun := fun x =>\n Localization.liftOn x (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)),\n map_zero' :=\n (_ :\n Localization.liftOn 0 (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)) =\n 0 • powHalf (Submonoid.log 1)) }\n (Localization.mk\n (c,\n { val := (fun x x_1 => x ^ x_1) 2 d',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 d') }).fst\n (c,\n { val := (fun x x_1 => x ^ x_1) 2 d',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 d') }).snd)\n[PROOFSTEP]\nsimp_rw [Submonoid.pow_apply] at hpow₂ \n[GOAL]\ncase mk.mk.intro.mk.mk.intro\nx y : Localization.Away 2\na : ℤ\nb' : ℕ\nc : ℤ\nd' : ℕ\nh₂ : 1 < Int.natAbs 2\nhpow₂ : ∀ (m : ℕ), Submonoid.log { val := 2 ^ m, property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = 2 ^ m) } = m\n⊢ ZeroHom.toFun\n {\n toFun := fun x =>\n Localization.liftOn x (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)),\n map_zero' :=\n (_ :\n Localization.liftOn 0 (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)) =\n 0 • powHalf (Submonoid.log 1)) }\n (Localization.mk\n (a,\n { val := (fun x x_1 => x ^ x_1) 2 b',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 b') }).fst\n (a,\n { val := (fun x x_1 => x ^ x_1) 2 b',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 b') }).snd +\n Localization.mk\n (c,\n { val := (fun x x_1 => x ^ x_1) 2 d',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 d') }).fst\n (c,\n { val := (fun x x_1 => x ^ x_1) 2 d',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 d') }).snd) =\n ZeroHom.toFun\n {\n toFun := fun x =>\n Localization.liftOn x (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)),\n map_zero' :=\n (_ :\n Localization.liftOn 0 (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)) =\n 0 • powHalf (Submonoid.log 1)) }\n (Localization.mk\n (a,\n { val := (fun x x_1 => x ^ x_1) 2 b',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 b') }).fst\n (a,\n { val := (fun x x_1 => x ^ x_1) 2 b',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 b') }).snd) +\n ZeroHom.toFun\n {\n toFun := fun x =>\n Localization.liftOn x (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)),\n map_zero' :=\n (_ :\n Localization.liftOn 0 (fun x y => x • powHalf (Submonoid.log y))\n (_ :\n ∀ {m₁ m₂ : ℤ} {n₁ n₂ : { x // x ∈ Submonoid.powers 2 }},\n ↑(Localization.r (Submonoid.powers 2)) (m₁, n₁) (m₂, n₂) →\n m₁ • powHalf (Submonoid.log n₁) = m₂ • powHalf (Submonoid.log n₂)) =\n 0 • powHalf (Submonoid.log 1)) }\n (Localization.mk\n (c,\n { val := (fun x x_1 => x ^ x_1) 2 d',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 d') }).fst\n (c,\n { val := (fun x x_1 => x ^ x_1) 2 d',\n property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = (fun x x_1 => x ^ x_1) 2 d') }).snd)\n[PROOFSTEP]\nsimp_rw [Localization.add_mk, Localization.liftOn_mk, Submonoid.log_mul (Int.pow_right_injective h₂), hpow₂]\n[GOAL]\ncase mk.mk.intro.mk.mk.intro\nx y : Localization.Away 2\na : ℤ\nb' : ℕ\nc : ℤ\nd' : ℕ\nh₂ : 1 < Int.natAbs 2\nhpow₂ : ∀ (m : ℕ), Submonoid.log { val := 2 ^ m, property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = 2 ^ m) } = m\n⊢ (2 ^ b' * c + 2 ^ d' * a) • powHalf (b' + d') = a • powHalf b' + c • powHalf d'\n[PROOFSTEP]\ncalc\n (2 ^ b' * c + 2 ^ d' * a) • powHalf (b' + d') = (c * 2 ^ b') • powHalf (b' + d') + (a * 2 ^ d') • powHalf (d' + b') :=\n by simp only [add_smul, mul_comm, add_comm]\n _ = c • powHalf d' + a • powHalf b' := by simp only [zsmul_pow_two_powHalf]\n _ = a • powHalf b' + c • powHalf d' := add_comm _ _\n[GOAL]\nx y : Localization.Away 2\na : ℤ\nb' : ℕ\nc : ℤ\nd' : ℕ\nh₂ : 1 < Int.natAbs 2\nhpow₂ : ∀ (m : ℕ), Submonoid.log { val := 2 ^ m, property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = 2 ^ m) } = m\n⊢ (2 ^ b' * c + 2 ^ d' * a) • powHalf (b' + d') = (c * 2 ^ b') • powHalf (b' + d') + (a * 2 ^ d') • powHalf (d' + b')\n[PROOFSTEP]\nsimp only [add_smul, mul_comm, add_comm]\n[GOAL]\nx y : Localization.Away 2\na : ℤ\nb' : ℕ\nc : ℤ\nd' : ℕ\nh₂ : 1 < Int.natAbs 2\nhpow₂ : ∀ (m : ℕ), Submonoid.log { val := 2 ^ m, property := (_ : ∃ y, (fun x x_1 => x ^ x_1) 2 y = 2 ^ m) } = m\n⊢ (c * 2 ^ b') • powHalf (b' + d') + (a * 2 ^ d') • powHalf (d' + b') = c • powHalf d' + a • powHalf b'\n[PROOFSTEP]\nsimp only [zsmul_pow_two_powHalf]\n[GOAL]\nm : ℤ\np : { x // x ∈ Submonoid.powers 2 }\n⊢ ↑dyadicMap (IsLocalization.mk' (Localization (Submonoid.powers 2)) m p) = m • powHalf (Submonoid.log p)\n[PROOFSTEP]\nrw [← Localization.mk_eq_mk']\n[GOAL]\nm : ℤ\np : { x // x ∈ Submonoid.powers 2 }\n⊢ ↑dyadicMap (Localization.mk m p) = m • powHalf (Submonoid.log p)\n[PROOFSTEP]\nrfl\n[GOAL]\nm : ℤ\nn : ℕ\n⊢ ↑dyadicMap (IsLocalization.mk' (Localization (Submonoid.powers 2)) m (Submonoid.pow 2 n)) = m • powHalf n\n[PROOFSTEP]\nrw [dyadicMap_apply, @Submonoid.log_pow_int_eq_self 2 one_lt_two]\n[GOAL]\nm : ℤ\nn : ℕ\n⊢ m • powHalf (Submonoid.log (Submonoid.pow 2 n)) = m • powHalf n\n[PROOFSTEP]\nrw [@Submonoid.log_pow_int_eq_self 2 one_lt_two]\n", "meta": {"mathlib_filename": "Mathlib.SetTheory.Surreal.Dyadic", "llama_tokens": 20181, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.857768108626046, "lm_q2_score": 0.6548947155710233, "lm_q1q2_score": 0.5617478015245491}} {"text": "[GOAL]\n⊢ ∀ {X' X : Type u} {Y : AddCommGroupCat} (f : X' ⟶ X) (g : X ⟶ (forget AddCommGroupCat).obj Y),\n ↑((fun X G => FreeAbelianGroup.lift.symm) X' Y).symm (f ≫ g) =\n free.map f ≫ ↑((fun X G => FreeAbelianGroup.lift.symm) X Y).symm g\n[PROOFSTEP]\nintros\n[GOAL]\nX'✝ X✝ : Type u\nY✝ : AddCommGroupCat\nf✝ : X'✝ ⟶ X✝\ng✝ : X✝ ⟶ (forget AddCommGroupCat).obj Y✝\n⊢ ↑((fun X G => FreeAbelianGroup.lift.symm) X'✝ Y✝).symm (f✝ ≫ g✝) =\n free.map f✝ ≫ ↑((fun X G => FreeAbelianGroup.lift.symm) X✝ Y✝).symm g✝\n[PROOFSTEP]\next\n[GOAL]\ncase w\nX'✝ X✝ : Type u\nY✝ : AddCommGroupCat\nf✝ : X'✝ ⟶ X✝\ng✝ : X✝ ⟶ (forget AddCommGroupCat).obj Y✝\nx✝ : ↑(free.obj X'✝)\n⊢ ↑(↑((fun X G => FreeAbelianGroup.lift.symm) X'✝ Y✝).symm (f✝ ≫ g✝)) x✝ =\n ↑(free.map f✝ ≫ ↑((fun X G => FreeAbelianGroup.lift.symm) X✝ Y✝).symm g✝) x✝\n[PROOFSTEP]\nsimp only [Equiv.symm_symm]\n[GOAL]\ncase w\nX'✝ X✝ : Type u\nY✝ : AddCommGroupCat\nf✝ : X'✝ ⟶ X✝\ng✝ : X✝ ⟶ (forget AddCommGroupCat).obj Y✝\nx✝ : ↑(free.obj X'✝)\n⊢ ↑(↑FreeAbelianGroup.lift (f✝ ≫ g✝)) x✝ = ↑(free.map f✝ ≫ ↑FreeAbelianGroup.lift g✝) x✝\n[PROOFSTEP]\napply FreeAbelianGroup.lift_comp\n[GOAL]\n⊢ ∀ (X : Type u),\n { obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.map (𝟙 X) =\n 𝟙 ({ obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.obj X)\n[PROOFSTEP]\nintros\n[GOAL]\nX✝ : Type u\n⊢ { obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.map (𝟙 X✝) =\n 𝟙 ({ obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.obj X✝)\n[PROOFSTEP]\next1\n[GOAL]\ncase w\nX✝ : Type u\nx✝ : ↑({ obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.obj X✝)\n⊢ ↑({ obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.map (𝟙 X✝)) x✝ =\n ↑(𝟙 ({ obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.obj X✝)) x✝\n[PROOFSTEP]\nrw [← FreeGroup.map.unique]\n[GOAL]\ncase w.hg\nX✝ : Type u\nx✝ : ↑({ obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.obj X✝)\n⊢ ∀ (x : X✝),\n ↑(𝟙 ({ obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.obj X✝)) (FreeGroup.of x) =\n FreeGroup.of (𝟙 X✝ x)\n[PROOFSTEP]\nintros\n[GOAL]\ncase w.hg\nX✝ : Type u\nx✝¹ : ↑({ obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.obj X✝)\nx✝ : X✝\n⊢ ↑(𝟙 ({ obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.obj X✝)) (FreeGroup.of x✝) =\n FreeGroup.of (𝟙 X✝ x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ∀ {X Y Z : Type u} (f : X ⟶ Y) (g : Y ⟶ Z),\n { obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.map (f ≫ g) =\n { obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.map f ≫\n { obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.map g\n[PROOFSTEP]\nintros\n[GOAL]\nX✝ Y✝ Z✝ : Type u\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\n⊢ { obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.map (f✝ ≫ g✝) =\n { obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.map f✝ ≫\n { obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.map g✝\n[PROOFSTEP]\next1\n[GOAL]\ncase w\nX✝ Y✝ Z✝ : Type u\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\nx✝ : ↑({ obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.obj X✝)\n⊢ ↑({ obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.map (f✝ ≫ g✝)) x✝ =\n ↑({ obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.map f✝ ≫\n { obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.map g✝)\n x✝\n[PROOFSTEP]\nrw [← FreeGroup.map.unique]\n[GOAL]\ncase w.hg\nX✝ Y✝ Z✝ : Type u\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\nx✝ : ↑({ obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.obj X✝)\n⊢ ∀ (x : X✝),\n ↑({ obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.map f✝ ≫\n { obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.map g✝)\n (FreeGroup.of x) =\n FreeGroup.of ((f✝ ≫ g✝) x)\n[PROOFSTEP]\nintros\n[GOAL]\ncase w.hg\nX✝ Y✝ Z✝ : Type u\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\nx✝¹ : ↑({ obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.obj X✝)\nx✝ : X✝\n⊢ ↑({ obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.map f✝ ≫\n { obj := fun α => of (FreeGroup α), map := fun {X Y} => FreeGroup.map }.map g✝)\n (FreeGroup.of x✝) =\n FreeGroup.of ((f✝ ≫ g✝) x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ∀ {X' X : Type u} {Y : GroupCat} (f : X' ⟶ X) (g : X ⟶ (forget GroupCat).obj Y),\n ↑((fun X G => FreeGroup.lift.symm) X' Y).symm (f ≫ g) = free.map f ≫ ↑((fun X G => FreeGroup.lift.symm) X Y).symm g\n[PROOFSTEP]\nintros\n[GOAL]\nX'✝ X✝ : Type u\nY✝ : GroupCat\nf✝ : X'✝ ⟶ X✝\ng✝ : X✝ ⟶ (forget GroupCat).obj Y✝\n⊢ ↑((fun X G => FreeGroup.lift.symm) X'✝ Y✝).symm (f✝ ≫ g✝) =\n free.map f✝ ≫ ↑((fun X G => FreeGroup.lift.symm) X✝ Y✝).symm g✝\n[PROOFSTEP]\next1\n[GOAL]\ncase w\nX'✝ X✝ : Type u\nY✝ : GroupCat\nf✝ : X'✝ ⟶ X✝\ng✝ : X✝ ⟶ (forget GroupCat).obj Y✝\nx✝ : ↑(free.obj X'✝)\n⊢ ↑(↑((fun X G => FreeGroup.lift.symm) X'✝ Y✝).symm (f✝ ≫ g✝)) x✝ =\n ↑(free.map f✝ ≫ ↑((fun X G => FreeGroup.lift.symm) X✝ Y✝).symm g✝) x✝\n[PROOFSTEP]\nsimp only [Equiv.symm_symm]\n[GOAL]\ncase w\nX'✝ X✝ : Type u\nY✝ : GroupCat\nf✝ : X'✝ ⟶ X✝\ng✝ : X✝ ⟶ (forget GroupCat).obj Y✝\nx✝ : ↑(free.obj X'✝)\n⊢ ↑(↑FreeGroup.lift (f✝ ≫ g✝)) x✝ = ↑(free.map f✝ ≫ ↑FreeGroup.lift g✝) x✝\n[PROOFSTEP]\napply Eq.symm\n[GOAL]\ncase w.h\nX'✝ X✝ : Type u\nY✝ : GroupCat\nf✝ : X'✝ ⟶ X✝\ng✝ : X✝ ⟶ (forget GroupCat).obj Y✝\nx✝ : ↑(free.obj X'✝)\n⊢ ↑(free.map f✝ ≫ ↑FreeGroup.lift g✝) x✝ = ↑(↑FreeGroup.lift (f✝ ≫ g✝)) x✝\n[PROOFSTEP]\napply FreeGroup.lift.unique\n[GOAL]\ncase w.h.hg\nX'✝ X✝ : Type u\nY✝ : GroupCat\nf✝ : X'✝ ⟶ X✝\ng✝ : X✝ ⟶ (forget GroupCat).obj Y✝\nx✝ : ↑(free.obj X'✝)\n⊢ ∀ (x : X'✝), ↑(free.map f✝ ≫ ↑FreeGroup.lift g✝) (FreeGroup.of x) = (f✝ ≫ g✝) x\n[PROOFSTEP]\nintros\n[GOAL]\ncase w.h.hg\nX'✝ X✝ : Type u\nY✝ : GroupCat\nf✝ : X'✝ ⟶ X✝\ng✝ : X✝ ⟶ (forget GroupCat).obj Y✝\nx✝¹ : ↑(free.obj X'✝)\nx✝ : X'✝\n⊢ ↑(free.map f✝ ≫ ↑FreeGroup.lift g✝) (FreeGroup.of x✝) = (f✝ ≫ g✝) x✝\n[PROOFSTEP]\napply FreeGroup.lift.of\n[GOAL]\nG : GroupCat\n⊢ CommGroup (Abelianization ↑G)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX✝ Y✝ : GroupCat\nf : X✝ ⟶ Y✝\n⊢ (fun x => ↑Abelianization.of (↑f x)) 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nX✝ Y✝ : GroupCat\nf : X✝ ⟶ Y✝\n⊢ ∀ (x y : ↑X✝),\n OneHom.toFun { toFun := fun x => ↑Abelianization.of (↑f x), map_one' := (_ : ↑Abelianization.of (↑f 1) = 1) }\n (x * y) =\n OneHom.toFun { toFun := fun x => ↑Abelianization.of (↑f x), map_one' := (_ : ↑Abelianization.of (↑f 1) = 1) } x *\n OneHom.toFun { toFun := fun x => ↑Abelianization.of (↑f x), map_one' := (_ : ↑Abelianization.of (↑f 1) = 1) } y\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ ∀ (X : GroupCat),\n { obj := fun G => Bundled.mk (Abelianization ↑G),\n map := fun {X Y} f =>\n ↑Abelianization.lift\n {\n toOneHom :=\n { toFun := fun x => ↑Abelianization.of (↑f x), map_one' := (_ : ↑Abelianization.of (↑f 1) = 1) },\n map_mul' :=\n (_ :\n ∀ (a a_1 : ↑X),\n ↑Abelianization.of (↑f (a * a_1)) =\n ↑Abelianization.of (↑f a) * ↑Abelianization.of (↑f a_1)) } }.map\n (𝟙 X) =\n 𝟙\n ({ obj := fun G => Bundled.mk (Abelianization ↑G),\n map := fun {X Y} f =>\n ↑Abelianization.lift\n {\n toOneHom :=\n { toFun := fun x => ↑Abelianization.of (↑f x), map_one' := (_ : ↑Abelianization.of (↑f 1) = 1) },\n map_mul' :=\n (_ :\n ∀ (a a_1 : ↑X),\n ↑Abelianization.of (↑f (a * a_1)) =\n ↑Abelianization.of (↑f a) * ↑Abelianization.of (↑f a_1)) } }.obj\n X)\n[PROOFSTEP]\nintros\n[GOAL]\nX✝ : GroupCat\n⊢ { obj := fun G => Bundled.mk (Abelianization ↑G),\n map := fun {X Y} f =>\n ↑Abelianization.lift\n {\n toOneHom :=\n { toFun := fun x => ↑Abelianization.of (↑f x), map_one' := (_ : ↑Abelianization.of (↑f 1) = 1) },\n map_mul' :=\n (_ :\n ∀ (a a_1 : ↑X),\n ↑Abelianization.of (↑f (a * a_1)) =\n ↑Abelianization.of (↑f a) * ↑Abelianization.of (↑f a_1)) } }.map\n (𝟙 X✝) =\n 𝟙\n ({ obj := fun G => Bundled.mk (Abelianization ↑G),\n map := fun {X Y} f =>\n ↑Abelianization.lift\n {\n toOneHom :=\n { toFun := fun x => ↑Abelianization.of (↑f x), map_one' := (_ : ↑Abelianization.of (↑f 1) = 1) },\n map_mul' :=\n (_ :\n ∀ (a a_1 : ↑X),\n ↑Abelianization.of (↑f (a * a_1)) =\n ↑Abelianization.of (↑f a) * ↑Abelianization.of (↑f a_1)) } }.obj\n X✝)\n[PROOFSTEP]\nsimp only [MonoidHom.mk_coe, coe_id]\n[GOAL]\nX✝ : GroupCat\n⊢ ↑Abelianization.lift\n {\n toOneHom :=\n { toFun := fun x => ↑Abelianization.of (↑(𝟙 X✝) x), map_one' := (_ : ↑Abelianization.of (↑(𝟙 X✝) 1) = 1) },\n map_mul' :=\n (_ :\n ∀ (a a_1 : ↑X✝),\n ↑Abelianization.of (↑(𝟙 X✝) (a * a_1)) =\n ↑Abelianization.of (↑(𝟙 X✝) a) * ↑Abelianization.of (↑(𝟙 X✝) a_1)) } =\n 𝟙 (Bundled.mk (Abelianization ↑X✝))\n[PROOFSTEP]\napply (Equiv.apply_eq_iff_eq_symm_apply Abelianization.lift).mpr\n[GOAL]\nX✝ : GroupCat\n⊢ {\n toOneHom :=\n { toFun := fun x => ↑Abelianization.of (↑(𝟙 X✝) x), map_one' := (_ : ↑Abelianization.of (↑(𝟙 X✝) 1) = 1) },\n map_mul' :=\n (_ :\n ∀ (a a_1 : ↑X✝),\n ↑Abelianization.of (↑(𝟙 X✝) (a * a_1)) =\n ↑Abelianization.of (↑(𝟙 X✝) a) * ↑Abelianization.of (↑(𝟙 X✝) a_1)) } =\n ↑Abelianization.lift.symm (𝟙 (Bundled.mk (Abelianization ↑X✝)))\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ∀ {X Y Z : GroupCat} (f : X ⟶ Y) (g : Y ⟶ Z),\n { obj := fun G => Bundled.mk (Abelianization ↑G),\n map := fun {X Y} f =>\n ↑Abelianization.lift\n {\n toOneHom :=\n { toFun := fun x => ↑Abelianization.of (↑f x), map_one' := (_ : ↑Abelianization.of (↑f 1) = 1) },\n map_mul' :=\n (_ :\n ∀ (a a_1 : ↑X),\n ↑Abelianization.of (↑f (a * a_1)) =\n ↑Abelianization.of (↑f a) * ↑Abelianization.of (↑f a_1)) } }.map\n (f ≫ g) =\n { obj := fun G => Bundled.mk (Abelianization ↑G),\n map := fun {X Y} f =>\n ↑Abelianization.lift\n {\n toOneHom :=\n { toFun := fun x => ↑Abelianization.of (↑f x), map_one' := (_ : ↑Abelianization.of (↑f 1) = 1) },\n map_mul' :=\n (_ :\n ∀ (a a_1 : ↑X),\n ↑Abelianization.of (↑f (a * a_1)) =\n ↑Abelianization.of (↑f a) * ↑Abelianization.of (↑f a_1)) } }.map\n f ≫\n { obj := fun G => Bundled.mk (Abelianization ↑G),\n map := fun {X Y} f =>\n ↑Abelianization.lift\n {\n toOneHom :=\n { toFun := fun x => ↑Abelianization.of (↑f x), map_one' := (_ : ↑Abelianization.of (↑f 1) = 1) },\n map_mul' :=\n (_ :\n ∀ (a a_1 : ↑X),\n ↑Abelianization.of (↑f (a * a_1)) =\n ↑Abelianization.of (↑f a) * ↑Abelianization.of (↑f a_1)) } }.map\n g\n[PROOFSTEP]\nintros\n[GOAL]\nX✝ Y✝ Z✝ : GroupCat\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\n⊢ { obj := fun G => Bundled.mk (Abelianization ↑G),\n map := fun {X Y} f =>\n ↑Abelianization.lift\n {\n toOneHom :=\n { toFun := fun x => ↑Abelianization.of (↑f x), map_one' := (_ : ↑Abelianization.of (↑f 1) = 1) },\n map_mul' :=\n (_ :\n ∀ (a a_1 : ↑X),\n ↑Abelianization.of (↑f (a * a_1)) =\n ↑Abelianization.of (↑f a) * ↑Abelianization.of (↑f a_1)) } }.map\n (f✝ ≫ g✝) =\n { obj := fun G => Bundled.mk (Abelianization ↑G),\n map := fun {X Y} f =>\n ↑Abelianization.lift\n {\n toOneHom :=\n { toFun := fun x => ↑Abelianization.of (↑f x), map_one' := (_ : ↑Abelianization.of (↑f 1) = 1) },\n map_mul' :=\n (_ :\n ∀ (a a_1 : ↑X),\n ↑Abelianization.of (↑f (a * a_1)) =\n ↑Abelianization.of (↑f a) * ↑Abelianization.of (↑f a_1)) } }.map\n f✝ ≫\n { obj := fun G => Bundled.mk (Abelianization ↑G),\n map := fun {X Y} f =>\n ↑Abelianization.lift\n {\n toOneHom :=\n { toFun := fun x => ↑Abelianization.of (↑f x), map_one' := (_ : ↑Abelianization.of (↑f 1) = 1) },\n map_mul' :=\n (_ :\n ∀ (a a_1 : ↑X),\n ↑Abelianization.of (↑f (a * a_1)) =\n ↑Abelianization.of (↑f a) * ↑Abelianization.of (↑f a_1)) } }.map\n g✝\n[PROOFSTEP]\nsimp only [coe_comp]\n[GOAL]\nX✝ Y✝ Z✝ : GroupCat\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\n⊢ ↑Abelianization.lift\n {\n toOneHom :=\n { toFun := fun x => ↑Abelianization.of (↑(f✝ ≫ g✝) x),\n map_one' := (_ : ↑Abelianization.of (↑(f✝ ≫ g✝) 1) = 1) },\n map_mul' :=\n (_ :\n ∀ (a a_1 : ↑X✝),\n ↑Abelianization.of (↑(f✝ ≫ g✝) (a * a_1)) =\n ↑Abelianization.of (↑(f✝ ≫ g✝) a) * ↑Abelianization.of (↑(f✝ ≫ g✝) a_1)) } =\n ↑Abelianization.lift\n {\n toOneHom :=\n { toFun := fun x => ↑Abelianization.of (↑f✝ x), map_one' := (_ : ↑Abelianization.of (↑f✝ 1) = 1) },\n map_mul' :=\n (_ :\n ∀ (a a_1 : ↑X✝),\n ↑Abelianization.of (↑f✝ (a * a_1)) = ↑Abelianization.of (↑f✝ a) * ↑Abelianization.of (↑f✝ a_1)) } ≫\n ↑Abelianization.lift\n {\n toOneHom :=\n { toFun := fun x => ↑Abelianization.of (↑g✝ x), map_one' := (_ : ↑Abelianization.of (↑g✝ 1) = 1) },\n map_mul' :=\n (_ :\n ∀ (a a_1 : ↑Y✝),\n ↑Abelianization.of (↑g✝ (a * a_1)) = ↑Abelianization.of (↑g✝ a) * ↑Abelianization.of (↑g✝ a_1)) }\n[PROOFSTEP]\napply (Equiv.apply_eq_iff_eq_symm_apply Abelianization.lift).mpr\n[GOAL]\nX✝ Y✝ Z✝ : GroupCat\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\n⊢ {\n toOneHom :=\n { toFun := fun x => ↑Abelianization.of (↑(f✝ ≫ g✝) x),\n map_one' := (_ : ↑Abelianization.of (↑(f✝ ≫ g✝) 1) = 1) },\n map_mul' :=\n (_ :\n ∀ (a a_1 : ↑X✝),\n ↑Abelianization.of (↑(f✝ ≫ g✝) (a * a_1)) =\n ↑Abelianization.of (↑(f✝ ≫ g✝) a) * ↑Abelianization.of (↑(f✝ ≫ g✝) a_1)) } =\n ↑Abelianization.lift.symm\n (↑Abelianization.lift\n {\n toOneHom :=\n { toFun := fun x => ↑Abelianization.of (↑f✝ x), map_one' := (_ : ↑Abelianization.of (↑f✝ 1) = 1) },\n map_mul' :=\n (_ :\n ∀ (a a_1 : ↑X✝),\n ↑Abelianization.of (↑f✝ (a * a_1)) = ↑Abelianization.of (↑f✝ a) * ↑Abelianization.of (↑f✝ a_1)) } ≫\n ↑Abelianization.lift\n {\n toOneHom :=\n { toFun := fun x => ↑Abelianization.of (↑g✝ x), map_one' := (_ : ↑Abelianization.of (↑g✝ 1) = 1) },\n map_mul' :=\n (_ :\n ∀ (a a_1 : ↑Y✝),\n ↑Abelianization.of (↑g✝ (a * a_1)) = ↑Abelianization.of (↑g✝ a) * ↑Abelianization.of (↑g✝ a_1)) })\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ∀ {X' X : GroupCat} {Y : CommGroupCat} (f : X' ⟶ X) (g : X ⟶ (forget₂ CommGroupCat GroupCat).obj Y),\n ↑((fun G A => Abelianization.lift.symm) X' Y).symm (f ≫ g) =\n abelianize.map f ≫ ↑((fun G A => Abelianization.lift.symm) X Y).symm g\n[PROOFSTEP]\nintros\n[GOAL]\nX'✝ X✝ : GroupCat\nY✝ : CommGroupCat\nf✝ : X'✝ ⟶ X✝\ng✝ : X✝ ⟶ (forget₂ CommGroupCat GroupCat).obj Y✝\n⊢ ↑((fun G A => Abelianization.lift.symm) X'✝ Y✝).symm (f✝ ≫ g✝) =\n abelianize.map f✝ ≫ ↑((fun G A => Abelianization.lift.symm) X✝ Y✝).symm g✝\n[PROOFSTEP]\next1\n[GOAL]\ncase w\nX'✝ X✝ : GroupCat\nY✝ : CommGroupCat\nf✝ : X'✝ ⟶ X✝\ng✝ : X✝ ⟶ (forget₂ CommGroupCat GroupCat).obj Y✝\nx✝ : ↑(abelianize.obj X'✝)\n⊢ ↑(↑((fun G A => Abelianization.lift.symm) X'✝ Y✝).symm (f✝ ≫ g✝)) x✝ =\n ↑(abelianize.map f✝ ≫ ↑((fun G A => Abelianization.lift.symm) X✝ Y✝).symm g✝) x✝\n[PROOFSTEP]\nsimp only [Equiv.symm_symm]\n[GOAL]\ncase w\nX'✝ X✝ : GroupCat\nY✝ : CommGroupCat\nf✝ : X'✝ ⟶ X✝\ng✝ : X✝ ⟶ (forget₂ CommGroupCat GroupCat).obj Y✝\nx✝ : ↑(abelianize.obj X'✝)\n⊢ ↑(↑Abelianization.lift (f✝ ≫ g✝)) x✝ = ↑(abelianize.map f✝ ≫ ↑Abelianization.lift g✝) x✝\n[PROOFSTEP]\napply Eq.symm\n[GOAL]\ncase w.h\nX'✝ X✝ : GroupCat\nY✝ : CommGroupCat\nf✝ : X'✝ ⟶ X✝\ng✝ : X✝ ⟶ (forget₂ CommGroupCat GroupCat).obj Y✝\nx✝ : ↑(abelianize.obj X'✝)\n⊢ ↑(abelianize.map f✝ ≫ ↑Abelianization.lift g✝) x✝ = ↑(↑Abelianization.lift (f✝ ≫ g✝)) x✝\n[PROOFSTEP]\napply Abelianization.lift.unique\n[GOAL]\ncase w.h.hφ\nX'✝ X✝ : GroupCat\nY✝ : CommGroupCat\nf✝ : X'✝ ⟶ X✝\ng✝ : X✝ ⟶ (forget₂ CommGroupCat GroupCat).obj Y✝\nx✝ : ↑(abelianize.obj X'✝)\n⊢ ∀ (x : ↑X'✝), ↑(abelianize.map f✝ ≫ ↑Abelianization.lift g✝) (↑Abelianization.of x) = ↑(f✝ ≫ g✝) x\n[PROOFSTEP]\nintros\n[GOAL]\ncase w.h.hφ\nX'✝ X✝ : GroupCat\nY✝ : CommGroupCat\nf✝ : X'✝ ⟶ X✝\ng✝ : X✝ ⟶ (forget₂ CommGroupCat GroupCat).obj Y✝\nx✝¹ : ↑(abelianize.obj X'✝)\nx✝ : ↑X'✝\n⊢ ↑(abelianize.map f✝ ≫ ↑Abelianization.lift g✝) (↑Abelianization.of x✝) = ↑(f✝ ≫ g✝) x✝\n[PROOFSTEP]\napply Abelianization.lift.of\n[GOAL]\n⊢ ∀ ⦃X Y : MonCat⦄ (f : X ⟶ Y),\n (MonCat.units ⋙ forget₂ GroupCat MonCat).map f ≫ (fun X => Units.coeHom ↑X) Y =\n (fun X => Units.coeHom ↑X) X ≫ (𝟭 MonCat).map f\n[PROOFSTEP]\nintros\n[GOAL]\nX✝ Y✝ : MonCat\nf✝ : X✝ ⟶ Y✝\n⊢ (MonCat.units ⋙ forget₂ GroupCat MonCat).map f✝ ≫ (fun X => Units.coeHom ↑X) Y✝ =\n (fun X => Units.coeHom ↑X) X✝ ≫ (𝟭 MonCat).map f✝\n[PROOFSTEP]\nexact MonoidHom.ext fun x => rfl\n[GOAL]\n⊢ ∀ ⦃X Y : CommMonCat⦄ (f : X ⟶ Y),\n (CommMonCat.units ⋙ forget₂ CommGroupCat CommMonCat).map f ≫ (fun X => Units.coeHom ↑X) Y =\n (fun X => Units.coeHom ↑X) X ≫ (𝟭 CommMonCat).map f\n[PROOFSTEP]\nintros\n[GOAL]\nX✝ Y✝ : CommMonCat\nf✝ : X✝ ⟶ Y✝\n⊢ (CommMonCat.units ⋙ forget₂ CommGroupCat CommMonCat).map f✝ ≫ (fun X => Units.coeHom ↑X) Y✝ =\n (fun X => Units.coeHom ↑X) X✝ ≫ (𝟭 CommMonCat).map f✝\n[PROOFSTEP]\nexact MonoidHom.ext fun x => rfl\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.GroupCat.Adjunctions", "llama_tokens": 9173, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8397339756938818, "lm_q2_score": 0.6688802603710086, "lm_q1q2_score": 0.5616814803045058}} {"text": "[GOAL]\nk : Type u_1\nP₁ : Type u_2\nP₂ : Type u_3\nP₃ : Type u_4\nP₄ : Type u_5\nV₁ : Type u_6\nV₂ : Type u_7\nV₃ : Type u_8\nV₄ : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V₁\ninst✝¹⁰ : Module k V₁\ninst✝⁹ : AffineSpace V₁ P₁\ninst✝⁸ : AddCommGroup V₂\ninst✝⁷ : Module k V₂\ninst✝⁶ : AffineSpace V₂ P₂\ninst✝⁵ : AddCommGroup V₃\ninst✝⁴ : Module k V₃\ninst✝³ : AffineSpace V₃ P₃\ninst✝² : AddCommGroup V₄\ninst✝¹ : Module k V₄\ninst✝ : AffineSpace V₄ P₄\n⊢ Injective toAffineMap\n[PROOFSTEP]\nrintro ⟨e, el, h⟩ ⟨e', el', h'⟩ H\n[GOAL]\ncase mk.mk\nk : Type u_1\nP₁ : Type u_2\nP₂ : Type u_3\nP₃ : Type u_4\nP₄ : Type u_5\nV₁ : Type u_6\nV₂ : Type u_7\nV₃ : Type u_8\nV₄ : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V₁\ninst✝¹⁰ : Module k V₁\ninst✝⁹ : AffineSpace V₁ P₁\ninst✝⁸ : AddCommGroup V₂\ninst✝⁷ : Module k V₂\ninst✝⁶ : AffineSpace V₂ P₂\ninst✝⁵ : AddCommGroup V₃\ninst✝⁴ : Module k V₃\ninst✝³ : AffineSpace V₃ P₃\ninst✝² : AddCommGroup V₄\ninst✝¹ : Module k V₄\ninst✝ : AffineSpace V₄ P₄\ne : P₁ ≃ P₂\nel : V₁ ≃ₗ[k] V₂\nh : ∀ (p : P₁) (v : V₁), ↑e (v +ᵥ p) = ↑el v +ᵥ ↑e p\ne' : P₁ ≃ P₂\nel' : V₁ ≃ₗ[k] V₂\nh' : ∀ (p : P₁) (v : V₁), ↑e' (v +ᵥ p) = ↑el' v +ᵥ ↑e' p\nH : ↑{ toEquiv := e, linear := el, map_vadd' := h } = ↑{ toEquiv := e', linear := el', map_vadd' := h' }\n⊢ { toEquiv := e, linear := el, map_vadd' := h } = { toEquiv := e', linear := el', map_vadd' := h' }\n[PROOFSTEP]\nsimp only [(toAffineMap_mk), (AffineMap.mk.injEq), Equiv.coe_inj, LinearEquiv.toLinearMap_inj] at H \n[GOAL]\ncase mk.mk\nk : Type u_1\nP₁ : Type u_2\nP₂ : Type u_3\nP₃ : Type u_4\nP₄ : Type u_5\nV₁ : Type u_6\nV₂ : Type u_7\nV₃ : Type u_8\nV₄ : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V₁\ninst✝¹⁰ : Module k V₁\ninst✝⁹ : AffineSpace V₁ P₁\ninst✝⁸ : AddCommGroup V₂\ninst✝⁷ : Module k V₂\ninst✝⁶ : AffineSpace V₂ P₂\ninst✝⁵ : AddCommGroup V₃\ninst✝⁴ : Module k V₃\ninst✝³ : AffineSpace V₃ P₃\ninst✝² : AddCommGroup V₄\ninst✝¹ : Module k V₄\ninst✝ : AffineSpace V₄ P₄\ne : P₁ ≃ P₂\nel : V₁ ≃ₗ[k] V₂\nh : ∀ (p : P₁) (v : V₁), ↑e (v +ᵥ p) = ↑el v +ᵥ ↑e p\ne' : P₁ ≃ P₂\nel' : V₁ ≃ₗ[k] V₂\nh' : ∀ (p : P₁) (v : V₁), ↑e' (v +ᵥ p) = ↑el' v +ᵥ ↑e' p\nH : e = e' ∧ el = el'\n⊢ { toEquiv := e, linear := el, map_vadd' := h } = { toEquiv := e', linear := el', map_vadd' := h' }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_toEquiv\nk : Type u_1\nP₁ : Type u_2\nP₂ : Type u_3\nP₃ : Type u_4\nP₄ : Type u_5\nV₁ : Type u_6\nV₂ : Type u_7\nV₃ : Type u_8\nV₄ : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V₁\ninst✝¹⁰ : Module k V₁\ninst✝⁹ : AffineSpace V₁ P₁\ninst✝⁸ : AddCommGroup V₂\ninst✝⁷ : Module k V₂\ninst✝⁶ : AffineSpace V₂ P₂\ninst✝⁵ : AddCommGroup V₃\ninst✝⁴ : Module k V₃\ninst✝³ : AffineSpace V₃ P₃\ninst✝² : AddCommGroup V₄\ninst✝¹ : Module k V₄\ninst✝ : AffineSpace V₄ P₄\ne : P₁ ≃ P₂\nel : V₁ ≃ₗ[k] V₂\nh : ∀ (p : P₁) (v : V₁), ↑e (v +ᵥ p) = ↑el v +ᵥ ↑e p\ne' : P₁ ≃ P₂\nel' : V₁ ≃ₗ[k] V₂\nh' : ∀ (p : P₁) (v : V₁), ↑e' (v +ᵥ p) = ↑el' v +ᵥ ↑e' p\nH : e = e' ∧ el = el'\n⊢ e = e'\ncase mk.mk.e_linear\nk : Type u_1\nP₁ : Type u_2\nP₂ : Type u_3\nP₃ : Type u_4\nP₄ : Type u_5\nV₁ : Type u_6\nV₂ : Type u_7\nV₃ : Type u_8\nV₄ : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V₁\ninst✝¹⁰ : Module k V₁\ninst✝⁹ : AffineSpace V₁ P₁\ninst✝⁸ : AddCommGroup V₂\ninst✝⁷ : Module k V₂\ninst✝⁶ : AffineSpace V₂ P₂\ninst✝⁵ : AddCommGroup V₃\ninst✝⁴ : Module k V₃\ninst✝³ : AffineSpace V₃ P₃\ninst✝² : AddCommGroup V₄\ninst✝¹ : Module k V₄\ninst✝ : AffineSpace V₄ P₄\ne : P₁ ≃ P₂\nel : V₁ ≃ₗ[k] V₂\nh : ∀ (p : P₁) (v : V₁), ↑e (v +ᵥ p) = ↑el v +ᵥ ↑e p\ne' : P₁ ≃ P₂\nel' : V₁ ≃ₗ[k] V₂\nh' : ∀ (p : P₁) (v : V₁), ↑e' (v +ᵥ p) = ↑el' v +ᵥ ↑e' p\nH : e = e' ∧ el = el'\n⊢ el = el'\n[PROOFSTEP]\nexacts [H.1, H.2]\n[GOAL]\nk : Type u_1\nP₁ : Type u_2\nP₂ : Type u_3\nP₃ : Type u_4\nP₄ : Type u_5\nV₁ : Type u_6\nV₂ : Type u_7\nV₃ : Type u_8\nV₄ : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V₁\ninst✝¹⁰ : Module k V₁\ninst✝⁹ : AffineSpace V₁ P₁\ninst✝⁸ : AddCommGroup V₂\ninst✝⁷ : Module k V₂\ninst✝⁶ : AffineSpace V₂ P₂\ninst✝⁵ : AddCommGroup V₃\ninst✝⁴ : Module k V₃\ninst✝³ : AffineSpace V₃ P₃\ninst✝² : AddCommGroup V₄\ninst✝¹ : Module k V₄\ninst✝ : AffineSpace V₄ P₄\ne : P₁ → P₂\ne' : V₁ ≃ₗ[k] V₂\np : P₁\nh : ∀ (p' : P₁), e p' = ↑e' (p' -ᵥ p) +ᵥ e p\np' : P₁\n⊢ (fun q' => ↑(LinearEquiv.symm e') (q' -ᵥ e p) +ᵥ p) (e p') = p'\n[PROOFSTEP]\nsimp [h p', (vadd_vsub), (vsub_vadd)]\n -- Porting note: `simp` needs `()`\n[GOAL]\nk : Type u_1\nP₁ : Type u_2\nP₂ : Type u_3\nP₃ : Type u_4\nP₄ : Type u_5\nV₁ : Type u_6\nV₂ : Type u_7\nV₃ : Type u_8\nV₄ : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V₁\ninst✝¹⁰ : Module k V₁\ninst✝⁹ : AffineSpace V₁ P₁\ninst✝⁸ : AddCommGroup V₂\ninst✝⁷ : Module k V₂\ninst✝⁶ : AffineSpace V₂ P₂\ninst✝⁵ : AddCommGroup V₃\ninst✝⁴ : Module k V₃\ninst✝³ : AffineSpace V₃ P₃\ninst✝² : AddCommGroup V₄\ninst✝¹ : Module k V₄\ninst✝ : AffineSpace V₄ P₄\ne : P₁ → P₂\ne' : V₁ ≃ₗ[k] V₂\np : P₁\nh : ∀ (p' : P₁), e p' = ↑e' (p' -ᵥ p) +ᵥ e p\nq' : P₂\n⊢ e ((fun q' => ↑(LinearEquiv.symm e') (q' -ᵥ e p) +ᵥ p) q') = q'\n[PROOFSTEP]\nsimp [h (e'.symm (q' -ᵥ e p) +ᵥ p), (vadd_vsub), (vsub_vadd)]\n[GOAL]\nk : Type u_1\nP₁ : Type u_2\nP₂ : Type u_3\nP₃ : Type u_4\nP₄ : Type u_5\nV₁ : Type u_6\nV₂ : Type u_7\nV₃ : Type u_8\nV₄ : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V₁\ninst✝¹⁰ : Module k V₁\ninst✝⁹ : AffineSpace V₁ P₁\ninst✝⁸ : AddCommGroup V₂\ninst✝⁷ : Module k V₂\ninst✝⁶ : AffineSpace V₂ P₂\ninst✝⁵ : AddCommGroup V₃\ninst✝⁴ : Module k V₃\ninst✝³ : AffineSpace V₃ P₃\ninst✝² : AddCommGroup V₄\ninst✝¹ : Module k V₄\ninst✝ : AffineSpace V₄ P₄\ne : P₁ → P₂\ne' : V₁ ≃ₗ[k] V₂\np : P₁\nh : ∀ (p' : P₁), e p' = ↑e' (p' -ᵥ p) +ᵥ e p\np' : P₁\nv : V₁\n⊢ ↑{ toFun := e, invFun := fun q' => ↑(LinearEquiv.symm e') (q' -ᵥ e p) +ᵥ p,\n left_inv := (_ : ∀ (p' : P₁), ↑(LinearEquiv.symm e') (e p' -ᵥ e p) +ᵥ p = p'),\n right_inv := (_ : ∀ (q' : P₂), e (↑(LinearEquiv.symm e') (q' -ᵥ e p) +ᵥ p) = q') }\n (v +ᵥ p') =\n ↑e' v +ᵥ\n ↑{ toFun := e, invFun := fun q' => ↑(LinearEquiv.symm e') (q' -ᵥ e p) +ᵥ p,\n left_inv := (_ : ∀ (p' : P₁), ↑(LinearEquiv.symm e') (e p' -ᵥ e p) +ᵥ p = p'),\n right_inv := (_ : ∀ (q' : P₂), e (↑(LinearEquiv.symm e') (q' -ᵥ e p) +ᵥ p) = q') }\n p'\n[PROOFSTEP]\nsimp [h p', h (v +ᵥ p'), (vadd_vsub_assoc), (vadd_vadd)]\n[GOAL]\nk : Type u_1\nP₁ : Type u_2\nP₂ : Type u_3\nP₃ : Type u_4\nP₄ : Type u_5\nV₁ : Type u_6\nV₂ : Type u_7\nV₃ : Type u_8\nV₄ : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V₁\ninst✝¹⁰ : Module k V₁\ninst✝⁹ : AffineSpace V₁ P₁\ninst✝⁸ : AddCommGroup V₂\ninst✝⁷ : Module k V₂\ninst✝⁶ : AffineSpace V₂ P₂\ninst✝⁵ : AddCommGroup V₃\ninst✝⁴ : Module k V₃\ninst✝³ : AffineSpace V₃ P₃\ninst✝² : AddCommGroup V₄\ninst✝¹ : Module k V₄\ninst✝ : AffineSpace V₄ P₄\ne : P₁ ≃ᵃ[k] P₂\np : P₂\nv : V₂\n⊢ v +ᵥ p = ↑e.symm.symm (↑(LinearEquiv.symm e.linear) v +ᵥ ↑e.symm p)\n[PROOFSTEP]\nrw [Equiv.symm_symm, e.map_vadd' ((Equiv.symm e.toEquiv) p) ((LinearEquiv.symm e.linear) v),\n LinearEquiv.apply_symm_apply, Equiv.apply_symm_apply]\n[GOAL]\nk : Type u_1\nP₁ : Type u_2\nP₂ : Type u_3\nP₃ : Type u_4\nP₄ : Type u_5\nV₁ : Type u_6\nV₂ : Type u_7\nV₃ : Type u_8\nV₄ : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V₁\ninst✝¹⁰ : Module k V₁\ninst✝⁹ : AffineSpace V₁ P₁\ninst✝⁸ : AddCommGroup V₂\ninst✝⁷ : Module k V₂\ninst✝⁶ : AffineSpace V₂ P₂\ninst✝⁵ : AddCommGroup V₃\ninst✝⁴ : Module k V₃\ninst✝³ : AffineSpace V₃ P₃\ninst✝² : AddCommGroup V₄\ninst✝¹ : Module k V₄\ninst✝ : AffineSpace V₄ P₄\ne : P₁ ≃ᵃ[k] P₂\ne' : P₂ ≃ᵃ[k] P₃\np : P₁\nv : V₁\n⊢ ↑(e.trans e'.toEquiv) (v +ᵥ p) = ↑(LinearEquiv.trans e.linear e'.linear) v +ᵥ ↑(e.trans e'.toEquiv) p\n[PROOFSTEP]\nsimp only [LinearEquiv.trans_apply, (coe_toEquiv), (· ∘ ·), Equiv.coe_trans, (map_vadd)]\n[GOAL]\nk : Type u_1\nP₁ : Type u_2\nP₂ : Type u_3\nP₃ : Type u_4\nP₄ : Type u_5\nV₁ : Type u_6\nV₂ : Type u_7\nV₃ : Type u_8\nV₄ : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V₁\ninst✝¹⁰ : Module k V₁\ninst✝⁹ : AffineSpace V₁ P₁\ninst✝⁸ : AddCommGroup V₂\ninst✝⁷ : Module k V₂\ninst✝⁶ : AffineSpace V₂ P₂\ninst✝⁵ : AddCommGroup V₃\ninst✝⁴ : Module k V₃\ninst✝³ : AffineSpace V₃ P₃\ninst✝² : AddCommGroup V₄\ninst✝¹ : Module k V₄\ninst✝ : AffineSpace V₄ P₄\np p' : P₁\nv : V₁\n⊢ ↑(Equiv.constVSub p) (v +ᵥ p') = ↑(LinearEquiv.neg k) v +ᵥ ↑(Equiv.constVSub p) p'\n[PROOFSTEP]\nsimp [(Equiv.coe_constVSub), (vsub_vadd_eq_vsub_sub), neg_add_eq_sub]\n[GOAL]\nk : Type u_1\nP₁ : Type u_2\nP₂ : Type u_3\nP₃ : Type u_4\nP₄ : Type u_5\nV₁ : Type u_6\nV₂ : Type u_7\nV₃ : Type u_8\nV₄ : Type u_9\ninst✝¹³ : Ring k\ninst✝¹² : AddCommGroup V₁\ninst✝¹¹ : Module k V₁\ninst✝¹⁰ : AffineSpace V₁ P₁\ninst✝⁹ : AddCommGroup V₂\ninst✝⁸ : Module k V₂\ninst✝⁷ : AffineSpace V₂ P₂\ninst✝⁶ : AddCommGroup V₃\ninst✝⁵ : Module k V₃\ninst✝⁴ : AffineSpace V₃ P₃\ninst✝³ : AddCommGroup V₄\ninst✝² : Module k V₄\ninst✝¹ : AffineSpace V₄ P₄\ninst✝ : Invertible 2\nx y : V₁\nh : bit0 x = bit0 y\n⊢ x = y\n[PROOFSTEP]\nrwa [bit0, bit0, ← two_smul k x, ← two_smul k y, (isUnit_of_invertible (2 : k)).smul_left_cancel] at h \n[GOAL]\nk : Type u_1\nP₁ : Type u_2\nP₂ : Type u_3\nP₃ : Type u_4\nP₄ : Type u_5\nV₁ : Type u_6\nV₂ : Type u_7\nV₃ : Type u_8\nV₄ : Type u_9\ninst✝¹⁴ : Ring k\ninst✝¹³ : AddCommGroup V₁\ninst✝¹² : Module k V₁\ninst✝¹¹ : AffineSpace V₁ P₁\ninst✝¹⁰ : AddCommGroup V₂\ninst✝⁹ : Module k V₂\ninst✝⁸ : AffineSpace V₂ P₂\ninst✝⁷ : AddCommGroup V₃\ninst✝⁶ : Module k V₃\ninst✝⁵ : AffineSpace V₃ P₃\ninst✝⁴ : AddCommGroup V₄\ninst✝³ : Module k V₄\ninst✝² : AffineSpace V₄ P₄\nR' : Type u_10\ninst✝¹ : CommRing R'\ninst✝ : Module R' V₁\nc p : P₁\n⊢ ↑(homothety c (-1)) p = ↑(pointReflection R' c) p\n[PROOFSTEP]\nsimp [(homothety_apply), pointReflection_apply _, (neg_vsub_eq_vsub_rev)]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.AffineSpace.AffineEquiv", "llama_tokens": 5213, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8397339676722394, "lm_q2_score": 0.668880247169804, "lm_q1q2_score": 0.5616814638534877}} {"text": "[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : Type u_3\ns s₁ s₂ : Finset ι\nt t₁ t₂ : (i : ι) → Finset (α i)\n⊢ Finset.Nonempty (Finset.sigma s t) ↔ ∃ i, i ∈ s ∧ Finset.Nonempty (t i)\n[PROOFSTEP]\nsimp [Finset.Nonempty]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : Type u_3\ns s₁ s₂ : Finset ι\nt t₁ t₂ : (i : ι) → Finset (α i)\n⊢ Finset.sigma s t = ∅ ↔ ∀ (i : ι), i ∈ s → t i = ∅\n[PROOFSTEP]\nsimp only [← not_nonempty_iff_eq_empty, sigma_nonempty, not_exists, not_and]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : Type u_3\ns s₁ s₂ : Finset ι\nt t₁ t₂ : (i : ι) → Finset (α i)\n⊢ Set.PairwiseDisjoint ↑s fun i => map (Embedding.sigmaMk i) (t i)\n[PROOFSTEP]\nintro i _ j _ hij\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : Type u_3\ns s₁ s₂ : Finset ι\nt t₁ t₂ : (i : ι) → Finset (α i)\ni : ι\na✝¹ : i ∈ ↑s\nj : ι\na✝ : j ∈ ↑s\nhij : i ≠ j\n⊢ (_root_.Disjoint on fun i => map (Embedding.sigmaMk i) (t i)) i j\n[PROOFSTEP]\nrw [Function.onFun, disjoint_left]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : Type u_3\ns s₁ s₂ : Finset ι\nt t₁ t₂ : (i : ι) → Finset (α i)\ni : ι\na✝¹ : i ∈ ↑s\nj : ι\na✝ : j ∈ ↑s\nhij : i ≠ j\n⊢ ∀ ⦃a : (x : ι) × α x⦄, a ∈ map (Embedding.sigmaMk i) (t i) → ¬a ∈ map (Embedding.sigmaMk j) (t j)\n[PROOFSTEP]\nsimp_rw [mem_map, Function.Embedding.sigmaMk_apply]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : Type u_3\ns s₁ s₂ : Finset ι\nt t₁ t₂ : (i : ι) → Finset (α i)\ni : ι\na✝¹ : i ∈ ↑s\nj : ι\na✝ : j ∈ ↑s\nhij : i ≠ j\n⊢ ∀ ⦃a : (x : ι) × α x⦄,\n (∃ a_1, a_1 ∈ t i ∧ { fst := i, snd := a_1 } = a) → ¬∃ a_2, a_2 ∈ t j ∧ { fst := j, snd := a_2 } = a\n[PROOFSTEP]\nrintro _ ⟨y, _, rfl⟩ ⟨z, _, hz'⟩\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₂ : (i : ι) → Finset (α i)\ni : ι\na✝¹ : i ∈ ↑s\nj : ι\na✝ : j ∈ ↑s\nhij : i ≠ j\ny : α i\nleft✝¹ : y ∈ t i\nz : α j\nleft✝ : z ∈ t j\nhz' : { fst := j, snd := z } = { fst := i, snd := y }\n⊢ False\n[PROOFSTEP]\nexact hij (congr_arg Sigma.fst hz'.symm)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : Type u_3\ns✝ s₁ s₂ : Finset ι\nt✝ t₁ t₂ : (i : ι) → Finset (α i)\ninst✝ : DecidableEq ((i : ι) × α i)\ns : Finset ι\nt : (i : ι) → Finset (α i)\n⊢ Finset.sigma s t = Finset.biUnion s fun i => map (Embedding.sigmaMk i) (t i)\n[PROOFSTEP]\next ⟨x, y⟩\n[GOAL]\ncase a.mk\nι : Type u_1\nα : ι → Type u_2\nβ : Type u_3\ns✝ s₁ s₂ : Finset ι\nt✝ t₁ t₂ : (i : ι) → Finset (α i)\ninst✝ : DecidableEq ((i : ι) × α i)\ns : Finset ι\nt : (i : ι) → Finset (α i)\nx : ι\ny : α x\n⊢ { fst := x, snd := y } ∈ Finset.sigma s t ↔\n { fst := x, snd := y } ∈ Finset.biUnion s fun i => map (Embedding.sigmaMk i) (t i)\n[PROOFSTEP]\nsimp [and_left_comm]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : Type u_3\ns s₁ s₂ : Finset ι\nt t₁ t₂ : (i : ι) → Finset (α i)\nf : (i : ι) × α i → β\ninst✝¹ : SemilatticeSup β\ninst✝ : OrderBot β\n⊢ sup (Finset.sigma s t) f = sup s fun i => sup (t i) fun b => f { fst := i, snd := b }\n[PROOFSTEP]\nsimp only [le_antisymm_iff, Finset.sup_le_iff, mem_sigma, and_imp, Sigma.forall]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : Type u_3\ns s₁ s₂ : Finset ι\nt t₁ t₂ : (i : ι) → Finset (α i)\nf : (i : ι) × α i → β\ninst✝¹ : SemilatticeSup β\ninst✝ : OrderBot β\n⊢ (∀ (a : ι) (b : α a),\n a ∈ s → b ∈ t a → f { fst := a, snd := b } ≤ sup s fun i => sup (t i) fun b => f { fst := i, snd := b }) ∧\n ∀ (b : ι), b ∈ s → ∀ (b_1 : α b), b_1 ∈ t b → f { fst := b, snd := b_1 } ≤ sup (Finset.sigma s t) f\n[PROOFSTEP]\nexact\n ⟨fun i a hi ha => (le_sup hi).trans' <| le_sup (f := fun a => f ⟨i, a⟩) ha, fun i hi a ha =>\n le_sup <| mem_sigma.2 ⟨hi, ha⟩⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na : Sigma α\nb : Sigma β\nx : Sigma γ\n⊢ x ∈ sigmaLift f a b ↔ ∃ ha hb, x.snd ∈ f (ha ▸ a.snd) (hb ▸ b.snd)\n[PROOFSTEP]\nobtain ⟨⟨i, a⟩, j, b⟩ := a, b\n[GOAL]\ncase mk.mk\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\nx : Sigma γ\ni : ι\na : α i\nj : ι\nb : β j\n⊢ x ∈ sigmaLift f { fst := i, snd := a } { fst := j, snd := b } ↔\n ∃ ha hb, x.snd ∈ f (ha ▸ { fst := i, snd := a }.snd) (hb ▸ { fst := j, snd := b }.snd)\n[PROOFSTEP]\nobtain rfl | h := Decidable.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\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\nx : Sigma γ\ni : ι\na : α i\nb : β i\n⊢ x ∈ sigmaLift f { fst := i, snd := a } { fst := i, snd := b } ↔\n ∃ ha hb, x.snd ∈ f (ha ▸ { fst := i, snd := a }.snd) (hb ▸ { fst := i, snd := b }.snd)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mk.mk.inl.mp\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\nx : Sigma γ\ni : ι\na : α i\nb : β i\n⊢ x ∈ sigmaLift f { fst := i, snd := a } { fst := i, snd := b } →\n ∃ ha hb, x.snd ∈ f (ha ▸ { fst := i, snd := a }.snd) (hb ▸ { fst := i, snd := b }.snd)\n[PROOFSTEP]\nsimp_rw [sigmaLift]\n[GOAL]\ncase mk.mk.inl.mp\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\nx : Sigma γ\ni : ι\na : α i\nb : β i\n⊢ (x ∈ if h : True then map (Embedding.sigmaMk i) (f a b) else ∅) →\n ∃ h h_1, x.snd ∈ f ((_ : { fst := i, snd := a }.fst = x.fst) ▸ a) ((_ : { fst := i, snd := b }.fst = x.fst) ▸ b)\n[PROOFSTEP]\nsimp only [dite_eq_ite, ite_true, mem_map, Embedding.sigmaMk_apply, forall_exists_index, and_imp]\n[GOAL]\ncase mk.mk.inl.mp\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\nx : Sigma γ\ni : ι\na : α i\nb : β i\n⊢ ∀ (x_1 : γ i),\n x_1 ∈ f a b →\n { fst := i, snd := x_1 } = x →\n ∃ h h_1, x.snd ∈ f ((_ : { fst := i, snd := a }.fst = x.fst) ▸ a) ((_ : { fst := i, snd := b }.fst = x.fst) ▸ b)\n[PROOFSTEP]\nrintro x hx rfl\n[GOAL]\ncase mk.mk.inl.mp\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\ni : ι\na : α i\nb : β i\nx : γ i\nhx : x ∈ f a b\n⊢ ∃ h h_1,\n { fst := i, snd := x }.snd ∈\n f ((_ : { fst := i, snd := a }.fst = { fst := i, snd := x }.fst) ▸ a)\n ((_ : { fst := i, snd := b }.fst = { fst := i, snd := x }.fst) ▸ b)\n[PROOFSTEP]\nexact ⟨rfl, rfl, hx⟩\n[GOAL]\ncase mk.mk.inl.mpr\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\nx : Sigma γ\ni : ι\na : α i\nb : β i\n⊢ (∃ ha hb, x.snd ∈ f (ha ▸ { fst := i, snd := a }.snd) (hb ▸ { fst := i, snd := b }.snd)) →\n x ∈ sigmaLift f { fst := i, snd := a } { fst := i, snd := b }\n[PROOFSTEP]\nrintro ⟨⟨⟩, ⟨⟩, hx⟩\n[GOAL]\ncase mk.mk.inl.mpr.intro.refl.intro.refl\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\nx : Sigma γ\na : α x.1\nb : β x.1\nhx :\n x.snd ∈\n f ((_ : { fst := x.1, snd := a }.fst = { fst := x.1, snd := a }.fst) ▸ { fst := x.1, snd := a }.snd)\n ((_ : { fst := x.1, snd := b }.fst = { fst := x.1, snd := b }.fst) ▸ { fst := x.1, snd := b }.snd)\n⊢ x ∈ sigmaLift f { fst := x.1, snd := a } { fst := x.1, snd := b }\n[PROOFSTEP]\nrw [sigmaLift, dif_pos rfl, mem_map]\n[GOAL]\ncase mk.mk.inl.mpr.intro.refl.intro.refl\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\nx : Sigma γ\na : α x.1\nb : β x.1\nhx :\n x.snd ∈\n f ((_ : { fst := x.1, snd := a }.fst = { fst := x.1, snd := a }.fst) ▸ { fst := x.1, snd := a }.snd)\n ((_ : { fst := x.1, snd := b }.fst = { fst := x.1, snd := b }.fst) ▸ { fst := x.1, snd := b }.snd)\n⊢ ∃ a_1,\n a_1 ∈\n f ((_ : { fst := x.1, snd := a }.fst = { fst := x.1, snd := a }.fst) ▸ { fst := x.1, snd := a }.snd)\n { fst := x.1, snd := b }.snd ∧\n ↑(Embedding.sigmaMk { fst := x.1, snd := b }.fst) a_1 = x\n[PROOFSTEP]\nexact ⟨_, hx, by simp [Sigma.ext_iff]⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\nx : Sigma γ\na : α x.1\nb : β x.1\nhx :\n x.snd ∈\n f ((_ : { fst := x.1, snd := a }.fst = { fst := x.1, snd := a }.fst) ▸ { fst := x.1, snd := a }.snd)\n ((_ : { fst := x.1, snd := b }.fst = { fst := x.1, snd := b }.fst) ▸ { fst := x.1, snd := b }.snd)\n⊢ ↑(Embedding.sigmaMk { fst := x.1, snd := b }.fst) x.snd = x\n[PROOFSTEP]\nsimp [Sigma.ext_iff]\n[GOAL]\ncase mk.mk.inr\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\nx : Sigma γ\ni : ι\na : α i\nj : ι\nb : β j\nh : i ≠ j\n⊢ x ∈ sigmaLift f { fst := i, snd := a } { fst := j, snd := b } ↔\n ∃ ha hb, x.snd ∈ f (ha ▸ { fst := i, snd := a }.snd) (hb ▸ { fst := j, snd := b }.snd)\n[PROOFSTEP]\nrw [sigmaLift, dif_neg h]\n[GOAL]\ncase mk.mk.inr\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\nx : Sigma γ\ni : ι\na : α i\nj : ι\nb : β j\nh : i ≠ j\n⊢ x ∈ ∅ ↔ ∃ ha hb, x.snd ∈ f (ha ▸ { fst := i, snd := a }.snd) (hb ▸ { fst := j, snd := b }.snd)\n[PROOFSTEP]\nrefine' iff_of_false (not_mem_empty _) _\n[GOAL]\ncase mk.mk.inr\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\nx : Sigma γ\ni : ι\na : α i\nj : ι\nb : β j\nh : i ≠ j\n⊢ ¬∃ ha hb, x.snd ∈ f (ha ▸ { fst := i, snd := a }.snd) (hb ▸ { fst := j, snd := b }.snd)\n[PROOFSTEP]\nrintro ⟨⟨⟩, ⟨⟩, _⟩\n[GOAL]\ncase mk.mk.inr.intro.refl.intro.refl\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\nx : Sigma γ\na : α x.1\nb : β x.1\nh : x.1 ≠ x.1\nh✝ :\n x.snd ∈\n f ((_ : { fst := x.1, snd := a }.fst = { fst := x.1, snd := a }.fst) ▸ { fst := x.1, snd := a }.snd)\n ((_ : { fst := x.1, snd := b }.fst = { fst := x.1, snd := b }.fst) ▸ { fst := x.1, snd := b }.snd)\n⊢ False\n[PROOFSTEP]\nexact h rfl\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\ni : ι\na : α i\nb : β i\nx : γ i\n⊢ { fst := i, snd := x } ∈ sigmaLift f { fst := i, snd := a } { fst := i, snd := b } ↔ x ∈ f a b\n[PROOFSTEP]\nrw [sigmaLift, dif_pos rfl, mem_map]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\ni : ι\na : α i\nb : β i\nx : γ i\n⊢ (∃ a_1,\n a_1 ∈\n f ((_ : { fst := i, snd := a }.fst = { fst := i, snd := a }.fst) ▸ { fst := i, snd := a }.snd)\n { fst := i, snd := b }.snd ∧\n ↑(Embedding.sigmaMk { fst := i, snd := b }.fst) a_1 = { fst := i, snd := x }) ↔\n x ∈ f a b\n[PROOFSTEP]\nrefine' ⟨_, fun hx => ⟨_, hx, rfl⟩⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\ni : ι\na : α i\nb : β i\nx : γ i\n⊢ (∃ a_1,\n a_1 ∈\n f ((_ : { fst := i, snd := a }.fst = { fst := i, snd := a }.fst) ▸ { fst := i, snd := a }.snd)\n { fst := i, snd := b }.snd ∧\n ↑(Embedding.sigmaMk { fst := i, snd := b }.fst) a_1 = { fst := i, snd := x }) →\n x ∈ f a b\n[PROOFSTEP]\nrintro ⟨x, hx, _, rfl⟩\n[GOAL]\ncase intro.intro.refl\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\ni : ι\na : α i\nb : β i\nx : γ i\nhx :\n x ∈\n f ((_ : { fst := i, snd := a }.fst = { fst := i, snd := a }.fst) ▸ { fst := i, snd := a }.snd)\n { fst := i, snd := b }.snd\n⊢ x ∈ f a b\n[PROOFSTEP]\nexact hx\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na : Sigma α\nb : Sigma β\nx : Sigma γ\nh : a.fst ≠ x.fst\n⊢ ¬x ∈ sigmaLift f a b\n[PROOFSTEP]\nrw [mem_sigmaLift]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na : Sigma α\nb : Sigma β\nx : Sigma γ\nh : a.fst ≠ x.fst\n⊢ ¬∃ ha hb, x.snd ∈ f (ha ▸ a.snd) (hb ▸ b.snd)\n[PROOFSTEP]\nexact fun H => h H.fst\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na : Sigma α\nb : Sigma β\nx : Sigma γ\nh : b.fst ≠ x.fst\n⊢ ¬x ∈ sigmaLift f a b\n[PROOFSTEP]\nrw [mem_sigmaLift]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na : Sigma α\nb : Sigma β\nx : Sigma γ\nh : b.fst ≠ x.fst\n⊢ ¬∃ ha hb, x.snd ∈ f (ha ▸ a.snd) (hb ▸ b.snd)\n[PROOFSTEP]\nexact fun H => h H.snd.fst\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf g : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na : (i : ι) × α i\nb : (i : ι) × β i\n⊢ Finset.Nonempty (sigmaLift f a b) ↔ ∃ h, Finset.Nonempty (f (h ▸ a.snd) b.snd)\n[PROOFSTEP]\nsimp_rw [nonempty_iff_ne_empty, sigmaLift]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf g : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na : (i : ι) × α i\nb : (i : ι) × β i\n⊢ (if h : a.fst = b.fst then map (Embedding.sigmaMk b.fst) (f (h ▸ a.snd) b.snd) else ∅) ≠ ∅ ↔\n ∃ h, f ((_ : a.fst = b.fst) ▸ a.snd) b.snd ≠ ∅\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf g : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na : (i : ι) × α i\nb : (i : ι) × β i\nh : a.fst = b.fst\n⊢ map (Embedding.sigmaMk b.fst) (f (h ▸ a.snd) b.snd) ≠ ∅ ↔ ∃ h, f ((_ : a.fst = b.fst) ▸ a.snd) b.snd ≠ ∅\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf g : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na : (i : ι) × α i\nb : (i : ι) × β i\nh : ¬a.fst = b.fst\n⊢ ∅ ≠ ∅ ↔ ∃ h, f ((_ : a.fst = b.fst) ▸ a.snd) b.snd ≠ ∅\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf g : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na : (i : ι) × α i\nb : (i : ι) × β i\n⊢ sigmaLift f a b = ∅ ↔ ∀ (h : a.fst = b.fst), f (h ▸ a.snd) b.snd = ∅\n[PROOFSTEP]\nsimp_rw [sigmaLift]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf g : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na : (i : ι) × α i\nb : (i : ι) × β i\n⊢ (if h : a.fst = b.fst then map (Embedding.sigmaMk b.fst) (f (h ▸ a.snd) b.snd) else ∅) = ∅ ↔\n ∀ (h : a.fst = b.fst), f (h ▸ a.snd) b.snd = ∅\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf g : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na : (i : ι) × α i\nb : (i : ι) × β i\nh : a.fst = b.fst\n⊢ map (Embedding.sigmaMk b.fst) (f (h ▸ a.snd) b.snd) = ∅ ↔ ∀ (h : a.fst = b.fst), f (h ▸ a.snd) b.snd = ∅\n[PROOFSTEP]\nsimp [h, forall_prop_of_true h]\n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf g : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na : (i : ι) × α i\nb : (i : ι) × β i\nh : ¬a.fst = b.fst\n⊢ ∅ = ∅ ↔ ∀ (h : a.fst = b.fst), f (h ▸ a.snd) b.snd = ∅\n[PROOFSTEP]\nsimp [h, forall_prop_of_false h]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf g : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na✝ : (i : ι) × α i\nb✝ : (i : ι) × β i\nh : ∀ ⦃i : ι⦄ ⦃a : α i⦄ ⦃b : β i⦄, f a b ⊆ g a b\na : (i : ι) × α i\nb : (i : ι) × β i\n⊢ sigmaLift f a b ⊆ sigmaLift g a b\n[PROOFSTEP]\nrintro x hx\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf g : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na✝ : (i : ι) × α i\nb✝ : (i : ι) × β i\nh : ∀ ⦃i : ι⦄ ⦃a : α i⦄ ⦃b : β i⦄, f a b ⊆ g a b\na : (i : ι) × α i\nb : (i : ι) × β i\nx : (i : ι) × γ i\nhx : x ∈ sigmaLift f a b\n⊢ x ∈ sigmaLift g a b\n[PROOFSTEP]\nrw [mem_sigmaLift] at hx ⊢\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf g : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na✝ : (i : ι) × α i\nb✝ : (i : ι) × β i\nh : ∀ ⦃i : ι⦄ ⦃a : α i⦄ ⦃b : β i⦄, f a b ⊆ g a b\na : (i : ι) × α i\nb : (i : ι) × β i\nx : (i : ι) × γ i\nhx : ∃ ha hb, x.snd ∈ f (ha ▸ a.snd) (hb ▸ b.snd)\n⊢ ∃ ha hb, x.snd ∈ g (ha ▸ a.snd) (hb ▸ b.snd)\n[PROOFSTEP]\nobtain ⟨ha, hb, hx⟩ := hx\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf g : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na✝ : (i : ι) × α i\nb✝ : (i : ι) × β i\nh : ∀ ⦃i : ι⦄ ⦃a : α i⦄ ⦃b : β i⦄, f a b ⊆ g a b\na : (i : ι) × α i\nb : (i : ι) × β i\nx : (i : ι) × γ i\nha : a.fst = x.fst\nhb : b.fst = x.fst\nhx : x.snd ∈ f (ha ▸ a.snd) (hb ▸ b.snd)\n⊢ ∃ ha hb, x.snd ∈ g (ha ▸ a.snd) (hb ▸ b.snd)\n[PROOFSTEP]\nexact ⟨ha, hb, h hx⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf g : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na : (i : ι) × α i\nb : (i : ι) × β i\n⊢ card (sigmaLift f a b) = if h : a.fst = b.fst then card (f (h ▸ a.snd) b.snd) else 0\n[PROOFSTEP]\nsimp_rw [sigmaLift]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf g : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na : (i : ι) × α i\nb : (i : ι) × β i\n⊢ card (if h : a.fst = b.fst then map (Embedding.sigmaMk b.fst) (f (h ▸ a.snd) b.snd) else ∅) =\n if h : a.fst = b.fst then card (f (h ▸ a.snd) b.snd) else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf g : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na : (i : ι) × α i\nb : (i : ι) × β i\nh : a.fst = b.fst\n⊢ card (map (Embedding.sigmaMk b.fst) (f (h ▸ a.snd) b.snd)) = card (f (h ▸ a.snd) b.snd)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\nβ : ι → Type u_3\nγ : ι → Type u_4\ninst✝ : DecidableEq ι\nf g : ⦃i : ι⦄ → α i → β i → Finset (γ i)\na : (i : ι) × α i\nb : (i : ι) × β i\nh : ¬a.fst = b.fst\n⊢ card ∅ = 0\n[PROOFSTEP]\nsimp [h]\n", "meta": {"mathlib_filename": "Mathlib.Data.Finset.Sigma", "llama_tokens": 10566, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8311430478583168, "lm_q2_score": 0.6757646075489392, "lm_q1q2_score": 0.5616570555530046}} {"text": "[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\ng1 g2 : G\np : P\nh : g1 +ᵥ p = g2 +ᵥ p\n⊢ g1 = g2\n[PROOFSTEP]\nrw [← vadd_vsub g1 p, h, vadd_vsub]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\ng : G\np1 p2 : P\n⊢ g +ᵥ p1 -ᵥ p2 = g + (p1 -ᵥ p2)\n[PROOFSTEP]\napply vadd_right_cancel p2\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\ng : G\np1 p2 : P\n⊢ g +ᵥ p1 -ᵥ p2 +ᵥ p2 = g + (p1 -ᵥ p2) +ᵥ p2\n[PROOFSTEP]\nrw [vsub_vadd, add_vadd, vsub_vadd]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\np : P\n⊢ p -ᵥ p = 0\n[PROOFSTEP]\nrw [← zero_add (p -ᵥ p), ← vadd_vsub_assoc, vadd_vsub]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\np1 p2 : P\nh : p1 -ᵥ p2 = 0\n⊢ p1 = p2\n[PROOFSTEP]\nrw [← vsub_vadd p1 p2, h, zero_vadd]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\np1 p2 p3 : P\n⊢ p1 -ᵥ p2 + (p2 -ᵥ p3) = p1 -ᵥ p3\n[PROOFSTEP]\napply vadd_right_cancel p3\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\np1 p2 p3 : P\n⊢ p1 -ᵥ p2 + (p2 -ᵥ p3) +ᵥ p3 = p1 -ᵥ p3 +ᵥ p3\n[PROOFSTEP]\nrw [add_vadd, vsub_vadd, vsub_vadd, vsub_vadd]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\np1 p2 : P\n⊢ -(p1 -ᵥ p2) = p2 -ᵥ p1\n[PROOFSTEP]\nrefine' neg_eq_of_add_eq_zero_right (vadd_right_cancel p1 _)\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\np1 p2 : P\n⊢ p1 -ᵥ p2 + (p2 -ᵥ p1) +ᵥ p1 = 0 +ᵥ p1\n[PROOFSTEP]\nrw [vsub_add_vsub_cancel, vsub_self]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\ng : G\np q : P\n⊢ g +ᵥ p -ᵥ q = g - (q -ᵥ p)\n[PROOFSTEP]\nrw [vadd_vsub_assoc, sub_eq_add_neg, neg_vsub_eq_vsub_rev]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\np1 p2 : P\ng : G\n⊢ p1 -ᵥ (g +ᵥ p2) = p1 -ᵥ p2 - g\n[PROOFSTEP]\nrw [← add_right_inj (p2 -ᵥ p1 : G), vsub_add_vsub_cancel, ← neg_vsub_eq_vsub_rev, vadd_vsub, ← add_sub_assoc, ←\n neg_vsub_eq_vsub_rev, neg_add_self, zero_sub]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\np1 p2 p3 : P\n⊢ p1 -ᵥ p3 - (p2 -ᵥ p3) = p1 -ᵥ p2\n[PROOFSTEP]\nrw [← vsub_vadd_eq_vsub_sub, vsub_vadd]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\nv₁ v₂ : G\np₁ p₂ : P\n⊢ v₁ +ᵥ p₁ = v₂ +ᵥ p₂ ↔ -v₁ + v₂ = p₁ -ᵥ p₂\n[PROOFSTEP]\nrw [eq_vadd_iff_vsub_eq, vadd_vsub_assoc, ← add_right_inj (-v₁), neg_add_cancel_left, eq_comm]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\np : P\n⊢ {p} -ᵥ {p} = {0}\n[PROOFSTEP]\nrw [Set.singleton_vsub_singleton, vsub_self]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\nv₁ v₂ : G\np : P\n⊢ v₁ +ᵥ p -ᵥ (v₂ +ᵥ p) = v₁ - v₂\n[PROOFSTEP]\nrw [vsub_vadd_eq_vsub_sub, vadd_vsub_assoc, vsub_self, add_zero]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\np1 p2 p : P\nh : p1 -ᵥ p = p2 -ᵥ p\n⊢ p1 = p2\n[PROOFSTEP]\nrwa [← sub_eq_zero, vsub_sub_vsub_cancel_right, vsub_eq_zero_iff_eq] at h \n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\np1 p2 p : P\nh : p -ᵥ p1 = p -ᵥ p2\n⊢ p1 = p2\n[PROOFSTEP]\nrefine' vadd_left_cancel (p -ᵥ p2) _\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\np1 p2 p : P\nh : p -ᵥ p1 = p -ᵥ p2\n⊢ p -ᵥ p2 +ᵥ p1 = p -ᵥ p2 +ᵥ p2\n[PROOFSTEP]\nrw [vsub_vadd, ← h, vsub_vadd]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝¹ : AddCommGroup G\ninst✝ : AddTorsor G P\np1 p2 p3 : P\n⊢ p3 -ᵥ p2 - (p3 -ᵥ p1) = p1 -ᵥ p2\n[PROOFSTEP]\nrw [sub_eq_add_neg, neg_vsub_eq_vsub_rev, add_comm, vsub_add_vsub_cancel]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝¹ : AddCommGroup G\ninst✝ : AddTorsor G P\nv : G\np1 p2 : P\n⊢ v +ᵥ p1 -ᵥ (v +ᵥ p2) = p1 -ᵥ p2\n[PROOFSTEP]\nrw [vsub_vadd_eq_vsub_sub, vadd_vsub_assoc, add_sub_cancel']\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝¹ : AddCommGroup G\ninst✝ : AddTorsor G P\np1 p2 p3 : P\n⊢ p1 -ᵥ p2 +ᵥ p3 = p3 -ᵥ p2 +ᵥ p1\n[PROOFSTEP]\nrw [← @vsub_eq_zero_iff_eq G, vadd_vsub_assoc, vsub_vadd_eq_vsub_sub]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝¹ : AddCommGroup G\ninst✝ : AddTorsor G P\np1 p2 p3 : P\n⊢ p1 -ᵥ p2 + (p3 -ᵥ p1 - (p3 -ᵥ p2)) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝¹ : AddCommGroup G\ninst✝ : AddTorsor G P\nv₁ v₂ : G\np₁ p₂ : P\n⊢ v₁ +ᵥ p₁ = v₂ +ᵥ p₂ ↔ v₂ - v₁ = p₁ -ᵥ p₂\n[PROOFSTEP]\nrw [vadd_eq_vadd_iff_neg_add_eq_vsub, neg_add_eq_sub]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝¹ : AddCommGroup G\ninst✝ : AddTorsor G P\np₁ p₂ p₃ p₄ : P\n⊢ p₁ -ᵥ p₂ - (p₃ -ᵥ p₄) = p₁ -ᵥ p₃ - (p₂ -ᵥ p₄)\n[PROOFSTEP]\nrw [← vsub_vadd_eq_vsub_sub, vsub_vadd_comm, vsub_vadd_eq_vsub_sub]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝¹ : AddGroup G\ninst✝ : AddTorsor G P\np p' : P\n⊢ (fun v => -v +ᵥ p) ((fun x x_1 => x -ᵥ x_1) p p') = p'\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝¹ : AddGroup G\ninst✝ : AddTorsor G P\np : P\nv : G\n⊢ (fun x x_1 => x -ᵥ x_1) p ((fun v => -v +ᵥ p) v) = v\n[PROOFSTEP]\nsimp [vsub_vadd_eq_vsub_sub]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝¹ : AddGroup G\ninst✝ : AddTorsor G P\nv : G\np : P\n⊢ (fun x x_1 => x +ᵥ x_1) (-v) ((fun x x_1 => x +ᵥ x_1) v p) = p\n[PROOFSTEP]\nsimp [vadd_vadd]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝¹ : AddGroup G\ninst✝ : AddTorsor G P\nv : G\np : P\n⊢ (fun x x_1 => x +ᵥ x_1) v ((fun x x_1 => x +ᵥ x_1) (-v) p) = p\n[PROOFSTEP]\nsimp [vadd_vadd]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝¹ : AddGroup G\ninst✝ : AddTorsor G P\nx y : P\n⊢ -(x -ᵥ ↑(pointReflection x) y) = -(y -ᵥ x)\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝¹ : AddGroup G\ninst✝ : AddTorsor G P\nx y : P\n⊢ ↑(pointReflection x) y -ᵥ y = 2 • (x -ᵥ y)\n[PROOFSTEP]\nsimp [pointReflection, two_nsmul, vadd_vsub_assoc]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝¹ : AddGroup G\ninst✝ : AddTorsor G P\nx y : P\n⊢ -(y -ᵥ ↑(pointReflection x) y) = -(2 • (y -ᵥ x))\n[PROOFSTEP]\nsimp [← neg_nsmul]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝¹ : AddGroup G\ninst✝ : AddTorsor G P\nx : P\n⊢ ∀ (x_1 : P), ↑(pointReflection x).symm x_1 = ↑(pointReflection x) x_1\n[PROOFSTEP]\nsimp [pointReflection]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝¹ : AddGroup G\ninst✝ : AddTorsor G P\nx y : P\n⊢ ↑(pointReflection x) y = ↑(pointReflection x).symm y\n[PROOFSTEP]\nrw [pointReflection_symm]\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝¹ : AddGroup G\ninst✝ : AddTorsor G P\nx y : P\nh : Injective bit0\n⊢ ↑(pointReflection x) y = y ↔ y = x\n[PROOFSTEP]\nrw [pointReflection_apply, eq_comm, eq_vadd_iff_vsub_eq, ← neg_vsub_eq_vsub_rev, neg_eq_iff_add_eq_zero, ← bit0, ←\n bit0_zero, h.eq_iff, vsub_eq_zero_iff_eq, eq_comm]\n[GOAL]\nG✝ : Type u_1\nP✝ : Type u_2\ninst✝³ : AddGroup G✝\ninst✝² : AddTorsor G✝ P✝\nG : Type u_3\nP : Type u_4\ninst✝¹ : AddCommGroup G\ninst✝ : AddTorsor G P\nh : Injective bit0\ny x₁ x₂ : P\nhy : ↑(pointReflection x₁) y = ↑(pointReflection x₂) y\n⊢ x₁ = x₂\n[PROOFSTEP]\nrwa [pointReflection_apply, pointReflection_apply, vadd_eq_vadd_iff_sub_eq_vsub, vsub_sub_vsub_cancel_right, ←\n neg_vsub_eq_vsub_rev, neg_eq_iff_add_eq_zero, ← bit0, ← bit0_zero, h.eq_iff, vsub_eq_zero_iff_eq] at hy \n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝¹ : AddGroup G\ninst✝ : AddTorsor G P\n⊢ Subsingleton G ↔ Subsingleton P\n[PROOFSTEP]\ninhabit P\n[GOAL]\nG : Type u_1\nP : Type u_2\ninst✝¹ : AddGroup G\ninst✝ : AddTorsor G P\ninhabited_h : Inhabited P\n⊢ Subsingleton G ↔ Subsingleton P\n[PROOFSTEP]\nexact (Equiv.vaddConst default).subsingleton_congr\n", "meta": {"mathlib_filename": "Mathlib.Algebra.AddTorsor", "llama_tokens": 4135, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8031737869342623, "lm_q2_score": 0.6992544273261175, "lm_q1q2_score": 0.5616228264260668}} {"text": "[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nh : x ≠ y\n⊢ x (firstDiff x y) ≠ y (firstDiff x y)\n[PROOFSTEP]\nrw [firstDiff_def, dif_pos h]\n[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nh : x ≠ y\n⊢ x (Nat.find (_ : ∃ a, x a ≠ y a)) ≠ y (Nat.find (_ : ∃ a, x a ≠ y a))\n[PROOFSTEP]\nexact Nat.find_spec (ne_iff.1 h)\n[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhn : n < firstDiff x y\n⊢ x n = y n\n[PROOFSTEP]\nrw [firstDiff_def] at hn \n[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhn : n < if h : x ≠ y then Nat.find (_ : ∃ a, x a ≠ y a) else 0\n⊢ x n = y n\n[PROOFSTEP]\nsplit_ifs at hn with h\n[GOAL]\ncase pos\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nh : x ≠ y\nhn : n < Nat.find (_ : ∃ a, x a ≠ y a)\n⊢ x n = y n\n[PROOFSTEP]\nconvert Nat.find_min (ne_iff.1 h) hn\n[GOAL]\ncase a\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nh : x ≠ y\nhn : n < Nat.find (_ : ∃ a, x a ≠ y a)\n⊢ x n = y n ↔ ¬x n ≠ y n\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nh : ¬x ≠ y\nhn : n < 0\n⊢ x n = y n\n[PROOFSTEP]\nexact (not_lt_zero' hn).elim\n[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\n⊢ firstDiff x y = firstDiff y x\n[PROOFSTEP]\nsimp only [firstDiff_def, ne_comm]\n[GOAL]\nE : ℕ → Type u_1\nx y z : (n : ℕ) → E n\nh : x ≠ z\n⊢ min (firstDiff x y) (firstDiff y z) ≤ firstDiff x z\n[PROOFSTEP]\nby_contra' H\n[GOAL]\nE : ℕ → Type u_1\nx y z : (n : ℕ) → E n\nh : x ≠ z\nH : firstDiff x z < min (firstDiff x y) (firstDiff y z)\n⊢ False\n[PROOFSTEP]\nrw [lt_min_iff] at H \n[GOAL]\nE : ℕ → Type u_1\nx y z : (n : ℕ) → E n\nh : x ≠ z\nH : firstDiff x z < firstDiff x y ∧ firstDiff x z < firstDiff y z\n⊢ False\n[PROOFSTEP]\nrefine apply_firstDiff_ne h ?_\n[GOAL]\nE : ℕ → Type u_1\nx y z : (n : ℕ) → E n\nh : x ≠ z\nH : firstDiff x z < firstDiff x y ∧ firstDiff x z < firstDiff y z\n⊢ x (firstDiff x z) = z (firstDiff x z)\n[PROOFSTEP]\ncalc\n x (firstDiff x z) = y (firstDiff x z) := apply_eq_of_lt_firstDiff H.1\n _ = z (firstDiff x z) := apply_eq_of_lt_firstDiff H.2\n[GOAL]\nE : ℕ → Type u_1\nx : (n : ℕ) → E n\nn : ℕ\n⊢ cylinder x n = Set.pi ↑(Finset.range n) fun i => {x i}\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nE : ℕ → Type u_1\nx : (n : ℕ) → E n\nn : ℕ\ny : (n : ℕ) → E n\n⊢ y ∈ cylinder x n ↔ y ∈ Set.pi ↑(Finset.range n) fun i => {x i}\n[PROOFSTEP]\nsimp [cylinder]\n[GOAL]\nE : ℕ → Type u_1\nx : (n : ℕ) → E n\n⊢ cylinder x 0 = univ\n[PROOFSTEP]\nsimp [cylinder_eq_pi]\n[GOAL]\nE : ℕ → Type u_1\nx : (n : ℕ) → E n\nn : ℕ\n⊢ x ∈ cylinder x n\n[PROOFSTEP]\nsimp\n[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\n⊢ y ∈ cylinder x n ↔ cylinder y n = cylinder x n\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\n⊢ y ∈ cylinder x n → cylinder y n = cylinder x n\n[PROOFSTEP]\nintro hy\n[GOAL]\ncase mp\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhy : y ∈ cylinder x n\n⊢ cylinder y n = cylinder x n\n[PROOFSTEP]\napply Subset.antisymm\n[GOAL]\ncase mp.h₁\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhy : y ∈ cylinder x n\n⊢ cylinder y n ⊆ cylinder x n\n[PROOFSTEP]\nintro z hz i hi\n[GOAL]\ncase mp.h₁\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhy : y ∈ cylinder x n\nz : (n : ℕ) → E n\nhz : z ∈ cylinder y n\ni : ℕ\nhi : i < n\n⊢ z i = x i\n[PROOFSTEP]\nrw [← hy i hi]\n[GOAL]\ncase mp.h₁\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhy : y ∈ cylinder x n\nz : (n : ℕ) → E n\nhz : z ∈ cylinder y n\ni : ℕ\nhi : i < n\n⊢ z i = y i\n[PROOFSTEP]\nexact hz i hi\n[GOAL]\ncase mp.h₂\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhy : y ∈ cylinder x n\n⊢ cylinder x n ⊆ cylinder y n\n[PROOFSTEP]\nintro z hz i hi\n[GOAL]\ncase mp.h₂\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhy : y ∈ cylinder x n\nz : (n : ℕ) → E n\nhz : z ∈ cylinder x n\ni : ℕ\nhi : i < n\n⊢ z i = y i\n[PROOFSTEP]\nrw [hy i hi]\n[GOAL]\ncase mp.h₂\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhy : y ∈ cylinder x n\nz : (n : ℕ) → E n\nhz : z ∈ cylinder x n\ni : ℕ\nhi : i < n\n⊢ z i = x i\n[PROOFSTEP]\nexact hz i hi\n[GOAL]\ncase mpr\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\n⊢ cylinder y n = cylinder x n → y ∈ cylinder x n\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nh : cylinder y n = cylinder x n\n⊢ y ∈ cylinder x n\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase mpr\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nh : cylinder y n = cylinder x n\n⊢ y ∈ cylinder y n\n[PROOFSTEP]\nexact self_mem_cylinder _ _\n[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\n⊢ y ∈ cylinder x n ↔ x ∈ cylinder y n\n[PROOFSTEP]\nsimp [mem_cylinder_iff_eq, eq_comm]\n[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nhne : x ≠ y\ni : ℕ\n⊢ x ∈ cylinder y i ↔ i ≤ firstDiff x y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nhne : x ≠ y\ni : ℕ\n⊢ x ∈ cylinder y i → i ≤ firstDiff x y\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nhne : x ≠ y\ni : ℕ\nh : x ∈ cylinder y i\n⊢ i ≤ firstDiff x y\n[PROOFSTEP]\nby_contra'\n[GOAL]\ncase mp\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nhne : x ≠ y\ni : ℕ\nh : x ∈ cylinder y i\nthis : firstDiff x y < i\n⊢ False\n[PROOFSTEP]\nexact apply_firstDiff_ne hne (h _ this)\n[GOAL]\ncase mpr\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nhne : x ≠ y\ni : ℕ\n⊢ i ≤ firstDiff x y → x ∈ cylinder y i\n[PROOFSTEP]\nintro hi j hj\n[GOAL]\ncase mpr\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nhne : x ≠ y\ni : ℕ\nhi : i ≤ firstDiff x y\nj : ℕ\nhj : j < i\n⊢ x j = y j\n[PROOFSTEP]\nexact apply_eq_of_lt_firstDiff (hj.trans_le hi)\n[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhn : n ≤ firstDiff x y\n⊢ cylinder x n = cylinder y n\n[PROOFSTEP]\nrw [← mem_cylinder_iff_eq]\n[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhn : n ≤ firstDiff x y\n⊢ x ∈ cylinder y n\n[PROOFSTEP]\nintro i hi\n[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhn : n ≤ firstDiff x y\ni : ℕ\nhi : i < n\n⊢ x i = y i\n[PROOFSTEP]\nexact apply_eq_of_lt_firstDiff (hi.trans_le hn)\n[GOAL]\nE : ℕ → Type u_1\nx : (n : ℕ) → E n\nn : ℕ\n⊢ ⋃ (k : E n), cylinder (update x n k) (n + 1) = cylinder x n\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nE : ℕ → Type u_1\nx : (n : ℕ) → E n\nn : ℕ\ny : (n : ℕ) → E n\n⊢ y ∈ ⋃ (k : E n), cylinder (update x n k) (n + 1) ↔ y ∈ cylinder x n\n[PROOFSTEP]\nsimp only [mem_cylinder_iff, mem_iUnion]\n[GOAL]\ncase h\nE : ℕ → Type u_1\nx : (n : ℕ) → E n\nn : ℕ\ny : (n : ℕ) → E n\n⊢ (∃ i, ∀ (i_1 : ℕ), i_1 < n + 1 → y i_1 = update x n i i_1) ↔ ∀ (i : ℕ), i < n → y i = x i\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nE : ℕ → Type u_1\nx : (n : ℕ) → E n\nn : ℕ\ny : (n : ℕ) → E n\n⊢ (∃ i, ∀ (i_1 : ℕ), i_1 < n + 1 → y i_1 = update x n i i_1) → ∀ (i : ℕ), i < n → y i = x i\n[PROOFSTEP]\nrintro ⟨k, hk⟩ i hi\n[GOAL]\ncase h.mp.intro\nE : ℕ → Type u_1\nx : (n : ℕ) → E n\nn : ℕ\ny : (n : ℕ) → E n\nk : E n\nhk : ∀ (i : ℕ), i < n + 1 → y i = update x n k i\ni : ℕ\nhi : i < n\n⊢ y i = x i\n[PROOFSTEP]\nsimpa [hi.ne] using hk i (Nat.lt_succ_of_lt hi)\n[GOAL]\ncase h.mpr\nE : ℕ → Type u_1\nx : (n : ℕ) → E n\nn : ℕ\ny : (n : ℕ) → E n\n⊢ (∀ (i : ℕ), i < n → y i = x i) → ∃ i, ∀ (i_1 : ℕ), i_1 < n + 1 → y i_1 = update x n i i_1\n[PROOFSTEP]\nintro H\n[GOAL]\ncase h.mpr\nE : ℕ → Type u_1\nx : (n : ℕ) → E n\nn : ℕ\ny : (n : ℕ) → E n\nH : ∀ (i : ℕ), i < n → y i = x i\n⊢ ∃ i, ∀ (i_1 : ℕ), i_1 < n + 1 → y i_1 = update x n i i_1\n[PROOFSTEP]\nrefine' ⟨y n, fun i hi => _⟩\n[GOAL]\ncase h.mpr\nE : ℕ → Type u_1\nx : (n : ℕ) → E n\nn : ℕ\ny : (n : ℕ) → E n\nH : ∀ (i : ℕ), i < n → y i = x i\ni : ℕ\nhi : i < n + 1\n⊢ y i = update x n (y n) i\n[PROOFSTEP]\nrcases Nat.lt_succ_iff_lt_or_eq.1 hi with (h'i | rfl)\n[GOAL]\ncase h.mpr.inl\nE : ℕ → Type u_1\nx : (n : ℕ) → E n\nn : ℕ\ny : (n : ℕ) → E n\nH : ∀ (i : ℕ), i < n → y i = x i\ni : ℕ\nhi : i < n + 1\nh'i : i < n\n⊢ y i = update x n (y n) i\n[PROOFSTEP]\nsimp [H i h'i, h'i.ne]\n[GOAL]\ncase h.mpr.inr\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\ni : ℕ\nH : ∀ (i_1 : ℕ), i_1 < i → y i_1 = x i_1\nhi : i < i + 1\n⊢ y i = update x i (y i) i\n[PROOFSTEP]\nsimp\n[GOAL]\nE : ℕ → Type u_1\nx : (n : ℕ) → E n\nn : ℕ\ny : E n\ni : ℕ\nhi : i < n\n⊢ update x n y i = x i\n[PROOFSTEP]\nsimp [hi.ne]\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\nx : ℕ → α\nn : ℕ\n⊢ length (res x n) = n\n[PROOFSTEP]\ninduction n\n[GOAL]\ncase zero\nE : ℕ → Type u_1\nα : Type u_2\nx : ℕ → α\n⊢ length (res x Nat.zero) = Nat.zero\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase succ\nE : ℕ → Type u_1\nα : Type u_2\nx : ℕ → α\nn✝ : ℕ\nn_ih✝ : length (res x n✝) = n✝\n⊢ length (res x (Nat.succ n✝)) = Nat.succ n✝\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nn : ℕ\n⊢ res x n = res y n ↔ ∀ ⦃m : ℕ⦄, m < n → x m = y m\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nn : ℕ\n⊢ res x n = res y n → ∀ ⦃m : ℕ⦄, m < n → x m = y m\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nn : ℕ\n⊢ (∀ ⦃m : ℕ⦄, m < n → x m = y m) → res x n = res y n\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nn : ℕ\nh : res x n = res y n\n⊢ ∀ ⦃m : ℕ⦄, m < n → x m = y m\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase mpr\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nn : ℕ\nh : ∀ ⦃m : ℕ⦄, m < n → x m = y m\n⊢ res x n = res y n\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase mp.zero\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nn : ℕ\nh✝ : res x n = res y n\nh : res x Nat.zero = res y Nat.zero\n⊢ ∀ ⦃m : ℕ⦄, m < Nat.zero → x m = y m\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mp.succ\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nn✝ : ℕ\nh✝ : res x n✝ = res y n✝\nn : ℕ\nih : res x n = res y n → ∀ ⦃m : ℕ⦄, m < n → x m = y m\nh : res x (Nat.succ n) = res y (Nat.succ n)\n⊢ ∀ ⦃m : ℕ⦄, m < Nat.succ n → x m = y m\n[PROOFSTEP]\nintro m hm\n[GOAL]\ncase mp.succ\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nn✝ : ℕ\nh✝ : res x n✝ = res y n✝\nn : ℕ\nih : res x n = res y n → ∀ ⦃m : ℕ⦄, m < n → x m = y m\nh : res x (Nat.succ n) = res y (Nat.succ n)\nm : ℕ\nhm : m < Nat.succ n\n⊢ x m = y m\n[PROOFSTEP]\nrw [Nat.lt_succ_iff_lt_or_eq] at hm \n[GOAL]\ncase mp.succ\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nn✝ : ℕ\nh✝ : res x n✝ = res y n✝\nn : ℕ\nih : res x n = res y n → ∀ ⦃m : ℕ⦄, m < n → x m = y m\nh : res x (Nat.succ n) = res y (Nat.succ n)\nm : ℕ\nhm : m < n ∨ m = n\n⊢ x m = y m\n[PROOFSTEP]\nsimp only [res_succ, cons.injEq] at h \n[GOAL]\ncase mp.succ\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nn✝ : ℕ\nh✝ : res x n✝ = res y n✝\nn : ℕ\nih : res x n = res y n → ∀ ⦃m : ℕ⦄, m < n → x m = y m\nm : ℕ\nhm : m < n ∨ m = n\nh : x n = y n ∧ res x n = res y n\n⊢ x m = y m\n[PROOFSTEP]\ncases' hm with hm hm\n[GOAL]\ncase mp.succ.inl\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nn✝ : ℕ\nh✝ : res x n✝ = res y n✝\nn : ℕ\nih : res x n = res y n → ∀ ⦃m : ℕ⦄, m < n → x m = y m\nm : ℕ\nh : x n = y n ∧ res x n = res y n\nhm : m < n\n⊢ x m = y m\n[PROOFSTEP]\nexact ih h.2 hm\n[GOAL]\ncase mp.succ.inr\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nn✝ : ℕ\nh✝ : res x n✝ = res y n✝\nn : ℕ\nih : res x n = res y n → ∀ ⦃m : ℕ⦄, m < n → x m = y m\nm : ℕ\nh : x n = y n ∧ res x n = res y n\nhm : m = n\n⊢ x m = y m\n[PROOFSTEP]\nrw [hm]\n[GOAL]\ncase mp.succ.inr\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nn✝ : ℕ\nh✝ : res x n✝ = res y n✝\nn : ℕ\nih : res x n = res y n → ∀ ⦃m : ℕ⦄, m < n → x m = y m\nm : ℕ\nh : x n = y n ∧ res x n = res y n\nhm : m = n\n⊢ x n = y n\n[PROOFSTEP]\nexact h.1\n[GOAL]\ncase mpr.zero\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nn : ℕ\nh✝ : ∀ ⦃m : ℕ⦄, m < n → x m = y m\nh : ∀ ⦃m : ℕ⦄, m < Nat.zero → x m = y m\n⊢ res x Nat.zero = res y Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr.succ\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nn✝ : ℕ\nh✝ : ∀ ⦃m : ℕ⦄, m < n✝ → x m = y m\nn : ℕ\nih : (∀ ⦃m : ℕ⦄, m < n → x m = y m) → res x n = res y n\nh : ∀ ⦃m : ℕ⦄, m < Nat.succ n → x m = y m\n⊢ res x (Nat.succ n) = res y (Nat.succ n)\n[PROOFSTEP]\nsimp only [res_succ, cons.injEq]\n[GOAL]\ncase mpr.succ\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nn✝ : ℕ\nh✝ : ∀ ⦃m : ℕ⦄, m < n✝ → x m = y m\nn : ℕ\nih : (∀ ⦃m : ℕ⦄, m < n → x m = y m) → res x n = res y n\nh : ∀ ⦃m : ℕ⦄, m < Nat.succ n → x m = y m\n⊢ x n = y n ∧ res x n = res y n\n[PROOFSTEP]\nrefine' ⟨h (Nat.lt_succ_self _), ih fun m hm => _⟩\n[GOAL]\ncase mpr.succ\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nn✝ : ℕ\nh✝ : ∀ ⦃m : ℕ⦄, m < n✝ → x m = y m\nn : ℕ\nih : (∀ ⦃m : ℕ⦄, m < n → x m = y m) → res x n = res y n\nh : ∀ ⦃m : ℕ⦄, m < Nat.succ n → x m = y m\nm : ℕ\nhm : m < n\n⊢ x m = y m\n[PROOFSTEP]\nexact h (hm.trans (Nat.lt_succ_self _))\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\n⊢ Injective res\n[PROOFSTEP]\nintro x y h\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nh : res x = res y\n⊢ x = y\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nh : res x = res y\nn : ℕ\n⊢ x n = y n\n[PROOFSTEP]\napply res_eq_res.mp _ (Nat.lt_succ_self _)\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\nx y : ℕ → α\nh : res x = res y\nn : ℕ\n⊢ res x (Nat.succ n) = res (fun n => y n) (Nat.succ n)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\nx : ℕ → α\nn : ℕ\n⊢ cylinder x n = {y | res y n = res x n}\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nE : ℕ → Type u_1\nα : Type u_2\nx : ℕ → α\nn : ℕ\ny : ℕ → α\n⊢ y ∈ cylinder x n ↔ y ∈ {y | res y n = res x n}\n[PROOFSTEP]\ndsimp [cylinder]\n[GOAL]\ncase h\nE : ℕ → Type u_1\nα : Type u_2\nx : ℕ → α\nn : ℕ\ny : ℕ → α\n⊢ (∀ (i : ℕ), i < n → y i = x i) ↔ res y n = res x n\n[PROOFSTEP]\nrw [res_eq_res]\n[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nh : x ≠ y\n⊢ dist x y = (1 / 2) ^ firstDiff x y\n[PROOFSTEP]\nsimp [dist, h]\n[GOAL]\nE : ℕ → Type u_1\nx : (n : ℕ) → E n\n⊢ dist x x = 0\n[PROOFSTEP]\nsimp [dist]\n[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\n⊢ dist x y = dist y x\n[PROOFSTEP]\nsimp [dist, @eq_comm _ x y, firstDiff_comm]\n[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\n⊢ 0 ≤ dist x y\n[PROOFSTEP]\nrcases eq_or_ne x y with (rfl | h)\n[GOAL]\ncase inl\nE : ℕ → Type u_1\nx : (n : ℕ) → E n\n⊢ 0 ≤ dist x x\n[PROOFSTEP]\nsimp [dist]\n[GOAL]\ncase inr\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nh : x ≠ y\n⊢ 0 ≤ dist x y\n[PROOFSTEP]\nsimp [dist, h, zero_le_two]\n[GOAL]\nE : ℕ → Type u_1\nx y z : (n : ℕ) → E n\n⊢ dist x z ≤ max (dist x y) (dist y z)\n[PROOFSTEP]\nrcases eq_or_ne x z with (rfl | hxz)\n[GOAL]\ncase inl\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\n⊢ dist x x ≤ max (dist x y) (dist y x)\n[PROOFSTEP]\nsimp [PiNat.dist_self x, PiNat.dist_nonneg]\n[GOAL]\ncase inr\nE : ℕ → Type u_1\nx y z : (n : ℕ) → E n\nhxz : x ≠ z\n⊢ dist x z ≤ max (dist x y) (dist y z)\n[PROOFSTEP]\nrcases eq_or_ne x y with (rfl | hxy)\n[GOAL]\ncase inr.inl\nE : ℕ → Type u_1\nx z : (n : ℕ) → E n\nhxz : x ≠ z\n⊢ dist x z ≤ max (dist x x) (dist x z)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr\nE : ℕ → Type u_1\nx y z : (n : ℕ) → E n\nhxz : x ≠ z\nhxy : x ≠ y\n⊢ dist x z ≤ max (dist x y) (dist y z)\n[PROOFSTEP]\nrcases eq_or_ne y z with (rfl | hyz)\n[GOAL]\ncase inr.inr.inl\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nhxy hxz : x ≠ y\n⊢ dist x y ≤ max (dist x y) (dist y y)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr.inr\nE : ℕ → Type u_1\nx y z : (n : ℕ) → E n\nhxz : x ≠ z\nhxy : x ≠ y\nhyz : y ≠ z\n⊢ dist x z ≤ max (dist x y) (dist y z)\n[PROOFSTEP]\nsimp only [dist_eq_of_ne, hxz, hxy, hyz, inv_le_inv, one_div, inv_pow, zero_lt_two, Ne.def, not_false_iff, le_max_iff,\n pow_le_pow_iff, one_lt_two, pow_pos, min_le_iff.1 (min_firstDiff_le x y z hxz)]\n[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nhxy : dist x y = 0\n⊢ x = y\n[PROOFSTEP]\nrcases eq_or_ne x y with (rfl | h)\n[GOAL]\ncase inl\nE : ℕ → Type u_1\nx : (n : ℕ) → E n\nhxy : dist x x = 0\n⊢ x = x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nhxy : dist x y = 0\nh : x ≠ y\n⊢ x = y\n[PROOFSTEP]\nsimp [dist_eq_of_ne h] at hxy \n[GOAL]\ncase inr\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nh : x ≠ y\nhxy : 2 ^ firstDiff x y = 0\n⊢ x = y\n[PROOFSTEP]\nexact (two_ne_zero (pow_eq_zero hxy)).elim\n[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\n⊢ y ∈ cylinder x n ↔ dist y x ≤ (1 / 2) ^ n\n[PROOFSTEP]\nrcases eq_or_ne y x with (rfl | hne)\n[GOAL]\ncase inl\nE : ℕ → Type u_1\ny : (n : ℕ) → E n\nn : ℕ\n⊢ y ∈ cylinder y n ↔ dist y y ≤ (1 / 2) ^ n\n[PROOFSTEP]\nsimp [PiNat.dist_self]\n[GOAL]\ncase inr\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhne : y ≠ x\n⊢ y ∈ cylinder x n ↔ dist y x ≤ (1 / 2) ^ n\n[PROOFSTEP]\nsuffices (∀ i : ℕ, i < n → y i = x i) ↔ n ≤ firstDiff y x by simpa [dist_eq_of_ne hne]\n[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhne : y ≠ x\nthis : (∀ (i : ℕ), i < n → y i = x i) ↔ n ≤ firstDiff y x\n⊢ y ∈ cylinder x n ↔ dist y x ≤ (1 / 2) ^ n\n[PROOFSTEP]\nsimpa [dist_eq_of_ne hne]\n[GOAL]\ncase inr\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhne : y ≠ x\n⊢ (∀ (i : ℕ), i < n → y i = x i) ↔ n ≤ firstDiff y x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase inr.mp\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhne : y ≠ x\n⊢ (∀ (i : ℕ), i < n → y i = x i) → n ≤ firstDiff y x\n[PROOFSTEP]\nintro hy\n[GOAL]\ncase inr.mp\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhne : y ≠ x\nhy : ∀ (i : ℕ), i < n → y i = x i\n⊢ n ≤ firstDiff y x\n[PROOFSTEP]\nby_contra' H\n[GOAL]\ncase inr.mp\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhne : y ≠ x\nhy : ∀ (i : ℕ), i < n → y i = x i\nH : firstDiff y x < n\n⊢ False\n[PROOFSTEP]\nexact apply_firstDiff_ne hne (hy _ H)\n[GOAL]\ncase inr.mpr\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhne : y ≠ x\n⊢ n ≤ firstDiff y x → ∀ (i : ℕ), i < n → y i = x i\n[PROOFSTEP]\nintro h i hi\n[GOAL]\ncase inr.mpr\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nhne : y ≠ x\nh : n ≤ firstDiff y x\ni : ℕ\nhi : i < n\n⊢ y i = x i\n[PROOFSTEP]\nexact apply_eq_of_lt_firstDiff (hi.trans_le h)\n[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nh : dist x y < (1 / 2) ^ n\ni : ℕ\nhi : i ≤ n\n⊢ x i = y i\n[PROOFSTEP]\nrcases eq_or_ne x y with (rfl | hne)\n[GOAL]\ncase inl\nE : ℕ → Type u_1\nx : (n : ℕ) → E n\nn i : ℕ\nhi : i ≤ n\nh : dist x x < (1 / 2) ^ n\n⊢ x i = x i\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nh : dist x y < (1 / 2) ^ n\ni : ℕ\nhi : i ≤ n\nhne : x ≠ y\n⊢ x i = y i\n[PROOFSTEP]\nhave : n < firstDiff x y := by simpa [dist_eq_of_ne hne, inv_lt_inv, pow_lt_pow_iff, one_lt_two] using h\n[GOAL]\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nh : dist x y < (1 / 2) ^ n\ni : ℕ\nhi : i ≤ n\nhne : x ≠ y\n⊢ n < firstDiff x y\n[PROOFSTEP]\nsimpa [dist_eq_of_ne hne, inv_lt_inv, pow_lt_pow_iff, one_lt_two] using h\n[GOAL]\ncase inr\nE : ℕ → Type u_1\nx y : (n : ℕ) → E n\nn : ℕ\nh : dist x y < (1 / 2) ^ n\ni : ℕ\nhi : i ≤ n\nhne : x ≠ y\nthis : n < firstDiff x y\n⊢ x i = y i\n[PROOFSTEP]\nexact apply_eq_of_lt_firstDiff (hi.trans_lt this)\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝ : PseudoMetricSpace α\nf : ((n : ℕ) → E n) → α\n⊢ (∀ (x y : (n : ℕ) → E n), dist (f x) (f y) ≤ dist x y) ↔\n ∀ (x y : (n : ℕ) → E n) (n : ℕ), y ∈ cylinder x n → dist (f x) (f y) ≤ (1 / 2) ^ n\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nE : ℕ → Type u_1\nα : Type u_2\ninst✝ : PseudoMetricSpace α\nf : ((n : ℕ) → E n) → α\n⊢ (∀ (x y : (n : ℕ) → E n), dist (f x) (f y) ≤ dist x y) →\n ∀ (x y : (n : ℕ) → E n) (n : ℕ), y ∈ cylinder x n → dist (f x) (f y) ≤ (1 / 2) ^ n\n[PROOFSTEP]\nintro H x y n hxy\n[GOAL]\ncase mp\nE : ℕ → Type u_1\nα : Type u_2\ninst✝ : PseudoMetricSpace α\nf : ((n : ℕ) → E n) → α\nH : ∀ (x y : (n : ℕ) → E n), dist (f x) (f y) ≤ dist x y\nx y : (n : ℕ) → E n\nn : ℕ\nhxy : y ∈ cylinder x n\n⊢ dist (f x) (f y) ≤ (1 / 2) ^ n\n[PROOFSTEP]\napply (H x y).trans\n[GOAL]\ncase mp\nE : ℕ → Type u_1\nα : Type u_2\ninst✝ : PseudoMetricSpace α\nf : ((n : ℕ) → E n) → α\nH : ∀ (x y : (n : ℕ) → E n), dist (f x) (f y) ≤ dist x y\nx y : (n : ℕ) → E n\nn : ℕ\nhxy : y ∈ cylinder x n\n⊢ dist x y ≤ (1 / 2) ^ n\n[PROOFSTEP]\nrw [PiNat.dist_comm]\n[GOAL]\ncase mp\nE : ℕ → Type u_1\nα : Type u_2\ninst✝ : PseudoMetricSpace α\nf : ((n : ℕ) → E n) → α\nH : ∀ (x y : (n : ℕ) → E n), dist (f x) (f y) ≤ dist x y\nx y : (n : ℕ) → E n\nn : ℕ\nhxy : y ∈ cylinder x n\n⊢ dist y x ≤ (1 / 2) ^ n\n[PROOFSTEP]\nexact mem_cylinder_iff_dist_le.1 hxy\n[GOAL]\ncase mpr\nE : ℕ → Type u_1\nα : Type u_2\ninst✝ : PseudoMetricSpace α\nf : ((n : ℕ) → E n) → α\n⊢ (∀ (x y : (n : ℕ) → E n) (n : ℕ), y ∈ cylinder x n → dist (f x) (f y) ≤ (1 / 2) ^ n) →\n ∀ (x y : (n : ℕ) → E n), dist (f x) (f y) ≤ dist x y\n[PROOFSTEP]\nintro H x y\n[GOAL]\ncase mpr\nE : ℕ → Type u_1\nα : Type u_2\ninst✝ : PseudoMetricSpace α\nf : ((n : ℕ) → E n) → α\nH : ∀ (x y : (n : ℕ) → E n) (n : ℕ), y ∈ cylinder x n → dist (f x) (f y) ≤ (1 / 2) ^ n\nx y : (n : ℕ) → E n\n⊢ dist (f x) (f y) ≤ dist x y\n[PROOFSTEP]\nrcases eq_or_ne x y with (rfl | hne)\n[GOAL]\ncase mpr.inl\nE : ℕ → Type u_1\nα : Type u_2\ninst✝ : PseudoMetricSpace α\nf : ((n : ℕ) → E n) → α\nH : ∀ (x y : (n : ℕ) → E n) (n : ℕ), y ∈ cylinder x n → dist (f x) (f y) ≤ (1 / 2) ^ n\nx : (n : ℕ) → E n\n⊢ dist (f x) (f x) ≤ dist x x\n[PROOFSTEP]\nsimp [PiNat.dist_nonneg]\n[GOAL]\ncase mpr.inr\nE : ℕ → Type u_1\nα : Type u_2\ninst✝ : PseudoMetricSpace α\nf : ((n : ℕ) → E n) → α\nH : ∀ (x y : (n : ℕ) → E n) (n : ℕ), y ∈ cylinder x n → dist (f x) (f y) ≤ (1 / 2) ^ n\nx y : (n : ℕ) → E n\nhne : x ≠ y\n⊢ dist (f x) (f y) ≤ dist x y\n[PROOFSTEP]\nrw [dist_eq_of_ne hne]\n[GOAL]\ncase mpr.inr\nE : ℕ → Type u_1\nα : Type u_2\ninst✝ : PseudoMetricSpace α\nf : ((n : ℕ) → E n) → α\nH : ∀ (x y : (n : ℕ) → E n) (n : ℕ), y ∈ cylinder x n → dist (f x) (f y) ≤ (1 / 2) ^ n\nx y : (n : ℕ) → E n\nhne : x ≠ y\n⊢ dist (f x) (f y) ≤ (1 / 2) ^ firstDiff x y\n[PROOFSTEP]\napply H x y (firstDiff x y)\n[GOAL]\ncase mpr.inr\nE : ℕ → Type u_1\nα : Type u_2\ninst✝ : PseudoMetricSpace α\nf : ((n : ℕ) → E n) → α\nH : ∀ (x y : (n : ℕ) → E n) (n : ℕ), y ∈ cylinder x n → dist (f x) (f y) ≤ (1 / 2) ^ n\nx y : (n : ℕ) → E n\nhne : x ≠ y\n⊢ y ∈ cylinder x (firstDiff x y)\n[PROOFSTEP]\nrw [firstDiff_comm]\n[GOAL]\ncase mpr.inr\nE : ℕ → Type u_1\nα : Type u_2\ninst✝ : PseudoMetricSpace α\nf : ((n : ℕ) → E n) → α\nH : ∀ (x y : (n : ℕ) → E n) (n : ℕ), y ∈ cylinder x n → dist (f x) (f y) ≤ (1 / 2) ^ n\nx y : (n : ℕ) → E n\nhne : x ≠ y\n⊢ y ∈ cylinder x (firstDiff y x)\n[PROOFSTEP]\nexact mem_cylinder_firstDiff _ _\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx : (n : ℕ) → E n\nn : ℕ\n⊢ IsOpen (cylinder x n)\n[PROOFSTEP]\nrw [PiNat.cylinder_eq_pi]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx : (n : ℕ) → E n\nn : ℕ\n⊢ IsOpen (Set.pi ↑(Finset.range n) fun i => {x i})\n[PROOFSTEP]\nexact isOpen_set_pi (Finset.range n).finite_toSet fun a _ => isOpen_discrete _\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\n⊢ IsTopologicalBasis {s | ∃ x n, s = cylinder x n}\n[PROOFSTEP]\napply isTopologicalBasis_of_open_of_nhds\n[GOAL]\ncase h_open\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\n⊢ ∀ (u : Set ((n : ℕ) → E n)), u ∈ {s | ∃ x n, s = cylinder x n} → IsOpen u\n[PROOFSTEP]\nrintro u ⟨x, n, rfl⟩\n[GOAL]\ncase h_open.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx : (n : ℕ) → E n\nn : ℕ\n⊢ IsOpen (cylinder x n)\n[PROOFSTEP]\napply isOpen_cylinder\n[GOAL]\ncase h_nhds\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\n⊢ ∀ (a : (n : ℕ) → E n) (u : Set ((n : ℕ) → E n)),\n a ∈ u → IsOpen u → ∃ v, v ∈ {s | ∃ x n, s = cylinder x n} ∧ a ∈ v ∧ v ⊆ u\n[PROOFSTEP]\nintro x u hx u_open\n[GOAL]\ncase h_nhds\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx : (n : ℕ) → E n\nu : Set ((n : ℕ) → E n)\nhx : x ∈ u\nu_open : IsOpen u\n⊢ ∃ v, v ∈ {s | ∃ x n, s = cylinder x n} ∧ x ∈ v ∧ v ⊆ u\n[PROOFSTEP]\nobtain ⟨v, ⟨U, F, -, rfl⟩, xU, Uu⟩ :\n ∃\n v ∈\n {S : Set (∀ i : ℕ, E i) |\n ∃ (U : ∀ i : ℕ, Set (E i)) (F : Finset ℕ),\n (∀ i : ℕ, i ∈ F → U i ∈ {s : Set (E i) | IsOpen s}) ∧ S = (F : Set ℕ).pi U},\n x ∈ v ∧ v ⊆ u :=\n (isTopologicalBasis_pi fun n : ℕ => isTopologicalBasis_opens).exists_subset_of_mem_open hx u_open\n[GOAL]\ncase h_nhds.intro.intro.intro.intro.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx : (n : ℕ) → E n\nu : Set ((n : ℕ) → E n)\nhx : x ∈ u\nu_open : IsOpen u\nU : (i : ℕ) → Set (E i)\nF : Finset ℕ\nxU : x ∈ Set.pi (↑F) U\nUu : Set.pi (↑F) U ⊆ u\n⊢ ∃ v, v ∈ {s | ∃ x n, s = cylinder x n} ∧ x ∈ v ∧ v ⊆ u\n[PROOFSTEP]\nrcases Finset.bddAbove F with ⟨n, hn⟩\n[GOAL]\ncase h_nhds.intro.intro.intro.intro.intro.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx : (n : ℕ) → E n\nu : Set ((n : ℕ) → E n)\nhx : x ∈ u\nu_open : IsOpen u\nU : (i : ℕ) → Set (E i)\nF : Finset ℕ\nxU : x ∈ Set.pi (↑F) U\nUu : Set.pi (↑F) U ⊆ u\nn : ℕ\nhn : n ∈ upperBounds ↑F\n⊢ ∃ v, v ∈ {s | ∃ x n, s = cylinder x n} ∧ x ∈ v ∧ v ⊆ u\n[PROOFSTEP]\nrefine' ⟨cylinder x (n + 1), ⟨x, n + 1, rfl⟩, self_mem_cylinder _ _, Subset.trans _ Uu⟩\n[GOAL]\ncase h_nhds.intro.intro.intro.intro.intro.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx : (n : ℕ) → E n\nu : Set ((n : ℕ) → E n)\nhx : x ∈ u\nu_open : IsOpen u\nU : (i : ℕ) → Set (E i)\nF : Finset ℕ\nxU : x ∈ Set.pi (↑F) U\nUu : Set.pi (↑F) U ⊆ u\nn : ℕ\nhn : n ∈ upperBounds ↑F\n⊢ cylinder x (n + 1) ⊆ Set.pi (↑F) U\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase h_nhds.intro.intro.intro.intro.intro.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx : (n : ℕ) → E n\nu : Set ((n : ℕ) → E n)\nhx : x ∈ u\nu_open : IsOpen u\nU : (i : ℕ) → Set (E i)\nF : Finset ℕ\nxU : x ∈ Set.pi (↑F) U\nUu : Set.pi (↑F) U ⊆ u\nn : ℕ\nhn : n ∈ upperBounds ↑F\ny : (n : ℕ) → E n\nhy : y ∈ cylinder x (n + 1)\n⊢ y ∈ Set.pi (↑F) U\n[PROOFSTEP]\nsuffices ∀ i : ℕ, i ∈ F → y i ∈ U i by simpa\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx : (n : ℕ) → E n\nu : Set ((n : ℕ) → E n)\nhx : x ∈ u\nu_open : IsOpen u\nU : (i : ℕ) → Set (E i)\nF : Finset ℕ\nxU : x ∈ Set.pi (↑F) U\nUu : Set.pi (↑F) U ⊆ u\nn : ℕ\nhn : n ∈ upperBounds ↑F\ny : (n : ℕ) → E n\nhy : y ∈ cylinder x (n + 1)\nthis : ∀ (i : ℕ), i ∈ F → y i ∈ U i\n⊢ y ∈ Set.pi (↑F) U\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase h_nhds.intro.intro.intro.intro.intro.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx : (n : ℕ) → E n\nu : Set ((n : ℕ) → E n)\nhx : x ∈ u\nu_open : IsOpen u\nU : (i : ℕ) → Set (E i)\nF : Finset ℕ\nxU : x ∈ Set.pi (↑F) U\nUu : Set.pi (↑F) U ⊆ u\nn : ℕ\nhn : n ∈ upperBounds ↑F\ny : (n : ℕ) → E n\nhy : y ∈ cylinder x (n + 1)\n⊢ ∀ (i : ℕ), i ∈ F → y i ∈ U i\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h_nhds.intro.intro.intro.intro.intro.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx : (n : ℕ) → E n\nu : Set ((n : ℕ) → E n)\nhx : x ∈ u\nu_open : IsOpen u\nU : (i : ℕ) → Set (E i)\nF : Finset ℕ\nxU : x ∈ Set.pi (↑F) U\nUu : Set.pi (↑F) U ⊆ u\nn : ℕ\nhn : n ∈ upperBounds ↑F\ny : (n : ℕ) → E n\nhy : y ∈ cylinder x (n + 1)\ni : ℕ\nhi : i ∈ F\n⊢ y i ∈ U i\n[PROOFSTEP]\nhave : y i = x i := mem_cylinder_iff.1 hy i ((hn hi).trans_lt (lt_add_one n))\n[GOAL]\ncase h_nhds.intro.intro.intro.intro.intro.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx : (n : ℕ) → E n\nu : Set ((n : ℕ) → E n)\nhx : x ∈ u\nu_open : IsOpen u\nU : (i : ℕ) → Set (E i)\nF : Finset ℕ\nxU : x ∈ Set.pi (↑F) U\nUu : Set.pi (↑F) U ⊆ u\nn : ℕ\nhn : n ∈ upperBounds ↑F\ny : (n : ℕ) → E n\nhy : y ∈ cylinder x (n + 1)\ni : ℕ\nhi : i ∈ F\nthis : y i = x i\n⊢ y i ∈ U i\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase h_nhds.intro.intro.intro.intro.intro.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx : (n : ℕ) → E n\nu : Set ((n : ℕ) → E n)\nhx : x ∈ u\nu_open : IsOpen u\nU : (i : ℕ) → Set (E i)\nF : Finset ℕ\nxU : x ∈ Set.pi (↑F) U\nUu : Set.pi (↑F) U ⊆ u\nn : ℕ\nhn : n ∈ upperBounds ↑F\ny : (n : ℕ) → E n\nhy : y ∈ cylinder x (n + 1)\ni : ℕ\nhi : i ∈ F\nthis : y i = x i\n⊢ x i ∈ U i\n[PROOFSTEP]\nsimp only [Set.mem_pi, Finset.mem_coe] at xU \n[GOAL]\ncase h_nhds.intro.intro.intro.intro.intro.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx : (n : ℕ) → E n\nu : Set ((n : ℕ) → E n)\nhx : x ∈ u\nu_open : IsOpen u\nU : (i : ℕ) → Set (E i)\nF : Finset ℕ\nUu : Set.pi (↑F) U ⊆ u\nn : ℕ\nhn : n ∈ upperBounds ↑F\ny : (n : ℕ) → E n\nhy : y ∈ cylinder x (n + 1)\ni : ℕ\nhi : i ∈ F\nthis : y i = x i\nxU : ∀ (i : ℕ), i ∈ F → x i ∈ U i\n⊢ x i ∈ U i\n[PROOFSTEP]\nexact xU i hi\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\n⊢ IsOpen s ↔ ∀ (x : (n : ℕ) → E n), x ∈ s → ∃ ε, ε > 0 ∧ ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\n⊢ IsOpen s → ∀ (x : (n : ℕ) → E n), x ∈ s → ∃ ε, ε > 0 ∧ ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s\n[PROOFSTEP]\nintro hs x hx\n[GOAL]\ncase mp\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsOpen s\nx : (n : ℕ) → E n\nhx : x ∈ s\n⊢ ∃ ε, ε > 0 ∧ ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s\n[PROOFSTEP]\nobtain ⟨v, ⟨y, n, rfl⟩, h'x, h's⟩ : ∃ v ∈ {s | ∃ (x : ∀ n : ℕ, E n) (n : ℕ), s = cylinder x n}, x ∈ v ∧ v ⊆ s :=\n (isTopologicalBasis_cylinders E).exists_subset_of_mem_open hx hs\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsOpen s\nx : (n : ℕ) → E n\nhx : x ∈ s\ny : (n : ℕ) → E n\nn : ℕ\nh'x : x ∈ cylinder y n\nh's : cylinder y n ⊆ s\n⊢ ∃ ε, ε > 0 ∧ ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s\n[PROOFSTEP]\nrw [← mem_cylinder_iff_eq.1 h'x] at h's \n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsOpen s\nx : (n : ℕ) → E n\nhx : x ∈ s\ny : (n : ℕ) → E n\nn : ℕ\nh'x : x ∈ cylinder y n\nh's : cylinder x n ⊆ s\n⊢ ∃ ε, ε > 0 ∧ ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s\n[PROOFSTEP]\nexact ⟨(1 / 2 : ℝ) ^ n, by simp, fun y hy => h's fun i hi => (apply_eq_of_dist_lt hy hi.le).symm⟩\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsOpen s\nx : (n : ℕ) → E n\nhx : x ∈ s\ny : (n : ℕ) → E n\nn : ℕ\nh'x : x ∈ cylinder y n\nh's : cylinder x n ⊆ s\n⊢ (1 / 2) ^ n > 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\n⊢ (∀ (x : (n : ℕ) → E n), x ∈ s → ∃ ε, ε > 0 ∧ ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s) → IsOpen s\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nh : ∀ (x : (n : ℕ) → E n), x ∈ s → ∃ ε, ε > 0 ∧ ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s\n⊢ IsOpen s\n[PROOFSTEP]\nrefine (isTopologicalBasis_cylinders E).isOpen_iff.2 fun x hx => ?_\n[GOAL]\ncase mpr\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nh : ∀ (x : (n : ℕ) → E n), x ∈ s → ∃ ε, ε > 0 ∧ ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s\nx : (n : ℕ) → E n\nhx : x ∈ s\n⊢ ∃ t, t ∈ {s | ∃ x n, s = cylinder x n} ∧ x ∈ t ∧ t ⊆ s\n[PROOFSTEP]\nrcases h x hx with ⟨ε, εpos, hε⟩\n[GOAL]\ncase mpr.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nh : ∀ (x : (n : ℕ) → E n), x ∈ s → ∃ ε, ε > 0 ∧ ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s\nx : (n : ℕ) → E n\nhx : x ∈ s\nε : ℝ\nεpos : ε > 0\nhε : ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s\n⊢ ∃ t, t ∈ {s | ∃ x n, s = cylinder x n} ∧ x ∈ t ∧ t ⊆ s\n[PROOFSTEP]\nobtain ⟨n, hn⟩ : ∃ n : ℕ, (1 / 2 : ℝ) ^ n < ε := exists_pow_lt_of_lt_one εpos one_half_lt_one\n[GOAL]\ncase mpr.intro.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nh : ∀ (x : (n : ℕ) → E n), x ∈ s → ∃ ε, ε > 0 ∧ ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s\nx : (n : ℕ) → E n\nhx : x ∈ s\nε : ℝ\nεpos : ε > 0\nhε : ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s\nn : ℕ\nhn : (1 / 2) ^ n < ε\n⊢ ∃ t, t ∈ {s | ∃ x n, s = cylinder x n} ∧ x ∈ t ∧ t ⊆ s\n[PROOFSTEP]\nrefine' ⟨cylinder x n, ⟨x, n, rfl⟩, self_mem_cylinder x n, fun y hy => hε y _⟩\n[GOAL]\ncase mpr.intro.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nh : ∀ (x : (n : ℕ) → E n), x ∈ s → ∃ ε, ε > 0 ∧ ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s\nx : (n : ℕ) → E n\nhx : x ∈ s\nε : ℝ\nεpos : ε > 0\nhε : ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s\nn : ℕ\nhn : (1 / 2) ^ n < ε\ny : (n : ℕ) → E n\nhy : y ∈ cylinder x n\n⊢ dist x y < ε\n[PROOFSTEP]\nrw [PiNat.dist_comm]\n[GOAL]\ncase mpr.intro.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nh : ∀ (x : (n : ℕ) → E n), x ∈ s → ∃ ε, ε > 0 ∧ ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s\nx : (n : ℕ) → E n\nhx : x ∈ s\nε : ℝ\nεpos : ε > 0\nhε : ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s\nn : ℕ\nhn : (1 / 2) ^ n < ε\ny : (n : ℕ) → E n\nhy : y ∈ cylinder x n\n⊢ dist y x < ε\n[PROOFSTEP]\nexact (mem_cylinder_iff_dist_le.1 hy).trans_lt hn\n[GOAL]\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\nx✝¹ x✝ : (n : ℕ) → E n\n⊢ (fun x y => ↑{ val := dist x y, property := (_ : 0 ≤ dist x y) }) x✝¹ x✝ = ENNReal.ofReal (dist x✝¹ x✝)\n[PROOFSTEP]\nexact ENNReal.coe_nnreal_eq _\n[GOAL]\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\n⊢ uniformity ((n : ℕ) → E n) = ⨅ (ε : ℝ) (_ : ε > 0), 𝓟 {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\nsimp [Pi.uniformity, comap_iInf, gt_iff_lt, preimage_setOf_eq, comap_principal, PseudoMetricSpace.uniformity_dist, h,\n idRel]\n[GOAL]\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\n⊢ ⨅ (i : ℕ), 𝓟 {a | Prod.fst a i = Prod.snd a i} = ⨅ (ε : ℝ) (_ : 0 < ε), 𝓟 {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\n⊢ ⨅ (i : ℕ), 𝓟 {a | Prod.fst a i = Prod.snd a i} ≤ ⨅ (ε : ℝ) (_ : 0 < ε), 𝓟 {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\nsimp only [le_iInf_iff, le_principal_iff]\n[GOAL]\ncase a\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\n⊢ ∀ (i : ℝ), 0 < i → {p | dist p.fst p.snd < i} ∈ ⨅ (i : ℕ), 𝓟 {a | Prod.fst a i = Prod.snd a i}\n[PROOFSTEP]\nintro ε εpos\n[GOAL]\ncase a\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\nε : ℝ\nεpos : 0 < ε\n⊢ {p | dist p.fst p.snd < ε} ∈ ⨅ (i : ℕ), 𝓟 {a | Prod.fst a i = Prod.snd a i}\n[PROOFSTEP]\nobtain ⟨n, hn⟩ : ∃ n, (1 / 2 : ℝ) ^ n < ε := exists_pow_lt_of_lt_one εpos (by norm_num)\n[GOAL]\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\nε : ℝ\nεpos : 0 < ε\n⊢ 1 / 2 < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase a.intro\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\nε : ℝ\nεpos : 0 < ε\nn : ℕ\nhn : (1 / 2) ^ n < ε\n⊢ {p | dist p.fst p.snd < ε} ∈ ⨅ (i : ℕ), 𝓟 {a | Prod.fst a i = Prod.snd a i}\n[PROOFSTEP]\napply\n @mem_iInf_of_iInter _ _ _ _ _ (Finset.range n).finite_toSet fun i =>\n {p : (∀ n : ℕ, E n) × ∀ n : ℕ, E n | p.fst i = p.snd i}\n[GOAL]\ncase a.intro.hV\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\nε : ℝ\nεpos : 0 < ε\nn : ℕ\nhn : (1 / 2) ^ n < ε\n⊢ ∀ (i : ↑↑(Finset.range n)), {p | Prod.fst p ↑i = Prod.snd p ↑i} ∈ 𝓟 {a | Prod.fst a ↑i = Prod.snd a ↑i}\n[PROOFSTEP]\nsimp only [mem_principal, setOf_subset_setOf, imp_self, imp_true_iff]\n[GOAL]\ncase a.intro.hU\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\nε : ℝ\nεpos : 0 < ε\nn : ℕ\nhn : (1 / 2) ^ n < ε\n⊢ ⋂ (i : ↑↑(Finset.range n)), {p | Prod.fst p ↑i = Prod.snd p ↑i} ⊆ {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\nrintro ⟨x, y⟩ hxy\n[GOAL]\ncase a.intro.hU.mk\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\nε : ℝ\nεpos : 0 < ε\nn : ℕ\nhn : (1 / 2) ^ n < ε\nx y : (n : ℕ) → E n\nhxy : (x, y) ∈ ⋂ (i : ↑↑(Finset.range n)), {p | Prod.fst p ↑i = Prod.snd p ↑i}\n⊢ (x, y) ∈ {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\nsimp only [Finset.mem_coe, Finset.mem_range, iInter_coe_set, mem_iInter, mem_setOf_eq] at hxy \n[GOAL]\ncase a.intro.hU.mk\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\nε : ℝ\nεpos : 0 < ε\nn : ℕ\nhn : (1 / 2) ^ n < ε\nx y : (n : ℕ) → E n\nhxy : ∀ (i : ℕ), i < n → x i = y i\n⊢ (x, y) ∈ {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\napply lt_of_le_of_lt _ hn\n[GOAL]\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\nε : ℝ\nεpos : 0 < ε\nn : ℕ\nhn : (1 / 2) ^ n < ε\nx y : (n : ℕ) → E n\nhxy : ∀ (i : ℕ), i < n → x i = y i\n⊢ dist (x, y).fst (x, y).snd ≤ (1 / 2) ^ n\n[PROOFSTEP]\nrw [← mem_cylinder_iff_dist_le, mem_cylinder_iff]\n[GOAL]\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\nε : ℝ\nεpos : 0 < ε\nn : ℕ\nhn : (1 / 2) ^ n < ε\nx y : (n : ℕ) → E n\nhxy : ∀ (i : ℕ), i < n → x i = y i\n⊢ ∀ (i : ℕ), i < n → Prod.fst (x, y) i = Prod.snd (x, y) i\n[PROOFSTEP]\nexact hxy\n[GOAL]\ncase a\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\n⊢ ⨅ (ε : ℝ) (_ : 0 < ε), 𝓟 {p | dist p.fst p.snd < ε} ≤ ⨅ (i : ℕ), 𝓟 {a | Prod.fst a i = Prod.snd a i}\n[PROOFSTEP]\nsimp only [le_iInf_iff, le_principal_iff]\n[GOAL]\ncase a\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\n⊢ ∀ (i : ℕ), {a | Prod.fst a i = Prod.snd a i} ∈ ⨅ (ε : ℝ) (_ : 0 < ε), 𝓟 {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\nintro n\n[GOAL]\ncase a\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\nn : ℕ\n⊢ {a | Prod.fst a n = Prod.snd a n} ∈ ⨅ (ε : ℝ) (_ : 0 < ε), 𝓟 {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\nrefine' mem_iInf_of_mem ((1 / 2) ^ n : ℝ) _\n[GOAL]\ncase a\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\nn : ℕ\n⊢ {a | Prod.fst a n = Prod.snd a n} ∈ ⨅ (_ : 0 < (1 / 2) ^ n), 𝓟 {p | dist p.fst p.snd < (1 / 2) ^ n}\n[PROOFSTEP]\nrefine' mem_iInf_of_mem (by positivity) _\n[GOAL]\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\nn : ℕ\n⊢ 0 < (1 / 2) ^ n\n[PROOFSTEP]\npositivity\n[GOAL]\ncase a\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\nn : ℕ\n⊢ {a | Prod.fst a n = Prod.snd a n} ∈ 𝓟 {p | dist p.fst p.snd < (1 / 2) ^ n}\n[PROOFSTEP]\nsimp only [mem_principal, setOf_subset_setOf, Prod.forall]\n[GOAL]\ncase a\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\nn : ℕ\n⊢ ∀ (a b : (n : ℕ) → E n), dist a b < (1 / 2) ^ n → a n = b n\n[PROOFSTEP]\nintro x y hxy\n[GOAL]\ncase a\nE✝ : ℕ → Type u_1\ninst✝² : (n : ℕ) → TopologicalSpace (E✝ n)\ninst✝¹ : ∀ (n : ℕ), DiscreteTopology (E✝ n)\nE : ℕ → Type u_2\ninst✝ : (n : ℕ) → UniformSpace (E n)\nh : ∀ (n : ℕ), uniformity (E n) = 𝓟 idRel\nthis : ∀ (n : ℕ), DiscreteTopology (E n)\nn : ℕ\nx y : (n : ℕ) → E n\nhxy : dist x y < (1 / 2) ^ n\n⊢ x n = y n\n[PROOFSTEP]\nexact apply_eq_of_dist_lt hxy le_rfl\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\n⊢ CompleteSpace ((n : ℕ) → E n)\n[PROOFSTEP]\nrefine' Metric.complete_of_convergent_controlled_sequences (fun n => (1 / 2) ^ n) (by simp) _\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\n⊢ ∀ (n : ℕ), 0 < (fun n => (1 / 2) ^ n) n\n[PROOFSTEP]\nsimp\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\n⊢ ∀ (u : ℕ → (n : ℕ) → E n),\n (∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N) → ∃ x, Tendsto u atTop (𝓝 x)\n[PROOFSTEP]\nintro u hu\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nu : ℕ → (n : ℕ) → E n\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N\n⊢ ∃ x, Tendsto u atTop (𝓝 x)\n[PROOFSTEP]\nrefine' ⟨fun n => u n n, tendsto_pi_nhds.2 fun i => _⟩\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nu : ℕ → (n : ℕ) → E n\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N\ni : ℕ\n⊢ Tendsto (fun i_1 => u i_1 i) atTop (𝓝 (u i i))\n[PROOFSTEP]\nrefine' tendsto_const_nhds.congr' _\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nu : ℕ → (n : ℕ) → E n\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N\ni : ℕ\n⊢ (fun x => u i i) =ᶠ[atTop] fun i_1 => u i_1 i\n[PROOFSTEP]\nfilter_upwards [Filter.Ici_mem_atTop i] with n hn\n[GOAL]\ncase h\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nu : ℕ → (n : ℕ) → E n\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N\ni n : ℕ\nhn : n ∈ Ici i\n⊢ u i i = u n i\n[PROOFSTEP]\nexact apply_eq_of_dist_lt (hu i i n le_rfl hn) le_rfl\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\n⊢ ∃ n, Disjoint s (cylinder x n)\n[PROOFSTEP]\nrcases eq_empty_or_nonempty s with (rfl | hne)\n[GOAL]\ncase inl\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx : (n : ℕ) → E n\nhs : IsClosed ∅\nhx : ¬x ∈ ∅\n⊢ ∃ n, Disjoint ∅ (cylinder x n)\n[PROOFSTEP]\nexact ⟨0, by simp⟩\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx : (n : ℕ) → E n\nhs : IsClosed ∅\nhx : ¬x ∈ ∅\n⊢ Disjoint ∅ (cylinder x 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nhne : Set.Nonempty s\n⊢ ∃ n, Disjoint s (cylinder x n)\n[PROOFSTEP]\nhave A : 0 < infDist x s := (hs.not_mem_iff_infDist_pos hne).1 hx\n[GOAL]\ncase inr\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nhne : Set.Nonempty s\nA : 0 < infDist x s\n⊢ ∃ n, Disjoint s (cylinder x n)\n[PROOFSTEP]\nobtain ⟨n, hn⟩ : ∃ n, (1 / 2 : ℝ) ^ n < infDist x s := exists_pow_lt_of_lt_one A one_half_lt_one\n[GOAL]\ncase inr.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nhne : Set.Nonempty s\nA : 0 < infDist x s\nn : ℕ\nhn : (1 / 2) ^ n < infDist x s\n⊢ ∃ n, Disjoint s (cylinder x n)\n[PROOFSTEP]\nrefine' ⟨n, disjoint_left.2 fun y ys hy => ?_⟩\n[GOAL]\ncase inr.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nhne : Set.Nonempty s\nA : 0 < infDist x s\nn : ℕ\nhn : (1 / 2) ^ n < infDist x s\ny : (n : ℕ) → E n\nys : y ∈ s\nhy : y ∈ cylinder x n\n⊢ False\n[PROOFSTEP]\napply lt_irrefl (infDist x s)\n[GOAL]\ncase inr.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nhne : Set.Nonempty s\nA : 0 < infDist x s\nn : ℕ\nhn : (1 / 2) ^ n < infDist x s\ny : (n : ℕ) → E n\nys : y ∈ s\nhy : y ∈ cylinder x n\n⊢ infDist x s < infDist x s\n[PROOFSTEP]\ncalc\n infDist x s ≤ dist x y := infDist_le_dist_of_mem ys\n _ ≤ (1 / 2) ^ n := by\n rw [mem_cylinder_comm] at hy \n exact mem_cylinder_iff_dist_le.1 hy\n _ < infDist x s := hn\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nhne : Set.Nonempty s\nA : 0 < infDist x s\nn : ℕ\nhn : (1 / 2) ^ n < infDist x s\ny : (n : ℕ) → E n\nys : y ∈ s\nhy : y ∈ cylinder x n\n⊢ dist x y ≤ (1 / 2) ^ n\n[PROOFSTEP]\nrw [mem_cylinder_comm] at hy \n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nhne : Set.Nonempty s\nA : 0 < infDist x s\nn : ℕ\nhn : (1 / 2) ^ n < infDist x s\ny : (n : ℕ) → E n\nys : y ∈ s\nhy : x ∈ cylinder y n\n⊢ dist x y ≤ (1 / 2) ^ n\n[PROOFSTEP]\nexact mem_cylinder_iff_dist_le.1 hy\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx y : (n : ℕ) → E n\nhx : ¬x ∈ s\nhy : y ∈ s\n⊢ firstDiff x y < shortestPrefixDiff x s\n[PROOFSTEP]\nhave A := exists_disjoint_cylinder hs hx\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx y : (n : ℕ) → E n\nhx : ¬x ∈ s\nhy : y ∈ s\nA : ∃ n, Disjoint s (cylinder x n)\n⊢ firstDiff x y < shortestPrefixDiff x s\n[PROOFSTEP]\nrw [shortestPrefixDiff, dif_pos A]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx y : (n : ℕ) → E n\nhx : ¬x ∈ s\nhy : y ∈ s\nA : ∃ n, Disjoint s (cylinder x n)\n⊢ firstDiff x y < Nat.find A\n[PROOFSTEP]\nhave B := Nat.find_spec A\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx y : (n : ℕ) → E n\nhx : ¬x ∈ s\nhy : y ∈ s\nA : ∃ n, Disjoint s (cylinder x n)\nB : Disjoint s (cylinder x (Nat.find A))\n⊢ firstDiff x y < Nat.find A\n[PROOFSTEP]\ncontrapose! B\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx y : (n : ℕ) → E n\nhx : ¬x ∈ s\nhy : y ∈ s\nA : ∃ n, Disjoint s (cylinder x n)\nB : Nat.find A ≤ firstDiff x y\n⊢ ¬Disjoint s (cylinder x (Nat.find A))\n[PROOFSTEP]\nrw [not_disjoint_iff_nonempty_inter]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx y : (n : ℕ) → E n\nhx : ¬x ∈ s\nhy : y ∈ s\nA : ∃ n, Disjoint s (cylinder x n)\nB : Nat.find A ≤ firstDiff x y\n⊢ Set.Nonempty (s ∩ cylinder x (Nat.find A))\n[PROOFSTEP]\nrefine' ⟨y, hy, _⟩\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx y : (n : ℕ) → E n\nhx : ¬x ∈ s\nhy : y ∈ s\nA : ∃ n, Disjoint s (cylinder x n)\nB : Nat.find A ≤ firstDiff x y\n⊢ y ∈ cylinder x (Nat.find A)\n[PROOFSTEP]\nrw [mem_cylinder_comm]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx y : (n : ℕ) → E n\nhx : ¬x ∈ s\nhy : y ∈ s\nA : ∃ n, Disjoint s (cylinder x n)\nB : Nat.find A ≤ firstDiff x y\n⊢ x ∈ cylinder y (Nat.find A)\n[PROOFSTEP]\nexact cylinder_anti y B (mem_cylinder_firstDiff x y)\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\n⊢ 0 < shortestPrefixDiff x s\n[PROOFSTEP]\nrcases hne with ⟨y, hy⟩\n[GOAL]\ncase intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\ny : (n : ℕ) → E n\nhy : y ∈ s\n⊢ 0 < shortestPrefixDiff x s\n[PROOFSTEP]\nexact (zero_le _).trans_lt (firstDiff_lt_shortestPrefixDiff hs hx hy)\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx y : (n : ℕ) → E n\nhx : ¬x ∈ s\nhy : y ∈ s\n⊢ firstDiff x y ≤ longestPrefix x s\n[PROOFSTEP]\nrw [longestPrefix, le_tsub_iff_right]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx y : (n : ℕ) → E n\nhx : ¬x ∈ s\nhy : y ∈ s\n⊢ firstDiff x y + 1 ≤ shortestPrefixDiff x s\n[PROOFSTEP]\nexact firstDiff_lt_shortestPrefixDiff hs hx hy\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx y : (n : ℕ) → E n\nhx : ¬x ∈ s\nhy : y ∈ s\n⊢ 1 ≤ shortestPrefixDiff x s\n[PROOFSTEP]\nexact shortestPrefixDiff_pos hs ⟨y, hy⟩ hx\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nx : (n : ℕ) → E n\n⊢ Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\n[PROOFSTEP]\nby_cases hx : x ∈ s\n[GOAL]\ncase pos\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nx : (n : ℕ) → E n\nhx : x ∈ s\n⊢ Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\n[PROOFSTEP]\nexact ⟨x, hx, self_mem_cylinder _ _⟩\n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\n⊢ Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\n[PROOFSTEP]\nhave A := exists_disjoint_cylinder hs hx\n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nA : ∃ n, Disjoint s (cylinder x n)\n⊢ Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\n[PROOFSTEP]\nhave B : longestPrefix x s < shortestPrefixDiff x s := Nat.pred_lt (shortestPrefixDiff_pos hs hne hx).ne'\n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nA : ∃ n, Disjoint s (cylinder x n)\nB : longestPrefix x s < shortestPrefixDiff x s\n⊢ Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\n[PROOFSTEP]\nrw [longestPrefix, shortestPrefixDiff, dif_pos A] at B ⊢\n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nA : ∃ n, Disjoint s (cylinder x n)\nB : Nat.find A - 1 < Nat.find A\n⊢ Set.Nonempty (s ∩ cylinder x (Nat.find A - 1))\n[PROOFSTEP]\nobtain ⟨y, ys, hy⟩ : ∃ y : ∀ n : ℕ, E n, y ∈ s ∧ x ∈ cylinder y (Nat.find A - 1) := by\n simpa only [not_disjoint_iff, mem_cylinder_comm] using Nat.find_min A B\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nA : ∃ n, Disjoint s (cylinder x n)\nB : Nat.find A - 1 < Nat.find A\n⊢ ∃ y, y ∈ s ∧ x ∈ cylinder y (Nat.find A - 1)\n[PROOFSTEP]\nsimpa only [not_disjoint_iff, mem_cylinder_comm] using Nat.find_min A B\n[GOAL]\ncase neg.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nA : ∃ n, Disjoint s (cylinder x n)\nB : Nat.find A - 1 < Nat.find A\ny : (n : ℕ) → E n\nys : y ∈ s\nhy : x ∈ cylinder y (Nat.find A - 1)\n⊢ Set.Nonempty (s ∩ cylinder x (Nat.find A - 1))\n[PROOFSTEP]\nrefine' ⟨y, ys, _⟩\n[GOAL]\ncase neg.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nA : ∃ n, Disjoint s (cylinder x n)\nB : Nat.find A - 1 < Nat.find A\ny : (n : ℕ) → E n\nys : y ∈ s\nhy : x ∈ cylinder y (Nat.find A - 1)\n⊢ y ∈ cylinder x (Nat.find A - 1)\n[PROOFSTEP]\nrw [mem_cylinder_iff_eq] at hy ⊢\n[GOAL]\ncase neg.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nA : ∃ n, Disjoint s (cylinder x n)\nB : Nat.find A - 1 < Nat.find A\ny : (n : ℕ) → E n\nys : y ∈ s\nhy : cylinder x (Nat.find A - 1) = cylinder y (Nat.find A - 1)\n⊢ cylinder y (Nat.find A - 1) = cylinder x (Nat.find A - 1)\n[PROOFSTEP]\nrw [hy]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nn : ℕ\nhn : longestPrefix x s < n\n⊢ Disjoint s (cylinder x n)\n[PROOFSTEP]\ncontrapose! hn\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nn : ℕ\nhn : ¬Disjoint s (cylinder x n)\n⊢ n ≤ longestPrefix x s\n[PROOFSTEP]\nrcases not_disjoint_iff_nonempty_inter.1 hn with ⟨y, ys, hy⟩\n[GOAL]\ncase intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nn : ℕ\nhn : ¬Disjoint s (cylinder x n)\ny : (n : ℕ) → E n\nys : y ∈ s\nhy : y ∈ cylinder x n\n⊢ n ≤ longestPrefix x s\n[PROOFSTEP]\napply le_trans _ (firstDiff_le_longestPrefix hs hx ys)\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nn : ℕ\nhn : ¬Disjoint s (cylinder x n)\ny : (n : ℕ) → E n\nys : y ∈ s\nhy : y ∈ cylinder x n\n⊢ n ≤ firstDiff x y\n[PROOFSTEP]\napply (mem_cylinder_iff_le_firstDiff (ne_of_mem_of_not_mem ys hx).symm _).1\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nx : (n : ℕ) → E n\nhx : ¬x ∈ s\nn : ℕ\nhn : ¬Disjoint s (cylinder x n)\ny : (n : ℕ) → E n\nys : y ∈ s\nhy : y ∈ cylinder x n\n⊢ x ∈ cylinder y n\n[PROOFSTEP]\nrwa [mem_cylinder_comm]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx y : (n : ℕ) → E n\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nH : longestPrefix x s < firstDiff x y\nxs : ¬x ∈ s\nys : ¬y ∈ s\n⊢ cylinder x (longestPrefix x s) = cylinder y (longestPrefix y s)\n[PROOFSTEP]\nhave l_eq : longestPrefix y s = longestPrefix x s :=\n by\n rcases lt_trichotomy (longestPrefix y s) (longestPrefix x s) with (L | L | L)\n · have Ax : (s ∩ cylinder x (longestPrefix x s)).Nonempty := inter_cylinder_longestPrefix_nonempty hs hne x\n have Z := disjoint_cylinder_of_longestPrefix_lt hs ys L\n rw [firstDiff_comm] at H \n rw [cylinder_eq_cylinder_of_le_firstDiff _ _ H.le] at Z \n exact (Ax.not_disjoint Z).elim\n · exact L\n · have Ay : (s ∩ cylinder y (longestPrefix y s)).Nonempty := inter_cylinder_longestPrefix_nonempty hs hne y\n have A'y : (s ∩ cylinder y (longestPrefix x s).succ).Nonempty :=\n Ay.mono (inter_subset_inter_right s (cylinder_anti _ L))\n have Z := disjoint_cylinder_of_longestPrefix_lt hs xs (Nat.lt_succ_self _)\n rw [cylinder_eq_cylinder_of_le_firstDiff _ _ H] at Z \n exact (A'y.not_disjoint Z).elim\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx y : (n : ℕ) → E n\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nH : longestPrefix x s < firstDiff x y\nxs : ¬x ∈ s\nys : ¬y ∈ s\n⊢ longestPrefix y s = longestPrefix x s\n[PROOFSTEP]\nrcases lt_trichotomy (longestPrefix y s) (longestPrefix x s) with (L | L | L)\n[GOAL]\ncase inl\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx y : (n : ℕ) → E n\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nH : longestPrefix x s < firstDiff x y\nxs : ¬x ∈ s\nys : ¬y ∈ s\nL : longestPrefix y s < longestPrefix x s\n⊢ longestPrefix y s = longestPrefix x s\n[PROOFSTEP]\nhave Ax : (s ∩ cylinder x (longestPrefix x s)).Nonempty := inter_cylinder_longestPrefix_nonempty hs hne x\n[GOAL]\ncase inl\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx y : (n : ℕ) → E n\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nH : longestPrefix x s < firstDiff x y\nxs : ¬x ∈ s\nys : ¬y ∈ s\nL : longestPrefix y s < longestPrefix x s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\n⊢ longestPrefix y s = longestPrefix x s\n[PROOFSTEP]\nhave Z := disjoint_cylinder_of_longestPrefix_lt hs ys L\n[GOAL]\ncase inl\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx y : (n : ℕ) → E n\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nH : longestPrefix x s < firstDiff x y\nxs : ¬x ∈ s\nys : ¬y ∈ s\nL : longestPrefix y s < longestPrefix x s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nZ : Disjoint s (cylinder y (longestPrefix x s))\n⊢ longestPrefix y s = longestPrefix x s\n[PROOFSTEP]\nrw [firstDiff_comm] at H \n[GOAL]\ncase inl\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx y : (n : ℕ) → E n\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nH : longestPrefix x s < firstDiff y x\nxs : ¬x ∈ s\nys : ¬y ∈ s\nL : longestPrefix y s < longestPrefix x s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nZ : Disjoint s (cylinder y (longestPrefix x s))\n⊢ longestPrefix y s = longestPrefix x s\n[PROOFSTEP]\nrw [cylinder_eq_cylinder_of_le_firstDiff _ _ H.le] at Z \n[GOAL]\ncase inl\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx y : (n : ℕ) → E n\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nH : longestPrefix x s < firstDiff y x\nxs : ¬x ∈ s\nys : ¬y ∈ s\nL : longestPrefix y s < longestPrefix x s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nZ : Disjoint s (cylinder x (longestPrefix x s))\n⊢ longestPrefix y s = longestPrefix x s\n[PROOFSTEP]\nexact (Ax.not_disjoint Z).elim\n[GOAL]\ncase inr.inl\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx y : (n : ℕ) → E n\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nH : longestPrefix x s < firstDiff x y\nxs : ¬x ∈ s\nys : ¬y ∈ s\nL : longestPrefix y s = longestPrefix x s\n⊢ longestPrefix y s = longestPrefix x s\n[PROOFSTEP]\nexact L\n[GOAL]\ncase inr.inr\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx y : (n : ℕ) → E n\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nH : longestPrefix x s < firstDiff x y\nxs : ¬x ∈ s\nys : ¬y ∈ s\nL : longestPrefix x s < longestPrefix y s\n⊢ longestPrefix y s = longestPrefix x s\n[PROOFSTEP]\nhave Ay : (s ∩ cylinder y (longestPrefix y s)).Nonempty := inter_cylinder_longestPrefix_nonempty hs hne y\n[GOAL]\ncase inr.inr\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx y : (n : ℕ) → E n\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nH : longestPrefix x s < firstDiff x y\nxs : ¬x ∈ s\nys : ¬y ∈ s\nL : longestPrefix x s < longestPrefix y s\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\n⊢ longestPrefix y s = longestPrefix x s\n[PROOFSTEP]\nhave A'y : (s ∩ cylinder y (longestPrefix x s).succ).Nonempty :=\n Ay.mono (inter_subset_inter_right s (cylinder_anti _ L))\n[GOAL]\ncase inr.inr\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx y : (n : ℕ) → E n\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nH : longestPrefix x s < firstDiff x y\nxs : ¬x ∈ s\nys : ¬y ∈ s\nL : longestPrefix x s < longestPrefix y s\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nA'y : Set.Nonempty (s ∩ cylinder y (Nat.succ (longestPrefix x s)))\n⊢ longestPrefix y s = longestPrefix x s\n[PROOFSTEP]\nhave Z := disjoint_cylinder_of_longestPrefix_lt hs xs (Nat.lt_succ_self _)\n[GOAL]\ncase inr.inr\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx y : (n : ℕ) → E n\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nH : longestPrefix x s < firstDiff x y\nxs : ¬x ∈ s\nys : ¬y ∈ s\nL : longestPrefix x s < longestPrefix y s\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nA'y : Set.Nonempty (s ∩ cylinder y (Nat.succ (longestPrefix x s)))\nZ : Disjoint s (cylinder x (Nat.succ (longestPrefix x s)))\n⊢ longestPrefix y s = longestPrefix x s\n[PROOFSTEP]\nrw [cylinder_eq_cylinder_of_le_firstDiff _ _ H] at Z \n[GOAL]\ncase inr.inr\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx y : (n : ℕ) → E n\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nH : longestPrefix x s < firstDiff x y\nxs : ¬x ∈ s\nys : ¬y ∈ s\nL : longestPrefix x s < longestPrefix y s\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nA'y : Set.Nonempty (s ∩ cylinder y (Nat.succ (longestPrefix x s)))\nZ : Disjoint s (cylinder y (Nat.succ (longestPrefix x s)))\n⊢ longestPrefix y s = longestPrefix x s\n[PROOFSTEP]\nexact (A'y.not_disjoint Z).elim\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx y : (n : ℕ) → E n\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nH : longestPrefix x s < firstDiff x y\nxs : ¬x ∈ s\nys : ¬y ∈ s\nl_eq : longestPrefix y s = longestPrefix x s\n⊢ cylinder x (longestPrefix x s) = cylinder y (longestPrefix y s)\n[PROOFSTEP]\nrw [l_eq, ← mem_cylinder_iff_eq]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nx y : (n : ℕ) → E n\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nH : longestPrefix x s < firstDiff x y\nxs : ¬x ∈ s\nys : ¬y ∈ s\nl_eq : longestPrefix y s = longestPrefix x s\n⊢ x ∈ cylinder y (longestPrefix x s)\n[PROOFSTEP]\nexact cylinder_anti y H.le (mem_cylinder_firstDiff x y)\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\n⊢ ∃ f, (∀ (x : (n : ℕ) → E n), x ∈ s → f x = x) ∧ range f = s ∧ LipschitzWith 1 f\n[PROOFSTEP]\nset f := fun x => if x ∈ s then x else (inter_cylinder_longestPrefix_nonempty hs hne x).some\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\n⊢ ∃ f, (∀ (x : (n : ℕ) → E n), x ∈ s → f x = x) ∧ range f = s ∧ LipschitzWith 1 f\n[PROOFSTEP]\nhave fs : ∀ x ∈ s, f x = x := fun x xs => by simp [xs]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nx : (n : ℕ) → E n\nxs : x ∈ s\n⊢ f x = x\n[PROOFSTEP]\nsimp [xs]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\n⊢ ∃ f, (∀ (x : (n : ℕ) → E n), x ∈ s → f x = x) ∧ range f = s ∧ LipschitzWith 1 f\n[PROOFSTEP]\nrefine'\n ⟨f, fs, _, _⟩\n -- check that the range of `f` is `s`.\n[GOAL]\ncase refine'_1\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\n⊢ range f = s\n[PROOFSTEP]\napply Subset.antisymm\n[GOAL]\ncase refine'_1.h₁\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\n⊢ range f ⊆ s\n[PROOFSTEP]\nrintro x ⟨y, rfl⟩\n[GOAL]\ncase refine'_1.h₁.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\ny : (n : ℕ) → E n\n⊢ f y ∈ s\n[PROOFSTEP]\nby_cases hy : y ∈ s\n[GOAL]\ncase pos\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\ny : (n : ℕ) → E n\nhy : y ∈ s\n⊢ f y ∈ s\n[PROOFSTEP]\nrwa [fs y hy]\n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\ny : (n : ℕ) → E n\nhy : ¬y ∈ s\n⊢ f y ∈ s\n[PROOFSTEP]\nsimpa [if_neg hy] using (inter_cylinder_longestPrefix_nonempty hs hne y).choose_spec.1\n[GOAL]\ncase refine'_1.h₂\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\n⊢ s ⊆ range f\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine'_1.h₂\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx : (n : ℕ) → E n\nhx : x ∈ s\n⊢ x ∈ range f\n[PROOFSTEP]\nrw [← fs x hx]\n[GOAL]\ncase refine'_1.h₂\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx : (n : ℕ) → E n\nhx : x ∈ s\n⊢ f x ∈ range f\n[PROOFSTEP]\nexact\n mem_range_self\n _\n -- check that `f` is `1`-Lipschitz, by a case analysis.\n[GOAL]\ncase refine'_2\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\n⊢ LipschitzWith 1 f\n[PROOFSTEP]\nrefine\n LipschitzWith.mk_one fun x y =>\n ?_\n -- exclude the trivial cases where `x = y`, or `f x = f y`.\n[GOAL]\ncase refine'_2\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\n⊢ dist (f x) (f y) ≤ dist x y\n[PROOFSTEP]\nrcases eq_or_ne x y with (rfl | hxy)\n[GOAL]\ncase refine'_2.inl\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx : (n : ℕ) → E n\n⊢ dist (f x) (f x) ≤ dist x x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2.inr\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\n⊢ dist (f x) (f y) ≤ dist x y\n[PROOFSTEP]\nrcases eq_or_ne (f x) (f y) with (h' | hfxfy)\n[GOAL]\ncase refine'_2.inr.inl\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nh' : f x = f y\n⊢ dist (f x) (f y) ≤ dist x y\n[PROOFSTEP]\nsimp [h', dist_nonneg]\n[GOAL]\ncase refine'_2.inr.inr\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\n⊢ dist (f x) (f y) ≤ dist x y\n[PROOFSTEP]\nhave I2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y) :=\n by\n rw [← mem_cylinder_iff_eq]\n apply mem_cylinder_firstDiff\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\n⊢ cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\n[PROOFSTEP]\nrw [← mem_cylinder_iff_eq]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\n⊢ x ∈ cylinder y (firstDiff x y)\n[PROOFSTEP]\napply mem_cylinder_firstDiff\n[GOAL]\ncase refine'_2.inr.inr\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\n⊢ dist (f x) (f y) ≤ dist x y\n[PROOFSTEP]\nsuffices firstDiff x y ≤ firstDiff (f x) (f y) by\n simpa [dist_eq_of_ne hxy, dist_eq_of_ne hfxfy]\n -- case where `x ∈ s`\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nthis : firstDiff x y ≤ firstDiff (f x) (f y)\n⊢ dist (f x) (f y) ≤ dist x y\n[PROOFSTEP]\nsimpa [dist_eq_of_ne hxy, dist_eq_of_ne hfxfy]\n -- case where `x ∈ s`\n[GOAL]\ncase refine'_2.inr.inr\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nby_cases xs : x ∈ s\n[GOAL]\ncase pos\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : x ∈ s\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nrw [fs x xs] at hfxfy ⊢\n -- case where `y ∈ s`, trivial\n[GOAL]\ncase pos\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : x ∈ s\n⊢ firstDiff x y ≤ firstDiff x (f y)\n[PROOFSTEP]\nby_cases ys : y ∈ s\n[GOAL]\ncase pos\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : x ∈ s\nys : y ∈ s\n⊢ firstDiff x y ≤ firstDiff x (f y)\n[PROOFSTEP]\nrw [fs y ys]\n -- case where `y ∉ s`\n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : x ∈ s\nys : ¬y ∈ s\n⊢ firstDiff x y ≤ firstDiff x (f y)\n[PROOFSTEP]\nhave A : (s ∩ cylinder y (longestPrefix y s)).Nonempty := inter_cylinder_longestPrefix_nonempty hs hne y\n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : x ∈ s\nys : ¬y ∈ s\nA : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\n⊢ firstDiff x y ≤ firstDiff x (f y)\n[PROOFSTEP]\nhave fy : f y = A.some := by simp_rw [if_neg ys]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : x ∈ s\nys : ¬y ∈ s\nA : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\n⊢ f y = Set.Nonempty.some A\n[PROOFSTEP]\nsimp_rw [if_neg ys]\n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : x ∈ s\nys : ¬y ∈ s\nA : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some A\n⊢ firstDiff x y ≤ firstDiff x (f y)\n[PROOFSTEP]\nhave I : cylinder A.some (firstDiff x y) = cylinder y (firstDiff x y) :=\n by\n rw [← mem_cylinder_iff_eq, firstDiff_comm]\n apply cylinder_anti y _ A.some_mem.2\n exact firstDiff_le_longestPrefix hs ys xs\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : x ∈ s\nys : ¬y ∈ s\nA : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some A\n⊢ cylinder (Set.Nonempty.some A) (firstDiff x y) = cylinder y (firstDiff x y)\n[PROOFSTEP]\nrw [← mem_cylinder_iff_eq, firstDiff_comm]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : x ∈ s\nys : ¬y ∈ s\nA : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some A\n⊢ Set.Nonempty.some A ∈ cylinder y (firstDiff y x)\n[PROOFSTEP]\napply cylinder_anti y _ A.some_mem.2\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : x ∈ s\nys : ¬y ∈ s\nA : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some A\n⊢ firstDiff y x ≤ longestPrefix y s\n[PROOFSTEP]\nexact firstDiff_le_longestPrefix hs ys xs\n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : x ∈ s\nys : ¬y ∈ s\nA : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some A\nI : cylinder (Set.Nonempty.some A) (firstDiff x y) = cylinder y (firstDiff x y)\n⊢ firstDiff x y ≤ firstDiff x (f y)\n[PROOFSTEP]\nrwa [← fy, ← I2, ← mem_cylinder_iff_eq, mem_cylinder_iff_le_firstDiff hfxfy.symm, firstDiff_comm _ x] at I \n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nby_cases ys : y ∈ s\n[GOAL]\ncase pos\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : y ∈ s\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nhave A : (s ∩ cylinder x (longestPrefix x s)).Nonempty := inter_cylinder_longestPrefix_nonempty hs hne x\n[GOAL]\ncase pos\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : y ∈ s\nA : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nhave fx : f x = A.some := by simp_rw [if_neg xs]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : y ∈ s\nA : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\n⊢ f x = Set.Nonempty.some A\n[PROOFSTEP]\nsimp_rw [if_neg xs]\n[GOAL]\ncase pos\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : y ∈ s\nA : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some A\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nhave I : cylinder A.some (firstDiff x y) = cylinder x (firstDiff x y) :=\n by\n rw [← mem_cylinder_iff_eq]\n apply cylinder_anti x _ A.some_mem.2\n apply firstDiff_le_longestPrefix hs xs ys\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : y ∈ s\nA : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some A\n⊢ cylinder (Set.Nonempty.some A) (firstDiff x y) = cylinder x (firstDiff x y)\n[PROOFSTEP]\nrw [← mem_cylinder_iff_eq]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : y ∈ s\nA : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some A\n⊢ Set.Nonempty.some A ∈ cylinder x (firstDiff x y)\n[PROOFSTEP]\napply cylinder_anti x _ A.some_mem.2\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : y ∈ s\nA : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some A\n⊢ firstDiff x y ≤ longestPrefix x s\n[PROOFSTEP]\napply firstDiff_le_longestPrefix hs xs ys\n[GOAL]\ncase pos\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : y ∈ s\nA : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some A\nI : cylinder (Set.Nonempty.some A) (firstDiff x y) = cylinder x (firstDiff x y)\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nrw [fs y ys] at hfxfy ⊢\n[GOAL]\ncase pos\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : y ∈ s\nA : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some A\nI : cylinder (Set.Nonempty.some A) (firstDiff x y) = cylinder x (firstDiff x y)\n⊢ firstDiff x y ≤ firstDiff (f x) y\n[PROOFSTEP]\nrwa [← fx, I2, ← mem_cylinder_iff_eq, mem_cylinder_iff_le_firstDiff hfxfy] at I \n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nhave Ax : (s ∩ cylinder x (longestPrefix x s)).Nonempty := inter_cylinder_longestPrefix_nonempty hs hne x\n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nhave fx : f x = Ax.some := by simp_rw [if_neg xs]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\n⊢ f x = Set.Nonempty.some Ax\n[PROOFSTEP]\nsimp_rw [if_neg xs]\n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nhave Ay : (s ∩ cylinder y (longestPrefix y s)).Nonempty := inter_cylinder_longestPrefix_nonempty hs hne y\n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nhave fy : f y = Ay.some := by\n simp_rw [if_neg ys]\n -- case where the common prefix to `x` and `s`, or `y` and `s`, is shorter than the\n -- common part to `x` and `y` -- then `f x = f y`.\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\n⊢ f y = Set.Nonempty.some Ay\n[PROOFSTEP]\nsimp_rw [if_neg ys]\n -- case where the common prefix to `x` and `s`, or `y` and `s`, is shorter than the\n -- common part to `x` and `y` -- then `f x = f y`.\n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nby_cases H : longestPrefix x s < firstDiff x y ∨ longestPrefix y s < firstDiff x y\n[GOAL]\ncase pos\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\nH : longestPrefix x s < firstDiff x y ∨ longestPrefix y s < firstDiff x y\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nhave : cylinder x (longestPrefix x s) = cylinder y (longestPrefix y s) :=\n by\n cases' H with H H\n · exact cylinder_longestPrefix_eq_of_longestPrefix_lt_firstDiff hs hne H xs ys\n · symm\n rw [firstDiff_comm] at H \n exact cylinder_longestPrefix_eq_of_longestPrefix_lt_firstDiff hs hne H ys xs\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\nH : longestPrefix x s < firstDiff x y ∨ longestPrefix y s < firstDiff x y\n⊢ cylinder x (longestPrefix x s) = cylinder y (longestPrefix y s)\n[PROOFSTEP]\ncases' H with H H\n[GOAL]\ncase inl\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\nH : longestPrefix x s < firstDiff x y\n⊢ cylinder x (longestPrefix x s) = cylinder y (longestPrefix y s)\n[PROOFSTEP]\nexact cylinder_longestPrefix_eq_of_longestPrefix_lt_firstDiff hs hne H xs ys\n[GOAL]\ncase inr\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\nH : longestPrefix y s < firstDiff x y\n⊢ cylinder x (longestPrefix x s) = cylinder y (longestPrefix y s)\n[PROOFSTEP]\nsymm\n[GOAL]\ncase inr\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\nH : longestPrefix y s < firstDiff x y\n⊢ cylinder y (longestPrefix y s) = cylinder x (longestPrefix x s)\n[PROOFSTEP]\nrw [firstDiff_comm] at H \n[GOAL]\ncase inr\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\nH : longestPrefix y s < firstDiff y x\n⊢ cylinder y (longestPrefix y s) = cylinder x (longestPrefix x s)\n[PROOFSTEP]\nexact cylinder_longestPrefix_eq_of_longestPrefix_lt_firstDiff hs hne H ys xs\n[GOAL]\ncase pos\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\nH : longestPrefix x s < firstDiff x y ∨ longestPrefix y s < firstDiff x y\nthis : cylinder x (longestPrefix x s) = cylinder y (longestPrefix y s)\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nrw [fx, fy] at hfxfy \n[GOAL]\ncase pos\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nhfxfy : Set.Nonempty.some Ax ≠ Set.Nonempty.some Ay\nfy : f y = Set.Nonempty.some Ay\nH : longestPrefix x s < firstDiff x y ∨ longestPrefix y s < firstDiff x y\nthis : cylinder x (longestPrefix x s) = cylinder y (longestPrefix y s)\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\napply (hfxfy _).elim\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nhfxfy : Set.Nonempty.some Ax ≠ Set.Nonempty.some Ay\nfy : f y = Set.Nonempty.some Ay\nH : longestPrefix x s < firstDiff x y ∨ longestPrefix y s < firstDiff x y\nthis : cylinder x (longestPrefix x s) = cylinder y (longestPrefix y s)\n⊢ Set.Nonempty.some Ax = Set.Nonempty.some Ay\n[PROOFSTEP]\ncongr\n -- case where the common prefix to `x` and `s` is long, as well as the common prefix to\n -- `y` and `s`. Then all points remain in the same cylinders.\n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\nH : ¬(longestPrefix x s < firstDiff x y ∨ longestPrefix y s < firstDiff x y)\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\npush_neg at H \n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\nH : firstDiff x y ≤ longestPrefix x s ∧ firstDiff x y ≤ longestPrefix y s\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nhave I1 : cylinder Ax.some (firstDiff x y) = cylinder x (firstDiff x y) :=\n by\n rw [← mem_cylinder_iff_eq]\n exact cylinder_anti x H.1 Ax.some_mem.2\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\nH : firstDiff x y ≤ longestPrefix x s ∧ firstDiff x y ≤ longestPrefix y s\n⊢ cylinder (Set.Nonempty.some Ax) (firstDiff x y) = cylinder x (firstDiff x y)\n[PROOFSTEP]\nrw [← mem_cylinder_iff_eq]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\nH : firstDiff x y ≤ longestPrefix x s ∧ firstDiff x y ≤ longestPrefix y s\n⊢ Set.Nonempty.some Ax ∈ cylinder x (firstDiff x y)\n[PROOFSTEP]\nexact cylinder_anti x H.1 Ax.some_mem.2\n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\nH : firstDiff x y ≤ longestPrefix x s ∧ firstDiff x y ≤ longestPrefix y s\nI1 : cylinder (Set.Nonempty.some Ax) (firstDiff x y) = cylinder x (firstDiff x y)\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nhave I3 : cylinder y (firstDiff x y) = cylinder Ay.some (firstDiff x y) :=\n by\n rw [eq_comm, ← mem_cylinder_iff_eq]\n exact cylinder_anti y H.2 Ay.some_mem.2\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\nH : firstDiff x y ≤ longestPrefix x s ∧ firstDiff x y ≤ longestPrefix y s\nI1 : cylinder (Set.Nonempty.some Ax) (firstDiff x y) = cylinder x (firstDiff x y)\n⊢ cylinder y (firstDiff x y) = cylinder (Set.Nonempty.some Ay) (firstDiff x y)\n[PROOFSTEP]\nrw [eq_comm, ← mem_cylinder_iff_eq]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\nH : firstDiff x y ≤ longestPrefix x s ∧ firstDiff x y ≤ longestPrefix y s\nI1 : cylinder (Set.Nonempty.some Ax) (firstDiff x y) = cylinder x (firstDiff x y)\n⊢ Set.Nonempty.some Ay ∈ cylinder y (firstDiff x y)\n[PROOFSTEP]\nexact cylinder_anti y H.2 Ay.some_mem.2\n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\nH : firstDiff x y ≤ longestPrefix x s ∧ firstDiff x y ≤ longestPrefix y s\nI1 : cylinder (Set.Nonempty.some Ax) (firstDiff x y) = cylinder x (firstDiff x y)\nI3 : cylinder y (firstDiff x y) = cylinder (Set.Nonempty.some Ay) (firstDiff x y)\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nhave : cylinder Ax.some (firstDiff x y) = cylinder Ay.some (firstDiff x y) := by rw [I1, I2, I3]\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\nH : firstDiff x y ≤ longestPrefix x s ∧ firstDiff x y ≤ longestPrefix y s\nI1 : cylinder (Set.Nonempty.some Ax) (firstDiff x y) = cylinder x (firstDiff x y)\nI3 : cylinder y (firstDiff x y) = cylinder (Set.Nonempty.some Ay) (firstDiff x y)\n⊢ cylinder (Set.Nonempty.some Ax) (firstDiff x y) = cylinder (Set.Nonempty.some Ay) (firstDiff x y)\n[PROOFSTEP]\nrw [I1, I2, I3]\n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\nH : firstDiff x y ≤ longestPrefix x s ∧ firstDiff x y ≤ longestPrefix y s\nI1 : cylinder (Set.Nonempty.some Ax) (firstDiff x y) = cylinder x (firstDiff x y)\nI3 : cylinder y (firstDiff x y) = cylinder (Set.Nonempty.some Ay) (firstDiff x y)\nthis : cylinder (Set.Nonempty.some Ax) (firstDiff x y) = cylinder (Set.Nonempty.some Ay) (firstDiff x y)\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nrw [← fx, ← fy, ← mem_cylinder_iff_eq, mem_cylinder_iff_le_firstDiff hfxfy] at this \n[GOAL]\ncase neg\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n :=\n fun x => if x ∈ s then x else Set.Nonempty.some (_ : Set.Nonempty (s ∩ cylinder x (longestPrefix x s)))\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nx y : (n : ℕ) → E n\nhxy : x ≠ y\nhfxfy : f x ≠ f y\nI2 : cylinder x (firstDiff x y) = cylinder y (firstDiff x y)\nxs : ¬x ∈ s\nys : ¬y ∈ s\nAx : Set.Nonempty (s ∩ cylinder x (longestPrefix x s))\nfx : f x = Set.Nonempty.some Ax\nAy : Set.Nonempty (s ∩ cylinder y (longestPrefix y s))\nfy : f y = Set.Nonempty.some Ay\nH : firstDiff x y ≤ longestPrefix x s ∧ firstDiff x y ≤ longestPrefix y s\nI1 : cylinder (Set.Nonempty.some Ax) (firstDiff x y) = cylinder x (firstDiff x y)\nI3 : cylinder y (firstDiff x y) = cylinder (Set.Nonempty.some Ay) (firstDiff x y)\nthis : firstDiff x y ≤ firstDiff (f x) (f y)\n⊢ firstDiff x y ≤ firstDiff (f x) (f y)\n[PROOFSTEP]\nexact this\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\n⊢ ∃ f, (∀ (x : (n : ℕ) → E n), x ∈ s → f x = x) ∧ range f = s ∧ Continuous f\n[PROOFSTEP]\nrcases exists_lipschitz_retraction_of_isClosed hs hne with ⟨f, fs, frange, hf⟩\n[GOAL]\ncase intro.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\nf : ((n : ℕ) → E n) → (n : ℕ) → E n\nfs : ∀ (x : (n : ℕ) → E n), x ∈ s → f x = x\nfrange : range f = s\nhf : LipschitzWith 1 f\n⊢ ∃ f, (∀ (x : (n : ℕ) → E n), x ∈ s → f x = x) ∧ range f = s ∧ Continuous f\n[PROOFSTEP]\nexact ⟨f, fs, frange, hf.continuous⟩\n[GOAL]\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\ns : Set ((n : ℕ) → E n)\nhs : IsClosed s\nhne : Set.Nonempty s\n⊢ ∃ f, (∀ (x : ↑s), f ↑x = x) ∧ Surjective f ∧ Continuous f\n[PROOFSTEP]\nobtain ⟨f, fs, rfl, f_cont⟩ : ∃ f : (∀ n, E n) → ∀ n, E n, (∀ x ∈ s, f x = x) ∧ range f = s ∧ Continuous f :=\n exists_retraction_of_isClosed hs hne\n[GOAL]\ncase intro.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nf : ((n : ℕ) → E n) → (n : ℕ) → E n\nf_cont : Continuous f\nhs : IsClosed (range f)\nhne : Set.Nonempty (range f)\nfs : ∀ (x : (n : ℕ) → E n), x ∈ range f → f x = x\n⊢ ∃ f_1, (∀ (x : ↑(range f)), f_1 ↑x = x) ∧ Surjective f_1 ∧ Continuous f_1\n[PROOFSTEP]\nhave A : ∀ x : range f, rangeFactorization f x = x := fun x ↦ Subtype.eq <| fs x x.2\n[GOAL]\ncase intro.intro.intro\nE : ℕ → Type u_1\ninst✝¹ : (n : ℕ) → TopologicalSpace (E n)\ninst✝ : ∀ (n : ℕ), DiscreteTopology (E n)\nf : ((n : ℕ) → E n) → (n : ℕ) → E n\nf_cont : Continuous f\nhs : IsClosed (range f)\nhne : Set.Nonempty (range f)\nfs : ∀ (x : (n : ℕ) → E n), x ∈ range f → f x = x\nA : ∀ (x : ↑(range f)), rangeFactorization f ↑x = x\n⊢ ∃ f_1, (∀ (x : ↑(range f)), f_1 ↑x = x) ∧ Surjective f_1 ∧ Continuous f_1\n[PROOFSTEP]\nexact ⟨rangeFactorization f, A, fun x => ⟨x, A x⟩, f_cont.subtype_mk _⟩\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\n⊢ ∃ f, Continuous f ∧ Surjective f\n[PROOFSTEP]\nletI : MetricSpace (ℕ → ℕ) := PiNat.metricSpaceNatNat\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\n⊢ ∃ f, Continuous f ∧ Surjective f\n[PROOFSTEP]\nhave I0 : (0 : ℝ) < 1 / 2 := by norm_num\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\n⊢ 0 < 1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\n⊢ ∃ f, Continuous f ∧ Surjective f\n[PROOFSTEP]\nhave I1 : (1 / 2 : ℝ) < 1 := by norm_num\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\n⊢ 1 / 2 < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\n⊢ ∃ f, Continuous f ∧ Surjective f\n[PROOFSTEP]\nrcases exists_dense_seq α with ⟨u, hu⟩\n[GOAL]\ncase intro\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\n⊢ ∃ f, Continuous f ∧ Surjective f\n[PROOFSTEP]\nlet s : Set (ℕ → ℕ) := {x | (⋂ n : ℕ, closedBall (u (x n)) ((1 / 2) ^ n)).Nonempty}\n[GOAL]\ncase intro\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\n⊢ ∃ f, Continuous f ∧ Surjective f\n[PROOFSTEP]\nlet g : s → α := fun x => x.2.some\n[GOAL]\ncase intro\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\n⊢ ∃ f, Continuous f ∧ Surjective f\n[PROOFSTEP]\nhave A : ∀ (x : s) (n : ℕ), dist (g x) (u ((x : ℕ → ℕ) n)) ≤ (1 / 2) ^ n := fun x n => (mem_iInter.1 x.2.some_mem n : _)\n[GOAL]\ncase intro\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\n⊢ ∃ f, Continuous f ∧ Surjective f\n[PROOFSTEP]\nhave g_cont : Continuous g := by\n refine continuous_iff_continuousAt.2 fun y => ?_\n refine continuousAt_of_locally_lipschitz zero_lt_one 4 fun x hxy => ?_\n rcases eq_or_ne x y with (rfl | hne)\n · simp\n have hne' : x.1 ≠ y.1 := Subtype.coe_injective.ne hne\n have dist' : dist x y = dist x.1 y.1 := rfl\n let n := firstDiff x.1 y.1 - 1\n have diff_pos : 0 < firstDiff x.1 y.1 := by\n by_contra' h\n apply apply_firstDiff_ne hne'\n rw [le_zero_iff.1 h]\n apply apply_eq_of_dist_lt _ le_rfl\n rw [pow_zero]\n exact hxy\n have hn : firstDiff x.1 y.1 = n + 1 := (Nat.succ_pred_eq_of_pos diff_pos).symm\n rw [dist', dist_eq_of_ne hne', hn]\n have B : x.1 n = y.1 n := mem_cylinder_firstDiff x.1 y.1 n (Nat.pred_lt diff_pos.ne')\n calc\n dist (g x) (g y) ≤ dist (g x) (u (x.1 n)) + dist (g y) (u (x.1 n)) := dist_triangle_right _ _ _\n _ = dist (g x) (u (x.1 n)) + dist (g y) (u (y.1 n)) := by rw [← B]\n _ ≤ (1 / 2) ^ n + (1 / 2) ^ n := (add_le_add (A x n) (A y n))\n _ = 4 * (1 / 2) ^ (n + 1) := by ring\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\n⊢ Continuous g\n[PROOFSTEP]\nrefine continuous_iff_continuousAt.2 fun y => ?_\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ny : ↑s\n⊢ ContinuousAt g y\n[PROOFSTEP]\nrefine continuousAt_of_locally_lipschitz zero_lt_one 4 fun x hxy => ?_\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ny x : ↑s\nhxy : dist x y < 1\n⊢ dist (g x) (g y) ≤ 4 * dist x y\n[PROOFSTEP]\nrcases eq_or_ne x y with (rfl | hne)\n[GOAL]\ncase inl\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\nx : ↑s\nhxy : dist x x < 1\n⊢ dist (g x) (g x) ≤ 4 * dist x x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ny x : ↑s\nhxy : dist x y < 1\nhne : x ≠ y\n⊢ dist (g x) (g y) ≤ 4 * dist x y\n[PROOFSTEP]\nhave hne' : x.1 ≠ y.1 := Subtype.coe_injective.ne hne\n[GOAL]\ncase inr\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ny x : ↑s\nhxy : dist x y < 1\nhne : x ≠ y\nhne' : ↑x ≠ ↑y\n⊢ dist (g x) (g y) ≤ 4 * dist x y\n[PROOFSTEP]\nhave dist' : dist x y = dist x.1 y.1 := rfl\n[GOAL]\ncase inr\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ny x : ↑s\nhxy : dist x y < 1\nhne : x ≠ y\nhne' : ↑x ≠ ↑y\ndist' : dist x y = dist ↑x ↑y\n⊢ dist (g x) (g y) ≤ 4 * dist x y\n[PROOFSTEP]\nlet n := firstDiff x.1 y.1 - 1\n[GOAL]\ncase inr\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ny x : ↑s\nhxy : dist x y < 1\nhne : x ≠ y\nhne' : ↑x ≠ ↑y\ndist' : dist x y = dist ↑x ↑y\nn : ℕ := firstDiff ↑x ↑y - 1\n⊢ dist (g x) (g y) ≤ 4 * dist x y\n[PROOFSTEP]\nhave diff_pos : 0 < firstDiff x.1 y.1 := by\n by_contra' h\n apply apply_firstDiff_ne hne'\n rw [le_zero_iff.1 h]\n apply apply_eq_of_dist_lt _ le_rfl\n rw [pow_zero]\n exact hxy\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ny x : ↑s\nhxy : dist x y < 1\nhne : x ≠ y\nhne' : ↑x ≠ ↑y\ndist' : dist x y = dist ↑x ↑y\nn : ℕ := firstDiff ↑x ↑y - 1\n⊢ 0 < firstDiff ↑x ↑y\n[PROOFSTEP]\nby_contra' h\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ny x : ↑s\nhxy : dist x y < 1\nhne : x ≠ y\nhne' : ↑x ≠ ↑y\ndist' : dist x y = dist ↑x ↑y\nn : ℕ := firstDiff ↑x ↑y - 1\nh : firstDiff ↑x ↑y ≤ 0\n⊢ False\n[PROOFSTEP]\napply apply_firstDiff_ne hne'\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ny x : ↑s\nhxy : dist x y < 1\nhne : x ≠ y\nhne' : ↑x ≠ ↑y\ndist' : dist x y = dist ↑x ↑y\nn : ℕ := firstDiff ↑x ↑y - 1\nh : firstDiff ↑x ↑y ≤ 0\n⊢ ↑x (firstDiff ↑x ↑y) = ↑y (firstDiff ↑x ↑y)\n[PROOFSTEP]\nrw [le_zero_iff.1 h]\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ny x : ↑s\nhxy : dist x y < 1\nhne : x ≠ y\nhne' : ↑x ≠ ↑y\ndist' : dist x y = dist ↑x ↑y\nn : ℕ := firstDiff ↑x ↑y - 1\nh : firstDiff ↑x ↑y ≤ 0\n⊢ ↑x 0 = ↑y 0\n[PROOFSTEP]\napply apply_eq_of_dist_lt _ le_rfl\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ny x : ↑s\nhxy : dist x y < 1\nhne : x ≠ y\nhne' : ↑x ≠ ↑y\ndist' : dist x y = dist ↑x ↑y\nn : ℕ := firstDiff ↑x ↑y - 1\nh : firstDiff ↑x ↑y ≤ 0\n⊢ dist ↑x ↑y < (1 / 2) ^ 0\n[PROOFSTEP]\nrw [pow_zero]\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ny x : ↑s\nhxy : dist x y < 1\nhne : x ≠ y\nhne' : ↑x ≠ ↑y\ndist' : dist x y = dist ↑x ↑y\nn : ℕ := firstDiff ↑x ↑y - 1\nh : firstDiff ↑x ↑y ≤ 0\n⊢ dist ↑x ↑y < 1\n[PROOFSTEP]\nexact hxy\n[GOAL]\ncase inr\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ny x : ↑s\nhxy : dist x y < 1\nhne : x ≠ y\nhne' : ↑x ≠ ↑y\ndist' : dist x y = dist ↑x ↑y\nn : ℕ := firstDiff ↑x ↑y - 1\ndiff_pos : 0 < firstDiff ↑x ↑y\n⊢ dist (g x) (g y) ≤ 4 * dist x y\n[PROOFSTEP]\nhave hn : firstDiff x.1 y.1 = n + 1 := (Nat.succ_pred_eq_of_pos diff_pos).symm\n[GOAL]\ncase inr\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ny x : ↑s\nhxy : dist x y < 1\nhne : x ≠ y\nhne' : ↑x ≠ ↑y\ndist' : dist x y = dist ↑x ↑y\nn : ℕ := firstDiff ↑x ↑y - 1\ndiff_pos : 0 < firstDiff ↑x ↑y\nhn : firstDiff ↑x ↑y = n + 1\n⊢ dist (g x) (g y) ≤ 4 * dist x y\n[PROOFSTEP]\nrw [dist', dist_eq_of_ne hne', hn]\n[GOAL]\ncase inr\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ny x : ↑s\nhxy : dist x y < 1\nhne : x ≠ y\nhne' : ↑x ≠ ↑y\ndist' : dist x y = dist ↑x ↑y\nn : ℕ := firstDiff ↑x ↑y - 1\ndiff_pos : 0 < firstDiff ↑x ↑y\nhn : firstDiff ↑x ↑y = n + 1\n⊢ dist (g x) (g y) ≤ 4 * (1 / 2) ^ (n + 1)\n[PROOFSTEP]\nhave B : x.1 n = y.1 n := mem_cylinder_firstDiff x.1 y.1 n (Nat.pred_lt diff_pos.ne')\n[GOAL]\ncase inr\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ny x : ↑s\nhxy : dist x y < 1\nhne : x ≠ y\nhne' : ↑x ≠ ↑y\ndist' : dist x y = dist ↑x ↑y\nn : ℕ := firstDiff ↑x ↑y - 1\ndiff_pos : 0 < firstDiff ↑x ↑y\nhn : firstDiff ↑x ↑y = n + 1\nB : ↑x n = ↑y n\n⊢ dist (g x) (g y) ≤ 4 * (1 / 2) ^ (n + 1)\n[PROOFSTEP]\ncalc\n dist (g x) (g y) ≤ dist (g x) (u (x.1 n)) + dist (g y) (u (x.1 n)) := dist_triangle_right _ _ _\n _ = dist (g x) (u (x.1 n)) + dist (g y) (u (y.1 n)) := by rw [← B]\n _ ≤ (1 / 2) ^ n + (1 / 2) ^ n := (add_le_add (A x n) (A y n))\n _ = 4 * (1 / 2) ^ (n + 1) := by ring\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ny x : ↑s\nhxy : dist x y < 1\nhne : x ≠ y\nhne' : ↑x ≠ ↑y\ndist' : dist x y = dist ↑x ↑y\nn : ℕ := firstDiff ↑x ↑y - 1\ndiff_pos : 0 < firstDiff ↑x ↑y\nhn : firstDiff ↑x ↑y = n + 1\nB : ↑x n = ↑y n\n⊢ dist (g x) (u (↑x n)) + dist (g y) (u (↑x n)) = dist (g x) (u (↑x n)) + dist (g y) (u (↑y n))\n[PROOFSTEP]\nrw [← B]\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ny x : ↑s\nhxy : dist x y < 1\nhne : x ≠ y\nhne' : ↑x ≠ ↑y\ndist' : dist x y = dist ↑x ↑y\nn : ℕ := firstDiff ↑x ↑y - 1\ndiff_pos : 0 < firstDiff ↑x ↑y\nhn : firstDiff ↑x ↑y = n + 1\nB : ↑x n = ↑y n\n⊢ (1 / 2) ^ n + (1 / 2) ^ n = 4 * (1 / 2) ^ (n + 1)\n[PROOFSTEP]\nring\n[GOAL]\ncase intro\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\n⊢ ∃ f, Continuous f ∧ Surjective f\n[PROOFSTEP]\nhave g_surj : Surjective g := fun y ↦\n by\n have : ∀ n : ℕ, ∃ j, y ∈ closedBall (u j) ((1 / 2) ^ n) := fun n ↦\n by\n rcases hu.exists_dist_lt y (by simp : (0 : ℝ) < (1 / 2) ^ n) with ⟨j, hj⟩\n exact ⟨j, hj.le⟩\n choose x hx using this\n have I : (⋂ n : ℕ, closedBall (u (x n)) ((1 / 2) ^ n)).Nonempty := ⟨y, mem_iInter.2 hx⟩\n refine' ⟨⟨x, I⟩, _⟩\n refine' dist_le_zero.1 _\n have J : ∀ n : ℕ, dist (g ⟨x, I⟩) y ≤ (1 / 2) ^ n + (1 / 2) ^ n := fun n =>\n calc\n dist (g ⟨x, I⟩) y ≤ dist (g ⟨x, I⟩) (u (x n)) + dist y (u (x n)) := dist_triangle_right _ _ _\n _ ≤ (1 / 2) ^ n + (1 / 2) ^ n := add_le_add (A ⟨x, I⟩ n) (hx n)\n have L : Tendsto (fun n : ℕ => (1 / 2 : ℝ) ^ n + (1 / 2) ^ n) atTop (𝓝 (0 + 0)) :=\n (tendsto_pow_atTop_nhds_0_of_lt_1 I0.le I1).add (tendsto_pow_atTop_nhds_0_of_lt_1 I0.le I1)\n rw [add_zero] at L \n exact ge_of_tendsto' L J\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ny : α\n⊢ ∃ a, g a = y\n[PROOFSTEP]\nhave : ∀ n : ℕ, ∃ j, y ∈ closedBall (u j) ((1 / 2) ^ n) := fun n ↦\n by\n rcases hu.exists_dist_lt y (by simp : (0 : ℝ) < (1 / 2) ^ n) with ⟨j, hj⟩\n exact ⟨j, hj.le⟩\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ny : α\nn : ℕ\n⊢ ∃ j, y ∈ closedBall (u j) ((1 / 2) ^ n)\n[PROOFSTEP]\nrcases hu.exists_dist_lt y (by simp : (0 : ℝ) < (1 / 2) ^ n) with ⟨j, hj⟩\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ny : α\nn : ℕ\n⊢ 0 < (1 / 2) ^ n\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ny : α\nn j : ℕ\nhj : dist y (u j) < (1 / 2) ^ n\n⊢ ∃ j, y ∈ closedBall (u j) ((1 / 2) ^ n)\n[PROOFSTEP]\nexact ⟨j, hj.le⟩\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis✝ : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ny : α\nthis : ∀ (n : ℕ), ∃ j, y ∈ closedBall (u j) ((1 / 2) ^ n)\n⊢ ∃ a, g a = y\n[PROOFSTEP]\nchoose x hx using this\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ny : α\nx : ℕ → ℕ\nhx : ∀ (n : ℕ), y ∈ closedBall (u (x n)) ((1 / 2) ^ n)\n⊢ ∃ a, g a = y\n[PROOFSTEP]\nhave I : (⋂ n : ℕ, closedBall (u (x n)) ((1 / 2) ^ n)).Nonempty := ⟨y, mem_iInter.2 hx⟩\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ny : α\nx : ℕ → ℕ\nhx : ∀ (n : ℕ), y ∈ closedBall (u (x n)) ((1 / 2) ^ n)\nI : Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))\n⊢ ∃ a, g a = y\n[PROOFSTEP]\nrefine' ⟨⟨x, I⟩, _⟩\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ny : α\nx : ℕ → ℕ\nhx : ∀ (n : ℕ), y ∈ closedBall (u (x n)) ((1 / 2) ^ n)\nI : Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))\n⊢ g { val := x, property := I } = y\n[PROOFSTEP]\nrefine' dist_le_zero.1 _\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ny : α\nx : ℕ → ℕ\nhx : ∀ (n : ℕ), y ∈ closedBall (u (x n)) ((1 / 2) ^ n)\nI : Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))\n⊢ dist (g { val := x, property := I }) y ≤ 0\n[PROOFSTEP]\nhave J : ∀ n : ℕ, dist (g ⟨x, I⟩) y ≤ (1 / 2) ^ n + (1 / 2) ^ n := fun n =>\n calc\n dist (g ⟨x, I⟩) y ≤ dist (g ⟨x, I⟩) (u (x n)) + dist y (u (x n)) := dist_triangle_right _ _ _\n _ ≤ (1 / 2) ^ n + (1 / 2) ^ n := add_le_add (A ⟨x, I⟩ n) (hx n)\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ny : α\nx : ℕ → ℕ\nhx : ∀ (n : ℕ), y ∈ closedBall (u (x n)) ((1 / 2) ^ n)\nI : Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))\nJ : ∀ (n : ℕ), dist (g { val := x, property := I }) y ≤ (1 / 2) ^ n + (1 / 2) ^ n\n⊢ dist (g { val := x, property := I }) y ≤ 0\n[PROOFSTEP]\nhave L : Tendsto (fun n : ℕ => (1 / 2 : ℝ) ^ n + (1 / 2) ^ n) atTop (𝓝 (0 + 0)) :=\n (tendsto_pow_atTop_nhds_0_of_lt_1 I0.le I1).add (tendsto_pow_atTop_nhds_0_of_lt_1 I0.le I1)\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ny : α\nx : ℕ → ℕ\nhx : ∀ (n : ℕ), y ∈ closedBall (u (x n)) ((1 / 2) ^ n)\nI : Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))\nJ : ∀ (n : ℕ), dist (g { val := x, property := I }) y ≤ (1 / 2) ^ n + (1 / 2) ^ n\nL : Tendsto (fun n => (1 / 2) ^ n + (1 / 2) ^ n) atTop (𝓝 (0 + 0))\n⊢ dist (g { val := x, property := I }) y ≤ 0\n[PROOFSTEP]\nrw [add_zero] at L \n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ny : α\nx : ℕ → ℕ\nhx : ∀ (n : ℕ), y ∈ closedBall (u (x n)) ((1 / 2) ^ n)\nI : Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))\nJ : ∀ (n : ℕ), dist (g { val := x, property := I }) y ≤ (1 / 2) ^ n + (1 / 2) ^ n\nL : Tendsto (fun n => (1 / 2) ^ n + (1 / 2) ^ n) atTop (𝓝 0)\n⊢ dist (g { val := x, property := I }) y ≤ 0\n[PROOFSTEP]\nexact ge_of_tendsto' L J\n[GOAL]\ncase intro\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\n⊢ ∃ f, Continuous f ∧ Surjective f\n[PROOFSTEP]\nhave s_closed : IsClosed s := by\n refine isClosed_iff_clusterPt.mpr fun x hx ↦ ?_\n have L : Tendsto (fun n : ℕ => diam (closedBall (u (x n)) ((1 / 2) ^ n))) atTop (𝓝 0) :=\n by\n have : Tendsto (fun n : ℕ => (2 : ℝ) * (1 / 2) ^ n) atTop (𝓝 (2 * 0)) :=\n (tendsto_pow_atTop_nhds_0_of_lt_1 I0.le I1).const_mul _\n rw [mul_zero] at this \n exact squeeze_zero (fun n => diam_nonneg) (fun n => diam_closedBall (pow_nonneg I0.le _)) this\n refine nonempty_iInter_of_nonempty_biInter (fun n => isClosed_ball) (fun n => bounded_closedBall) (fun N ↦ ?_) L\n obtain ⟨y, hxy, ys⟩ : ∃ y, y ∈ ball x ((1 / 2) ^ N) ∩ s :=\n clusterPt_principal_iff.1 hx _ (ball_mem_nhds x (pow_pos I0 N))\n have E :\n ⋂ (n : ℕ) (H : n ≤ N), closedBall (u (x n)) ((1 / 2) ^ n) =\n ⋂ (n : ℕ) (H : n ≤ N), closedBall (u (y n)) ((1 / 2) ^ n) :=\n by\n refine iInter_congr fun n ↦ iInter_congr fun hn ↦ ?_\n have : x n = y n := apply_eq_of_dist_lt (mem_ball'.1 hxy) hn\n rw [this]\n rw [E]\n apply Nonempty.mono _ ys\n apply iInter_subset_iInter₂\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\n⊢ IsClosed s\n[PROOFSTEP]\nrefine isClosed_iff_clusterPt.mpr fun x hx ↦ ?_\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\nx : ℕ → ℕ\nhx : ClusterPt x (𝓟 s)\n⊢ x ∈ s\n[PROOFSTEP]\nhave L : Tendsto (fun n : ℕ => diam (closedBall (u (x n)) ((1 / 2) ^ n))) atTop (𝓝 0) :=\n by\n have : Tendsto (fun n : ℕ => (2 : ℝ) * (1 / 2) ^ n) atTop (𝓝 (2 * 0)) :=\n (tendsto_pow_atTop_nhds_0_of_lt_1 I0.le I1).const_mul _\n rw [mul_zero] at this \n exact squeeze_zero (fun n => diam_nonneg) (fun n => diam_closedBall (pow_nonneg I0.le _)) this\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\nx : ℕ → ℕ\nhx : ClusterPt x (𝓟 s)\n⊢ Tendsto (fun n => diam (closedBall (u (x n)) ((1 / 2) ^ n))) atTop (𝓝 0)\n[PROOFSTEP]\nhave : Tendsto (fun n : ℕ => (2 : ℝ) * (1 / 2) ^ n) atTop (𝓝 (2 * 0)) :=\n (tendsto_pow_atTop_nhds_0_of_lt_1 I0.le I1).const_mul _\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis✝ : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\nx : ℕ → ℕ\nhx : ClusterPt x (𝓟 s)\nthis : Tendsto (fun n => 2 * (1 / 2) ^ n) atTop (𝓝 (2 * 0))\n⊢ Tendsto (fun n => diam (closedBall (u (x n)) ((1 / 2) ^ n))) atTop (𝓝 0)\n[PROOFSTEP]\nrw [mul_zero] at this \n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis✝ : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\nx : ℕ → ℕ\nhx : ClusterPt x (𝓟 s)\nthis : Tendsto (fun n => 2 * (1 / 2) ^ n) atTop (𝓝 0)\n⊢ Tendsto (fun n => diam (closedBall (u (x n)) ((1 / 2) ^ n))) atTop (𝓝 0)\n[PROOFSTEP]\nexact squeeze_zero (fun n => diam_nonneg) (fun n => diam_closedBall (pow_nonneg I0.le _)) this\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\nx : ℕ → ℕ\nhx : ClusterPt x (𝓟 s)\nL : Tendsto (fun n => diam (closedBall (u (x n)) ((1 / 2) ^ n))) atTop (𝓝 0)\n⊢ x ∈ s\n[PROOFSTEP]\nrefine nonempty_iInter_of_nonempty_biInter (fun n => isClosed_ball) (fun n => bounded_closedBall) (fun N ↦ ?_) L\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\nx : ℕ → ℕ\nhx : ClusterPt x (𝓟 s)\nL : Tendsto (fun n => diam (closedBall (u (x n)) ((1 / 2) ^ n))) atTop (𝓝 0)\nN : ℕ\n⊢ Set.Nonempty (⋂ (n : ℕ) (_ : n ≤ N), closedBall (u (x n)) ((1 / 2) ^ n))\n[PROOFSTEP]\nobtain ⟨y, hxy, ys⟩ : ∃ y, y ∈ ball x ((1 / 2) ^ N) ∩ s :=\n clusterPt_principal_iff.1 hx _ (ball_mem_nhds x (pow_pos I0 N))\n[GOAL]\ncase intro.intro\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\nx : ℕ → ℕ\nhx : ClusterPt x (𝓟 s)\nL : Tendsto (fun n => diam (closedBall (u (x n)) ((1 / 2) ^ n))) atTop (𝓝 0)\nN : ℕ\ny : ℕ → ℕ\nhxy : y ∈ ball x ((1 / 2) ^ N)\nys : y ∈ s\n⊢ Set.Nonempty (⋂ (n : ℕ) (_ : n ≤ N), closedBall (u (x n)) ((1 / 2) ^ n))\n[PROOFSTEP]\nhave E :\n ⋂ (n : ℕ) (H : n ≤ N), closedBall (u (x n)) ((1 / 2) ^ n) =\n ⋂ (n : ℕ) (H : n ≤ N), closedBall (u (y n)) ((1 / 2) ^ n) :=\n by\n refine iInter_congr fun n ↦ iInter_congr fun hn ↦ ?_\n have : x n = y n := apply_eq_of_dist_lt (mem_ball'.1 hxy) hn\n rw [this]\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\nx : ℕ → ℕ\nhx : ClusterPt x (𝓟 s)\nL : Tendsto (fun n => diam (closedBall (u (x n)) ((1 / 2) ^ n))) atTop (𝓝 0)\nN : ℕ\ny : ℕ → ℕ\nhxy : y ∈ ball x ((1 / 2) ^ N)\nys : y ∈ s\n⊢ ⋂ (n : ℕ) (_ : n ≤ N), closedBall (u (x n)) ((1 / 2) ^ n) = ⋂ (n : ℕ) (_ : n ≤ N), closedBall (u (y n)) ((1 / 2) ^ n)\n[PROOFSTEP]\nrefine iInter_congr fun n ↦ iInter_congr fun hn ↦ ?_\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\nx : ℕ → ℕ\nhx : ClusterPt x (𝓟 s)\nL : Tendsto (fun n => diam (closedBall (u (x n)) ((1 / 2) ^ n))) atTop (𝓝 0)\nN : ℕ\ny : ℕ → ℕ\nhxy : y ∈ ball x ((1 / 2) ^ N)\nys : y ∈ s\nn : ℕ\nhn : n ≤ N\n⊢ closedBall (u (x n)) ((1 / 2) ^ n) = closedBall (u (y n)) ((1 / 2) ^ n)\n[PROOFSTEP]\nhave : x n = y n := apply_eq_of_dist_lt (mem_ball'.1 hxy) hn\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis✝ : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\nx : ℕ → ℕ\nhx : ClusterPt x (𝓟 s)\nL : Tendsto (fun n => diam (closedBall (u (x n)) ((1 / 2) ^ n))) atTop (𝓝 0)\nN : ℕ\ny : ℕ → ℕ\nhxy : y ∈ ball x ((1 / 2) ^ N)\nys : y ∈ s\nn : ℕ\nhn : n ≤ N\nthis : x n = y n\n⊢ closedBall (u (x n)) ((1 / 2) ^ n) = closedBall (u (y n)) ((1 / 2) ^ n)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase intro.intro\nE✝ : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\nx : ℕ → ℕ\nhx : ClusterPt x (𝓟 s)\nL : Tendsto (fun n => diam (closedBall (u (x n)) ((1 / 2) ^ n))) atTop (𝓝 0)\nN : ℕ\ny : ℕ → ℕ\nhxy : y ∈ ball x ((1 / 2) ^ N)\nys : y ∈ s\nE :\n ⋂ (n : ℕ) (_ : n ≤ N), closedBall (u (x n)) ((1 / 2) ^ n) = ⋂ (n : ℕ) (_ : n ≤ N), closedBall (u (y n)) ((1 / 2) ^ n)\n⊢ Set.Nonempty (⋂ (n : ℕ) (_ : n ≤ N), closedBall (u (x n)) ((1 / 2) ^ n))\n[PROOFSTEP]\nrw [E]\n[GOAL]\ncase intro.intro\nE✝ : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\nx : ℕ → ℕ\nhx : ClusterPt x (𝓟 s)\nL : Tendsto (fun n => diam (closedBall (u (x n)) ((1 / 2) ^ n))) atTop (𝓝 0)\nN : ℕ\ny : ℕ → ℕ\nhxy : y ∈ ball x ((1 / 2) ^ N)\nys : y ∈ s\nE :\n ⋂ (n : ℕ) (_ : n ≤ N), closedBall (u (x n)) ((1 / 2) ^ n) = ⋂ (n : ℕ) (_ : n ≤ N), closedBall (u (y n)) ((1 / 2) ^ n)\n⊢ Set.Nonempty (⋂ (n : ℕ) (_ : n ≤ N), closedBall (u (y n)) ((1 / 2) ^ n))\n[PROOFSTEP]\napply Nonempty.mono _ ys\n[GOAL]\nE✝ : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\nx : ℕ → ℕ\nhx : ClusterPt x (𝓟 s)\nL : Tendsto (fun n => diam (closedBall (u (x n)) ((1 / 2) ^ n))) atTop (𝓝 0)\nN : ℕ\ny : ℕ → ℕ\nhxy : y ∈ ball x ((1 / 2) ^ N)\nys : y ∈ s\nE :\n ⋂ (n : ℕ) (_ : n ≤ N), closedBall (u (x n)) ((1 / 2) ^ n) = ⋂ (n : ℕ) (_ : n ≤ N), closedBall (u (y n)) ((1 / 2) ^ n)\n⊢ ⋂ (n : ℕ), closedBall (u (y n)) ((1 / 2) ^ n) ⊆ ⋂ (n : ℕ) (_ : n ≤ N), closedBall (u (y n)) ((1 / 2) ^ n)\n[PROOFSTEP]\napply iInter_subset_iInter₂\n[GOAL]\ncase intro\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\ns_closed : IsClosed s\n⊢ ∃ f, Continuous f ∧ Surjective f\n[PROOFSTEP]\nobtain ⟨f, -, f_surj, f_cont⟩ : ∃ f : (ℕ → ℕ) → s, (∀ x : s, f x = x) ∧ Surjective f ∧ Continuous f :=\n by\n apply exists_retraction_subtype_of_isClosed s_closed\n simpa only [nonempty_coe_sort] using g_surj.nonempty\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\ns_closed : IsClosed s\n⊢ ∃ f, (∀ (x : ↑s), f ↑x = x) ∧ Surjective f ∧ Continuous f\n[PROOFSTEP]\napply exists_retraction_subtype_of_isClosed s_closed\n[GOAL]\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\ns_closed : IsClosed s\n⊢ Set.Nonempty s\n[PROOFSTEP]\nsimpa only [nonempty_coe_sort] using g_surj.nonempty\n[GOAL]\ncase intro.intro.intro.intro\nE : ℕ → Type u_1\nα : Type u_2\ninst✝³ : MetricSpace α\ninst✝² : CompleteSpace α\ninst✝¹ : SecondCountableTopology α\ninst✝ : Nonempty α\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nI0 : 0 < 1 / 2\nI1 : 1 / 2 < 1\nu : ℕ → α\nhu : DenseRange u\ns : Set (ℕ → ℕ) := {x | Set.Nonempty (⋂ (n : ℕ), closedBall (u (x n)) ((1 / 2) ^ n))}\ng : ↑s → α := fun x => Set.Nonempty.some (_ : ↑x ∈ s)\nA : ∀ (x : ↑s) (n : ℕ), dist (g x) (u (↑x n)) ≤ (1 / 2) ^ n\ng_cont : Continuous g\ng_surj : Surjective g\ns_closed : IsClosed s\nf : (ℕ → ℕ) → ↑s\nf_surj : Surjective f\nf_cont : Continuous f\n⊢ ∃ f, Continuous f ∧ Surjective f\n[PROOFSTEP]\nexact ⟨g ∘ f, g_cont.comp f_cont, g_surj.comp f_surj⟩\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nx y : (i : ι) → F i\n⊢ Summable fun i => min ((1 / 2) ^ encode i) (dist (x i) (y i))\n[PROOFSTEP]\nrefine summable_of_nonneg_of_le (fun i => ?_) (fun i => min_le_left _ _) summable_geometric_two_encode\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nx y : (i : ι) → F i\ni : ι\n⊢ 0 ≤ min ((1 / 2) ^ encode i) (dist (x i) (y i))\n[PROOFSTEP]\nexact le_min (pow_nonneg (by norm_num) _) dist_nonneg\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nx y : (i : ι) → F i\ni : ι\n⊢ 0 ≤ 1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nx y : (i : ι) → F i\ni j : ι\nx✝ : j ≠ i\n⊢ 0 ≤ (1 / 2) ^ encode j\n[PROOFSTEP]\nsimp\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nx y : (i : ι) → F i\ni : ι\nh : dist x y < (1 / 2) ^ encode i\n⊢ dist (x i) (y i) ≤ dist x y\n[PROOFSTEP]\nsimpa only [not_le.2 h, false_or_iff] using min_le_iff.1 (min_dist_le_dist_pi x y i)\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nx : (i : ι) → F i\n⊢ dist x x = 0\n[PROOFSTEP]\nsimp [dist_eq_tsum]\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nx y : (i : ι) → F i\n⊢ dist x y = dist y x\n[PROOFSTEP]\nsimp [dist_eq_tsum, dist_comm]\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nx y z : (i : ι) → F i\ni : ι\n⊢ min ((1 / 2) ^ encode i) (dist (x i) (y i) + dist (y i) (z i)) =\n min ((1 / 2) ^ encode i) (min ((1 / 2) ^ encode i) (dist (x i) (y i)) + min ((1 / 2) ^ encode i) (dist (y i) (z i)))\n[PROOFSTEP]\nconvert congr_arg ((↑) : ℝ≥0 → ℝ) (min_add_distrib ((1 / 2 : ℝ≥0) ^ encode i) (nndist (x i) (y i)) (nndist (y i) (z i)))\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nx✝¹ x✝ : (i : ι) → F i\n⊢ (fun x y => ↑{ val := dist x y, property := (_ : 0 ≤ dist x y) }) x✝¹ x✝ = ENNReal.ofReal (dist x✝¹ x✝)\n[PROOFSTEP]\nexact ENNReal.coe_nnreal_eq _\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\n⊢ uniformity ((i : ι) → F i) = ⨅ (ε : ℝ) (_ : ε > 0), 𝓟 {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\nsimp only [Pi.uniformity, comap_iInf, gt_iff_lt, preimage_setOf_eq, comap_principal, PseudoMetricSpace.uniformity_dist]\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\n⊢ ⨅ (i : ι) (i_1 : ℝ) (_ : 0 < i_1), 𝓟 {a | dist (Prod.fst a i) (Prod.snd a i) < i_1} =\n ⨅ (ε : ℝ) (_ : 0 < ε), 𝓟 {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\n⊢ ⨅ (i : ι) (i_1 : ℝ) (_ : 0 < i_1), 𝓟 {a | dist (Prod.fst a i) (Prod.snd a i) < i_1} ≤\n ⨅ (ε : ℝ) (_ : 0 < ε), 𝓟 {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\nsimp only [le_iInf_iff, le_principal_iff]\n[GOAL]\ncase a\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\n⊢ ∀ (i : ℝ),\n 0 < i →\n {p | dist p.fst p.snd < i} ∈ ⨅ (i : ι) (i_2 : ℝ) (_ : 0 < i_2), 𝓟 {a | dist (Prod.fst a i) (Prod.snd a i) < i_2}\n[PROOFSTEP]\nintro ε εpos\n[GOAL]\ncase a\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nε : ℝ\nεpos : 0 < ε\n⊢ {p | dist p.fst p.snd < ε} ∈ ⨅ (i : ι) (i_1 : ℝ) (_ : 0 < i_1), 𝓟 {a | dist (Prod.fst a i) (Prod.snd a i) < i_1}\n[PROOFSTEP]\nobtain ⟨K, hK⟩ : ∃ K : Finset ι, (∑' i : { j // j ∉ K }, (1 / 2 : ℝ) ^ encode (i : ι)) < ε / 2 :=\n ((tendsto_order.1 (tendsto_tsum_compl_atTop_zero fun i : ι => (1 / 2 : ℝ) ^ encode i)).2 _ (half_pos εpos)).exists\n[GOAL]\ncase a.intro\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nε : ℝ\nεpos : 0 < ε\nK : Finset ι\nhK : ∑' (i : { j // ¬j ∈ K }), (1 / 2) ^ encode ↑i < ε / 2\n⊢ {p | dist p.fst p.snd < ε} ∈ ⨅ (i : ι) (i_1 : ℝ) (_ : 0 < i_1), 𝓟 {a | dist (Prod.fst a i) (Prod.snd a i) < i_1}\n[PROOFSTEP]\nobtain ⟨δ, δpos, hδ⟩ : ∃ δ : ℝ, 0 < δ ∧ (K.card : ℝ) * δ < ε / 2 := exists_pos_mul_lt (half_pos εpos) _\n[GOAL]\ncase a.intro.intro.intro\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nε : ℝ\nεpos : 0 < ε\nK : Finset ι\nhK : ∑' (i : { j // ¬j ∈ K }), (1 / 2) ^ encode ↑i < ε / 2\nδ : ℝ\nδpos : 0 < δ\nhδ : ↑(Finset.card K) * δ < ε / 2\n⊢ {p | dist p.fst p.snd < ε} ∈ ⨅ (i : ι) (i_1 : ℝ) (_ : 0 < i_1), 𝓟 {a | dist (Prod.fst a i) (Prod.snd a i) < i_1}\n[PROOFSTEP]\napply\n @mem_iInf_of_iInter _ _ _ _ _ K.finite_toSet fun i =>\n {p : (∀ i : ι, F i) × ∀ i : ι, F i | dist (p.fst i) (p.snd i) < δ}\n[GOAL]\ncase a.intro.intro.intro.hV\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nε : ℝ\nεpos : 0 < ε\nK : Finset ι\nhK : ∑' (i : { j // ¬j ∈ K }), (1 / 2) ^ encode ↑i < ε / 2\nδ : ℝ\nδpos : 0 < δ\nhδ : ↑(Finset.card K) * δ < ε / 2\n⊢ ∀ (i : ↑↑K),\n {p | dist (Prod.fst p ↑i) (Prod.snd p ↑i) < δ} ∈\n ⨅ (i_1 : ℝ) (_ : 0 < i_1), 𝓟 {a | dist (Prod.fst a ↑i) (Prod.snd a ↑i) < i_1}\n[PROOFSTEP]\nrintro ⟨i, hi⟩\n[GOAL]\ncase a.intro.intro.intro.hV.mk\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nε : ℝ\nεpos : 0 < ε\nK : Finset ι\nhK : ∑' (i : { j // ¬j ∈ K }), (1 / 2) ^ encode ↑i < ε / 2\nδ : ℝ\nδpos : 0 < δ\nhδ : ↑(Finset.card K) * δ < ε / 2\ni : ι\nhi : i ∈ ↑K\n⊢ {p | dist (Prod.fst p ↑{ val := i, property := hi }) (Prod.snd p ↑{ val := i, property := hi }) < δ} ∈\n ⨅ (i_1 : ℝ) (_ : 0 < i_1),\n 𝓟 {a | dist (Prod.fst a ↑{ val := i, property := hi }) (Prod.snd a ↑{ val := i, property := hi }) < i_1}\n[PROOFSTEP]\nrefine' mem_iInf_of_mem δ (mem_iInf_of_mem δpos _)\n[GOAL]\ncase a.intro.intro.intro.hV.mk\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nε : ℝ\nεpos : 0 < ε\nK : Finset ι\nhK : ∑' (i : { j // ¬j ∈ K }), (1 / 2) ^ encode ↑i < ε / 2\nδ : ℝ\nδpos : 0 < δ\nhδ : ↑(Finset.card K) * δ < ε / 2\ni : ι\nhi : i ∈ ↑K\n⊢ {p | dist (Prod.fst p ↑{ val := i, property := hi }) (Prod.snd p ↑{ val := i, property := hi }) < δ} ∈\n 𝓟 {a | dist (Prod.fst a ↑{ val := i, property := hi }) (Prod.snd a ↑{ val := i, property := hi }) < δ}\n[PROOFSTEP]\nsimp only [Prod.forall, imp_self, mem_principal, Subset.rfl]\n[GOAL]\ncase a.intro.intro.intro.hU\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nε : ℝ\nεpos : 0 < ε\nK : Finset ι\nhK : ∑' (i : { j // ¬j ∈ K }), (1 / 2) ^ encode ↑i < ε / 2\nδ : ℝ\nδpos : 0 < δ\nhδ : ↑(Finset.card K) * δ < ε / 2\n⊢ ⋂ (i : ↑↑K), {p | dist (Prod.fst p ↑i) (Prod.snd p ↑i) < δ} ⊆ {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\nrintro ⟨x, y⟩ hxy\n[GOAL]\ncase a.intro.intro.intro.hU.mk\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nε : ℝ\nεpos : 0 < ε\nK : Finset ι\nhK : ∑' (i : { j // ¬j ∈ K }), (1 / 2) ^ encode ↑i < ε / 2\nδ : ℝ\nδpos : 0 < δ\nhδ : ↑(Finset.card K) * δ < ε / 2\nx y : (i : ι) → F i\nhxy : (x, y) ∈ ⋂ (i : ↑↑K), {p | dist (Prod.fst p ↑i) (Prod.snd p ↑i) < δ}\n⊢ (x, y) ∈ {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\nsimp only [mem_iInter, mem_setOf_eq, SetCoe.forall, Finset.mem_range, Finset.mem_coe] at hxy \n[GOAL]\ncase a.intro.intro.intro.hU.mk\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nε : ℝ\nεpos : 0 < ε\nK : Finset ι\nhK : ∑' (i : { j // ¬j ∈ K }), (1 / 2) ^ encode ↑i < ε / 2\nδ : ℝ\nδpos : 0 < δ\nhδ : ↑(Finset.card K) * δ < ε / 2\nx y : (i : ι) → F i\nhxy : ∀ (x_1 : ι), x_1 ∈ K → dist (x x_1) (y x_1) < δ\n⊢ (x, y) ∈ {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\ncalc\n dist x y = ∑' i : ι, min ((1 / 2) ^ encode i : ℝ) (dist (x i) (y i)) := rfl\n _ =\n (∑ i in K, min ((1 / 2) ^ encode i : ℝ) (dist (x i) (y i))) +\n ∑' i : ↑(K : Set ι)ᶜ, min ((1 / 2) ^ encode (i : ι) : ℝ) (dist (x i) (y i)) :=\n (sum_add_tsum_compl (dist_summable _ _)).symm\n _ ≤ (∑ i in K, dist (x i) (y i)) + ∑' i : ↑(K : Set ι)ᶜ, ((1 / 2) ^ encode (i : ι) : ℝ) :=\n by\n refine' add_le_add (Finset.sum_le_sum fun i _ => min_le_right _ _) _\n refine' tsum_le_tsum (fun i => min_le_left _ _) _ _\n · apply Summable.subtype (dist_summable x y) (↑K : Set ι)ᶜ\n · apply Summable.subtype summable_geometric_two_encode (↑K : Set ι)ᶜ\n _ < (∑ _i in K, δ) + ε / 2 := by\n apply add_lt_add_of_le_of_lt _ hK\n refine Finset.sum_le_sum fun i hi => (hxy i ?_).le\n simpa using hi\n _ ≤ ε / 2 + ε / 2 := (add_le_add_right (by simpa only [Finset.sum_const, nsmul_eq_mul] using hδ.le) _)\n _ = ε := add_halves _\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nε : ℝ\nεpos : 0 < ε\nK : Finset ι\nhK : ∑' (i : { j // ¬j ∈ K }), (1 / 2) ^ encode ↑i < ε / 2\nδ : ℝ\nδpos : 0 < δ\nhδ : ↑(Finset.card K) * δ < ε / 2\nx y : (i : ι) → F i\nhxy : ∀ (x_1 : ι), x_1 ∈ K → dist (x x_1) (y x_1) < δ\n⊢ ∑ i in K, min ((1 / 2) ^ encode i) (dist (x i) (y i)) +\n ∑' (i : ↑(↑K)ᶜ), min ((1 / 2) ^ encode ↑i) (dist (x ↑i) (y ↑i)) ≤\n ∑ i in K, dist (x i) (y i) + ∑' (i : ↑(↑K)ᶜ), (1 / 2) ^ encode ↑i\n[PROOFSTEP]\nrefine' add_le_add (Finset.sum_le_sum fun i _ => min_le_right _ _) _\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nε : ℝ\nεpos : 0 < ε\nK : Finset ι\nhK : ∑' (i : { j // ¬j ∈ K }), (1 / 2) ^ encode ↑i < ε / 2\nδ : ℝ\nδpos : 0 < δ\nhδ : ↑(Finset.card K) * δ < ε / 2\nx y : (i : ι) → F i\nhxy : ∀ (x_1 : ι), x_1 ∈ K → dist (x x_1) (y x_1) < δ\n⊢ ∑' (i : ↑(↑K)ᶜ), min ((1 / 2) ^ encode ↑i) (dist (x ↑i) (y ↑i)) ≤ ∑' (i : ↑(↑K)ᶜ), (1 / 2) ^ encode ↑i\n[PROOFSTEP]\nrefine' tsum_le_tsum (fun i => min_le_left _ _) _ _\n[GOAL]\ncase refine'_1\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nε : ℝ\nεpos : 0 < ε\nK : Finset ι\nhK : ∑' (i : { j // ¬j ∈ K }), (1 / 2) ^ encode ↑i < ε / 2\nδ : ℝ\nδpos : 0 < δ\nhδ : ↑(Finset.card K) * δ < ε / 2\nx y : (i : ι) → F i\nhxy : ∀ (x_1 : ι), x_1 ∈ K → dist (x x_1) (y x_1) < δ\n⊢ Summable fun i => min ((1 / 2) ^ encode ↑i) (dist (x ↑i) (y ↑i))\n[PROOFSTEP]\napply Summable.subtype (dist_summable x y) (↑K : Set ι)ᶜ\n[GOAL]\ncase refine'_2\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nε : ℝ\nεpos : 0 < ε\nK : Finset ι\nhK : ∑' (i : { j // ¬j ∈ K }), (1 / 2) ^ encode ↑i < ε / 2\nδ : ℝ\nδpos : 0 < δ\nhδ : ↑(Finset.card K) * δ < ε / 2\nx y : (i : ι) → F i\nhxy : ∀ (x_1 : ι), x_1 ∈ K → dist (x x_1) (y x_1) < δ\n⊢ Summable fun i => (1 / 2) ^ encode ↑i\n[PROOFSTEP]\napply Summable.subtype summable_geometric_two_encode (↑K : Set ι)ᶜ\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nε : ℝ\nεpos : 0 < ε\nK : Finset ι\nhK : ∑' (i : { j // ¬j ∈ K }), (1 / 2) ^ encode ↑i < ε / 2\nδ : ℝ\nδpos : 0 < δ\nhδ : ↑(Finset.card K) * δ < ε / 2\nx y : (i : ι) → F i\nhxy : ∀ (x_1 : ι), x_1 ∈ K → dist (x x_1) (y x_1) < δ\n⊢ ∑ i in K, dist (x i) (y i) + ∑' (i : ↑(↑K)ᶜ), (1 / 2) ^ encode ↑i < ∑ _i in K, δ + ε / 2\n[PROOFSTEP]\napply add_lt_add_of_le_of_lt _ hK\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nε : ℝ\nεpos : 0 < ε\nK : Finset ι\nhK : ∑' (i : { j // ¬j ∈ K }), (1 / 2) ^ encode ↑i < ε / 2\nδ : ℝ\nδpos : 0 < δ\nhδ : ↑(Finset.card K) * δ < ε / 2\nx y : (i : ι) → F i\nhxy : ∀ (x_1 : ι), x_1 ∈ K → dist (x x_1) (y x_1) < δ\n⊢ ∑ i in K, dist (x i) (y i) ≤ ∑ _i in K, δ\n[PROOFSTEP]\nrefine Finset.sum_le_sum fun i hi => (hxy i ?_).le\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nε : ℝ\nεpos : 0 < ε\nK : Finset ι\nhK : ∑' (i : { j // ¬j ∈ K }), (1 / 2) ^ encode ↑i < ε / 2\nδ : ℝ\nδpos : 0 < δ\nhδ : ↑(Finset.card K) * δ < ε / 2\nx y : (i : ι) → F i\nhxy : ∀ (x_1 : ι), x_1 ∈ K → dist (x x_1) (y x_1) < δ\ni : ι\nhi : i ∈ K\n⊢ i ∈ K\n[PROOFSTEP]\nsimpa using hi\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nε : ℝ\nεpos : 0 < ε\nK : Finset ι\nhK : ∑' (i : { j // ¬j ∈ K }), (1 / 2) ^ encode ↑i < ε / 2\nδ : ℝ\nδpos : 0 < δ\nhδ : ↑(Finset.card K) * δ < ε / 2\nx y : (i : ι) → F i\nhxy : ∀ (x_1 : ι), x_1 ∈ K → dist (x x_1) (y x_1) < δ\n⊢ ∑ _i in K, δ ≤ ε / 2\n[PROOFSTEP]\nsimpa only [Finset.sum_const, nsmul_eq_mul] using hδ.le\n[GOAL]\ncase a\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\n⊢ ⨅ (ε : ℝ) (_ : 0 < ε), 𝓟 {p | dist p.fst p.snd < ε} ≤\n ⨅ (i : ι) (i_1 : ℝ) (_ : 0 < i_1), 𝓟 {a | dist (Prod.fst a i) (Prod.snd a i) < i_1}\n[PROOFSTEP]\nsimp only [le_iInf_iff, le_principal_iff]\n[GOAL]\ncase a\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\n⊢ ∀ (i : ι) (i_1 : ℝ),\n 0 < i_1 → {a | dist (Prod.fst a i) (Prod.snd a i) < i_1} ∈ ⨅ (ε : ℝ) (_ : 0 < ε), 𝓟 {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\nintro i ε εpos\n[GOAL]\ncase a\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\ni : ι\nε : ℝ\nεpos : 0 < ε\n⊢ {a | dist (Prod.fst a i) (Prod.snd a i) < ε} ∈ ⨅ (ε : ℝ) (_ : 0 < ε), 𝓟 {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\nrefine' mem_iInf_of_mem (min ((1 / 2) ^ encode i : ℝ) ε) _\n[GOAL]\ncase a\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\ni : ι\nε : ℝ\nεpos : 0 < ε\n⊢ {a | dist (Prod.fst a i) (Prod.snd a i) < ε} ∈\n ⨅ (_ : 0 < min ((1 / 2) ^ encode i) ε), 𝓟 {p | dist p.fst p.snd < min ((1 / 2) ^ encode i) ε}\n[PROOFSTEP]\nhave : 0 < min ((1 / 2) ^ encode i : ℝ) ε := lt_min (by simp) εpos\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\ni : ι\nε : ℝ\nεpos : 0 < ε\n⊢ 0 < (1 / 2) ^ encode i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\ni : ι\nε : ℝ\nεpos : 0 < ε\nthis : 0 < min ((1 / 2) ^ encode i) ε\n⊢ {a | dist (Prod.fst a i) (Prod.snd a i) < ε} ∈\n ⨅ (_ : 0 < min ((1 / 2) ^ encode i) ε), 𝓟 {p | dist p.fst p.snd < min ((1 / 2) ^ encode i) ε}\n[PROOFSTEP]\nrefine' mem_iInf_of_mem this _\n[GOAL]\ncase a\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\ni : ι\nε : ℝ\nεpos : 0 < ε\nthis : 0 < min ((1 / 2) ^ encode i) ε\n⊢ {a | dist (Prod.fst a i) (Prod.snd a i) < ε} ∈ 𝓟 {p | dist p.fst p.snd < min ((1 / 2) ^ encode i) ε}\n[PROOFSTEP]\nsimp only [and_imp, Prod.forall, setOf_subset_setOf, lt_min_iff, mem_principal]\n[GOAL]\ncase a\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\ni : ι\nε : ℝ\nεpos : 0 < ε\nthis : 0 < min ((1 / 2) ^ encode i) ε\n⊢ ∀ (a b : (i : ι) → F i), dist a b < (1 / 2) ^ encode i → dist a b < ε → dist (a i) (b i) < ε\n[PROOFSTEP]\nintro x y hn hε\n[GOAL]\ncase a\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\ni : ι\nε : ℝ\nεpos : 0 < ε\nthis : 0 < min ((1 / 2) ^ encode i) ε\nx y : (i : ι) → F i\nhn : dist x y < (1 / 2) ^ encode i\nhε : dist x y < ε\n⊢ dist (x i) (y i) < ε\n[PROOFSTEP]\ncalc\n dist (x i) (y i) ≤ dist x y := dist_le_dist_pi_of_dist_lt hn\n _ < ε := hε\n[GOAL]\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nx✝ y✝ : (i : ι) → F i\nhxy : dist x✝ y✝ = 0\n⊢ x✝ = y✝\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nx✝ y✝ : (i : ι) → F i\nhxy : dist x✝ y✝ = 0\nn : ι\n⊢ x✝ n = y✝ n\n[PROOFSTEP]\nrw [← dist_le_zero, ← hxy]\n[GOAL]\ncase h\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nx✝ y✝ : (i : ι) → F i\nhxy : dist x✝ y✝ = 0\nn : ι\n⊢ dist (x✝ n) (y✝ n) ≤ dist x✝ y✝\n[PROOFSTEP]\napply dist_le_dist_pi_of_dist_lt\n[GOAL]\ncase h.h\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nx✝ y✝ : (i : ι) → F i\nhxy : dist x✝ y✝ = 0\nn : ι\n⊢ (dist x✝ fun n => y✝ n) < (1 / 2) ^ encode n\n[PROOFSTEP]\nrw [hxy]\n[GOAL]\ncase h.h\nE : ℕ → Type u_1\nι : Type u_2\ninst✝¹ : Encodable ι\nF : ι → Type u_3\ninst✝ : (i : ι) → MetricSpace (F i)\nx✝ y✝ : (i : ι) → F i\nhxy : dist x✝ y✝ = 0\nn : ι\n⊢ 0 < (1 / 2) ^ encode n\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Topology.MetricSpace.PiNat", "llama_tokens": 92683, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8221891305219504, "lm_q2_score": 0.6825737473266735, "lm_q1q2_score": 0.5612047158316272}} {"text": "[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝² : OrderedAddCommMonoid α\ninst✝¹ : OrderedAddCommMonoid β\ninst✝ : OrderAddMonoidHomClass F α β\nf : F\na : α\nha : 0 ≤ a\n⊢ 0 ≤ ↑f a\n[PROOFSTEP]\nrw [← map_zero f]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝² : OrderedAddCommMonoid α\ninst✝¹ : OrderedAddCommMonoid β\ninst✝ : OrderAddMonoidHomClass F α β\nf : F\na : α\nha : 0 ≤ a\n⊢ ↑f 0 ≤ ↑f a\n[PROOFSTEP]\nexact OrderHomClass.mono _ ha\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝² : OrderedAddCommMonoid α\ninst✝¹ : OrderedAddCommMonoid β\ninst✝ : OrderAddMonoidHomClass F α β\nf : F\na : α\nha : a ≤ 0\n⊢ ↑f a ≤ 0\n[PROOFSTEP]\nrw [← map_zero f]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝² : OrderedAddCommMonoid α\ninst✝¹ : OrderedAddCommMonoid β\ninst✝ : OrderAddMonoidHomClass F α β\nf : F\na : α\nha : a ≤ 0\n⊢ ↑f a ≤ ↑f 0\n[PROOFSTEP]\nexact OrderHomClass.mono _ ha\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝² : OrderedAddCommGroup α\ninst✝¹ : OrderedAddCommMonoid β\ninst✝ : AddMonoidHomClass F α β\nf : F\nh : Monotone ↑f\na : α\n⊢ 0 ≤ a → 0 ≤ ↑f a\n[PROOFSTEP]\nrw [← map_zero f]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝² : OrderedAddCommGroup α\ninst✝¹ : OrderedAddCommMonoid β\ninst✝ : AddMonoidHomClass F α β\nf : F\nh : Monotone ↑f\na : α\n⊢ 0 ≤ a → ↑f 0 ≤ ↑f a\n[PROOFSTEP]\napply h\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝² : OrderedAddCommGroup α\ninst✝¹ : OrderedAddCommMonoid β\ninst✝ : AddMonoidHomClass F α β\nf : F\nh : ∀ (a : α), 0 ≤ a → 0 ≤ ↑f a\na b : α\nhl : a ≤ b\n⊢ ↑f a ≤ ↑f b\n[PROOFSTEP]\nrw [← sub_add_cancel b a, map_add f]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝² : OrderedAddCommGroup α\ninst✝¹ : OrderedAddCommMonoid β\ninst✝ : AddMonoidHomClass F α β\nf : F\nh : ∀ (a : α), 0 ≤ a → 0 ≤ ↑f a\na b : α\nhl : a ≤ b\n⊢ ↑f a ≤ ↑f (b - a) + ↑f a\n[PROOFSTEP]\nexact le_add_of_nonneg_left (h _ <| sub_nonneg.2 hl)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝³ : OrderedAddCommGroup α\ninst✝² : OrderedAddCommMonoid β\ninst✝¹ : AddMonoidHomClass F α β\nf : F\ninst✝ : CovariantClass β β (fun x x_1 => x + x_1) fun x x_1 => x < x_1\n⊢ StrictMono ↑f ↔ ∀ (a : α), 0 < a → 0 < ↑f a\n[PROOFSTEP]\nrefine ⟨fun h a => ?_, fun h a b hl => ?_⟩\n[GOAL]\ncase refine_1\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝³ : OrderedAddCommGroup α\ninst✝² : OrderedAddCommMonoid β\ninst✝¹ : AddMonoidHomClass F α β\nf : F\ninst✝ : CovariantClass β β (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nh : StrictMono ↑f\na : α\n⊢ 0 < a → 0 < ↑f a\n[PROOFSTEP]\nrw [← map_zero f]\n[GOAL]\ncase refine_1\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝³ : OrderedAddCommGroup α\ninst✝² : OrderedAddCommMonoid β\ninst✝¹ : AddMonoidHomClass F α β\nf : F\ninst✝ : CovariantClass β β (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nh : StrictMono ↑f\na : α\n⊢ 0 < a → ↑f 0 < ↑f a\n[PROOFSTEP]\napply h\n[GOAL]\ncase refine_2\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝³ : OrderedAddCommGroup α\ninst✝² : OrderedAddCommMonoid β\ninst✝¹ : AddMonoidHomClass F α β\nf : F\ninst✝ : CovariantClass β β (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nh : ∀ (a : α), 0 < a → 0 < ↑f a\na b : α\nhl : a < b\n⊢ ↑f a < ↑f b\n[PROOFSTEP]\nrw [← sub_add_cancel b a, map_add f]\n[GOAL]\ncase refine_2\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝³ : OrderedAddCommGroup α\ninst✝² : OrderedAddCommMonoid β\ninst✝¹ : AddMonoidHomClass F α β\nf : F\ninst✝ : CovariantClass β β (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nh : ∀ (a : α), 0 < a → 0 < ↑f a\na b : α\nhl : a < b\n⊢ ↑f a < ↑f (b - a) + ↑f a\n[PROOFSTEP]\nexact lt_add_of_pos_left _ (h _ <| sub_pos.2 hl)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : Preorder α\ninst✝⁶ : Preorder β\ninst✝⁵ : Preorder γ\ninst✝⁴ : Preorder δ\ninst✝³ : MulOneClass α\ninst✝² : MulOneClass β\ninst✝¹ : MulOneClass γ\ninst✝ : MulOneClass δ\nf✝ g✝ f g : α →*o β\nh : (fun f => f.toFun) f = (fun f => f.toFun) g\n⊢ f = g\n[PROOFSTEP]\nobtain ⟨⟨⟨_, _⟩⟩, _⟩ := f\n[GOAL]\ncase mk.mk.mk\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : Preorder α\ninst✝⁶ : Preorder β\ninst✝⁵ : Preorder γ\ninst✝⁴ : Preorder δ\ninst✝³ : MulOneClass α\ninst✝² : MulOneClass β\ninst✝¹ : MulOneClass γ\ninst✝ : MulOneClass δ\nf g✝ g : α →*o β\ntoFun✝ : α → β\nmap_one'✝ : toFun✝ 1 = 1\nmap_mul'✝ :\n ∀ (x y : α),\n OneHom.toFun { toFun := toFun✝, map_one' := map_one'✝ } (x * y) =\n OneHom.toFun { toFun := toFun✝, map_one' := map_one'✝ } x *\n OneHom.toFun { toFun := toFun✝, map_one' := map_one'✝ } y\nmonotone'✝ : Monotone (↑{ toOneHom := { toFun := toFun✝, map_one' := map_one'✝ }, map_mul' := map_mul'✝ }).toFun\nh :\n (fun f => f.toFun)\n { toMonoidHom := { toOneHom := { toFun := toFun✝, map_one' := map_one'✝ }, map_mul' := map_mul'✝ },\n monotone' := monotone'✝ } =\n (fun f => f.toFun) g\n⊢ { toMonoidHom := { toOneHom := { toFun := toFun✝, map_one' := map_one'✝ }, map_mul' := map_mul'✝ },\n monotone' := monotone'✝ } =\n g\n[PROOFSTEP]\nobtain ⟨⟨⟨_, _⟩⟩, _⟩ := g\n[GOAL]\ncase mk.mk.mk.mk.mk.mk\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : Preorder α\ninst✝⁶ : Preorder β\ninst✝⁵ : Preorder γ\ninst✝⁴ : Preorder δ\ninst✝³ : MulOneClass α\ninst✝² : MulOneClass β\ninst✝¹ : MulOneClass γ\ninst✝ : MulOneClass δ\nf g : α →*o β\ntoFun✝¹ : α → β\nmap_one'✝¹ : toFun✝¹ 1 = 1\nmap_mul'✝¹ :\n ∀ (x y : α),\n OneHom.toFun { toFun := toFun✝¹, map_one' := map_one'✝¹ } (x * y) =\n OneHom.toFun { toFun := toFun✝¹, map_one' := map_one'✝¹ } x *\n OneHom.toFun { toFun := toFun✝¹, map_one' := map_one'✝¹ } y\nmonotone'✝¹ : Monotone (↑{ toOneHom := { toFun := toFun✝¹, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ }).toFun\ntoFun✝ : α → β\nmap_one'✝ : toFun✝ 1 = 1\nmap_mul'✝ :\n ∀ (x y : α),\n OneHom.toFun { toFun := toFun✝, map_one' := map_one'✝ } (x * y) =\n OneHom.toFun { toFun := toFun✝, map_one' := map_one'✝ } x *\n OneHom.toFun { toFun := toFun✝, map_one' := map_one'✝ } y\nmonotone'✝ : Monotone (↑{ toOneHom := { toFun := toFun✝, map_one' := map_one'✝ }, map_mul' := map_mul'✝ }).toFun\nh :\n (fun f => f.toFun)\n { toMonoidHom := { toOneHom := { toFun := toFun✝¹, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ },\n monotone' := monotone'✝¹ } =\n (fun f => f.toFun)\n { toMonoidHom := { toOneHom := { toFun := toFun✝, map_one' := map_one'✝ }, map_mul' := map_mul'✝ },\n monotone' := monotone'✝ }\n⊢ { toMonoidHom := { toOneHom := { toFun := toFun✝¹, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ },\n monotone' := monotone'✝¹ } =\n { toMonoidHom := { toOneHom := { toFun := toFun✝, map_one' := map_one'✝ }, map_mul' := map_mul'✝ },\n monotone' := monotone'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : Preorder α\ninst✝⁶ : Preorder β\ninst✝⁵ : Preorder γ\ninst✝⁴ : Preorder δ\ninst✝³ : MulOneClass α\ninst✝² : MulOneClass β\ninst✝¹ : MulOneClass γ\ninst✝ : MulOneClass δ\nf✝ g f : α →*o β\nh : Monotone (↑↑f).toFun\n⊢ { toMonoidHom := ↑f, monotone' := h } = f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : Preorder α\ninst✝⁶ : Preorder β\ninst✝⁵ : Preorder γ\ninst✝⁴ : Preorder δ\ninst✝³ : MulOneClass α\ninst✝² : MulOneClass β\ninst✝¹ : MulOneClass γ\ninst✝ : MulOneClass δ\nf✝ g f : α →*o β\nh : Monotone (↑↑f).toFun\na✝ : α\n⊢ ↑{ toMonoidHom := ↑f, monotone' := h } a✝ = ↑f a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : Preorder α\ninst✝⁶ : Preorder β\ninst✝⁵ : Preorder γ\ninst✝⁴ : Preorder δ\ninst✝³ : MulOneClass α\ninst✝² : MulOneClass β\ninst✝¹ : MulOneClass γ\ninst✝ : MulOneClass δ\nf✝ g✝ f g : α →*o β\nh : f.toMonoidHom = g.toMonoidHom\n⊢ ∀ (a : α), ↑f a = ↑g a\n[PROOFSTEP]\nconvert FunLike.ext_iff.1 h using 0\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : Preorder α\ninst✝⁶ : Preorder β\ninst✝⁵ : Preorder γ\ninst✝⁴ : Preorder δ\ninst✝³ : MulOneClass α\ninst✝² : MulOneClass β\ninst✝¹ : MulOneClass γ\ninst✝ : MulOneClass δ\nf✝ g✝ f g : α →*o β\nh : toOrderHom f = toOrderHom g\n⊢ ∀ (a : α), ↑f a = ↑g a\n[PROOFSTEP]\nconvert FunLike.ext_iff.1 h using 0\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : Preorder α\ninst✝⁶ : Preorder β\ninst✝⁵ : Preorder γ\ninst✝⁴ : Preorder δ\ninst✝³ : MulOneClass α\ninst✝² : MulOneClass β\ninst✝¹ : MulOneClass γ\ninst✝ : MulOneClass δ\nf✝ g : α →*o β\ng₁ g₂ : β →*o γ\nf : α →*o β\nhf : Surjective ↑f\nx✝ : g₁ = g₂\n⊢ comp g₁ f = comp g₂ f\n[PROOFSTEP]\ncongr\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : Preorder α\ninst✝⁶ : Preorder β\ninst✝⁵ : Preorder γ\ninst✝⁴ : Preorder δ\ninst✝³ : MulOneClass α\ninst✝² : MulOneClass β\ninst✝¹ : MulOneClass γ\ninst✝ : MulOneClass δ\nf g✝ : α →*o β\ng : β →*o γ\nf₁ f₂ : α →*o β\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\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : Preorder α\ninst✝⁶ : Preorder β\ninst✝⁵ : Preorder γ\ninst✝⁴ : Preorder δ\ninst✝³ : MulZeroOneClass α\ninst✝² : MulZeroOneClass β\ninst✝¹ : MulZeroOneClass γ\ninst✝ : MulZeroOneClass δ\nf✝ g✝ f g : α →*₀o β\nh : (fun f => f.toFun) f = (fun f => f.toFun) g\n⊢ f = g\n[PROOFSTEP]\nobtain ⟨⟨⟨_, _⟩⟩, _⟩ := f\n[GOAL]\ncase mk.mk.mk\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : Preorder α\ninst✝⁶ : Preorder β\ninst✝⁵ : Preorder γ\ninst✝⁴ : Preorder δ\ninst✝³ : MulZeroOneClass α\ninst✝² : MulZeroOneClass β\ninst✝¹ : MulZeroOneClass γ\ninst✝ : MulZeroOneClass δ\nf g✝ g : α →*₀o β\ntoFun✝ : α → β\nmap_zero'✝ : toFun✝ 0 = 0\nmap_one'✝ : ZeroHom.toFun { toFun := toFun✝, map_zero' := map_zero'✝ } 1 = 1\nmap_mul'✝ :\n ∀ (x y : α),\n ZeroHom.toFun { toFun := toFun✝, map_zero' := map_zero'✝ } (x * y) =\n ZeroHom.toFun { toFun := toFun✝, map_zero' := map_zero'✝ } x *\n ZeroHom.toFun { toFun := toFun✝, map_zero' := map_zero'✝ } y\nmonotone'✝ :\n Monotone\n (↑{ toZeroHom := { toFun := toFun✝, map_zero' := map_zero'✝ }, map_one' := map_one'✝, map_mul' := map_mul'✝ }).toFun\nh :\n (fun f => f.toFun)\n {\n toMonoidWithZeroHom :=\n { toZeroHom := { toFun := toFun✝, map_zero' := map_zero'✝ }, map_one' := map_one'✝, map_mul' := map_mul'✝ },\n monotone' := monotone'✝ } =\n (fun f => f.toFun) g\n⊢ {\n toMonoidWithZeroHom :=\n { toZeroHom := { toFun := toFun✝, map_zero' := map_zero'✝ }, map_one' := map_one'✝, map_mul' := map_mul'✝ },\n monotone' := monotone'✝ } =\n g\n[PROOFSTEP]\nobtain ⟨⟨⟨_, _⟩⟩, _⟩ := g\n[GOAL]\ncase mk.mk.mk.mk.mk.mk\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : Preorder α\ninst✝⁶ : Preorder β\ninst✝⁵ : Preorder γ\ninst✝⁴ : Preorder δ\ninst✝³ : MulZeroOneClass α\ninst✝² : MulZeroOneClass β\ninst✝¹ : MulZeroOneClass γ\ninst✝ : MulZeroOneClass δ\nf g : α →*₀o β\ntoFun✝¹ : α → β\nmap_zero'✝¹ : toFun✝¹ 0 = 0\nmap_one'✝¹ : ZeroHom.toFun { toFun := toFun✝¹, map_zero' := map_zero'✝¹ } 1 = 1\nmap_mul'✝¹ :\n ∀ (x y : α),\n ZeroHom.toFun { toFun := toFun✝¹, map_zero' := map_zero'✝¹ } (x * y) =\n ZeroHom.toFun { toFun := toFun✝¹, map_zero' := map_zero'✝¹ } x *\n ZeroHom.toFun { toFun := toFun✝¹, map_zero' := map_zero'✝¹ } y\nmonotone'✝¹ :\n Monotone\n (↑{ toZeroHom := { toFun := toFun✝¹, map_zero' := map_zero'✝¹ }, map_one' := map_one'✝¹,\n map_mul' := map_mul'✝¹ }).toFun\ntoFun✝ : α → β\nmap_zero'✝ : toFun✝ 0 = 0\nmap_one'✝ : ZeroHom.toFun { toFun := toFun✝, map_zero' := map_zero'✝ } 1 = 1\nmap_mul'✝ :\n ∀ (x y : α),\n ZeroHom.toFun { toFun := toFun✝, map_zero' := map_zero'✝ } (x * y) =\n ZeroHom.toFun { toFun := toFun✝, map_zero' := map_zero'✝ } x *\n ZeroHom.toFun { toFun := toFun✝, map_zero' := map_zero'✝ } y\nmonotone'✝ :\n Monotone\n (↑{ toZeroHom := { toFun := toFun✝, map_zero' := map_zero'✝ }, map_one' := map_one'✝, map_mul' := map_mul'✝ }).toFun\nh :\n (fun f => f.toFun)\n {\n toMonoidWithZeroHom :=\n { toZeroHom := { toFun := toFun✝¹, map_zero' := map_zero'✝¹ }, map_one' := map_one'✝¹,\n map_mul' := map_mul'✝¹ },\n monotone' := monotone'✝¹ } =\n (fun f => f.toFun)\n {\n toMonoidWithZeroHom :=\n { toZeroHom := { toFun := toFun✝, map_zero' := map_zero'✝ }, map_one' := map_one'✝, map_mul' := map_mul'✝ },\n monotone' := monotone'✝ }\n⊢ {\n toMonoidWithZeroHom :=\n { toZeroHom := { toFun := toFun✝¹, map_zero' := map_zero'✝¹ }, map_one' := map_one'✝¹, map_mul' := map_mul'✝¹ },\n monotone' := monotone'✝¹ } =\n {\n toMonoidWithZeroHom :=\n { toZeroHom := { toFun := toFun✝, map_zero' := map_zero'✝ }, map_one' := map_one'✝, map_mul' := map_mul'✝ },\n monotone' := monotone'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : Preorder α\ninst✝⁶ : Preorder β\ninst✝⁵ : Preorder γ\ninst✝⁴ : Preorder δ\ninst✝³ : MulZeroOneClass α\ninst✝² : MulZeroOneClass β\ninst✝¹ : MulZeroOneClass γ\ninst✝ : MulZeroOneClass δ\nf✝ g✝ f g : α →*₀o β\nh : toOrderMonoidHom f = toOrderMonoidHom g\n⊢ ∀ (a : α), ↑f a = ↑g a\n[PROOFSTEP]\nconvert FunLike.ext_iff.1 h using 0\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : Preorder α\ninst✝⁶ : Preorder β\ninst✝⁵ : Preorder γ\ninst✝⁴ : Preorder δ\ninst✝³ : MulZeroOneClass α\ninst✝² : MulZeroOneClass β\ninst✝¹ : MulZeroOneClass γ\ninst✝ : MulZeroOneClass δ\nf✝ g✝ f g : α →*₀o β\nh : f.toMonoidWithZeroHom = g.toMonoidWithZeroHom\n⊢ ∀ (a : α), ↑f a = ↑g a\n[PROOFSTEP]\nconvert FunLike.ext_iff.1 h using 0\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : Preorder α\ninst✝⁶ : Preorder β\ninst✝⁵ : Preorder γ\ninst✝⁴ : Preorder δ\ninst✝³ : MulZeroOneClass α\ninst✝² : MulZeroOneClass β\ninst✝¹ : MulZeroOneClass γ\ninst✝ : MulZeroOneClass δ\nf✝ g : α →*₀o β\ng₁ g₂ : β →*₀o γ\nf : α →*₀o β\nhf : Surjective ↑f\nx✝ : g₁ = g₂\n⊢ comp g₁ f = comp g₂ f\n[PROOFSTEP]\ncongr\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : Preorder α\ninst✝⁶ : Preorder β\ninst✝⁵ : Preorder γ\ninst✝⁴ : Preorder δ\ninst✝³ : MulZeroOneClass α\ninst✝² : MulZeroOneClass β\ninst✝¹ : MulZeroOneClass γ\ninst✝ : MulZeroOneClass δ\nf g✝ : α →*₀o β\ng : β →*₀o γ\nf₁ f₂ : α →*₀o β\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\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nhα : Preorder α\nhα' : MulZeroOneClass α\nhβ : Preorder β\nhβ' : MulZeroOneClass β\nf : α →*₀o β\n⊢ f.toMonoidWithZeroHom = ↑f\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Hom.Monoid", "llama_tokens": 7840, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8856314828740729, "lm_q2_score": 0.63341027059799, "lm_q1q2_score": 0.5609680772173657}} {"text": "[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nl' : Type u_5\nm' : Type u_6\nn' : Type u_7\no' : Type u_8\nm'' : Type u_9\nn'' : Type u_10\nR : Type u_11\nA : Type u_12\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid A\ninst✝ : Module R A\ne₁ : m ≃ m'\ne₂ : n ≃ n'\ne₁' : m' ≃ m''\ne₂' : n' ≃ n''\n⊢ LinearEquiv.trans (reindexLinearEquiv R A e₁ e₂) (reindexLinearEquiv R A e₁' e₂') =\n reindexLinearEquiv R A (e₁.trans e₁') (e₂.trans e₂')\n[PROOFSTEP]\next\n[GOAL]\ncase h.a.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nl' : Type u_5\nm' : Type u_6\nn' : Type u_7\no' : Type u_8\nm'' : Type u_9\nn'' : Type u_10\nR : Type u_11\nA : Type u_12\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid A\ninst✝ : Module R A\ne₁ : m ≃ m'\ne₂ : n ≃ n'\ne₁' : m' ≃ m''\ne₂' : n' ≃ n''\nx✝¹ : Matrix m n A\ni✝ : m''\nx✝ : n''\n⊢ ↑(LinearEquiv.trans (reindexLinearEquiv R A e₁ e₂) (reindexLinearEquiv R A e₁' e₂')) x✝¹ i✝ x✝ =\n ↑(reindexLinearEquiv R A (e₁.trans e₁') (e₂.trans e₂')) x✝¹ i✝ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nl' : Type u_5\nm' : Type u_6\nn' : Type u_7\no' : Type u_8\nm'' : Type u_9\nn'' : Type u_10\nR : Type u_11\nA : Type u_12\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid A\ninst✝ : Module R A\ne₁ : m ≃ m'\ne₂ : n ≃ n'\ne₁' : m' ≃ m''\ne₂' : n' ≃ n''\n⊢ ↑(reindexLinearEquiv R A e₁' e₂') ∘ ↑(reindexLinearEquiv R A e₁ e₂) =\n ↑(reindexLinearEquiv R A (e₁.trans e₁') (e₂.trans e₂'))\n[PROOFSTEP]\nrw [← reindexLinearEquiv_trans]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nl' : Type u_5\nm' : Type u_6\nn' : Type u_7\no' : Type u_8\nm'' : Type u_9\nn'' : Type u_10\nR : Type u_11\nA : Type u_12\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid A\ninst✝ : Module R A\ne₁ : m ≃ m'\ne₂ : n ≃ n'\ne₁' : m' ≃ m''\ne₂' : n' ≃ n''\n⊢ ↑(reindexLinearEquiv R A e₁' e₂') ∘ ↑(reindexLinearEquiv R A e₁ e₂) =\n ↑(LinearEquiv.trans (reindexLinearEquiv R A e₁ e₂) (reindexLinearEquiv R A e₁' e₂'))\n[PROOFSTEP]\nrfl\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nl' : Type u_5\nm' : Type u_6\nn' : Type u_7\no' : Type u_8\nm'' : Type u_9\nn'' : Type u_10\nR : Type u_11\nA : Type u_12\ninst✝⁴ : CommSemiring R\ninst✝³ : Fintype n\ninst✝² : Fintype m\ninst✝¹ : DecidableEq m\ninst✝ : DecidableEq n\ne : m ≃ n\nsrc✝ : Matrix m m R ≃ₗ[R] Matrix n n R := reindexLinearEquiv R R e e\nr : R\n⊢ toFun\n { toFun := ↑(reindex e e), invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n (↑(algebraMap R (Matrix m m R)) r) =\n ↑(algebraMap R (Matrix n n R)) r\n[PROOFSTEP]\nsimp [algebraMap, Algebra.toRingHom, submatrix_smul _ 1]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.Reindex", "llama_tokens": 1388, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7905303186696748, "lm_q2_score": 0.7090191399336402, "lm_q1q2_score": 0.5605011266346394}} {"text": "[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nx : P × P × P\nhx12 : x.fst ≠ x.snd.fst\nhx32 : x.snd.snd ≠ x.snd.fst\n⊢ ContinuousAt (fun y => ∠ y.fst y.snd.fst y.snd.snd) x\n[PROOFSTEP]\nlet f : P × P × P → V × V := fun y => (y.1 -ᵥ y.2.1, y.2.2 -ᵥ y.2.1)\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nx : P × P × P\nhx12 : x.fst ≠ x.snd.fst\nhx32 : x.snd.snd ≠ x.snd.fst\nf : P × P × P → V × V := fun y => (y.fst -ᵥ y.snd.fst, y.snd.snd -ᵥ y.snd.fst)\n⊢ ContinuousAt (fun y => ∠ y.fst y.snd.fst y.snd.snd) x\n[PROOFSTEP]\nhave hf1 : (f x).1 ≠ 0 := by simp [hx12]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nx : P × P × P\nhx12 : x.fst ≠ x.snd.fst\nhx32 : x.snd.snd ≠ x.snd.fst\nf : P × P × P → V × V := fun y => (y.fst -ᵥ y.snd.fst, y.snd.snd -ᵥ y.snd.fst)\n⊢ (f x).fst ≠ 0\n[PROOFSTEP]\nsimp [hx12]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nx : P × P × P\nhx12 : x.fst ≠ x.snd.fst\nhx32 : x.snd.snd ≠ x.snd.fst\nf : P × P × P → V × V := fun y => (y.fst -ᵥ y.snd.fst, y.snd.snd -ᵥ y.snd.fst)\nhf1 : (f x).fst ≠ 0\n⊢ ContinuousAt (fun y => ∠ y.fst y.snd.fst y.snd.snd) x\n[PROOFSTEP]\nhave hf2 : (f x).2 ≠ 0 := by simp [hx32]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nx : P × P × P\nhx12 : x.fst ≠ x.snd.fst\nhx32 : x.snd.snd ≠ x.snd.fst\nf : P × P × P → V × V := fun y => (y.fst -ᵥ y.snd.fst, y.snd.snd -ᵥ y.snd.fst)\nhf1 : (f x).fst ≠ 0\n⊢ (f x).snd ≠ 0\n[PROOFSTEP]\nsimp [hx32]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nx : P × P × P\nhx12 : x.fst ≠ x.snd.fst\nhx32 : x.snd.snd ≠ x.snd.fst\nf : P × P × P → V × V := fun y => (y.fst -ᵥ y.snd.fst, y.snd.snd -ᵥ y.snd.fst)\nhf1 : (f x).fst ≠ 0\nhf2 : (f x).snd ≠ 0\n⊢ ContinuousAt (fun y => ∠ y.fst y.snd.fst y.snd.snd) x\n[PROOFSTEP]\nexact\n (InnerProductGeometry.continuousAt_angle hf1 hf2).comp\n ((continuous_fst.vsub continuous_snd.fst).prod_mk (continuous_snd.snd.vsub continuous_snd.fst)).continuousAt\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁷ : NormedAddCommGroup V\ninst✝⁶ : InnerProductSpace ℝ V\ninst✝⁵ : MetricSpace P\ninst✝⁴ : NormedAddTorsor V P\nV₂ : Type u_3\nP₂ : Type u_4\ninst✝³ : NormedAddCommGroup V₂\ninst✝² : InnerProductSpace ℝ V₂\ninst✝¹ : MetricSpace P₂\ninst✝ : NormedAddTorsor V₂ P₂\nf : P →ᵃⁱ[ℝ] P₂\np₁ p₂ p₃ : P\n⊢ ∠ (↑f p₁) (↑f p₂) (↑f p₃) = ∠ p₁ p₂ p₃\n[PROOFSTEP]\nsimp_rw [angle, ← AffineIsometry.map_vsub, LinearIsometry.angle_map]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nv₁ v₂ v₃ v : V\n⊢ ∠ (v₁ - v) (v₂ - v) (v₃ - v) = ∠ v₁ v₂ v₃\n[PROOFSTEP]\nsimpa only [vsub_eq_sub] using angle_vsub_const v₁ v₂ v₃ v\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nv v₁ v₂ v₃ : V\n⊢ ∠ (v - v₁) (v - v₂) (v - v₃) = ∠ v₁ v₂ v₃\n[PROOFSTEP]\nsimpa only [vsub_eq_sub] using angle_const_vsub v v₁ v₂ v₃\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nv₁ v₂ v₃ : V\n⊢ ∠ (-v₁) (-v₂) (-v₃) = ∠ v₁ v₂ v₃\n[PROOFSTEP]\nsimpa only [zero_sub] using angle_const_sub 0 v₁ v₂ v₃\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 : P\n⊢ ∠ p1 p1 p2 = π / 2\n[PROOFSTEP]\nunfold angle\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 : P\n⊢ InnerProductGeometry.angle (p1 -ᵥ p1) (p2 -ᵥ p1) = π / 2\n[PROOFSTEP]\nrw [vsub_self]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 : P\n⊢ InnerProductGeometry.angle 0 (p2 -ᵥ p1) = π / 2\n[PROOFSTEP]\nexact angle_zero_left _\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 : P\n⊢ ∠ p1 p2 p2 = π / 2\n[PROOFSTEP]\nrw [angle_comm, angle_eq_left]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : ∠ p1 p2 p3 = π\n⊢ ∠ p2 p1 p3 = 0\n[PROOFSTEP]\nunfold angle at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : InnerProductGeometry.angle (p1 -ᵥ p2) (p3 -ᵥ p2) = π\n⊢ ∠ p2 p1 p3 = 0\n[PROOFSTEP]\nrw [angle_eq_pi_iff] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : p1 -ᵥ p2 ≠ 0 ∧ ∃ r, r < 0 ∧ p3 -ᵥ p2 = r • (p1 -ᵥ p2)\n⊢ ∠ p2 p1 p3 = 0\n[PROOFSTEP]\nrcases h with ⟨hp1p2, ⟨r, ⟨hr, hpr⟩⟩⟩\n[GOAL]\ncase intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nhp1p2 : p1 -ᵥ p2 ≠ 0\nr : ℝ\nhr : r < 0\nhpr : p3 -ᵥ p2 = r • (p1 -ᵥ p2)\n⊢ ∠ p2 p1 p3 = 0\n[PROOFSTEP]\nunfold angle\n[GOAL]\ncase intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nhp1p2 : p1 -ᵥ p2 ≠ 0\nr : ℝ\nhr : r < 0\nhpr : p3 -ᵥ p2 = r • (p1 -ᵥ p2)\n⊢ InnerProductGeometry.angle (p2 -ᵥ p1) (p3 -ᵥ p1) = 0\n[PROOFSTEP]\nrw [angle_eq_zero_iff]\n[GOAL]\ncase intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nhp1p2 : p1 -ᵥ p2 ≠ 0\nr : ℝ\nhr : r < 0\nhpr : p3 -ᵥ p2 = r • (p1 -ᵥ p2)\n⊢ p2 -ᵥ p1 ≠ 0 ∧ ∃ r, 0 < r ∧ p3 -ᵥ p1 = r • (p2 -ᵥ p1)\n[PROOFSTEP]\nrw [← neg_vsub_eq_vsub_rev, neg_ne_zero] at hp1p2 \n[GOAL]\ncase intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nhp1p2 : p2 -ᵥ p1 ≠ 0\nr : ℝ\nhr : r < 0\nhpr : p3 -ᵥ p2 = r • (p1 -ᵥ p2)\n⊢ p2 -ᵥ p1 ≠ 0 ∧ ∃ r, 0 < r ∧ p3 -ᵥ p1 = r • (p2 -ᵥ p1)\n[PROOFSTEP]\nuse hp1p2, -r + 1, add_pos (neg_pos_of_neg hr) zero_lt_one\n[GOAL]\ncase right\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nhp1p2 : p2 -ᵥ p1 ≠ 0\nr : ℝ\nhr : r < 0\nhpr : p3 -ᵥ p2 = r • (p1 -ᵥ p2)\n⊢ p3 -ᵥ p1 = (-r + 1) • (p2 -ᵥ p1)\n[PROOFSTEP]\nrw [add_smul, ← neg_vsub_eq_vsub_rev p1 p2, smul_neg]\n[GOAL]\ncase right\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nhp1p2 : p2 -ᵥ p1 ≠ 0\nr : ℝ\nhr : r < 0\nhpr : p3 -ᵥ p2 = r • (p1 -ᵥ p2)\n⊢ p3 -ᵥ p1 = -(-r • (p1 -ᵥ p2)) + 1 • -(p1 -ᵥ p2)\n[PROOFSTEP]\nsimp [← hpr]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : ∠ p1 p2 p3 = π\n⊢ ∠ p2 p3 p1 = 0\n[PROOFSTEP]\nrw [angle_comm] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : ∠ p3 p2 p1 = π\n⊢ ∠ p2 p3 p1 = 0\n[PROOFSTEP]\nexact angle_eq_zero_of_angle_eq_pi_left h\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 p4 : P\nh : ∠ p2 p3 p4 = π\n⊢ ∠ p1 p2 p3 = ∠ p1 p2 p4\n[PROOFSTEP]\nunfold angle at *\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 p4 : P\nh : InnerProductGeometry.angle (p2 -ᵥ p3) (p4 -ᵥ p3) = π\n⊢ InnerProductGeometry.angle (p1 -ᵥ p2) (p3 -ᵥ p2) = InnerProductGeometry.angle (p1 -ᵥ p2) (p4 -ᵥ p2)\n[PROOFSTEP]\nrcases angle_eq_pi_iff.1 h with ⟨_, ⟨r, ⟨hr, hpr⟩⟩⟩\n[GOAL]\ncase intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 p4 : P\nh : InnerProductGeometry.angle (p2 -ᵥ p3) (p4 -ᵥ p3) = π\nleft✝ : p2 -ᵥ p3 ≠ 0\nr : ℝ\nhr : r < 0\nhpr : p4 -ᵥ p3 = r • (p2 -ᵥ p3)\n⊢ InnerProductGeometry.angle (p1 -ᵥ p2) (p3 -ᵥ p2) = InnerProductGeometry.angle (p1 -ᵥ p2) (p4 -ᵥ p2)\n[PROOFSTEP]\nrw [eq_comm]\n[GOAL]\ncase intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 p4 : P\nh : InnerProductGeometry.angle (p2 -ᵥ p3) (p4 -ᵥ p3) = π\nleft✝ : p2 -ᵥ p3 ≠ 0\nr : ℝ\nhr : r < 0\nhpr : p4 -ᵥ p3 = r • (p2 -ᵥ p3)\n⊢ InnerProductGeometry.angle (p1 -ᵥ p2) (p4 -ᵥ p2) = InnerProductGeometry.angle (p1 -ᵥ p2) (p3 -ᵥ p2)\n[PROOFSTEP]\nconvert angle_smul_right_of_pos (p1 -ᵥ p2) (p3 -ᵥ p2) (add_pos (neg_pos_of_neg hr) zero_lt_one)\n[GOAL]\ncase h.e'_2.h.e'_5\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 p4 : P\nh : InnerProductGeometry.angle (p2 -ᵥ p3) (p4 -ᵥ p3) = π\nleft✝ : p2 -ᵥ p3 ≠ 0\nr : ℝ\nhr : r < 0\nhpr : p4 -ᵥ p3 = r • (p2 -ᵥ p3)\n⊢ p4 -ᵥ p2 = (-r + 1) • (p3 -ᵥ p2)\n[PROOFSTEP]\nrw [add_smul, ← neg_vsub_eq_vsub_rev p2 p3, smul_neg, neg_smul, ← hpr]\n[GOAL]\ncase h.e'_2.h.e'_5\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 p4 : P\nh : InnerProductGeometry.angle (p2 -ᵥ p3) (p4 -ᵥ p3) = π\nleft✝ : p2 -ᵥ p3 ≠ 0\nr : ℝ\nhr : r < 0\nhpr : p4 -ᵥ p3 = r • (p2 -ᵥ p3)\n⊢ p4 -ᵥ p2 = - -(p4 -ᵥ p3) + 1 • -(p2 -ᵥ p3)\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 p4 : P\nh : ∠ p2 p3 p4 = π\n⊢ ∠ p1 p3 p2 + ∠ p1 p3 p4 = π\n[PROOFSTEP]\nunfold angle at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 p4 : P\nh : InnerProductGeometry.angle (p2 -ᵥ p3) (p4 -ᵥ p3) = π\n⊢ ∠ p1 p3 p2 + ∠ p1 p3 p4 = π\n[PROOFSTEP]\nrw [angle_comm p1 p3 p2, angle_comm p1 p3 p4]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 p4 : P\nh : InnerProductGeometry.angle (p2 -ᵥ p3) (p4 -ᵥ p3) = π\n⊢ ∠ p2 p3 p1 + ∠ p4 p3 p1 = π\n[PROOFSTEP]\nunfold angle\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 p4 : P\nh : InnerProductGeometry.angle (p2 -ᵥ p3) (p4 -ᵥ p3) = π\n⊢ InnerProductGeometry.angle (p2 -ᵥ p3) (p1 -ᵥ p3) + InnerProductGeometry.angle (p4 -ᵥ p3) (p1 -ᵥ p3) = π\n[PROOFSTEP]\nexact angle_add_angle_eq_pi_of_angle_eq_pi _ h\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 p4 p5 : P\nhapc : ∠ p1 p5 p3 = π\nhbpd : ∠ p2 p5 p4 = π\n⊢ ∠ p1 p5 p2 = ∠ p3 p5 p4\n[PROOFSTEP]\nlinarith [angle_add_angle_eq_pi_of_angle_eq_pi p1 hbpd, angle_comm p4 p5 p1,\n angle_add_angle_eq_pi_of_angle_eq_pi p4 hapc, angle_comm p4 p5 p3]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : ∠ p1 p2 p3 = π\n⊢ dist p1 p2 ≠ 0\n[PROOFSTEP]\nby_contra heq\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : ∠ p1 p2 p3 = π\nheq : dist p1 p2 = 0\n⊢ False\n[PROOFSTEP]\nrw [dist_eq_zero] at heq \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : ∠ p1 p2 p3 = π\nheq : p1 = p2\n⊢ False\n[PROOFSTEP]\nrw [heq, angle_eq_left] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : π / 2 = π\nheq : p1 = p2\n⊢ False\n[PROOFSTEP]\nexact Real.pi_ne_zero (by linarith)\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : π / 2 = π\nheq : p1 = p2\n⊢ π = 0\n[PROOFSTEP]\nlinarith\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : ∠ p1 p2 p3 = π\n⊢ dist p1 p3 = dist p1 p2 + dist p3 p2\n[PROOFSTEP]\nrw [dist_eq_norm_vsub V, dist_eq_norm_vsub V, dist_eq_norm_vsub V, ← vsub_sub_vsub_cancel_right]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : ∠ p1 p2 p3 = π\n⊢ ‖p1 -ᵥ ?p3 - (p3 -ᵥ ?p3)‖ = ‖p1 -ᵥ p2‖ + ‖p3 -ᵥ p2‖\ncase p3\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : ∠ p1 p2 p3 = π\n⊢ P\n[PROOFSTEP]\nexact norm_sub_eq_add_norm_of_angle_eq_pi h\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nhp1p2 : p1 ≠ p2\nhp3p2 : p3 ≠ p2\n⊢ dist p1 p3 = dist p1 p2 + dist p3 p2 ↔ ∠ p1 p2 p3 = π\n[PROOFSTEP]\nrw [dist_eq_norm_vsub V, dist_eq_norm_vsub V, dist_eq_norm_vsub V, ← vsub_sub_vsub_cancel_right]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nhp1p2 : p1 ≠ p2\nhp3p2 : p3 ≠ p2\n⊢ ‖p1 -ᵥ ?p3 - (p3 -ᵥ ?p3)‖ = ‖p1 -ᵥ p2‖ + ‖p3 -ᵥ p2‖ ↔ ∠ p1 p2 p3 = π\ncase p3\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nhp1p2 : p1 ≠ p2\nhp3p2 : p3 ≠ p2\n⊢ P\n[PROOFSTEP]\nexact\n norm_sub_eq_add_norm_iff_angle_eq_pi (fun he => hp1p2 (vsub_eq_zero_iff_eq.1 he)) fun he =>\n hp3p2 (vsub_eq_zero_iff_eq.1 he)\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : ∠ p1 p2 p3 = 0\n⊢ dist p1 p3 = |dist p1 p2 - dist p3 p2|\n[PROOFSTEP]\nrw [dist_eq_norm_vsub V, dist_eq_norm_vsub V, dist_eq_norm_vsub V, ← vsub_sub_vsub_cancel_right]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : ∠ p1 p2 p3 = 0\n⊢ ‖p1 -ᵥ ?p3 - (p3 -ᵥ ?p3)‖ = |‖p1 -ᵥ p2‖ - ‖p3 -ᵥ p2‖|\ncase p3\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : ∠ p1 p2 p3 = 0\n⊢ P\n[PROOFSTEP]\nexact norm_sub_eq_abs_sub_norm_of_angle_eq_zero h\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nhp1p2 : p1 ≠ p2\nhp3p2 : p3 ≠ p2\n⊢ dist p1 p3 = |dist p1 p2 - dist p3 p2| ↔ ∠ p1 p2 p3 = 0\n[PROOFSTEP]\nrw [dist_eq_norm_vsub V, dist_eq_norm_vsub V, dist_eq_norm_vsub V, ← vsub_sub_vsub_cancel_right]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nhp1p2 : p1 ≠ p2\nhp3p2 : p3 ≠ p2\n⊢ ‖p1 -ᵥ ?p3 - (p3 -ᵥ ?p3)‖ = |‖p1 -ᵥ p2‖ - ‖p3 -ᵥ p2‖| ↔ ∠ p1 p2 p3 = 0\ncase p3\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nhp1p2 : p1 ≠ p2\nhp3p2 : p3 ≠ p2\n⊢ P\n[PROOFSTEP]\nexact\n norm_sub_eq_abs_sub_norm_iff_angle_eq_zero (fun he => hp1p2 (vsub_eq_zero_iff_eq.1 he)) fun he =>\n hp3p2 (vsub_eq_zero_iff_eq.1 he)\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 : P\nhp1p2 : p1 ≠ p2\n⊢ ∠ p1 (midpoint ℝ p1 p2) p2 = π\n[PROOFSTEP]\nsimp [angle, hp1p2, -zero_lt_one]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 : P\nhp1p2 : p1 ≠ p2\n⊢ InnerProductGeometry.angle (p1 -ᵥ p2) (p2 -ᵥ p1) = π\n[PROOFSTEP]\nrw [← neg_vsub_eq_vsub_rev p1 p2]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 : P\nhp1p2 : p1 ≠ p2\n⊢ InnerProductGeometry.angle (p1 -ᵥ p2) (-(p1 -ᵥ p2)) = π\n[PROOFSTEP]\napply angle_self_neg_of_nonzero\n[GOAL]\ncase hx\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 : P\nhp1p2 : p1 ≠ p2\n⊢ p1 -ᵥ p2 ≠ 0\n[PROOFSTEP]\nsimpa only [ne_eq, vsub_eq_zero_iff_eq]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : dist p3 p1 = dist p3 p2\n⊢ ∠ p3 (midpoint ℝ p1 p2) p1 = π / 2\n[PROOFSTEP]\nlet m : P := midpoint ℝ p1 p2\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : dist p3 p1 = dist p3 p2\nm : P := midpoint ℝ p1 p2\n⊢ ∠ p3 (midpoint ℝ p1 p2) p1 = π / 2\n[PROOFSTEP]\nhave h1 : p3 -ᵥ p1 = p3 -ᵥ m - (p1 -ᵥ m) := (vsub_sub_vsub_cancel_right p3 p1 m).symm\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : dist p3 p1 = dist p3 p2\nm : P := midpoint ℝ p1 p2\nh1 : p3 -ᵥ p1 = p3 -ᵥ m - (p1 -ᵥ m)\n⊢ ∠ p3 (midpoint ℝ p1 p2) p1 = π / 2\n[PROOFSTEP]\nhave h2 : p3 -ᵥ p2 = p3 -ᵥ m + (p1 -ᵥ m) := by rw [left_vsub_midpoint, ← midpoint_vsub_right, vsub_add_vsub_cancel]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : dist p3 p1 = dist p3 p2\nm : P := midpoint ℝ p1 p2\nh1 : p3 -ᵥ p1 = p3 -ᵥ m - (p1 -ᵥ m)\n⊢ p3 -ᵥ p2 = p3 -ᵥ m + (p1 -ᵥ m)\n[PROOFSTEP]\nrw [left_vsub_midpoint, ← midpoint_vsub_right, vsub_add_vsub_cancel]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : dist p3 p1 = dist p3 p2\nm : P := midpoint ℝ p1 p2\nh1 : p3 -ᵥ p1 = p3 -ᵥ m - (p1 -ᵥ m)\nh2 : p3 -ᵥ p2 = p3 -ᵥ m + (p1 -ᵥ m)\n⊢ ∠ p3 (midpoint ℝ p1 p2) p1 = π / 2\n[PROOFSTEP]\nrw [dist_eq_norm_vsub V p3 p1, dist_eq_norm_vsub V p3 p2, h1, h2] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nm : P := midpoint ℝ p1 p2\nh : ‖p3 -ᵥ m - (p1 -ᵥ m)‖ = ‖p3 -ᵥ m + (p1 -ᵥ m)‖\nh1 : p3 -ᵥ p1 = p3 -ᵥ m - (p1 -ᵥ m)\nh2 : p3 -ᵥ p2 = p3 -ᵥ m + (p1 -ᵥ m)\n⊢ ∠ p3 (midpoint ℝ p1 p2) p1 = π / 2\n[PROOFSTEP]\nexact (norm_add_eq_norm_sub_iff_angle_eq_pi_div_two (p3 -ᵥ m) (p1 -ᵥ m)).mp h.symm\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : dist p3 p1 = dist p3 p2\n⊢ ∠ p3 (midpoint ℝ p1 p2) p2 = π / 2\n[PROOFSTEP]\nrw [midpoint_comm p1 p2, angle_left_midpoint_eq_pi_div_two_of_dist_eq h.symm]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : Sbtw ℝ p₁ p₂ p₃\n⊢ ∠ p₁ p₂ p₃ = π\n[PROOFSTEP]\nrw [angle, angle_eq_pi_iff]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : Sbtw ℝ p₁ p₂ p₃\n⊢ p₁ -ᵥ p₂ ≠ 0 ∧ ∃ r, r < 0 ∧ p₃ -ᵥ p₂ = r • (p₁ -ᵥ p₂)\n[PROOFSTEP]\nrcases h with ⟨⟨r, ⟨hr0, hr1⟩, hp₂⟩, hp₂p₁, hp₂p₃⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nr : ℝ\nhp₂ : ↑(AffineMap.lineMap p₁ p₃) r = p₂\nhr0 : 0 ≤ r\nhr1 : r ≤ 1\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\n⊢ p₁ -ᵥ p₂ ≠ 0 ∧ ∃ r, r < 0 ∧ p₃ -ᵥ p₂ = r • (p₁ -ᵥ p₂)\n[PROOFSTEP]\nrefine' ⟨vsub_ne_zero.2 hp₂p₁.symm, -(1 - r) / r, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nr : ℝ\nhp₂ : ↑(AffineMap.lineMap p₁ p₃) r = p₂\nhr0 : 0 ≤ r\nhr1 : r ≤ 1\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\n⊢ -(1 - r) / r < 0 ∧ p₃ -ᵥ p₂ = (-(1 - r) / r) • (p₁ -ᵥ p₂)\n[PROOFSTEP]\nhave hr0' : r ≠ 0 := by\n rintro rfl\n rw [← hp₂] at hp₂p₁ \n simp at hp₂p₁ \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nr : ℝ\nhp₂ : ↑(AffineMap.lineMap p₁ p₃) r = p₂\nhr0 : 0 ≤ r\nhr1 : r ≤ 1\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\n⊢ r ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\nhp₂ : ↑(AffineMap.lineMap p₁ p₃) 0 = p₂\nhr0 : 0 ≤ 0\nhr1 : 0 ≤ 1\n⊢ False\n[PROOFSTEP]\nrw [← hp₂] at hp₂p₁ \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₂p₁ : ↑(AffineMap.lineMap p₁ p₃) 0 ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\nhp₂ : ↑(AffineMap.lineMap p₁ p₃) 0 = p₂\nhr0 : 0 ≤ 0\nhr1 : 0 ≤ 1\n⊢ False\n[PROOFSTEP]\nsimp at hp₂p₁ \n[GOAL]\ncase intro.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nr : ℝ\nhp₂ : ↑(AffineMap.lineMap p₁ p₃) r = p₂\nhr0 : 0 ≤ r\nhr1 : r ≤ 1\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\nhr0' : r ≠ 0\n⊢ -(1 - r) / r < 0 ∧ p₃ -ᵥ p₂ = (-(1 - r) / r) • (p₁ -ᵥ p₂)\n[PROOFSTEP]\nhave hr1' : r ≠ 1 := by\n rintro rfl\n rw [← hp₂] at hp₂p₃ \n simp at hp₂p₃ \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nr : ℝ\nhp₂ : ↑(AffineMap.lineMap p₁ p₃) r = p₂\nhr0 : 0 ≤ r\nhr1 : r ≤ 1\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\nhr0' : r ≠ 0\n⊢ r ≠ 1\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\nhp₂ : ↑(AffineMap.lineMap p₁ p₃) 1 = p₂\nhr0 : 0 ≤ 1\nhr1 : 1 ≤ 1\nhr0' : 1 ≠ 0\n⊢ False\n[PROOFSTEP]\nrw [← hp₂] at hp₂p₃ \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : ↑(AffineMap.lineMap p₁ p₃) 1 ≠ p₃\nhp₂ : ↑(AffineMap.lineMap p₁ p₃) 1 = p₂\nhr0 : 0 ≤ 1\nhr1 : 1 ≤ 1\nhr0' : 1 ≠ 0\n⊢ False\n[PROOFSTEP]\nsimp at hp₂p₃ \n[GOAL]\ncase intro.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nr : ℝ\nhp₂ : ↑(AffineMap.lineMap p₁ p₃) r = p₂\nhr0 : 0 ≤ r\nhr1 : r ≤ 1\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\nhr0' : r ≠ 0\nhr1' : r ≠ 1\n⊢ -(1 - r) / r < 0 ∧ p₃ -ᵥ p₂ = (-(1 - r) / r) • (p₁ -ᵥ p₂)\n[PROOFSTEP]\nreplace hr0 := hr0.lt_of_ne hr0'.symm\n[GOAL]\ncase intro.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nr : ℝ\nhp₂ : ↑(AffineMap.lineMap p₁ p₃) r = p₂\nhr1 : r ≤ 1\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\nhr0' : r ≠ 0\nhr1' : r ≠ 1\nhr0 : 0 < r\n⊢ -(1 - r) / r < 0 ∧ p₃ -ᵥ p₂ = (-(1 - r) / r) • (p₁ -ᵥ p₂)\n[PROOFSTEP]\nreplace hr1 := hr1.lt_of_ne hr1'\n[GOAL]\ncase intro.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nr : ℝ\nhp₂ : ↑(AffineMap.lineMap p₁ p₃) r = p₂\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\nhr0' : r ≠ 0\nhr1' : r ≠ 1\nhr0 : 0 < r\nhr1 : r < 1\n⊢ -(1 - r) / r < 0 ∧ p₃ -ᵥ p₂ = (-(1 - r) / r) • (p₁ -ᵥ p₂)\n[PROOFSTEP]\nrefine' ⟨div_neg_of_neg_of_pos (Left.neg_neg_iff.2 (sub_pos.2 hr1)) hr0, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nr : ℝ\nhp₂ : ↑(AffineMap.lineMap p₁ p₃) r = p₂\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\nhr0' : r ≠ 0\nhr1' : r ≠ 1\nhr0 : 0 < r\nhr1 : r < 1\n⊢ p₃ -ᵥ p₂ = (-(1 - r) / r) • (p₁ -ᵥ p₂)\n[PROOFSTEP]\nrw [← hp₂, AffineMap.lineMap_apply, vsub_vadd_eq_vsub_sub, vsub_vadd_eq_vsub_sub, vsub_self, zero_sub, smul_neg,\n smul_smul, div_mul_cancel _ hr0', neg_smul, neg_neg, sub_eq_iff_eq_add, ← add_smul, sub_add_cancel, one_smul]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : Sbtw ℝ p₁ p₂ p₃\n⊢ ∠ p₃ p₂ p₁ = π\n[PROOFSTEP]\nrw [← h.angle₁₂₃_eq_pi, angle_comm]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\n⊢ ∠ p₁ p₂ p₃ = π ↔ Sbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nrefine' ⟨_, fun h => h.angle₁₂₃_eq_pi⟩\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\n⊢ ∠ p₁ p₂ p₃ = π → Sbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nrw [angle, angle_eq_pi_iff]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\n⊢ (p₁ -ᵥ p₂ ≠ 0 ∧ ∃ r, r < 0 ∧ p₃ -ᵥ p₂ = r • (p₁ -ᵥ p₂)) → Sbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nrintro ⟨hp₁p₂, r, hr, hp₃p₂⟩\n[GOAL]\ncase intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : p₁ -ᵥ p₂ ≠ 0\nr : ℝ\nhr : r < 0\nhp₃p₂ : p₃ -ᵥ p₂ = r • (p₁ -ᵥ p₂)\n⊢ Sbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nrefine'\n ⟨⟨1 / (1 - r),\n ⟨div_nonneg zero_le_one (sub_nonneg.2 (hr.le.trans zero_le_one)),\n (div_le_one (sub_pos.2 (hr.trans zero_lt_one))).2 ((le_sub_self_iff 1).2 hr.le)⟩,\n _⟩,\n (vsub_ne_zero.1 hp₁p₂).symm, _⟩\n[GOAL]\ncase intro.intro.intro.refine'_1\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : p₁ -ᵥ p₂ ≠ 0\nr : ℝ\nhr : r < 0\nhp₃p₂ : p₃ -ᵥ p₂ = r • (p₁ -ᵥ p₂)\n⊢ ↑(AffineMap.lineMap p₁ p₃) (1 / (1 - r)) = p₂\n[PROOFSTEP]\nrw [← eq_vadd_iff_vsub_eq] at hp₃p₂ \n[GOAL]\ncase intro.intro.intro.refine'_1\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : p₁ -ᵥ p₂ ≠ 0\nr : ℝ\nhr : r < 0\nhp₃p₂ : p₃ = r • (p₁ -ᵥ p₂) +ᵥ p₂\n⊢ ↑(AffineMap.lineMap p₁ p₃) (1 / (1 - r)) = p₂\n[PROOFSTEP]\nrw [AffineMap.lineMap_apply, hp₃p₂, vadd_vsub_assoc, ← neg_vsub_eq_vsub_rev p₂ p₁, smul_neg, ← neg_smul, smul_add,\n smul_smul, ← add_smul, eq_comm, eq_vadd_iff_vsub_eq]\n[GOAL]\ncase intro.intro.intro.refine'_1\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : p₁ -ᵥ p₂ ≠ 0\nr : ℝ\nhr : r < 0\nhp₃p₂ : p₃ = r • (p₁ -ᵥ p₂) +ᵥ p₂\n⊢ p₂ -ᵥ p₁ = (1 / (1 - r) * -r + 1 / (1 - r)) • (p₂ -ᵥ p₁)\n[PROOFSTEP]\nconvert (one_smul ℝ (p₂ -ᵥ p₁)).symm\n[GOAL]\ncase h.e'_3.h.e'_5\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : p₁ -ᵥ p₂ ≠ 0\nr : ℝ\nhr : r < 0\nhp₃p₂ : p₃ = r • (p₁ -ᵥ p₂) +ᵥ p₂\n⊢ 1 / (1 - r) * -r + 1 / (1 - r) = 1\n[PROOFSTEP]\nfield_simp [(sub_pos.2 (hr.trans zero_lt_one)).ne.symm]\n[GOAL]\ncase h.e'_3.h.e'_5\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : p₁ -ᵥ p₂ ≠ 0\nr : ℝ\nhr : r < 0\nhp₃p₂ : p₃ = r • (p₁ -ᵥ p₂) +ᵥ p₂\n⊢ -(r * (1 - r)) + (1 - r) = (1 - r) * (1 - r)\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.intro.intro.refine'_2\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : p₁ -ᵥ p₂ ≠ 0\nr : ℝ\nhr : r < 0\nhp₃p₂ : p₃ -ᵥ p₂ = r • (p₁ -ᵥ p₂)\n⊢ p₂ ≠ p₃\n[PROOFSTEP]\nrw [ne_comm, ← @vsub_ne_zero V, hp₃p₂, smul_ne_zero_iff]\n[GOAL]\ncase intro.intro.intro.refine'_2\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : p₁ -ᵥ p₂ ≠ 0\nr : ℝ\nhr : r < 0\nhp₃p₂ : p₃ -ᵥ p₂ = r • (p₁ -ᵥ p₂)\n⊢ r ≠ 0 ∧ p₁ -ᵥ p₂ ≠ 0\n[PROOFSTEP]\nexact ⟨hr.ne, hp₁p₂⟩\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃\nhp₂p₁ : p₂ ≠ p₁\n⊢ ∠ p₂ p₁ p₃ = 0\n[PROOFSTEP]\nrw [angle, angle_eq_zero_iff]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃\nhp₂p₁ : p₂ ≠ p₁\n⊢ p₂ -ᵥ p₁ ≠ 0 ∧ ∃ r, 0 < r ∧ p₃ -ᵥ p₁ = r • (p₂ -ᵥ p₁)\n[PROOFSTEP]\nrcases h with ⟨r, ⟨hr0, hr1⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₃ : P\nr : ℝ\nhr0 : 0 ≤ r\nhr1 : r ≤ 1\nhp₂p₁ : ↑(AffineMap.lineMap p₁ p₃) r ≠ p₁\n⊢ ↑(AffineMap.lineMap p₁ p₃) r -ᵥ p₁ ≠ 0 ∧ ∃ r_1, 0 < r_1 ∧ p₃ -ᵥ p₁ = r_1 • (↑(AffineMap.lineMap p₁ p₃) r -ᵥ p₁)\n[PROOFSTEP]\nhave hr0' : r ≠ 0 := by\n rintro rfl\n simp at hp₂p₁ \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₃ : P\nr : ℝ\nhr0 : 0 ≤ r\nhr1 : r ≤ 1\nhp₂p₁ : ↑(AffineMap.lineMap p₁ p₃) r ≠ p₁\n⊢ r ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₃ : P\nhr0 : 0 ≤ 0\nhr1 : 0 ≤ 1\nhp₂p₁ : ↑(AffineMap.lineMap p₁ p₃) 0 ≠ p₁\n⊢ False\n[PROOFSTEP]\nsimp at hp₂p₁ \n[GOAL]\ncase intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₃ : P\nr : ℝ\nhr0 : 0 ≤ r\nhr1 : r ≤ 1\nhp₂p₁ : ↑(AffineMap.lineMap p₁ p₃) r ≠ p₁\nhr0' : r ≠ 0\n⊢ ↑(AffineMap.lineMap p₁ p₃) r -ᵥ p₁ ≠ 0 ∧ ∃ r_1, 0 < r_1 ∧ p₃ -ᵥ p₁ = r_1 • (↑(AffineMap.lineMap p₁ p₃) r -ᵥ p₁)\n[PROOFSTEP]\nreplace hr0 := hr0.lt_of_ne hr0'.symm\n[GOAL]\ncase intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₃ : P\nr : ℝ\nhr1 : r ≤ 1\nhp₂p₁ : ↑(AffineMap.lineMap p₁ p₃) r ≠ p₁\nhr0' : r ≠ 0\nhr0 : 0 < r\n⊢ ↑(AffineMap.lineMap p₁ p₃) r -ᵥ p₁ ≠ 0 ∧ ∃ r_1, 0 < r_1 ∧ p₃ -ᵥ p₁ = r_1 • (↑(AffineMap.lineMap p₁ p₃) r -ᵥ p₁)\n[PROOFSTEP]\nrefine' ⟨vsub_ne_zero.2 hp₂p₁, r⁻¹, inv_pos.2 hr0, _⟩\n[GOAL]\ncase intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₃ : P\nr : ℝ\nhr1 : r ≤ 1\nhp₂p₁ : ↑(AffineMap.lineMap p₁ p₃) r ≠ p₁\nhr0' : r ≠ 0\nhr0 : 0 < r\n⊢ p₃ -ᵥ p₁ = r⁻¹ • (↑(AffineMap.lineMap p₁ p₃) r -ᵥ p₁)\n[PROOFSTEP]\nrw [AffineMap.lineMap_apply, vadd_vsub_assoc, vsub_self, add_zero, smul_smul, inv_mul_cancel hr0', one_smul]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃\nhp₂p₁ : p₂ ≠ p₁\n⊢ ∠ p₃ p₁ p₂ = 0\n[PROOFSTEP]\nrw [← h.angle₂₁₃_eq_zero_of_ne hp₂p₁, angle_comm]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\n⊢ ∠ p₁ p₂ p₃ = 0 ↔ p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\n⊢ ∠ p₁ p₂ p₃ = 0 → p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nrw [angle, angle_eq_zero_iff]\n[GOAL]\ncase mp\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\n⊢ (p₁ -ᵥ p₂ ≠ 0 ∧ ∃ r, 0 < r ∧ p₃ -ᵥ p₂ = r • (p₁ -ᵥ p₂)) → p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nrintro ⟨hp₁p₂, r, hr0, hp₃p₂⟩\n[GOAL]\ncase mp.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : p₁ -ᵥ p₂ ≠ 0\nr : ℝ\nhr0 : 0 < r\nhp₃p₂ : p₃ -ᵥ p₂ = r • (p₁ -ᵥ p₂)\n⊢ p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nrcases le_or_lt 1 r with (hr1 | hr1)\n[GOAL]\ncase mp.intro.intro.intro.inl\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : p₁ -ᵥ p₂ ≠ 0\nr : ℝ\nhr0 : 0 < r\nhp₃p₂ : p₃ -ᵥ p₂ = r • (p₁ -ᵥ p₂)\nhr1 : 1 ≤ r\n⊢ p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nrefine' Or.inl ⟨vsub_ne_zero.1 hp₁p₂, r⁻¹, ⟨(inv_pos.2 hr0).le, inv_le_one hr1⟩, _⟩\n[GOAL]\ncase mp.intro.intro.intro.inl\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : p₁ -ᵥ p₂ ≠ 0\nr : ℝ\nhr0 : 0 < r\nhp₃p₂ : p₃ -ᵥ p₂ = r • (p₁ -ᵥ p₂)\nhr1 : 1 ≤ r\n⊢ ↑(AffineMap.lineMap p₂ p₃) r⁻¹ = p₁\n[PROOFSTEP]\nrw [AffineMap.lineMap_apply, hp₃p₂, smul_smul, inv_mul_cancel hr0.ne.symm, one_smul, vsub_vadd]\n[GOAL]\ncase mp.intro.intro.intro.inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : p₁ -ᵥ p₂ ≠ 0\nr : ℝ\nhr0 : 0 < r\nhp₃p₂ : p₃ -ᵥ p₂ = r • (p₁ -ᵥ p₂)\nhr1 : r < 1\n⊢ p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nrefine' Or.inr ⟨_, r, ⟨hr0.le, hr1.le⟩, _⟩\n[GOAL]\ncase mp.intro.intro.intro.inr.refine'_1\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : p₁ -ᵥ p₂ ≠ 0\nr : ℝ\nhr0 : 0 < r\nhp₃p₂ : p₃ -ᵥ p₂ = r • (p₁ -ᵥ p₂)\nhr1 : r < 1\n⊢ p₃ ≠ p₂\n[PROOFSTEP]\nrw [← @vsub_ne_zero V, hp₃p₂, smul_ne_zero_iff]\n[GOAL]\ncase mp.intro.intro.intro.inr.refine'_1\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : p₁ -ᵥ p₂ ≠ 0\nr : ℝ\nhr0 : 0 < r\nhp₃p₂ : p₃ -ᵥ p₂ = r • (p₁ -ᵥ p₂)\nhr1 : r < 1\n⊢ r ≠ 0 ∧ p₁ -ᵥ p₂ ≠ 0\n[PROOFSTEP]\nexact ⟨hr0.ne.symm, hp₁p₂⟩\n[GOAL]\ncase mp.intro.intro.intro.inr.refine'_2\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : p₁ -ᵥ p₂ ≠ 0\nr : ℝ\nhr0 : 0 < r\nhp₃p₂ : p₃ -ᵥ p₂ = r • (p₁ -ᵥ p₂)\nhr1 : r < 1\n⊢ ↑(AffineMap.lineMap p₂ p₁) r = p₃\n[PROOFSTEP]\nrw [AffineMap.lineMap_apply, ← hp₃p₂, vsub_vadd]\n[GOAL]\ncase mpr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\n⊢ p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁ → ∠ p₁ p₂ p₃ = 0\n[PROOFSTEP]\nrintro (⟨hp₁p₂, h⟩ | ⟨hp₃p₂, h⟩)\n[GOAL]\ncase mpr.inl.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : p₁ ≠ p₂\nh : Wbtw ℝ p₂ p₁ p₃\n⊢ ∠ p₁ p₂ p₃ = 0\n[PROOFSTEP]\nexact h.angle₂₁₃_eq_zero_of_ne hp₁p₂\n[GOAL]\ncase mpr.inr.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₃p₂ : p₃ ≠ p₂\nh : Wbtw ℝ p₂ p₃ p₁\n⊢ ∠ p₁ p₂ p₃ = 0\n[PROOFSTEP]\nexact h.angle₃₁₂_eq_zero_of_ne hp₃p₂\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\n⊢ ∠ p₁ p₂ p₃ = 0 ↔ p₁ = p₃ ∧ p₁ ≠ p₂ ∨ Sbtw ℝ p₂ p₁ p₃ ∨ Sbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nrw [angle_eq_zero_iff_ne_and_wbtw]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\n⊢ p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁ ↔ p₁ = p₃ ∧ p₁ ≠ p₂ ∨ Sbtw ℝ p₂ p₁ p₃ ∨ Sbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nby_cases hp₁p₂ : p₁ = p₂\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : p₁ = p₂\n⊢ p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁ ↔ p₁ = p₃ ∧ p₁ ≠ p₂ ∨ Sbtw ℝ p₂ p₁ p₃ ∨ Sbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nsimp [hp₁p₂]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : ¬p₁ = p₂\n⊢ p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁ ↔ p₁ = p₃ ∧ p₁ ≠ p₂ ∨ Sbtw ℝ p₂ p₁ p₃ ∨ Sbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nby_cases hp₁p₃ : p₁ = p₃\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : ¬p₁ = p₂\nhp₁p₃ : p₁ = p₃\n⊢ p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁ ↔ p₁ = p₃ ∧ p₁ ≠ p₂ ∨ Sbtw ℝ p₂ p₁ p₃ ∨ Sbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nsimp [hp₁p₃]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : ¬p₁ = p₂\nhp₁p₃ : ¬p₁ = p₃\n⊢ p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁ ↔ p₁ = p₃ ∧ p₁ ≠ p₂ ∨ Sbtw ℝ p₂ p₁ p₃ ∨ Sbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nby_cases hp₃p₂ : p₃ = p₂\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : ¬p₁ = p₂\nhp₁p₃ : ¬p₁ = p₃\nhp₃p₂ : p₃ = p₂\n⊢ p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁ ↔ p₁ = p₃ ∧ p₁ ≠ p₂ ∨ Sbtw ℝ p₂ p₁ p₃ ∨ Sbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nsimp [hp₃p₂]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nhp₁p₂ : ¬p₁ = p₂\nhp₁p₃ : ¬p₁ = p₃\nhp₃p₂ : ¬p₃ = p₂\n⊢ p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁ ↔ p₁ = p₃ ∧ p₁ ≠ p₂ ∨ Sbtw ℝ p₂ p₁ p₃ ∨ Sbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nsimp [hp₁p₂, hp₁p₃, Ne.symm hp₁p₃, Sbtw, hp₃p₂]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\n⊢ Collinear ℝ {p₁, p₂, p₃} ↔ p₁ = p₂ ∨ p₃ = p₂ ∨ ∠ p₁ p₂ p₃ = 0 ∨ ∠ p₁ p₂ p₃ = π\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase refine'_1\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : Collinear ℝ {p₁, p₂, p₃}\n⊢ p₁ = p₂ ∨ p₃ = p₂ ∨ ∠ p₁ p₂ p₃ = 0 ∨ ∠ p₁ p₂ p₃ = π\n[PROOFSTEP]\nreplace h := h.wbtw_or_wbtw_or_wbtw\n[GOAL]\ncase refine'_1\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃ ∨ Wbtw ℝ p₂ p₃ p₁ ∨ Wbtw ℝ p₃ p₁ p₂\n⊢ p₁ = p₂ ∨ p₃ = p₂ ∨ ∠ p₁ p₂ p₃ = 0 ∨ ∠ p₁ p₂ p₃ = π\n[PROOFSTEP]\nby_cases h₁₂ : p₁ = p₂\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃ ∨ Wbtw ℝ p₂ p₃ p₁ ∨ Wbtw ℝ p₃ p₁ p₂\nh₁₂ : p₁ = p₂\n⊢ p₁ = p₂ ∨ p₃ = p₂ ∨ ∠ p₁ p₂ p₃ = 0 ∨ ∠ p₁ p₂ p₃ = π\n[PROOFSTEP]\nexact Or.inl h₁₂\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃ ∨ Wbtw ℝ p₂ p₃ p₁ ∨ Wbtw ℝ p₃ p₁ p₂\nh₁₂ : ¬p₁ = p₂\n⊢ p₁ = p₂ ∨ p₃ = p₂ ∨ ∠ p₁ p₂ p₃ = 0 ∨ ∠ p₁ p₂ p₃ = π\n[PROOFSTEP]\nby_cases h₃₂ : p₃ = p₂\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃ ∨ Wbtw ℝ p₂ p₃ p₁ ∨ Wbtw ℝ p₃ p₁ p₂\nh₁₂ : ¬p₁ = p₂\nh₃₂ : p₃ = p₂\n⊢ p₁ = p₂ ∨ p₃ = p₂ ∨ ∠ p₁ p₂ p₃ = 0 ∨ ∠ p₁ p₂ p₃ = π\n[PROOFSTEP]\nexact Or.inr (Or.inl h₃₂)\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃ ∨ Wbtw ℝ p₂ p₃ p₁ ∨ Wbtw ℝ p₃ p₁ p₂\nh₁₂ : ¬p₁ = p₂\nh₃₂ : ¬p₃ = p₂\n⊢ p₁ = p₂ ∨ p₃ = p₂ ∨ ∠ p₁ p₂ p₃ = 0 ∨ ∠ p₁ p₂ p₃ = π\n[PROOFSTEP]\nrw [or_iff_right h₁₂, or_iff_right h₃₂]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃ ∨ Wbtw ℝ p₂ p₃ p₁ ∨ Wbtw ℝ p₃ p₁ p₂\nh₁₂ : ¬p₁ = p₂\nh₃₂ : ¬p₃ = p₂\n⊢ ∠ p₁ p₂ p₃ = 0 ∨ ∠ p₁ p₂ p₃ = π\n[PROOFSTEP]\nrcases h with (h | h | h)\n[GOAL]\ncase neg.inl\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh₁₂ : ¬p₁ = p₂\nh₃₂ : ¬p₃ = p₂\nh : Wbtw ℝ p₁ p₂ p₃\n⊢ ∠ p₁ p₂ p₃ = 0 ∨ ∠ p₁ p₂ p₃ = π\n[PROOFSTEP]\nexact Or.inr (angle_eq_pi_iff_sbtw.2 ⟨h, Ne.symm h₁₂, Ne.symm h₃₂⟩)\n[GOAL]\ncase neg.inr.inl\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh₁₂ : ¬p₁ = p₂\nh₃₂ : ¬p₃ = p₂\nh : Wbtw ℝ p₂ p₃ p₁\n⊢ ∠ p₁ p₂ p₃ = 0 ∨ ∠ p₁ p₂ p₃ = π\n[PROOFSTEP]\nexact Or.inl (h.angle₃₁₂_eq_zero_of_ne h₃₂)\n[GOAL]\ncase neg.inr.inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh₁₂ : ¬p₁ = p₂\nh₃₂ : ¬p₃ = p₂\nh : Wbtw ℝ p₃ p₁ p₂\n⊢ ∠ p₁ p₂ p₃ = 0 ∨ ∠ p₁ p₂ p₃ = π\n[PROOFSTEP]\nexact Or.inl (h.angle₂₃₁_eq_zero_of_ne h₁₂)\n[GOAL]\ncase refine'_2\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : p₁ = p₂ ∨ p₃ = p₂ ∨ ∠ p₁ p₂ p₃ = 0 ∨ ∠ p₁ p₂ p₃ = π\n⊢ Collinear ℝ {p₁, p₂, p₃}\n[PROOFSTEP]\nrcases h with (rfl | rfl | h | h)\n[GOAL]\ncase refine'_2.inl\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₃ : P\n⊢ Collinear ℝ {p₁, p₁, p₃}\n[PROOFSTEP]\nsimpa using collinear_pair ℝ p₁ p₃\n[GOAL]\ncase refine'_2.inr.inl\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₃ : P\n⊢ Collinear ℝ {p₁, p₃, p₃}\n[PROOFSTEP]\nsimpa using collinear_pair ℝ p₁ p₃\n[GOAL]\ncase refine'_2.inr.inr.inl\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : ∠ p₁ p₂ p₃ = 0\n⊢ Collinear ℝ {p₁, p₂, p₃}\n[PROOFSTEP]\nrw [angle_eq_zero_iff_ne_and_wbtw] at h \n[GOAL]\ncase refine'_2.inr.inr.inl\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁\n⊢ Collinear ℝ {p₁, p₂, p₃}\n[PROOFSTEP]\nrcases h with (⟨-, h⟩ | ⟨-, h⟩)\n[GOAL]\ncase refine'_2.inr.inr.inl.inl.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₂ p₁ p₃\n⊢ Collinear ℝ {p₁, p₂, p₃}\n[PROOFSTEP]\nrw [Set.insert_comm]\n[GOAL]\ncase refine'_2.inr.inr.inl.inl.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₂ p₁ p₃\n⊢ Collinear ℝ {p₂, p₁, p₃}\n[PROOFSTEP]\nexact h.collinear\n[GOAL]\ncase refine'_2.inr.inr.inl.inr.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₂ p₃ p₁\n⊢ Collinear ℝ {p₁, p₂, p₃}\n[PROOFSTEP]\nrw [Set.insert_comm, Set.pair_comm]\n[GOAL]\ncase refine'_2.inr.inr.inl.inr.intro\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₂ p₃ p₁\n⊢ Collinear ℝ {p₂, p₃, p₁}\n[PROOFSTEP]\nexact h.collinear\n[GOAL]\ncase refine'_2.inr.inr.inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : ∠ p₁ p₂ p₃ = π\n⊢ Collinear ℝ {p₁, p₂, p₃}\n[PROOFSTEP]\nrw [angle_eq_pi_iff_sbtw] at h \n[GOAL]\ncase refine'_2.inr.inr.inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : Sbtw ℝ p₁ p₂ p₃\n⊢ Collinear ℝ {p₁, p₂, p₃}\n[PROOFSTEP]\nexact h.wbtw.collinear\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\n⊢ Collinear ℝ {p₁, p₂, p₃} ↔ p₁ = p₂ ∨ p₃ = p₂ ∨ sin (∠ p₁ p₂ p₃) = 0\n[PROOFSTEP]\nrw [sin_eq_zero_iff_angle_eq_zero_or_angle_eq_pi, collinear_iff_eq_or_eq_or_angle_eq_zero_or_angle_eq_pi]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\nh : sin (∠ p₁ p₂ p₃) = 0\n⊢ Collinear ℝ {p₁, p₂, p₃}\n[PROOFSTEP]\nrevert h\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\n⊢ sin (∠ p₁ p₂ p₃) = 0 → Collinear ℝ {p₁, p₂, p₃}\n[PROOFSTEP]\ncontrapose\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np₁ p₂ p₃ : P\n⊢ ¬Collinear ℝ {p₁, p₂, p₃} → ¬sin (∠ p₁ p₂ p₃) = 0\n[PROOFSTEP]\nexact sin_ne_zero_of_not_collinear\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine", "llama_tokens": 27059, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8459424373085145, "lm_q2_score": 0.66192288918838, "lm_q1q2_score": 0.5599486621903119}} {"text": "[GOAL]\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\n⊢ z • r ∈ zmultiples p ↔ ∃ k, r - ↑k • (p / ↑z) ∈ zmultiples p\n[PROOFSTEP]\nrw [AddSubgroup.mem_zmultiples_iff]\n[GOAL]\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\n⊢ (∃ k, k • p = z • r) ↔ ∃ k, r - ↑k • (p / ↑z) ∈ zmultiples p\n[PROOFSTEP]\nsimp_rw [AddSubgroup.mem_zmultiples_iff, div_eq_mul_inv, ← smul_mul_assoc, eq_sub_iff_add_eq]\n[GOAL]\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\n⊢ (∃ k, k • p = z • r) ↔ ∃ k k_1, k_1 • p + ↑k • p * (↑z)⁻¹ = r\n[PROOFSTEP]\nhave hz' : (z : R) ≠ 0 := Int.cast_ne_zero.mpr hz\n[GOAL]\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\nhz' : ↑z ≠ 0\n⊢ (∃ k, k • p = z • r) ↔ ∃ k k_1, k_1 • p + ↑k • p * (↑z)⁻¹ = r\n[PROOFSTEP]\nconv_rhs => simp (config := { singlePass := true }) only [← (mul_right_injective₀ hz').eq_iff]\n[GOAL]\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\nhz' : ↑z ≠ 0\n| ∃ k k_1, k_1 • p + ↑k • p * (↑z)⁻¹ = r\n[PROOFSTEP]\nsimp (config := { singlePass := true }) only [← (mul_right_injective₀ hz').eq_iff]\n[GOAL]\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\nhz' : ↑z ≠ 0\n| ∃ k k_1, k_1 • p + ↑k • p * (↑z)⁻¹ = r\n[PROOFSTEP]\nsimp (config := { singlePass := true }) only [← (mul_right_injective₀ hz').eq_iff]\n[GOAL]\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\nhz' : ↑z ≠ 0\n| ∃ k k_1, k_1 • p + ↑k • p * (↑z)⁻¹ = r\n[PROOFSTEP]\nsimp (config := { singlePass := true }) only [← (mul_right_injective₀ hz').eq_iff]\n[GOAL]\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\nhz' : ↑z ≠ 0\n⊢ (∃ k, k • p = z • r) ↔\n ∃ k k_1, (fun x x_1 => x * x_1) (↑z) (k_1 • p + ↑k • p * (↑z)⁻¹) = (fun x x_1 => x * x_1) (↑z) r\n[PROOFSTEP]\nsimp_rw [← zsmul_eq_mul, smul_add, ← mul_smul_comm, zsmul_eq_mul (z : R)⁻¹, mul_inv_cancel hz', mul_one, ←\n coe_nat_zsmul, smul_smul, ← add_smul]\n[GOAL]\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\nhz' : ↑z ≠ 0\n⊢ (∃ k, k • p = z • r) ↔ ∃ k k_1, (z * k_1 + ↑↑k) • p = z • r\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\nhz' : ↑z ≠ 0\n⊢ (∃ k, k • p = z • r) → ∃ k k_1, (z * k_1 + ↑↑k) • p = z • r\n[PROOFSTEP]\nrintro ⟨k, h⟩\n[GOAL]\ncase mp.intro\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\nhz' : ↑z ≠ 0\nk : ℤ\nh : k • p = z • r\n⊢ ∃ k k_1, (z * k_1 + ↑↑k) • p = z • r\n[PROOFSTEP]\nsimp_rw [← h]\n[GOAL]\ncase mp.intro\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\nhz' : ↑z ≠ 0\nk : ℤ\nh : k • p = z • r\n⊢ ∃ k_1 k_2, (z * k_2 + ↑↑k_1) • p = k • p\n[PROOFSTEP]\nrefine' ⟨⟨(k % z).toNat, _⟩, k / z, _⟩\n[GOAL]\ncase mp.intro.refine'_1\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\nhz' : ↑z ≠ 0\nk : ℤ\nh : k • p = z • r\n⊢ Int.toNat (k % z) < Int.natAbs z\n[PROOFSTEP]\nrw [← Int.ofNat_lt, Int.toNat_of_nonneg (Int.emod_nonneg _ hz)]\n[GOAL]\ncase mp.intro.refine'_1\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\nhz' : ↑z ≠ 0\nk : ℤ\nh : k • p = z • r\n⊢ k % z < ↑(Int.natAbs z)\n[PROOFSTEP]\nexact (Int.emod_lt _ hz).trans_eq (Int.abs_eq_natAbs _)\n[GOAL]\ncase mp.intro.refine'_2\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\nhz' : ↑z ≠ 0\nk : ℤ\nh : k • p = z • r\n⊢ (z * (k / z) + ↑↑{ val := Int.toNat (k % z), isLt := (_ : Int.toNat (k % z) < Int.natAbs z) }) • p = k • p\n[PROOFSTEP]\nrw [Fin.val_mk, Int.toNat_of_nonneg (Int.emod_nonneg _ hz)]\n[GOAL]\ncase mp.intro.refine'_2\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\nhz' : ↑z ≠ 0\nk : ℤ\nh : k • p = z • r\n⊢ (z * (k / z) + k % z) • p = k • p\n[PROOFSTEP]\nnth_rewrite 3 [← Int.div_add_mod k z]\n[GOAL]\ncase mp.intro.refine'_2\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\nhz' : ↑z ≠ 0\nk : ℤ\nh : k • p = z • r\n⊢ (z * (k / z) + k % z) • p = (z * Int.div k z + Int.mod k z) • p\n[PROOFSTEP]\nrw [Int.mod_def, ← Int.div_def', Int.emod_def]\n[GOAL]\ncase mp.intro.refine'_2\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\nhz' : ↑z ≠ 0\nk : ℤ\nh : k • p = z • r\n⊢ (z * (k / z) + (k - z * (k / z))) • p = (z * (k / z) + (k - z * (k / z))) • p\n[PROOFSTEP]\nsimp only [add_sub_cancel'_right, zsmul_eq_mul, Int.div_def']\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\nhz' : ↑z ≠ 0\n⊢ (∃ k k_1, (z * k_1 + ↑↑k) • p = z • r) → ∃ k, k • p = z • r\n[PROOFSTEP]\nrintro ⟨k, n, h⟩\n[GOAL]\ncase mpr.intro.intro\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : ℤ\nhz : z ≠ 0\nhz' : ↑z ≠ 0\nk : Fin (Int.natAbs z)\nn : ℤ\nh : (z * n + ↑↑k) • p = z • r\n⊢ ∃ k, k • p = z • r\n[PROOFSTEP]\nexact ⟨_, h⟩\n[GOAL]\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nn : ℕ\nhn : n ≠ 0\n⊢ n • r ∈ zmultiples p ↔ ∃ k, r - ↑k • (p / ↑n) ∈ zmultiples p\n[PROOFSTEP]\nrw [← coe_nat_zsmul r, zsmul_mem_zmultiples_iff_exists_sub_div (Int.coe_nat_ne_zero.mpr hn), Int.cast_ofNat]\n[GOAL]\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nn : ℕ\nhn : n ≠ 0\n⊢ (∃ k, r - ↑k • (p / ↑n) ∈ zmultiples p) ↔ ∃ k, r - ↑k • (p / ↑n) ∈ zmultiples p\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np : R\nψ θ : R ⧸ AddSubgroup.zmultiples p\nz : ℤ\nhz : z ≠ 0\n⊢ z • ψ = z • θ ↔ ∃ k, ψ = θ + ↑(↑k • (p / ↑z))\n[PROOFSTEP]\ninduction ψ using Quotient.inductionOn'\n[GOAL]\ncase h\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np : R\nθ : R ⧸ AddSubgroup.zmultiples p\nz : ℤ\nhz : z ≠ 0\na✝ : R\n⊢ z • Quotient.mk'' a✝ = z • θ ↔ ∃ k, Quotient.mk'' a✝ = θ + ↑(↑k • (p / ↑z))\n[PROOFSTEP]\ninduction θ using Quotient.inductionOn'\n[GOAL]\ncase h.h\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np : R\nz : ℤ\nhz : z ≠ 0\na✝¹ a✝ : R\n⊢ z • Quotient.mk'' a✝¹ = z • Quotient.mk'' a✝ ↔ ∃ k, Quotient.mk'' a✝¹ = Quotient.mk'' a✝ + ↑(↑k • (p / ↑z))\n[PROOFSTEP]\nlet Zp := AddSubgroup.zmultiples p\n[GOAL]\ncase h.h\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np : R\nz : ℤ\nhz : z ≠ 0\na✝¹ a✝ : R\nZp : AddSubgroup R := AddSubgroup.zmultiples p\n⊢ z • Quotient.mk'' a✝¹ = z • Quotient.mk'' a✝ ↔ ∃ k, Quotient.mk'' a✝¹ = Quotient.mk'' a✝ + ↑(↑k • (p / ↑z))\n[PROOFSTEP]\nhave : (Quotient.mk'' : R → R ⧸ Zp) = ((↑) : R → R ⧸ Zp) := rfl\n[GOAL]\ncase h.h\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np : R\nz : ℤ\nhz : z ≠ 0\na✝¹ a✝ : R\nZp : AddSubgroup R := AddSubgroup.zmultiples p\nthis : Quotient.mk'' = mk\n⊢ z • Quotient.mk'' a✝¹ = z • Quotient.mk'' a✝ ↔ ∃ k, Quotient.mk'' a✝¹ = Quotient.mk'' a✝ + ↑(↑k • (p / ↑z))\n[PROOFSTEP]\nsimp only [this]\n[GOAL]\ncase h.h\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np : R\nz : ℤ\nhz : z ≠ 0\na✝¹ a✝ : R\nZp : AddSubgroup R := AddSubgroup.zmultiples p\nthis : Quotient.mk'' = mk\n⊢ z • ↑a✝¹ = z • ↑a✝ ↔ ∃ k, ↑a✝¹ = ↑a✝ + ↑(↑k • (p / ↑z))\n[PROOFSTEP]\nsimp_rw [← QuotientAddGroup.mk_zsmul, ← QuotientAddGroup.mk_add, QuotientAddGroup.eq_iff_sub_mem, ← smul_sub, ← sub_sub]\n[GOAL]\ncase h.h\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np : R\nz : ℤ\nhz : z ≠ 0\na✝¹ a✝ : R\nZp : AddSubgroup R := AddSubgroup.zmultiples p\nthis : Quotient.mk'' = mk\n⊢ z • (a✝¹ - a✝) ∈ AddSubgroup.zmultiples p ↔ ∃ k, a✝¹ - a✝ - ↑k • (p / ↑z) ∈ AddSubgroup.zmultiples p\n[PROOFSTEP]\nexact AddSubgroup.zsmul_mem_zmultiples_iff_exists_sub_div hz\n[GOAL]\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np : R\nψ θ : R ⧸ AddSubgroup.zmultiples p\nn : ℕ\nhz : n ≠ 0\n⊢ n • ψ = n • θ ↔ ∃ k, ψ = θ + ↑(↑k • (p / ↑n))\n[PROOFSTEP]\nrw [← coe_nat_zsmul ψ, ← coe_nat_zsmul θ, zmultiples_zsmul_eq_zsmul_iff (Int.coe_nat_ne_zero.mpr hz), Int.cast_ofNat]\n[GOAL]\nR : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np : R\nψ θ : R ⧸ AddSubgroup.zmultiples p\nn : ℕ\nhz : n ≠ 0\n⊢ (∃ k, ψ = θ + ↑(↑k • (p / ↑n))) ↔ ∃ k, ψ = θ + ↑(↑k • (p / ↑n))\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Algebra.CharZero.Quotient", "llama_tokens": 4617, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.819893335913536, "lm_q2_score": 0.6825737214979745, "lm_q1q2_score": 0.5596376455258911}} {"text": "[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\n⊢ annIdealGenerator 𝕜 a = 0 ↔ annIdeal 𝕜 a = ⊥\n[PROOFSTEP]\nsimp only [annIdealGenerator, mul_eq_zero, IsPrincipal.eq_bot_iff_generator_eq_zero, Polynomial.C_eq_zero, inv_eq_zero,\n Polynomial.leadingCoeff_eq_zero, or_self_iff]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\n⊢ Ideal.span {annIdealGenerator 𝕜 a} = annIdeal 𝕜 a\n[PROOFSTEP]\nby_cases h : annIdealGenerator 𝕜 a = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\nh : annIdealGenerator 𝕜 a = 0\n⊢ Ideal.span {annIdealGenerator 𝕜 a} = annIdeal 𝕜 a\n[PROOFSTEP]\nrw [h, annIdealGenerator_eq_zero_iff.mp h, Set.singleton_zero, Ideal.span_zero]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\nh : ¬annIdealGenerator 𝕜 a = 0\n⊢ Ideal.span {annIdealGenerator 𝕜 a} = annIdeal 𝕜 a\n[PROOFSTEP]\nrw [annIdealGenerator, Ideal.span_singleton_mul_right_unit, Ideal.span_singleton_generator]\n[GOAL]\ncase neg.h2\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\nh : ¬annIdealGenerator 𝕜 a = 0\n⊢ IsUnit (↑C (leadingCoeff (IsPrincipal.generator (annIdeal 𝕜 a)))⁻¹)\n[PROOFSTEP]\napply Polynomial.isUnit_C.mpr\n[GOAL]\ncase neg.h2\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\nh : ¬annIdealGenerator 𝕜 a = 0\n⊢ IsUnit (leadingCoeff (IsPrincipal.generator (annIdeal 𝕜 a)))⁻¹\n[PROOFSTEP]\napply IsUnit.mk0\n[GOAL]\ncase neg.h2.hx\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\nh : ¬annIdealGenerator 𝕜 a = 0\n⊢ (leadingCoeff (IsPrincipal.generator (annIdeal 𝕜 a)))⁻¹ ≠ 0\n[PROOFSTEP]\napply inv_eq_zero.not.mpr\n[GOAL]\ncase neg.h2.hx\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\nh : ¬annIdealGenerator 𝕜 a = 0\n⊢ ¬leadingCoeff (IsPrincipal.generator (annIdeal 𝕜 a)) = 0\n[PROOFSTEP]\napply Polynomial.leadingCoeff_eq_zero.not.mpr\n[GOAL]\ncase neg.h2.hx\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\nh : ¬annIdealGenerator 𝕜 a = 0\n⊢ ¬IsPrincipal.generator (annIdeal 𝕜 a) = 0\n[PROOFSTEP]\napply (mul_ne_zero_iff.mp h).1\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\np : 𝕜[X]\na : A\n⊢ p ∈ annIdeal 𝕜 a ↔ ∃ s, p = s • annIdealGenerator 𝕜 a\n[PROOFSTEP]\nsimp_rw [@eq_comm _ p, ← mem_span_singleton, ← span_singleton_annIdealGenerator 𝕜 a, Ideal.span]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\np : 𝕜[X]\na : A\n⊢ p ∈ annIdeal 𝕜 a ↔ annIdealGenerator 𝕜 a ∣ p\n[PROOFSTEP]\nrw [← Ideal.mem_span_singleton, span_singleton_annIdealGenerator]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\n⊢ annIdealGenerator 𝕜 a = minpoly 𝕜 a\n[PROOFSTEP]\nby_cases h : annIdealGenerator 𝕜 a = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\nh : annIdealGenerator 𝕜 a = 0\n⊢ annIdealGenerator 𝕜 a = minpoly 𝕜 a\n[PROOFSTEP]\nrw [h, minpoly.eq_zero]\n[GOAL]\ncase pos\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\nh : annIdealGenerator 𝕜 a = 0\n⊢ ¬IsIntegral 𝕜 a\n[PROOFSTEP]\nrintro ⟨p, p_monic, hp : aeval a p = 0⟩\n[GOAL]\ncase pos.intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\nh : annIdealGenerator 𝕜 a = 0\np : 𝕜[X]\np_monic : Monic p\nhp : ↑(aeval a) p = 0\n⊢ False\n[PROOFSTEP]\nrefine' p_monic.ne_zero (Ideal.mem_bot.mp _)\n[GOAL]\ncase pos.intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\nh : annIdealGenerator 𝕜 a = 0\np : 𝕜[X]\np_monic : Monic p\nhp : ↑(aeval a) p = 0\n⊢ p ∈ ⊥\n[PROOFSTEP]\nsimpa only [annIdealGenerator_eq_zero_iff.mp h] using mem_annIdeal_iff_aeval_eq_zero.mpr hp\n[GOAL]\ncase neg\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\nh : ¬annIdealGenerator 𝕜 a = 0\n⊢ annIdealGenerator 𝕜 a = minpoly 𝕜 a\n[PROOFSTEP]\nexact\n minpoly.unique _ _ (monic_annIdealGenerator _ _ h) (annIdealGenerator_aeval_eq_zero _ _) fun q q_monic hq =>\n degree_annIdealGenerator_le_of_mem a q (mem_annIdeal_iff_aeval_eq_zero.mpr hq) q_monic.ne_zero\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\np : 𝕜[X]\np_monic : Monic p\np_gen : Ideal.span {p} = annIdeal 𝕜 a\n⊢ annIdealGenerator 𝕜 a = p\n[PROOFSTEP]\nby_cases h : p = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\np : 𝕜[X]\np_monic : Monic p\np_gen : Ideal.span {p} = annIdeal 𝕜 a\nh : p = 0\n⊢ annIdealGenerator 𝕜 a = p\n[PROOFSTEP]\nrwa [h, annIdealGenerator_eq_zero_iff, ← p_gen, Ideal.span_singleton_eq_bot.mpr]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\np : 𝕜[X]\np_monic : Monic p\np_gen : Ideal.span {p} = annIdeal 𝕜 a\nh : ¬p = 0\n⊢ annIdealGenerator 𝕜 a = p\n[PROOFSTEP]\nrw [← span_singleton_annIdealGenerator, Ideal.span_singleton_eq_span_singleton] at p_gen \n[GOAL]\ncase neg\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\np : 𝕜[X]\np_monic : Monic p\np_gen : Associated p (annIdealGenerator 𝕜 a)\nh : ¬p = 0\n⊢ annIdealGenerator 𝕜 a = p\n[PROOFSTEP]\nrw [eq_comm]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\np : 𝕜[X]\np_monic : Monic p\np_gen : Associated p (annIdealGenerator 𝕜 a)\nh : ¬p = 0\n⊢ p = annIdealGenerator 𝕜 a\n[PROOFSTEP]\napply eq_of_monic_of_associated p_monic _ p_gen\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : A\np : 𝕜[X]\np_monic : Monic p\np_gen : Associated p (annIdealGenerator 𝕜 a)\nh : ¬p = 0\n⊢ Monic (annIdealGenerator 𝕜 a)\n[PROOFSTEP]\napply monic_annIdealGenerator _ _ ((Associated.ne_zero_iff p_gen).mp h)\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "llama_tokens": 3037, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8031737869342624, "lm_q2_score": 0.6959583376458152, "lm_q1q2_score": 0.5589754935954634}} {"text": "[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\na : α\nl : List (Sigma β)\nh₁ : ¬a ∈ keys l\ns : Sigma β\nh₂ : s ∈ l\ne : a = s.fst\n⊢ ¬s.fst ∈ keys l\n[PROOFSTEP]\nrwa [e] at h₁ \n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ns : Sigma β\nl : List (Sigma β)\n⊢ NodupKeys (s :: l) ↔ ¬s.fst ∈ keys l ∧ NodupKeys l\n[PROOFSTEP]\nsimp [keys, NodupKeys]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\na : α\nb b' : β a\nl : List (Sigma β)\nnd : NodupKeys l\nh : { fst := a, snd := b } ∈ l\nh' : { fst := a, snd := b' } ∈ l\n⊢ b = b'\n[PROOFSTEP]\ncases nd.eq_of_fst_eq h h' rfl\n[GOAL]\ncase refl\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\na : α\nb : β a\nl : List (Sigma β)\nnd : NodupKeys l\nh h' : { fst := a, snd := b } ∈ l\n⊢ b = b\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\nL : List (List (Sigma β))\n⊢ NodupKeys (join L) ↔ (∀ (l : List (Sigma β)), l ∈ L → NodupKeys l) ∧ Pairwise Disjoint (map keys L)\n[PROOFSTEP]\nrw [nodupKeys_iff_pairwise, pairwise_join, pairwise_map]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\nL : List (List (Sigma β))\n⊢ (∀ (l : List (Sigma β)), l ∈ L → Pairwise (fun s s' => s.fst ≠ s'.fst) l) ∧\n Pairwise (fun l₁ l₂ => ∀ (x : Sigma β), x ∈ l₁ → ∀ (y : Sigma β), y ∈ l₂ → x.fst ≠ y.fst) L ↔\n (∀ (l : List (Sigma β)), l ∈ L → NodupKeys l) ∧ Pairwise (fun a b => Disjoint (keys a) (keys b)) L\n[PROOFSTEP]\nrefine' and_congr (ball_congr fun l _ => by simp [nodupKeys_iff_pairwise]) _\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\nL : List (List (Sigma β))\nl : List (Sigma β)\nx✝ : l ∈ L\n⊢ Pairwise (fun s s' => s.fst ≠ s'.fst) l ↔ NodupKeys l\n[PROOFSTEP]\nsimp [nodupKeys_iff_pairwise]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\nL : List (List (Sigma β))\n⊢ Pairwise (fun l₁ l₂ => ∀ (x : Sigma β), x ∈ l₁ → ∀ (y : Sigma β), y ∈ l₂ → x.fst ≠ y.fst) L ↔\n Pairwise (fun a b => Disjoint (keys a) (keys b)) L\n[PROOFSTEP]\napply iff_of_eq\n[GOAL]\ncase a\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\nL : List (List (Sigma β))\n⊢ Pairwise (fun l₁ l₂ => ∀ (x : Sigma β), x ∈ l₁ → ∀ (y : Sigma β), y ∈ l₂ → x.fst ≠ y.fst) L =\n Pairwise (fun a b => Disjoint (keys a) (keys b)) L\n[PROOFSTEP]\ncongr with (l₁ l₂)\n[GOAL]\ncase a.e_R.h.h.a\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\nL : List (List (Sigma β))\nl₁ l₂ : List (Sigma β)\n⊢ (∀ (x : Sigma β), x ∈ l₁ → ∀ (y : Sigma β), y ∈ l₂ → x.fst ≠ y.fst) ↔ Disjoint (keys l₁) (keys l₂)\n[PROOFSTEP]\nsimp [keys, disjoint_iff_ne]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\nl : List α\n⊢ Nodup (map Prod.fst (enum l))\n[PROOFSTEP]\nsimp [List.nodup_range]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\n⊢ Option.isSome (dlookup a []) = true ↔ a ∈ keys []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb : β a'\nl : List (Sigma β)\n⊢ Option.isSome (dlookup a ({ fst := a', snd := b } :: l)) = true ↔ a ∈ keys ({ fst := a', snd := b } :: l)\n[PROOFSTEP]\nby_cases h : a = a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb : β a'\nl : List (Sigma β)\nh : a = a'\n⊢ Option.isSome (dlookup a ({ fst := a', snd := b } :: l)) = true ↔ a ∈ keys ({ fst := a', snd := b } :: l)\n[PROOFSTEP]\nsubst a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nb : β a\n⊢ Option.isSome (dlookup a ({ fst := a, snd := b } :: l)) = true ↔ a ∈ keys ({ fst := a, snd := b } :: l)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb : β a'\nl : List (Sigma β)\nh : ¬a = a'\n⊢ Option.isSome (dlookup a ({ fst := a', snd := b } :: l)) = true ↔ a ∈ keys ({ fst := a', snd := b } :: l)\n[PROOFSTEP]\nsimp [h, dlookup_isSome]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\n⊢ dlookup a l = none ↔ ¬a ∈ keys l\n[PROOFSTEP]\nsimp [← dlookup_isSome, Option.isNone_iff_eq_none]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\na' : α\nb' : β a'\nl : List (Sigma β)\nH : b ∈ dlookup a ({ fst := a', snd := b' } :: l)\n⊢ { fst := a, snd := b } ∈ { fst := a', snd := b' } :: l\n[PROOFSTEP]\nby_cases h : a = a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\na' : α\nb' : β a'\nl : List (Sigma β)\nH : b ∈ dlookup a ({ fst := a', snd := b' } :: l)\nh : a = a'\n⊢ { fst := a, snd := b } ∈ { fst := a', snd := b' } :: l\n[PROOFSTEP]\nsubst a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nb' : β a\nH : b ∈ dlookup a ({ fst := a, snd := b' } :: l)\n⊢ { fst := a, snd := b } ∈ { fst := a, snd := b' } :: l\n[PROOFSTEP]\nsimp at H \n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nb' : β a\nH : b' = b\n⊢ { fst := a, snd := b } ∈ { fst := a, snd := b' } :: l\n[PROOFSTEP]\nsimp [H]\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\na' : α\nb' : β a'\nl : List (Sigma β)\nH : b ∈ dlookup a ({ fst := a', snd := b' } :: l)\nh : ¬a = a'\n⊢ { fst := a, snd := b } ∈ { fst := a', snd := b' } :: l\n[PROOFSTEP]\nsimp only [ne_eq, h, not_false_iff, dlookup_cons_ne] at H \n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\na' : α\nb' : β a'\nl : List (Sigma β)\nh : ¬a = a'\nH : b ∈ dlookup a l\n⊢ { fst := a, snd := b } ∈ { fst := a', snd := b' } :: l\n[PROOFSTEP]\nsimp [of_mem_dlookup H]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nnd : NodupKeys l\nh : { fst := a, snd := b } ∈ l\n⊢ b ∈ dlookup a l\n[PROOFSTEP]\ncases' Option.isSome_iff_exists.mp (dlookup_isSome.mpr (mem_keys_of_mem h)) with b' h'\n[GOAL]\ncase intro\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nnd : NodupKeys l\nh : { fst := a, snd := b } ∈ l\nb' : β { fst := a, snd := b }.fst\nh' : dlookup { fst := a, snd := b }.fst l = some b'\n⊢ b ∈ dlookup a l\n[PROOFSTEP]\ncases nd.eq_of_mk_mem h (of_mem_dlookup h')\n[GOAL]\ncase intro.refl\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nnd : NodupKeys l\nh : { fst := a, snd := b } ∈ l\nh' : dlookup { fst := a, snd := b }.fst l = some b\n⊢ b ∈ dlookup a l\n[PROOFSTEP]\nexact h'\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb' : β a'\nl : List (Sigma β)\n⊢ Option.map (Sigma.mk a) (dlookup a ({ fst := a', snd := b' } :: l)) =\n find? (fun s => decide (a = s.fst)) ({ fst := a', snd := b' } :: l)\n[PROOFSTEP]\nby_cases h : a = a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb' : β a'\nl : List (Sigma β)\nh : a = a'\n⊢ Option.map (Sigma.mk a) (dlookup a ({ fst := a', snd := b' } :: l)) =\n find? (fun s => decide (a = s.fst)) ({ fst := a', snd := b' } :: l)\n[PROOFSTEP]\nsubst a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nb' : β a\n⊢ Option.map (Sigma.mk a) (dlookup a ({ fst := a, snd := b' } :: l)) =\n find? (fun s => decide (a = s.fst)) ({ fst := a, snd := b' } :: l)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb' : β a'\nl : List (Sigma β)\nh : ¬a = a'\n⊢ Option.map (Sigma.mk a) (dlookup a ({ fst := a', snd := b' } :: l)) =\n find? (fun s => decide (a = s.fst)) ({ fst := a', snd := b' } :: l)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb' : β a'\nl : List (Sigma β)\nh : ¬a = a'\n⊢ Option.map (Sigma.mk a) (dlookup a l) = find? (fun s => decide (a = s.fst)) l\n[PROOFSTEP]\nexact map_dlookup_eq_find a l\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂ : List (Sigma β)\nnd₁ : NodupKeys l₁\nnd₂ : NodupKeys l₂\np : l₁ ~ l₂\n⊢ dlookup a l₁ = dlookup a l₂\n[PROOFSTEP]\next b\n[GOAL]\ncase a\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂ : List (Sigma β)\nnd₁ : NodupKeys l₁\nnd₂ : NodupKeys l₂\np : l₁ ~ l₂\nb : β a\n⊢ b ∈ dlookup a l₁ ↔ b ∈ dlookup a l₂\n[PROOFSTEP]\nsimp only [mem_dlookup_iff nd₁, mem_dlookup_iff nd₂]\n[GOAL]\ncase a\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂ : List (Sigma β)\nnd₁ : NodupKeys l₁\nnd₂ : NodupKeys l₂\np : l₁ ~ l₂\nb : β a\n⊢ { fst := a, snd := b } ∈ l₁ ↔ { fst := a, snd := b } ∈ l₂\n[PROOFSTEP]\nexact p.mem_iff\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nl₀ l₁ : List (Sigma β)\nnd₀ : NodupKeys l₀\nnd₁ : NodupKeys l₁\nh : ∀ (x : α) (y : β x), y ∈ dlookup x l₀ ↔ y ∈ dlookup x l₁\nx✝ : Sigma β\na : α\nb : β a\n⊢ { fst := a, snd := b } ∈ l₀ ↔ { fst := a, snd := b } ∈ l₁\n[PROOFSTEP]\nrw [← mem_dlookup_iff, ← mem_dlookup_iff, h]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nl₀ l₁ : List (Sigma β)\nnd₀ : NodupKeys l₀\nnd₁ : NodupKeys l₁\nh : ∀ (x : α) (y : β x), y ∈ dlookup x l₀ ↔ y ∈ dlookup x l₁\nx✝ : Sigma β\na : α\nb : β a\n⊢ NodupKeys l₁\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nl₀ l₁ : List (Sigma β)\nnd₀ : NodupKeys l₀\nnd₁ : NodupKeys l₁\nh : ∀ (x : α) (y : β x), y ∈ dlookup x l₀ ↔ y ∈ dlookup x l₁\nx✝ : Sigma β\na : α\nb : β a\n⊢ NodupKeys l₀\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\n⊢ lookupAll a [] = [] ↔ ∀ (b : β a), ¬{ fst := a, snd := b } ∈ []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb : β a'\nl : List (Sigma β)\n⊢ lookupAll a ({ fst := a', snd := b } :: l) = [] ↔\n ∀ (b_1 : β a), ¬{ fst := a, snd := b_1 } ∈ { fst := a', snd := b } :: l\n[PROOFSTEP]\nby_cases h : a = a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb : β a'\nl : List (Sigma β)\nh : a = a'\n⊢ lookupAll a ({ fst := a', snd := b } :: l) = [] ↔\n ∀ (b_1 : β a), ¬{ fst := a, snd := b_1 } ∈ { fst := a', snd := b } :: l\n[PROOFSTEP]\nsubst a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nb : β a\n⊢ lookupAll a ({ fst := a, snd := b } :: l) = [] ↔\n ∀ (b_1 : β a), ¬{ fst := a, snd := b_1 } ∈ { fst := a, snd := b } :: l\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb : β a'\nl : List (Sigma β)\nh : ¬a = a'\n⊢ lookupAll a ({ fst := a', snd := b } :: l) = [] ↔\n ∀ (b_1 : β a), ¬{ fst := a, snd := b_1 } ∈ { fst := a', snd := b } :: l\n[PROOFSTEP]\nsimp [h, lookupAll_eq_nil]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\n⊢ head? (lookupAll a []) = dlookup a []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb : β a'\nl : List (Sigma β)\n⊢ head? (lookupAll a ({ fst := a', snd := b } :: l)) = dlookup a ({ fst := a', snd := b } :: l)\n[PROOFSTEP]\nby_cases h : a = a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb : β a'\nl : List (Sigma β)\nh : a = a'\n⊢ head? (lookupAll a ({ fst := a', snd := b } :: l)) = dlookup a ({ fst := a', snd := b } :: l)\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nb : β a\n⊢ head? (lookupAll a ({ fst := a, snd := b } :: l)) = dlookup a ({ fst := a, snd := b } :: l)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb : β a'\nl : List (Sigma β)\nh : ¬a = a'\n⊢ head? (lookupAll a ({ fst := a', snd := b } :: l)) = dlookup a ({ fst := a', snd := b } :: l)\n[PROOFSTEP]\nrw [lookupAll_cons_ne, dlookup_cons_ne, head?_lookupAll a l]\n[GOAL]\ncase neg.a\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb : β a'\nl : List (Sigma β)\nh : ¬a = a'\n⊢ a ≠ { fst := a', snd := b }.fst\n[PROOFSTEP]\nassumption\n[GOAL]\ncase neg.a\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb : β a'\nl : List (Sigma β)\nh : ¬a = a'\n⊢ a ≠ { fst := a', snd := b }.fst\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\n⊢ b ∈ lookupAll a [] ↔ { fst := a, snd := b } ∈ []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\na' : α\nb' : β a'\nl : List (Sigma β)\n⊢ b ∈ lookupAll a ({ fst := a', snd := b' } :: l) ↔ { fst := a, snd := b } ∈ { fst := a', snd := b' } :: l\n[PROOFSTEP]\nby_cases h : a = a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\na' : α\nb' : β a'\nl : List (Sigma β)\nh : a = a'\n⊢ b ∈ lookupAll a ({ fst := a', snd := b' } :: l) ↔ { fst := a, snd := b } ∈ { fst := a', snd := b' } :: l\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nb' : β a\n⊢ b ∈ lookupAll a ({ fst := a, snd := b' } :: l) ↔ { fst := a, snd := b } ∈ { fst := a, snd := b' } :: l\n[PROOFSTEP]\nsimp [*, mem_lookupAll]\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\na' : α\nb' : β a'\nl : List (Sigma β)\nh : ¬a = a'\n⊢ b ∈ lookupAll a ({ fst := a', snd := b' } :: l) ↔ { fst := a, snd := b } ∈ { fst := a', snd := b' } :: l\n[PROOFSTEP]\nsimp [*, mem_lookupAll]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\n⊢ map (Sigma.mk a) (lookupAll a []) <+ []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb' : β a'\nl : List (Sigma β)\n⊢ map (Sigma.mk a) (lookupAll a ({ fst := a', snd := b' } :: l)) <+ { fst := a', snd := b' } :: l\n[PROOFSTEP]\nby_cases h : a = a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb' : β a'\nl : List (Sigma β)\nh : a = a'\n⊢ map (Sigma.mk a) (lookupAll a ({ fst := a', snd := b' } :: l)) <+ { fst := a', snd := b' } :: l\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nb' : β a\n⊢ map (Sigma.mk a) (lookupAll a ({ fst := a, snd := b' } :: l)) <+ { fst := a, snd := b' } :: l\n[PROOFSTEP]\nsimp only [ne_eq, not_true, lookupAll_cons_eq, List.map]\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nb' : β a\n⊢ { fst := a, snd := b' } :: map (Sigma.mk a) (lookupAll a l) <+ { fst := a, snd := b' } :: l\n[PROOFSTEP]\nexact (lookupAll_sublist a l).cons₂ _\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb' : β a'\nl : List (Sigma β)\nh : ¬a = a'\n⊢ map (Sigma.mk a) (lookupAll a ({ fst := a', snd := b' } :: l)) <+ { fst := a', snd := b' } :: l\n[PROOFSTEP]\nsimp only [ne_eq, h, not_false_iff, lookupAll_cons_ne]\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb' : β a'\nl : List (Sigma β)\nh : ¬a = a'\n⊢ map (Sigma.mk a) (lookupAll a l) <+ { fst := a', snd := b' } :: l\n[PROOFSTEP]\nexact (lookupAll_sublist a l).cons _\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : NodupKeys l\n⊢ length (lookupAll a l) ≤ 1\n[PROOFSTEP]\nhave := Nodup.sublist ((lookupAll_sublist a l).map _) h\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : NodupKeys l\nthis : Nodup (map Sigma.fst (map (Sigma.mk a) (lookupAll a l)))\n⊢ length (lookupAll a l) ≤ 1\n[PROOFSTEP]\nrw [map_map] at this \n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : NodupKeys l\nthis : Nodup (map (Sigma.fst ∘ Sigma.mk a) (lookupAll a l))\n⊢ length (lookupAll a l) ≤ 1\n[PROOFSTEP]\nrwa [← nodup_replicate, ← map_const]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : NodupKeys l\n⊢ lookupAll a l = Option.toList (dlookup a l)\n[PROOFSTEP]\nrw [← head?_lookupAll]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : NodupKeys l\n⊢ lookupAll a l = Option.toList (head? (lookupAll a l))\n[PROOFSTEP]\nhave h1 := lookupAll_length_le_one a h\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : NodupKeys l\nh1 : length (lookupAll a l) ≤ 1\n⊢ lookupAll a l = Option.toList (head? (lookupAll a l))\n[PROOFSTEP]\nrevert h1\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : NodupKeys l\n⊢ length (lookupAll a l) ≤ 1 → lookupAll a l = Option.toList (head? (lookupAll a l))\n[PROOFSTEP]\nrcases lookupAll a l with (_ | ⟨b, _ | ⟨c, l⟩⟩)\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : NodupKeys l\n⊢ length [] ≤ 1 → [] = Option.toList (head? [])\n[PROOFSTEP]\nintro h1\n[GOAL]\ncase cons.nil\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : NodupKeys l\nb : β a\n⊢ length [b] ≤ 1 → [b] = Option.toList (head? [b])\n[PROOFSTEP]\nintro h1\n[GOAL]\ncase cons.cons\nα : Type u\nβ : α → Type v\nl✝¹ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl✝ : List (Sigma β)\nh : NodupKeys l✝\nb c : β a\nl : List (β a)\n⊢ length (b :: c :: l) ≤ 1 → b :: c :: l = Option.toList (head? (b :: c :: l))\n[PROOFSTEP]\nintro h1\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : NodupKeys l\nh1 : length [] ≤ 1\n⊢ [] = Option.toList (head? [])\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : NodupKeys l\nh1 : length [] ≤ 1\n⊢ [] = Option.toList (head? [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons.nil\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : NodupKeys l\nb : β a\nh1 : length [b] ≤ 1\n⊢ [b] = Option.toList (head? [b])\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase cons.nil\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : NodupKeys l\nb : β a\nh1 : length [b] ≤ 1\n⊢ [b] = Option.toList (head? [b])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons.cons\nα : Type u\nβ : α → Type v\nl✝¹ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl✝ : List (Sigma β)\nh : NodupKeys l✝\nb c : β a\nl : List (β a)\nh1 : length (b :: c :: l) ≤ 1\n⊢ b :: c :: l = Option.toList (head? (b :: c :: l))\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase cons.cons\nα : Type u\nβ : α → Type v\nl✝¹ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl✝ : List (Sigma β)\nh : NodupKeys l✝\nb c : β a\nl : List (β a)\nh1 : length (b :: c :: l) ≤ 1\n⊢ b :: c :: l = Option.toList (head? (b :: c :: l))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons.cons\nα : Type u\nβ : α → Type v\nl✝¹ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl✝ : List (Sigma β)\nh : NodupKeys l✝\nb c : β a\nl : List (β a)\nh1 : length (b :: c :: l) ≤ 1\n⊢ b :: c :: l = Option.toList (head? (b :: c :: l))\n[PROOFSTEP]\nexact absurd h1 (by simp)\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝¹ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl✝ : List (Sigma β)\nh : NodupKeys l✝\nb c : β a\nl : List (β a)\nh1 : length (b :: c :: l) ≤ 1\n⊢ ¬length (b :: c :: l) ≤ 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : NodupKeys l\n⊢ Nodup (lookupAll a l)\n[PROOFSTEP]\nrw [lookupAll_eq_dlookup a h]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : NodupKeys l\n⊢ Nodup (Option.toList (dlookup a l))\n[PROOFSTEP]\napply Option.toList_nodup\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂ : List (Sigma β)\nnd₁ : NodupKeys l₁\nnd₂ : NodupKeys l₂\np : l₁ ~ l₂\n⊢ lookupAll a l₁ = lookupAll a l₂\n[PROOFSTEP]\nsimp [lookupAll_eq_dlookup, nd₁, nd₂, perm_dlookup a nd₁ nd₂ p]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nH : ∀ (b : β a), ¬{ fst := a, snd := b } ∈ l\n⊢ ∀ (a_1 : Sigma β), a_1 ∈ l → (if a = a_1.fst then some { fst := a, snd := b } else none) = none\n[PROOFSTEP]\nrintro ⟨a', b'⟩ h\n[GOAL]\ncase mk\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nH : ∀ (b : β a), ¬{ fst := a, snd := b } ∈ l\na' : α\nb' : β a'\nh : { fst := a', snd := b' } ∈ l\n⊢ (if a = { fst := a', snd := b' }.fst then some { fst := a, snd := b } else none) = none\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nH : ∀ (b : β a), ¬{ fst := a, snd := b } ∈ l\na' : α\nb' : β a'\nh : { fst := a', snd := b' } ∈ l\n⊢ (if a = a' then some { fst := a, snd := b } else none) = none\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nH : ∀ (b : β a), ¬{ fst := a, snd := b } ∈ l\na' : α\nb' : β a'\nh : { fst := a', snd := b' } ∈ l\nh✝ : a = a'\n⊢ False\n[PROOFSTEP]\nsubst a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nH : ∀ (b : β a), ¬{ fst := a, snd := b } ∈ l\nb' : β a\nh : { fst := a, snd := b' } ∈ l\n⊢ False\n[PROOFSTEP]\nexact H _ h\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nH : ∀ (b : β a), ¬{ fst := a, snd := b } ∈ l\na' : α\nb' : β a'\nh : { fst := a', snd := b' } ∈ l\nh✝ : ¬a = a'\n⊢ none = none\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nnd : NodupKeys l\nh : { fst := a, snd := b } ∈ l\n⊢ kreplace a b l = l\n[PROOFSTEP]\nrefine' (lookmap_congr _).trans (lookmap_id' (Option.guard fun (s : Sigma β) => a = s.1) _ _)\n[GOAL]\ncase refine'_1\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nnd : NodupKeys l\nh : { fst := a, snd := b } ∈ l\n⊢ ∀ (a_1 : Sigma β),\n a_1 ∈ l → (if a = a_1.fst then some { fst := a, snd := b } else none) = Option.guard (fun s => a = s.fst) a_1\n[PROOFSTEP]\nrintro ⟨a', b'⟩ h'\n[GOAL]\ncase refine'_1.mk\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nnd : NodupKeys l\nh : { fst := a, snd := b } ∈ l\na' : α\nb' : β a'\nh' : { fst := a', snd := b' } ∈ l\n⊢ (if a = { fst := a', snd := b' }.fst then some { fst := a, snd := b } else none) =\n Option.guard (fun s => a = s.fst) { fst := a', snd := b' }\n[PROOFSTEP]\ndsimp [Option.guard]\n[GOAL]\ncase refine'_1.mk\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nnd : NodupKeys l\nh : { fst := a, snd := b } ∈ l\na' : α\nb' : β a'\nh' : { fst := a', snd := b' } ∈ l\n⊢ (if a = a' then some { fst := a, snd := b } else none) = if a = a' then some { fst := a', snd := b' } else none\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nnd : NodupKeys l\nh : { fst := a, snd := b } ∈ l\na' : α\nb' : β a'\nh' : { fst := a', snd := b' } ∈ l\nh✝ : a = a'\n⊢ some { fst := a, snd := b } = some { fst := a', snd := b' }\n[PROOFSTEP]\nsubst a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nnd : NodupKeys l\nh : { fst := a, snd := b } ∈ l\nb' : β a\nh' : { fst := a, snd := b' } ∈ l\n⊢ some { fst := a, snd := b } = some { fst := a, snd := b' }\n[PROOFSTEP]\nsimp [nd.eq_of_mk_mem h h']\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nnd : NodupKeys l\nh : { fst := a, snd := b } ∈ l\na' : α\nb' : β a'\nh' : { fst := a', snd := b' } ∈ l\nh✝ : ¬a = a'\n⊢ none = none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nnd : NodupKeys l\nh : { fst := a, snd := b } ∈ l\n⊢ ∀ (a_1 b : Sigma β), b ∈ Option.guard (fun s => a = s.fst) a_1 → a_1 = b\n[PROOFSTEP]\nrintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩\n[GOAL]\ncase refine'_2.mk.mk\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nnd : NodupKeys l\nh : { fst := a, snd := b } ∈ l\na₁ : α\nb₁ : β a₁\na₂ : α\nb₂ : β a₂\n⊢ { fst := a₂, snd := b₂ } ∈ Option.guard (fun s => a = s.fst) { fst := a₁, snd := b₁ } →\n { fst := a₁, snd := b₁ } = { fst := a₂, snd := b₂ }\n[PROOFSTEP]\ndsimp [Option.guard]\n[GOAL]\ncase refine'_2.mk.mk\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nnd : NodupKeys l\nh : { fst := a, snd := b } ∈ l\na₁ : α\nb₁ : β a₁\na₂ : α\nb₂ : β a₂\n⊢ ({ fst := a₂, snd := b₂ } ∈ if a = a₁ then some { fst := a₁, snd := b₁ } else none) →\n { fst := a₁, snd := b₁ } = { fst := a₂, snd := b₂ }\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nnd : NodupKeys l\nh : { fst := a, snd := b } ∈ l\na₁ : α\nb₁ : β a₁\na₂ : α\nb₂ : β a₂\nh✝ : a = a₁\n⊢ { fst := a₂, snd := b₂ } ∈ some { fst := a₁, snd := b₁ } → { fst := a₁, snd := b₁ } = { fst := a₂, snd := b₂ }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\nnd : NodupKeys l\nh : { fst := a, snd := b } ∈ l\na₁ : α\nb₁ : β a₁\na₂ : α\nb₂ : β a₂\nh✝ : ¬a = a₁\n⊢ { fst := a₂, snd := b₂ } ∈ none → { fst := a₁, snd := b₁ } = { fst := a₂, snd := b₂ }\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\n⊢ ∀ (a_1 b_1 : Sigma β), (b_1 ∈ if a = a_1.fst then some { fst := a, snd := b } else none) → a_1.fst = b_1.fst\n[PROOFSTEP]\nrintro ⟨a₁, b₂⟩ ⟨a₂, b₂⟩\n[GOAL]\ncase mk.mk\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\na₁ : α\nb₂✝ : β a₁\na₂ : α\nb₂ : β a₂\n⊢ ({ fst := a₂, snd := b₂ } ∈ if a = { fst := a₁, snd := b₂✝ }.fst then some { fst := a, snd := b } else none) →\n { fst := a₁, snd := b₂✝ }.fst = { fst := a₂, snd := b₂ }.fst\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.mk\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\na₁ : α\nb₂✝ : β a₁\na₂ : α\nb₂ : β a₂\n⊢ ({ fst := a₂, snd := b₂ } ∈ if a = a₁ then some { fst := a, snd := b } else none) → a₁ = a₂\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\na₁ : α\nb₂✝ : β a₁\na₂ : α\nb₂ : β a₂\nh : a = a₁\n⊢ { fst := a₂, snd := b₂ } ∈ some { fst := a, snd := b } → a₁ = a₂\n[PROOFSTEP]\nsimp (config := { contextual := true }) [h]\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\na₁ : α\nb₂✝ : β a₁\na₂ : α\nb₂ : β a₂\nh : ¬a = a₁\n⊢ { fst := a₂, snd := b₂ } ∈ none → a₁ = a₂\n[PROOFSTEP]\nsimp (config := { contextual := true }) [h]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\n⊢ NodupKeys (kreplace a b l) ↔ NodupKeys l\n[PROOFSTEP]\nsimp [NodupKeys, keys_kreplace]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl₁ l₂ : List (Sigma β)\nnd : NodupKeys l₁\n⊢ Pairwise\n (fun a_1 b_1 =>\n ∀ (c : Sigma β),\n (c ∈ if a = a_1.fst then some { fst := a, snd := b } else none) →\n ∀ (d : Sigma β), (d ∈ if a = b_1.fst then some { fst := a, snd := b } else none) → a_1 = b_1 ∧ c = d)\n l₁\n[PROOFSTEP]\nrefine' nd.pairwise_ne.imp _\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl₁ l₂ : List (Sigma β)\nnd : NodupKeys l₁\n⊢ ∀ {a_1 b_1 : Sigma β},\n a_1.fst ≠ b_1.fst →\n ∀ (c : Sigma β),\n (c ∈ if a = a_1.fst then some { fst := a, snd := b } else none) →\n ∀ (d : Sigma β), (d ∈ if a = b_1.fst then some { fst := a, snd := b } else none) → a_1 = b_1 ∧ c = d\n[PROOFSTEP]\nintro x y h z h₁ w h₂\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl₁ l₂ : List (Sigma β)\nnd : NodupKeys l₁\nx y : Sigma β\nh : x.fst ≠ y.fst\nz : Sigma β\nh₁ : z ∈ if a = x.fst then some { fst := a, snd := b } else none\nw : Sigma β\nh₂ : w ∈ if a = y.fst then some { fst := a, snd := b } else none\n⊢ x = y ∧ z = w\n[PROOFSTEP]\nsplit_ifs at h₁ h₂ with h_2 h_1\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl₁ l₂ : List (Sigma β)\nnd : NodupKeys l₁\nx y : Sigma β\nh : x.fst ≠ y.fst\nz w : Sigma β\nh_2 : a = x.fst\nh₁ : z ∈ some { fst := a, snd := b }\nh_1 : a = y.fst\nh₂ : w ∈ some { fst := a, snd := b }\n⊢ x = y ∧ z = w\n[PROOFSTEP]\ncases h₁\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl₁ l₂ : List (Sigma β)\nnd : NodupKeys l₁\nx y : Sigma β\nh : x.fst ≠ y.fst\nz w : Sigma β\nh_2 : a = x.fst\nh₁ : z ∈ some { fst := a, snd := b }\nh_1 : ¬a = y.fst\nh₂ : w ∈ none\n⊢ x = y ∧ z = w\n[PROOFSTEP]\ncases h₁\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl₁ l₂ : List (Sigma β)\nnd : NodupKeys l₁\nx y : Sigma β\nh : x.fst ≠ y.fst\nz w : Sigma β\nh_2 : ¬a = x.fst\nh₁ : z ∈ none\nh✝ : a = y.fst\nh₂ : w ∈ some { fst := a, snd := b }\n⊢ x = y ∧ z = w\n[PROOFSTEP]\ncases h₁\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl₁ l₂ : List (Sigma β)\nnd : NodupKeys l₁\nx y : Sigma β\nh : x.fst ≠ y.fst\nz w : Sigma β\nh_2 : ¬a = x.fst\nh₁ : z ∈ none\nh✝ : ¬a = y.fst\nh₂ : w ∈ none\n⊢ x = y ∧ z = w\n[PROOFSTEP]\ncases h₁\n[GOAL]\ncase pos.refl\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl₁ l₂ : List (Sigma β)\nnd : NodupKeys l₁\nx y : Sigma β\nh : x.fst ≠ y.fst\nw : Sigma β\nh_2 : a = x.fst\nh_1 : a = y.fst\nh₂ : w ∈ some { fst := a, snd := b }\n⊢ x = y ∧ { fst := a, snd := b } = w\n[PROOFSTEP]\ncases h₂\n[GOAL]\ncase neg.refl\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl₁ l₂ : List (Sigma β)\nnd : NodupKeys l₁\nx y : Sigma β\nh : x.fst ≠ y.fst\nw : Sigma β\nh_2 : a = x.fst\nh_1 : ¬a = y.fst\nh₂ : w ∈ none\n⊢ x = y ∧ { fst := a, snd := b } = w\n[PROOFSTEP]\ncases h₂\n[GOAL]\ncase pos.refl.refl\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl₁ l₂ : List (Sigma β)\nnd : NodupKeys l₁\nx y : Sigma β\nh : x.fst ≠ y.fst\nh_2 : a = x.fst\nh_1 : a = y.fst\n⊢ x = y ∧ { fst := a, snd := b } = { fst := a, snd := b }\n[PROOFSTEP]\nexact (h (h_2.symm.trans h_1)).elim\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ns : Sigma β\nl : List (Sigma β)\nh : a = s.fst\n⊢ kerase a (s :: l) = l\n[PROOFSTEP]\nsimp [kerase, h]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ns : Sigma β\nl : List (Sigma β)\nh : a ≠ s.fst\n⊢ kerase a (s :: l) = s :: kerase a l\n[PROOFSTEP]\nsimp [kerase, h]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : ¬a ∈ keys l\n⊢ kerase a l = l\n[PROOFSTEP]\ninduction' l with _ _ ih <;> [rfl; (simp [not_or] at h ; simp [h.1, ih h.2])]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : ¬a ∈ keys l\n⊢ kerase a l = l\n[PROOFSTEP]\ninduction' l with _ _ ih\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh✝ : ¬a ∈ keys l\nh : ¬a ∈ keys []\n⊢ kerase a [] = []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh✝ : ¬a ∈ keys l\nhead✝ : Sigma β\ntail✝ : List (Sigma β)\nih : ¬a ∈ keys tail✝ → kerase a tail✝ = tail✝\nh : ¬a ∈ keys (head✝ :: tail✝)\n⊢ kerase a (head✝ :: tail✝) = head✝ :: tail✝\n[PROOFSTEP]\nsimp [not_or] at h \n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh✝ : ¬a ∈ keys l\nhead✝ : Sigma β\ntail✝ : List (Sigma β)\nih : ¬a ∈ keys tail✝ → kerase a tail✝ = tail✝\nh : ¬a = head✝.fst ∧ ¬a ∈ keys tail✝\n⊢ kerase a (head✝ :: tail✝) = head✝ :: tail✝\n[PROOFSTEP]\nsimp [h.1, ih h.2]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : a ∈ keys l\n⊢ ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ l = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a l = l₁ ++ l₂\n[PROOFSTEP]\ninduction l with\n| nil => cases h\n| cons hd tl ih =>\n by_cases e : a = hd.1\n · subst e\n exact ⟨hd.2, [], tl, by simp, by cases hd; rfl, by simp⟩\n · simp at h \n cases' h with h h\n exact absurd h e\n rcases ih h with ⟨b, tl₁, tl₂, h₁, h₂, h₃⟩\n exact ⟨b, hd :: tl₁, tl₂, not_mem_cons_of_ne_of_not_mem e h₁, by (rw [h₂]; rfl), by simp [e, h₃]⟩\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nh : a ∈ keys l\n⊢ ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ l = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a l = l₁ ++ l₂\n[PROOFSTEP]\ninduction l with\n| nil => cases h\n| cons hd tl ih =>\n by_cases e : a = hd.1\n · subst e\n exact ⟨hd.2, [], tl, by simp, by cases hd; rfl, by simp⟩\n · simp at h \n cases' h with h h\n exact absurd h e\n rcases ih h with ⟨b, tl₁, tl₂, h₁, h₂, h₃⟩\n exact ⟨b, hd :: tl₁, tl₂, not_mem_cons_of_ne_of_not_mem e h₁, by (rw [h₂]; rfl), by simp [e, h₃]⟩\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nh : a ∈ keys []\n⊢ ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ [] = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a [] = l₁ ++ l₂\n[PROOFSTEP]\n\n| nil => cases h\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nh : a ∈ keys []\n⊢ ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ [] = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a [] = l₁ ++ l₂\n[PROOFSTEP]\ncases h\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhd : Sigma β\ntl : List (Sigma β)\nih : a ∈ keys tl → ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a tl = l₁ ++ l₂\nh : a ∈ keys (hd :: tl)\n⊢ ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ hd :: tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a (hd :: tl) = l₁ ++ l₂\n[PROOFSTEP]\n\n| cons hd tl ih =>\n by_cases e : a = hd.1\n · subst e\n exact ⟨hd.2, [], tl, by simp, by cases hd; rfl, by simp⟩\n · simp at h \n cases' h with h h\n exact absurd h e\n rcases ih h with ⟨b, tl₁, tl₂, h₁, h₂, h₃⟩\n exact ⟨b, hd :: tl₁, tl₂, not_mem_cons_of_ne_of_not_mem e h₁, by (rw [h₂]; rfl), by simp [e, h₃]⟩\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhd : Sigma β\ntl : List (Sigma β)\nih : a ∈ keys tl → ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a tl = l₁ ++ l₂\nh : a ∈ keys (hd :: tl)\n⊢ ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ hd :: tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a (hd :: tl) = l₁ ++ l₂\n[PROOFSTEP]\nby_cases e : a = hd.1\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhd : Sigma β\ntl : List (Sigma β)\nih : a ∈ keys tl → ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a tl = l₁ ++ l₂\nh : a ∈ keys (hd :: tl)\ne : a = hd.fst\n⊢ ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ hd :: tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a (hd :: tl) = l₁ ++ l₂\n[PROOFSTEP]\nsubst e\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nhd : Sigma β\ntl : List (Sigma β)\nih :\n hd.fst ∈ keys tl →\n ∃ b l₁ l₂, ¬hd.fst ∈ keys l₁ ∧ tl = l₁ ++ { fst := hd.fst, snd := b } :: l₂ ∧ kerase hd.fst tl = l₁ ++ l₂\nh : hd.fst ∈ keys (hd :: tl)\n⊢ ∃ b l₁ l₂,\n ¬hd.fst ∈ keys l₁ ∧ hd :: tl = l₁ ++ { fst := hd.fst, snd := b } :: l₂ ∧ kerase hd.fst (hd :: tl) = l₁ ++ l₂\n[PROOFSTEP]\nexact ⟨hd.2, [], tl, by simp, by cases hd; rfl, by simp⟩\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nhd : Sigma β\ntl : List (Sigma β)\nih :\n hd.fst ∈ keys tl →\n ∃ b l₁ l₂, ¬hd.fst ∈ keys l₁ ∧ tl = l₁ ++ { fst := hd.fst, snd := b } :: l₂ ∧ kerase hd.fst tl = l₁ ++ l₂\nh : hd.fst ∈ keys (hd :: tl)\n⊢ ¬hd.fst ∈ keys []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nhd : Sigma β\ntl : List (Sigma β)\nih :\n hd.fst ∈ keys tl →\n ∃ b l₁ l₂, ¬hd.fst ∈ keys l₁ ∧ tl = l₁ ++ { fst := hd.fst, snd := b } :: l₂ ∧ kerase hd.fst tl = l₁ ++ l₂\nh : hd.fst ∈ keys (hd :: tl)\n⊢ hd :: tl = [] ++ { fst := hd.fst, snd := hd.snd } :: tl\n[PROOFSTEP]\ncases hd\n[GOAL]\ncase mk\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\ntl : List (Sigma β)\nfst✝ : α\nsnd✝ : β fst✝\nih :\n { fst := fst✝, snd := snd✝ }.fst ∈ keys tl →\n ∃ b l₁ l₂,\n ¬{ fst := fst✝, snd := snd✝ }.fst ∈ keys l₁ ∧\n tl = l₁ ++ { fst := { fst := fst✝, snd := snd✝ }.fst, snd := b } :: l₂ ∧\n kerase { fst := fst✝, snd := snd✝ }.fst tl = l₁ ++ l₂\nh : { fst := fst✝, snd := snd✝ }.fst ∈ keys ({ fst := fst✝, snd := snd✝ } :: tl)\n⊢ { fst := fst✝, snd := snd✝ } :: tl =\n [] ++ { fst := { fst := fst✝, snd := snd✝ }.fst, snd := { fst := fst✝, snd := snd✝ }.snd } :: tl\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nhd : Sigma β\ntl : List (Sigma β)\nih :\n hd.fst ∈ keys tl →\n ∃ b l₁ l₂, ¬hd.fst ∈ keys l₁ ∧ tl = l₁ ++ { fst := hd.fst, snd := b } :: l₂ ∧ kerase hd.fst tl = l₁ ++ l₂\nh : hd.fst ∈ keys (hd :: tl)\n⊢ kerase hd.fst (hd :: tl) = [] ++ tl\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhd : Sigma β\ntl : List (Sigma β)\nih : a ∈ keys tl → ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a tl = l₁ ++ l₂\nh : a ∈ keys (hd :: tl)\ne : ¬a = hd.fst\n⊢ ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ hd :: tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a (hd :: tl) = l₁ ++ l₂\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhd : Sigma β\ntl : List (Sigma β)\nih : a ∈ keys tl → ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a tl = l₁ ++ l₂\ne : ¬a = hd.fst\nh : a = hd.fst ∨ a ∈ keys tl\n⊢ ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ hd :: tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a (hd :: tl) = l₁ ++ l₂\n[PROOFSTEP]\ncases' h with h h\n[GOAL]\ncase neg.inl\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhd : Sigma β\ntl : List (Sigma β)\nih : a ∈ keys tl → ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a tl = l₁ ++ l₂\ne : ¬a = hd.fst\nh : a = hd.fst\n⊢ ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ hd :: tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a (hd :: tl) = l₁ ++ l₂\ncase neg.inr\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhd : Sigma β\ntl : List (Sigma β)\nih : a ∈ keys tl → ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a tl = l₁ ++ l₂\ne : ¬a = hd.fst\nh : a ∈ keys tl\n⊢ ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ hd :: tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a (hd :: tl) = l₁ ++ l₂\n[PROOFSTEP]\nexact absurd h e\n[GOAL]\ncase neg.inr\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhd : Sigma β\ntl : List (Sigma β)\nih : a ∈ keys tl → ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a tl = l₁ ++ l₂\ne : ¬a = hd.fst\nh : a ∈ keys tl\n⊢ ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ hd :: tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a (hd :: tl) = l₁ ++ l₂\n[PROOFSTEP]\nrcases ih h with ⟨b, tl₁, tl₂, h₁, h₂, h₃⟩\n[GOAL]\ncase neg.inr.intro.intro.intro.intro.intro\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhd : Sigma β\ntl : List (Sigma β)\nih : a ∈ keys tl → ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a tl = l₁ ++ l₂\ne : ¬a = hd.fst\nh : a ∈ keys tl\nb : β a\ntl₁ tl₂ : List (Sigma β)\nh₁ : ¬a ∈ keys tl₁\nh₂ : tl = tl₁ ++ { fst := a, snd := b } :: tl₂\nh₃ : kerase a tl = tl₁ ++ tl₂\n⊢ ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ hd :: tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a (hd :: tl) = l₁ ++ l₂\n[PROOFSTEP]\nexact ⟨b, hd :: tl₁, tl₂, not_mem_cons_of_ne_of_not_mem e h₁, by (rw [h₂]; rfl), by simp [e, h₃]⟩\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhd : Sigma β\ntl : List (Sigma β)\nih : a ∈ keys tl → ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a tl = l₁ ++ l₂\ne : ¬a = hd.fst\nh : a ∈ keys tl\nb : β a\ntl₁ tl₂ : List (Sigma β)\nh₁ : ¬a ∈ keys tl₁\nh₂ : tl = tl₁ ++ { fst := a, snd := b } :: tl₂\nh₃ : kerase a tl = tl₁ ++ tl₂\n⊢ hd :: tl = hd :: tl₁ ++ { fst := a, snd := b } :: tl₂\n[PROOFSTEP]\nrw [h₂]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhd : Sigma β\ntl : List (Sigma β)\nih : a ∈ keys tl → ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a tl = l₁ ++ l₂\ne : ¬a = hd.fst\nh : a ∈ keys tl\nb : β a\ntl₁ tl₂ : List (Sigma β)\nh₁ : ¬a ∈ keys tl₁\nh₂ : tl = tl₁ ++ { fst := a, snd := b } :: tl₂\nh₃ : kerase a tl = tl₁ ++ tl₂\n⊢ hd :: (tl₁ ++ { fst := a, snd := b } :: tl₂) = hd :: tl₁ ++ { fst := a, snd := b } :: tl₂\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhd : Sigma β\ntl : List (Sigma β)\nih : a ∈ keys tl → ∃ b l₁ l₂, ¬a ∈ keys l₁ ∧ tl = l₁ ++ { fst := a, snd := b } :: l₂ ∧ kerase a tl = l₁ ++ l₂\ne : ¬a = hd.fst\nh : a ∈ keys tl\nb : β a\ntl₁ tl₂ : List (Sigma β)\nh₁ : ¬a ∈ keys tl₁\nh₂ : tl = tl₁ ++ { fst := a, snd := b } :: tl₂\nh₃ : kerase a tl = tl₁ ++ tl₂\n⊢ kerase a (hd :: tl) = hd :: tl₁ ++ tl₂\n[PROOFSTEP]\nsimp [e, h₃]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na₁ a₂ : α\nl : List (Sigma β)\nh : a₁ ≠ a₂\np✝ : a₁ ∈ keys l\nw✝² : β a₂\nw✝¹ w✝ : List (Sigma β)\nleft✝ : ¬a₂ ∈ keys w✝¹\np : a₁ ∈ keys (w✝¹ ++ { fst := a₂, snd := w✝² } :: w✝)\nq : a₂ ∈ keys (w✝¹ ++ { fst := a₂, snd := w✝² } :: w✝)\n⊢ a₁ ∈ keys (w✝¹ ++ w✝)\n[PROOFSTEP]\nsimpa [keys, h] using p\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na₁ a₂ : α\nl : List (Sigma β)\nh : a₁ ≠ a₂\np : a₁ ∈ keys l\nq : ¬a₂ ∈ keys l\n⊢ a₁ ∈ keys (kerase a₂ l)\n[PROOFSTEP]\nsimp [q, p]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\n⊢ keys (kerase a l) = List.erase (keys l) a\n[PROOFSTEP]\nrw [keys, kerase, erase_eq_eraseP, eraseP_map]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\n⊢ map Sigma.fst (eraseP (fun s => decide (a = s.fst)) l) =\n map Sigma.fst (eraseP ((fun b => decide (a = b)) ∘ Sigma.fst) l)\n[PROOFSTEP]\ndsimp [Function.comp]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nl : List (Sigma β)\n⊢ kerase a (kerase a' l) = kerase a' (kerase a l)\n[PROOFSTEP]\nby_cases h : a = a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nl : List (Sigma β)\nh : a = a'\n⊢ kerase a (kerase a' l) = kerase a' (kerase a l)\n[PROOFSTEP]\nsubst a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\n⊢ kerase a (kerase a l) = kerase a (kerase a l)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nl : List (Sigma β)\nh : ¬a = a'\n⊢ kerase a (kerase a' l) = kerase a' (kerase a l)\n[PROOFSTEP]\ninduction' l with x xs\n[GOAL]\ncase neg.nil\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh : ¬a = a'\n⊢ kerase a (kerase a' []) = kerase a' (kerase a [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg.cons\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh : ¬a = a'\nx : Sigma β\nxs : List (Sigma β)\ntail_ih✝ : kerase a (kerase a' xs) = kerase a' (kerase a xs)\n⊢ kerase a (kerase a' (x :: xs)) = kerase a' (kerase a (x :: xs))\n[PROOFSTEP]\nby_cases a' = x.1\n[GOAL]\ncase neg.cons\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh : ¬a = a'\nx : Sigma β\nxs : List (Sigma β)\ntail_ih✝ : kerase a (kerase a' xs) = kerase a' (kerase a xs)\n⊢ kerase a (kerase a' (x :: xs)) = kerase a' (kerase a (x :: xs))\n[PROOFSTEP]\nby_cases a' = x.1\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh✝ : ¬a = a'\nx : Sigma β\nxs : List (Sigma β)\ntail_ih✝ : kerase a (kerase a' xs) = kerase a' (kerase a xs)\nh : a' = x.fst\n⊢ kerase a (kerase a' (x :: xs)) = kerase a' (kerase a (x :: xs))\n[PROOFSTEP]\nsubst a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nx : Sigma β\nxs : List (Sigma β)\nh : ¬a = x.fst\ntail_ih✝ : kerase a (kerase x.fst xs) = kerase x.fst (kerase a xs)\n⊢ kerase a (kerase x.fst (x :: xs)) = kerase x.fst (kerase a (x :: xs))\n[PROOFSTEP]\nsimp [kerase_cons_ne h, kerase_cons_eq rfl]\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh✝ : ¬a = a'\nx : Sigma β\nxs : List (Sigma β)\ntail_ih✝ : kerase a (kerase a' xs) = kerase a' (kerase a xs)\nh : ¬a' = x.fst\n⊢ kerase a (kerase a' (x :: xs)) = kerase a' (kerase a (x :: xs))\n[PROOFSTEP]\nby_cases h' : a = x.1\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh✝ : ¬a = a'\nx : Sigma β\nxs : List (Sigma β)\ntail_ih✝ : kerase a (kerase a' xs) = kerase a' (kerase a xs)\nh : ¬a' = x.fst\nh' : a = x.fst\n⊢ kerase a (kerase a' (x :: xs)) = kerase a' (kerase a (x :: xs))\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na' : α\nx : Sigma β\nxs : List (Sigma β)\nh✝ : ¬a' = x.fst\nh : ¬x.fst = a'\ntail_ih✝ : kerase x.fst (kerase a' xs) = kerase a' (kerase x.fst xs)\n⊢ kerase x.fst (kerase a' (x :: xs)) = kerase a' (kerase x.fst (x :: xs))\n[PROOFSTEP]\nsimp [kerase_cons_eq rfl, kerase_cons_ne (Ne.symm h)]\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh✝ : ¬a = a'\nx : Sigma β\nxs : List (Sigma β)\ntail_ih✝ : kerase a (kerase a' xs) = kerase a' (kerase a xs)\nh : ¬a' = x.fst\nh' : ¬a = x.fst\n⊢ kerase a (kerase a' (x :: xs)) = kerase a' (kerase a (x :: xs))\n[PROOFSTEP]\nsimp [kerase_cons_ne, *]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂ : List (Sigma β)\nnd : NodupKeys l₁\n⊢ ∀ {a_1 b : Sigma β}, a_1.fst ≠ b.fst → a = a_1.fst → a = b.fst → False\n[PROOFSTEP]\nrintro x y h rfl\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\nl₁ l₂ : List (Sigma β)\nnd : NodupKeys l₁\nx y : Sigma β\nh : x.fst ≠ y.fst\n⊢ x.fst = y.fst → False\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nnd : NodupKeys l\n⊢ ¬a ∈ keys (kerase a l)\n[PROOFSTEP]\ninduction l with\n| nil => simp\n| cons hd tl ih =>\n simp at nd \n by_cases h : a = hd.1\n · subst h\n simp [nd.1]\n · simp [h, ih nd.2]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nnd : NodupKeys l\n⊢ ¬a ∈ keys (kerase a l)\n[PROOFSTEP]\ninduction l with\n| nil => simp\n| cons hd tl ih =>\n simp at nd \n by_cases h : a = hd.1\n · subst h\n simp [nd.1]\n · simp [h, ih nd.2]\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nnd : NodupKeys []\n⊢ ¬a ∈ keys (kerase a [])\n[PROOFSTEP]\n\n| nil => simp\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nnd : NodupKeys []\n⊢ ¬a ∈ keys (kerase a [])\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhd : Sigma β\ntl : List (Sigma β)\nih : NodupKeys tl → ¬a ∈ keys (kerase a tl)\nnd : NodupKeys (hd :: tl)\n⊢ ¬a ∈ keys (kerase a (hd :: tl))\n[PROOFSTEP]\n\n| cons hd tl ih =>\n simp at nd \n by_cases h : a = hd.1\n · subst h\n simp [nd.1]\n · simp [h, ih nd.2]\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhd : Sigma β\ntl : List (Sigma β)\nih : NodupKeys tl → ¬a ∈ keys (kerase a tl)\nnd : NodupKeys (hd :: tl)\n⊢ ¬a ∈ keys (kerase a (hd :: tl))\n[PROOFSTEP]\nsimp at nd \n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhd : Sigma β\ntl : List (Sigma β)\nih : NodupKeys tl → ¬a ∈ keys (kerase a tl)\nnd : ¬hd.fst ∈ keys tl ∧ NodupKeys tl\n⊢ ¬a ∈ keys (kerase a (hd :: tl))\n[PROOFSTEP]\nby_cases h : a = hd.1\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhd : Sigma β\ntl : List (Sigma β)\nih : NodupKeys tl → ¬a ∈ keys (kerase a tl)\nnd : ¬hd.fst ∈ keys tl ∧ NodupKeys tl\nh : a = hd.fst\n⊢ ¬a ∈ keys (kerase a (hd :: tl))\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nhd : Sigma β\ntl : List (Sigma β)\nnd : ¬hd.fst ∈ keys tl ∧ NodupKeys tl\nih : NodupKeys tl → ¬hd.fst ∈ keys (kerase hd.fst tl)\n⊢ ¬hd.fst ∈ keys (kerase hd.fst (hd :: tl))\n[PROOFSTEP]\nsimp [nd.1]\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhd : Sigma β\ntl : List (Sigma β)\nih : NodupKeys tl → ¬a ∈ keys (kerase a tl)\nnd : ¬hd.fst ∈ keys tl ∧ NodupKeys tl\nh : ¬a = hd.fst\n⊢ ¬a ∈ keys (kerase a (hd :: tl))\n[PROOFSTEP]\nsimp [h, ih nd.2]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nl : List (Sigma β)\nh : a ≠ a'\n⊢ dlookup a (kerase a' l) = dlookup a l\n[PROOFSTEP]\ninduction l with\n| nil => rfl\n| cons hd tl ih =>\n cases' hd with ah bh\n by_cases h₁ : a = ah <;> by_cases h₂ : a' = ah\n · substs h₁ h₂\n cases Ne.irrefl h\n · subst h₁\n simp [h₂]\n · subst h₂\n simp [h]\n · simp [h₁, h₂, ih]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nl : List (Sigma β)\nh : a ≠ a'\n⊢ dlookup a (kerase a' l) = dlookup a l\n[PROOFSTEP]\ninduction l with\n| nil => rfl\n| cons hd tl ih =>\n cases' hd with ah bh\n by_cases h₁ : a = ah <;> by_cases h₂ : a' = ah\n · substs h₁ h₂\n cases Ne.irrefl h\n · subst h₁\n simp [h₂]\n · subst h₂\n simp [h]\n · simp [h₁, h₂, ih]\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh : a ≠ a'\n⊢ dlookup a (kerase a' []) = dlookup a []\n[PROOFSTEP]\n\n| nil => rfl\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh : a ≠ a'\n⊢ dlookup a (kerase a' []) = dlookup a []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh : a ≠ a'\nhd : Sigma β\ntl : List (Sigma β)\nih : dlookup a (kerase a' tl) = dlookup a tl\n⊢ dlookup a (kerase a' (hd :: tl)) = dlookup a (hd :: tl)\n[PROOFSTEP]\n\n| cons hd tl ih =>\n cases' hd with ah bh\n by_cases h₁ : a = ah <;> by_cases h₂ : a' = ah\n · substs h₁ h₂\n cases Ne.irrefl h\n · subst h₁\n simp [h₂]\n · subst h₂\n simp [h]\n · simp [h₁, h₂, ih]\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh : a ≠ a'\nhd : Sigma β\ntl : List (Sigma β)\nih : dlookup a (kerase a' tl) = dlookup a tl\n⊢ dlookup a (kerase a' (hd :: tl)) = dlookup a (hd :: tl)\n[PROOFSTEP]\ncases' hd with ah bh\n[GOAL]\ncase cons.mk\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh : a ≠ a'\ntl : List (Sigma β)\nih : dlookup a (kerase a' tl) = dlookup a tl\nah : α\nbh : β ah\n⊢ dlookup a (kerase a' ({ fst := ah, snd := bh } :: tl)) = dlookup a ({ fst := ah, snd := bh } :: tl)\n[PROOFSTEP]\nby_cases h₁ : a = ah\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh : a ≠ a'\ntl : List (Sigma β)\nih : dlookup a (kerase a' tl) = dlookup a tl\nah : α\nbh : β ah\nh₁ : a = ah\n⊢ dlookup a (kerase a' ({ fst := ah, snd := bh } :: tl)) = dlookup a ({ fst := ah, snd := bh } :: tl)\n[PROOFSTEP]\nby_cases h₂ : a' = ah\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh : a ≠ a'\ntl : List (Sigma β)\nih : dlookup a (kerase a' tl) = dlookup a tl\nah : α\nbh : β ah\nh₁ : ¬a = ah\n⊢ dlookup a (kerase a' ({ fst := ah, snd := bh } :: tl)) = dlookup a ({ fst := ah, snd := bh } :: tl)\n[PROOFSTEP]\nby_cases h₂ : a' = ah\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh : a ≠ a'\ntl : List (Sigma β)\nih : dlookup a (kerase a' tl) = dlookup a tl\nah : α\nbh : β ah\nh₁ : a = ah\nh₂ : a' = ah\n⊢ dlookup a (kerase a' ({ fst := ah, snd := bh } :: tl)) = dlookup a ({ fst := ah, snd := bh } :: tl)\n[PROOFSTEP]\nsubsts h₁ h₂\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na' : α\ntl : List (Sigma β)\nh : a' ≠ a'\nih : dlookup a' (kerase a' tl) = dlookup a' tl\nbh : β a'\n⊢ dlookup a' (kerase a' ({ fst := a', snd := bh } :: tl)) = dlookup a' ({ fst := a', snd := bh } :: tl)\n[PROOFSTEP]\ncases Ne.irrefl h\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh : a ≠ a'\ntl : List (Sigma β)\nih : dlookup a (kerase a' tl) = dlookup a tl\nah : α\nbh : β ah\nh₁ : a = ah\nh₂ : ¬a' = ah\n⊢ dlookup a (kerase a' ({ fst := ah, snd := bh } :: tl)) = dlookup a ({ fst := ah, snd := bh } :: tl)\n[PROOFSTEP]\nsubst h₁\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh : a ≠ a'\ntl : List (Sigma β)\nih : dlookup a (kerase a' tl) = dlookup a tl\nbh : β a\nh₂ : ¬a' = a\n⊢ dlookup a (kerase a' ({ fst := a, snd := bh } :: tl)) = dlookup a ({ fst := a, snd := bh } :: tl)\n[PROOFSTEP]\nsimp [h₂]\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh : a ≠ a'\ntl : List (Sigma β)\nih : dlookup a (kerase a' tl) = dlookup a tl\nah : α\nbh : β ah\nh₁ : ¬a = ah\nh₂ : a' = ah\n⊢ dlookup a (kerase a' ({ fst := ah, snd := bh } :: tl)) = dlookup a ({ fst := ah, snd := bh } :: tl)\n[PROOFSTEP]\nsubst h₂\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh : a ≠ a'\ntl : List (Sigma β)\nih : dlookup a (kerase a' tl) = dlookup a tl\nbh : β a'\nh₁ : ¬a = a'\n⊢ dlookup a (kerase a' ({ fst := a', snd := bh } :: tl)) = dlookup a ({ fst := a', snd := bh } :: tl)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nh : a ≠ a'\ntl : List (Sigma β)\nih : dlookup a (kerase a' tl) = dlookup a tl\nah : α\nbh : β ah\nh₁ : ¬a = ah\nh₂ : ¬a' = ah\n⊢ dlookup a (kerase a' ({ fst := ah, snd := bh } :: tl)) = dlookup a ({ fst := ah, snd := bh } :: tl)\n[PROOFSTEP]\nsimp [h₁, h₂, ih]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nx✝ : List (Sigma β)\nh : a ∈ keys []\n⊢ kerase a ([] ++ x✝) = kerase a [] ++ x✝\n[PROOFSTEP]\ncases h\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ns : Sigma β\nl₁ : List (Sigma β)\nl₂ : List (Sigma β)\nh₁ : a ∈ keys (s :: l₁)\n⊢ kerase a (s :: l₁ ++ l₂) = kerase a (s :: l₁) ++ l₂\n[PROOFSTEP]\nif h₂ : a = s.1 then simp [h₂]\nelse simp at h₁ ; cases' h₁ with h₁ h₁ <;> [exact absurd h₁ h₂; simp [h₂, kerase_append_left h₁]]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ns : Sigma β\nl₁ : List (Sigma β)\nl₂ : List (Sigma β)\nh₁ : a ∈ keys (s :: l₁)\nh₂ : a = s.fst\n⊢ kerase a (s :: l₁ ++ l₂) = kerase a (s :: l₁) ++ l₂\n[PROOFSTEP]\nsimp [h₂]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ns : Sigma β\nl₁ : List (Sigma β)\nl₂ : List (Sigma β)\nh₁ : a ∈ keys (s :: l₁)\nh₂ : ¬a = s.fst\n⊢ kerase a (s :: l₁ ++ l₂) = kerase a (s :: l₁) ++ l₂\n[PROOFSTEP]\nsimp at h₁ \n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ns : Sigma β\nl₁ : List (Sigma β)\nl₂ : List (Sigma β)\nh₂ : ¬a = s.fst\nh₁ : a = s.fst ∨ a ∈ keys l₁\n⊢ kerase a (s :: l₁ ++ l₂) = kerase a (s :: l₁) ++ l₂\n[PROOFSTEP]\ncases' h₁ with h₁ h₁ <;> [exact absurd h₁ h₂; simp [h₂, kerase_append_left h₁]]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ns : Sigma β\nl₁ : List (Sigma β)\nl₂ : List (Sigma β)\nh₂ : ¬a = s.fst\nh₁ : a = s.fst ∨ a ∈ keys l₁\n⊢ kerase a (s :: l₁ ++ l₂) = kerase a (s :: l₁) ++ l₂\n[PROOFSTEP]\ncases' h₁ with h₁ h₁\n[GOAL]\ncase inl\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ns : Sigma β\nl₁ : List (Sigma β)\nl₂ : List (Sigma β)\nh₂ : ¬a = s.fst\nh₁ : a = s.fst\n⊢ kerase a (s :: l₁ ++ l₂) = kerase a (s :: l₁) ++ l₂\n[PROOFSTEP]\nexact absurd h₁ h₂\n[GOAL]\ncase inr\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ns : Sigma β\nl₁ : List (Sigma β)\nl₂ : List (Sigma β)\nh₂ : ¬a = s.fst\nh₁ : a ∈ keys l₁\n⊢ kerase a (s :: l₁ ++ l₂) = kerase a (s :: l₁) ++ l₂\n[PROOFSTEP]\nsimp [h₂, kerase_append_left h₁]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhead✝ : Sigma β\nl₁ : List (Sigma β)\nl₂ : List (Sigma β)\nh : ¬a ∈ keys (head✝ :: l₁)\n⊢ kerase a (head✝ :: l₁ ++ l₂) = head✝ :: l₁ ++ kerase a l₂\n[PROOFSTEP]\nsimp [not_or] at h \n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhead✝ : Sigma β\nl₁ : List (Sigma β)\nl₂ : List (Sigma β)\nh : ¬a = head✝.fst ∧ ¬a ∈ keys l₁\n⊢ kerase a (head✝ :: l₁ ++ l₂) = head✝ :: l₁ ++ kerase a l₂\n[PROOFSTEP]\nsimp [h.1, kerase_append_right h.2]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na₁ a₂ : α\nl : List (Sigma β)\nh : a₁ = a₂\n⊢ kerase a₂ (kerase a₁ l) = kerase a₁ (kerase a₂ l)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na₁ a₂ : α\nl : List (Sigma β)\nh : ¬a₁ = a₂\nha₂ : a₂ ∈ keys l\nb₁ : β a₁\nl₁ l₂ : List (Sigma β)\na₁_nin_l₁ : ¬a₁ ∈ keys l₁\nx✝ : a₂ ∈ keys (l₁ ++ { fst := a₁, snd := b₁ } :: l₂)\nha₁ : a₁ ∈ keys (l₁ ++ { fst := a₁, snd := b₁ } :: l₂)\nh' : a₂ ∈ keys l₁\n⊢ kerase a₂ (l₁ ++ l₂) = kerase a₁ (kerase a₂ (l₁ ++ { fst := a₁, snd := b₁ } :: l₂))\n[PROOFSTEP]\nsimp [kerase_append_left h', kerase_append_right (mt (mem_keys_kerase_of_ne h).mp a₁_nin_l₁)]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na₁ a₂ : α\nl : List (Sigma β)\nh : ¬a₁ = a₂\nha₂ : a₂ ∈ keys l\nb₁ : β a₁\nl₁ l₂ : List (Sigma β)\na₁_nin_l₁ : ¬a₁ ∈ keys l₁\nx✝ : a₂ ∈ keys (l₁ ++ { fst := a₁, snd := b₁ } :: l₂)\nha₁ : a₁ ∈ keys (l₁ ++ { fst := a₁, snd := b₁ } :: l₂)\nh' : ¬a₂ ∈ keys l₁\n⊢ kerase a₂ (l₁ ++ l₂) = kerase a₁ (kerase a₂ (l₁ ++ { fst := a₁, snd := b₁ } :: l₂))\n[PROOFSTEP]\nsimp [kerase_append_right h', kerase_append_right a₁_nin_l₁, @kerase_cons_ne _ _ _ a₂ ⟨a₁, b₁⟩ _ (Ne.symm h)]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na₁ a₂ : α\nl : List (Sigma β)\nh : ¬a₁ = a₂\nha₁ : a₁ ∈ keys l\nha₂ : ¬a₂ ∈ keys l\n⊢ kerase a₂ (kerase a₁ l) = kerase a₁ (kerase a₂ l)\n[PROOFSTEP]\nsimp [ha₂, mt mem_keys_of_mem_keys_kerase ha₂]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na₁ a₂ : α\nl : List (Sigma β)\nh : ¬a₁ = a₂\nha₁ : ¬a₁ ∈ keys l\n⊢ kerase a₂ (kerase a₁ l) = kerase a₁ (kerase a₂ l)\n[PROOFSTEP]\nsimp [ha₁, mt mem_keys_of_mem_keys_kerase ha₁]\n[GOAL]\nα✝ : Type u\nβ✝ : α✝ → Type v\nl l₁ l₂ : List (Sigma β✝)\ninst✝² : DecidableEq α✝\nα : Type u_2\nβ : α → Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : SizeOf (Sigma β)\nx : α\nxs : List (Sigma β)\n⊢ sizeOf (kerase x xs) ≤ sizeOf xs\n[PROOFSTEP]\nsimp only [SizeOf.sizeOf, _sizeOf_1]\n[GOAL]\nα✝ : Type u\nβ✝ : α✝ → Type v\nl l₁ l₂ : List (Sigma β✝)\ninst✝² : DecidableEq α✝\nα : Type u_2\nβ : α → Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : SizeOf (Sigma β)\nx : α\nxs : List (Sigma β)\n⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x xs) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs\n[PROOFSTEP]\ninduction' xs with y ys\n[GOAL]\ncase nil\nα✝ : Type u\nβ✝ : α✝ → Type v\nl l₁ l₂ : List (Sigma β✝)\ninst✝² : DecidableEq α✝\nα : Type u_2\nβ : α → Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : SizeOf (Sigma β)\nx : α\n⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x []) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα✝ : Type u\nβ✝ : α✝ → Type v\nl l₁ l₂ : List (Sigma β✝)\ninst✝² : DecidableEq α✝\nα : Type u_2\nβ : α → Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : SizeOf (Sigma β)\nx : α\ny : Sigma β\nys : List (Sigma β)\ntail_ih✝ :\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x ys) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) ys\n⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x (y :: ys)) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (y :: ys)\n[PROOFSTEP]\nby_cases x = y.1\n[GOAL]\ncase cons\nα✝ : Type u\nβ✝ : α✝ → Type v\nl l₁ l₂ : List (Sigma β✝)\ninst✝² : DecidableEq α✝\nα : Type u_2\nβ : α → Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : SizeOf (Sigma β)\nx : α\ny : Sigma β\nys : List (Sigma β)\ntail_ih✝ :\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x ys) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) ys\n⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x (y :: ys)) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (y :: ys)\n[PROOFSTEP]\nby_cases x = y.1\n[GOAL]\ncase pos\nα✝ : Type u\nβ✝ : α✝ → Type v\nl l₁ l₂ : List (Sigma β✝)\ninst✝² : DecidableEq α✝\nα : Type u_2\nβ : α → Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : SizeOf (Sigma β)\nx : α\ny : Sigma β\nys : List (Sigma β)\ntail_ih✝ :\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x ys) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) ys\nh : x = y.fst\n⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x (y :: ys)) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (y :: ys)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\nα✝ : Type u\nβ✝ : α✝ → Type v\nl l₁ l₂ : List (Sigma β✝)\ninst✝² : DecidableEq α✝\nα : Type u_2\nβ : α → Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : SizeOf (Sigma β)\nx : α\ny : Sigma β\nys : List (Sigma β)\ntail_ih✝ :\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x ys) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) ys\nh : ¬x = y.fst\n⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x (y :: ys)) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (y :: ys)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb' : β a'\nl : List (Sigma β)\n⊢ a ∈ keys (kinsert a' b' l) ↔ a = a' ∨ a ∈ keys l\n[PROOFSTEP]\nby_cases h : a = a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb' : β a'\nl : List (Sigma β)\nh : a = a'\n⊢ a ∈ keys (kinsert a' b' l) ↔ a = a' ∨ a ∈ keys l\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb' : β a'\nl : List (Sigma β)\nh : ¬a = a'\n⊢ a ∈ keys (kinsert a' b' l) ↔ a = a' ∨ a ∈ keys l\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl : List (Sigma β)\n⊢ dlookup a (kinsert a b l) = some b\n[PROOFSTEP]\nsimp only [kinsert, dlookup_cons_eq]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb' : β a'\nl : List (Sigma β)\nh : a ≠ a'\n⊢ dlookup a (kinsert a' b' l) = dlookup a l\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb : β a'\nl : List (Sigma β)\n⊢ kextract a ({ fst := a', snd := b } :: l) =\n (dlookup a ({ fst := a', snd := b } :: l), kerase a ({ fst := a', snd := b } :: l))\n[PROOFSTEP]\nsimp [kextract]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb : β a'\nl : List (Sigma β)\n⊢ (if h : a' = a then (some ((_ : { fst := a', snd := b }.fst = a) ▸ b), l)\n else ((kextract a l).fst, { fst := a', snd := b } :: (kextract a l).snd)) =\n (dlookup a ({ fst := a', snd := b } :: l), kerase a ({ fst := a', snd := b } :: l))\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb : β a'\nl : List (Sigma β)\n⊢ (if h : a' = a then (some ((_ : a' = a) ▸ b), l)\n else ((kextract a l).fst, { fst := a', snd := b } :: (kextract a l).snd)) =\n (dlookup a ({ fst := a', snd := b } :: l), kerase a ({ fst := a', snd := b } :: l))\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb : β a'\nl : List (Sigma β)\nh : a' = a\n⊢ (some ((_ : a' = a) ▸ b), l) = (dlookup a ({ fst := a', snd := b } :: l), kerase a ({ fst := a', snd := b } :: l))\n[PROOFSTEP]\nsubst a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\nb : β a\n⊢ (some ((_ : a = a) ▸ b), l) = (dlookup a ({ fst := a, snd := b } :: l), kerase a ({ fst := a, snd := b } :: l))\n[PROOFSTEP]\nsimp [kerase]\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na a' : α\nb : β a'\nl : List (Sigma β)\nh : ¬a' = a\n⊢ ((kextract a l).fst, { fst := a', snd := b } :: (kextract a l).snd) =\n (dlookup a ({ fst := a', snd := b } :: l), kerase a ({ fst := a', snd := b } :: l))\n[PROOFSTEP]\nsimp [kextract, Ne.symm h, kextract_eq_dlookup_kerase a l, kerase]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nl : List (Sigma β)\n⊢ NodupKeys (dedupKeys l)\n[PROOFSTEP]\ndsimp [dedupKeys]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nl : List (Sigma β)\n⊢ NodupKeys (foldr (fun x => kinsert x.fst x.snd) [] l)\n[PROOFSTEP]\ngeneralize hl : nil = l'\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nl : List (Sigma β)\nl' : List (Sigma β)\nhl : [] = l'\n⊢ NodupKeys (foldr (fun x => kinsert x.fst x.snd) l' l)\n[PROOFSTEP]\nhave : NodupKeys l' := by\n rw [← hl]\n apply nodup_nil\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nl : List (Sigma β)\nl' : List (Sigma β)\nhl : [] = l'\n⊢ NodupKeys l'\n[PROOFSTEP]\nrw [← hl]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nl : List (Sigma β)\nl' : List (Sigma β)\nhl : [] = l'\n⊢ NodupKeys []\n[PROOFSTEP]\napply nodup_nil\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nl : List (Sigma β)\nl' : List (Sigma β)\nhl : [] = l'\nthis : NodupKeys l'\n⊢ NodupKeys (foldr (fun x => kinsert x.fst x.snd) l' l)\n[PROOFSTEP]\nclear hl\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nl : List (Sigma β)\nl' : List (Sigma β)\nthis : NodupKeys l'\n⊢ NodupKeys (foldr (fun x => kinsert x.fst x.snd) l' l)\n[PROOFSTEP]\ninduction' l with x xs l_ih\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nl' : List (Sigma β)\nthis : NodupKeys l'\n⊢ NodupKeys (foldr (fun x => kinsert x.fst x.snd) l' [])\n[PROOFSTEP]\napply this\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nl' : List (Sigma β)\nthis : NodupKeys l'\nx : Sigma β\nxs : List (Sigma β)\nl_ih : NodupKeys (foldr (fun x => kinsert x.fst x.snd) l' xs)\n⊢ NodupKeys (foldr (fun x => kinsert x.fst x.snd) l' (x :: xs))\n[PROOFSTEP]\ncases x\n[GOAL]\ncase cons.mk\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nl' : List (Sigma β)\nthis : NodupKeys l'\nxs : List (Sigma β)\nl_ih : NodupKeys (foldr (fun x => kinsert x.fst x.snd) l' xs)\nfst✝ : α\nsnd✝ : β fst✝\n⊢ NodupKeys (foldr (fun x => kinsert x.fst x.snd) l' ({ fst := fst✝, snd := snd✝ } :: xs))\n[PROOFSTEP]\nsimp [dedupKeys]\n[GOAL]\ncase cons.mk\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nl' : List (Sigma β)\nthis : NodupKeys l'\nxs : List (Sigma β)\nl_ih : NodupKeys (foldr (fun x => kinsert x.fst x.snd) l' xs)\nfst✝ : α\nsnd✝ : β fst✝\n⊢ ¬fst✝ ∈ keys (kerase fst✝ (foldr (fun x => kinsert x.fst x.snd) l' xs)) ∧\n NodupKeys (kerase fst✝ (foldr (fun x => kinsert x.fst x.snd) l' xs))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase cons.mk.left\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nl' : List (Sigma β)\nthis : NodupKeys l'\nxs : List (Sigma β)\nl_ih : NodupKeys (foldr (fun x => kinsert x.fst x.snd) l' xs)\nfst✝ : α\nsnd✝ : β fst✝\n⊢ ¬fst✝ ∈ keys (kerase fst✝ (foldr (fun x => kinsert x.fst x.snd) l' xs))\n[PROOFSTEP]\nsimp [keys_kerase]\n[GOAL]\ncase cons.mk.left\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nl' : List (Sigma β)\nthis : NodupKeys l'\nxs : List (Sigma β)\nl_ih : NodupKeys (foldr (fun x => kinsert x.fst x.snd) l' xs)\nfst✝ : α\nsnd✝ : β fst✝\n⊢ ¬fst✝ ∈ List.erase (keys (foldr (fun x => kinsert x.fst x.snd) l' xs)) fst✝\n[PROOFSTEP]\napply l_ih.not_mem_erase\n[GOAL]\ncase cons.mk.right\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nl' : List (Sigma β)\nthis : NodupKeys l'\nxs : List (Sigma β)\nl_ih : NodupKeys (foldr (fun x => kinsert x.fst x.snd) l' xs)\nfst✝ : α\nsnd✝ : β fst✝\n⊢ NodupKeys (kerase fst✝ (foldr (fun x => kinsert x.fst x.snd) l' xs))\n[PROOFSTEP]\nexact l_ih.kerase _\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl : List (Sigma β)\n⊢ dlookup a (dedupKeys l) = dlookup a l\n[PROOFSTEP]\ninduction' l with l_hd _ l_ih\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\n⊢ dlookup a (dedupKeys []) = dlookup a []\ncase cons\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl_hd : Sigma β\ntail✝ : List (Sigma β)\nl_ih : dlookup a (dedupKeys tail✝) = dlookup a tail✝\n⊢ dlookup a (dedupKeys (l_hd :: tail✝)) = dlookup a (l_hd :: tail✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl_hd : Sigma β\ntail✝ : List (Sigma β)\nl_ih : dlookup a (dedupKeys tail✝) = dlookup a tail✝\n⊢ dlookup a (dedupKeys (l_hd :: tail✝)) = dlookup a (l_hd :: tail✝)\n[PROOFSTEP]\ncases' l_hd with a' b\n[GOAL]\ncase cons.mk\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ntail✝ : List (Sigma β)\nl_ih : dlookup a (dedupKeys tail✝) = dlookup a tail✝\na' : α\nb : β a'\n⊢ dlookup a (dedupKeys ({ fst := a', snd := b } :: tail✝)) = dlookup a ({ fst := a', snd := b } :: tail✝)\n[PROOFSTEP]\nby_cases h : a = a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ntail✝ : List (Sigma β)\nl_ih : dlookup a (dedupKeys tail✝) = dlookup a tail✝\na' : α\nb : β a'\nh : a = a'\n⊢ dlookup a (dedupKeys ({ fst := a', snd := b } :: tail✝)) = dlookup a ({ fst := a', snd := b } :: tail✝)\n[PROOFSTEP]\nsubst a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ntail✝ : List (Sigma β)\nl_ih : dlookup a (dedupKeys tail✝) = dlookup a tail✝\nb : β a\n⊢ dlookup a (dedupKeys ({ fst := a, snd := b } :: tail✝)) = dlookup a ({ fst := a, snd := b } :: tail✝)\n[PROOFSTEP]\nrw [dedupKeys_cons, dlookup_kinsert, dlookup_cons_eq]\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ntail✝ : List (Sigma β)\nl_ih : dlookup a (dedupKeys tail✝) = dlookup a tail✝\na' : α\nb : β a'\nh : ¬a = a'\n⊢ dlookup a (dedupKeys ({ fst := a', snd := b } :: tail✝)) = dlookup a ({ fst := a', snd := b } :: tail✝)\n[PROOFSTEP]\nrw [dedupKeys_cons, dlookup_kinsert_ne h, l_ih, dlookup_cons_ne]\n[GOAL]\ncase neg.a\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ntail✝ : List (Sigma β)\nl_ih : dlookup a (dedupKeys tail✝) = dlookup a tail✝\na' : α\nb : β a'\nh : ¬a = a'\n⊢ a ≠ { fst := a', snd := b }.fst\n[PROOFSTEP]\nexact h\n[GOAL]\nα✝ : Type u\nβ✝ : α✝ → Type v\nl l₁ l₂ : List (Sigma β✝)\ninst✝² : DecidableEq α✝\nα : Type u_2\nβ : α → Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : SizeOf (Sigma β)\nxs : List (Sigma β)\n⊢ sizeOf (dedupKeys xs) ≤ sizeOf xs\n[PROOFSTEP]\nsimp only [SizeOf.sizeOf, _sizeOf_1]\n[GOAL]\nα✝ : Type u\nβ✝ : α✝ → Type v\nl l₁ l₂ : List (Sigma β✝)\ninst✝² : DecidableEq α✝\nα : Type u_2\nβ : α → Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : SizeOf (Sigma β)\nxs : List (Sigma β)\n⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (dedupKeys xs) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs\n[PROOFSTEP]\ninduction' xs with x xs\n[GOAL]\ncase nil\nα✝ : Type u\nβ✝ : α✝ → Type v\nl l₁ l₂ : List (Sigma β✝)\ninst✝² : DecidableEq α✝\nα : Type u_2\nβ : α → Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : SizeOf (Sigma β)\n⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (dedupKeys []) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) []\n[PROOFSTEP]\nsimp [dedupKeys]\n[GOAL]\ncase cons\nα✝ : Type u\nβ✝ : α✝ → Type v\nl l₁ l₂ : List (Sigma β✝)\ninst✝² : DecidableEq α✝\nα : Type u_2\nβ : α → Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : SizeOf (Sigma β)\nx : Sigma β\nxs : List (Sigma β)\ntail_ih✝ :\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (dedupKeys xs) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs\n⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (dedupKeys (x :: xs)) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (x :: xs)\n[PROOFSTEP]\nsimp only [dedupKeys_cons, kinsert_def, add_le_add_iff_left, Sigma.eta]\n[GOAL]\ncase cons\nα✝ : Type u\nβ✝ : α✝ → Type v\nl l₁ l₂ : List (Sigma β✝)\ninst✝² : DecidableEq α✝\nα : Type u_2\nβ : α → Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : SizeOf (Sigma β)\nx : Sigma β\nxs : List (Sigma β)\ntail_ih✝ :\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (dedupKeys xs) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs\n⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x.fst (dedupKeys xs)) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs\n[PROOFSTEP]\ntrans\n[GOAL]\nα✝ : Type u\nβ✝ : α✝ → Type v\nl l₁ l₂ : List (Sigma β✝)\ninst✝² : DecidableEq α✝\nα : Type u_2\nβ : α → Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : SizeOf (Sigma β)\nx : Sigma β\nxs : List (Sigma β)\ntail_ih✝ :\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (dedupKeys xs) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs\n⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x.fst (dedupKeys xs)) ≤ ?m.375896\nα✝ : Type u\nβ✝ : α✝ → Type v\nl l₁ l₂ : List (Sigma β✝)\ninst✝² : DecidableEq α✝\nα : Type u_2\nβ : α → Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : SizeOf (Sigma β)\nx : Sigma β\nxs : List (Sigma β)\ntail_ih✝ :\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (dedupKeys xs) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs\n⊢ ?m.375896 ≤ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs\nα✝ : Type u\nβ✝ : α✝ → Type v\nl l₁ l₂ : List (Sigma β✝)\ninst✝² : DecidableEq α✝\nα : Type u_2\nβ : α → Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : SizeOf (Sigma β)\nx : Sigma β\nxs : List (Sigma β)\ntail_ih✝ :\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (dedupKeys xs) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs\n⊢ ℕ\n[PROOFSTEP]\napply sizeOf_kerase\n[GOAL]\nα✝ : Type u\nβ✝ : α✝ → Type v\nl l₁ l₂ : List (Sigma β✝)\ninst✝² : DecidableEq α✝\nα : Type u_2\nβ : α → Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : SizeOf (Sigma β)\nx : Sigma β\nxs : List (Sigma β)\ntail_ih✝ :\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (dedupKeys xs) ≤\n rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs\n⊢ sizeOf (dedupKeys xs) ≤ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nhead✝ : Sigma β\nl : List (Sigma β)\n⊢ kunion (head✝ :: l) [] = head✝ :: l\n[PROOFSTEP]\nrw [kunion, kerase_nil, kunion_nil]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂ : List (Sigma β)\n⊢ a ∈ keys (kunion l₁ l₂) ↔ a ∈ keys l₁ ∨ a ∈ keys l₂\n[PROOFSTEP]\ninduction l₁ generalizing l₂ with\n| nil => simp\n| cons s l₁ ih => by_cases h : a = s.1 <;> [simp [h]; simp [h, ih]]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂ : List (Sigma β)\n⊢ a ∈ keys (kunion l₁ l₂) ↔ a ∈ keys l₁ ∨ a ∈ keys l₂\n[PROOFSTEP]\ninduction l₁ generalizing l₂ with\n| nil => simp\n| cons s l₁ ih => by_cases h : a = s.1 <;> [simp [h]; simp [h, ih]]\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl l₁ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₂ : List (Sigma β)\n⊢ a ∈ keys (kunion [] l₂) ↔ a ∈ keys [] ∨ a ∈ keys l₂\n[PROOFSTEP]\n\n| nil => simp\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl l₁ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₂ : List (Sigma β)\n⊢ a ∈ keys (kunion [] l₂) ↔ a ∈ keys [] ∨ a ∈ keys l₂\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ns : Sigma β\nl₁ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, a ∈ keys (kunion l₁ l₂) ↔ a ∈ keys l₁ ∨ a ∈ keys l₂\nl₂ : List (Sigma β)\n⊢ a ∈ keys (kunion (s :: l₁) l₂) ↔ a ∈ keys (s :: l₁) ∨ a ∈ keys l₂\n[PROOFSTEP]\n\n| cons s l₁ ih => by_cases h : a = s.1 <;> [simp [h]; simp [h, ih]]\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ns : Sigma β\nl₁ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, a ∈ keys (kunion l₁ l₂) ↔ a ∈ keys l₁ ∨ a ∈ keys l₂\nl₂ : List (Sigma β)\n⊢ a ∈ keys (kunion (s :: l₁) l₂) ↔ a ∈ keys (s :: l₁) ∨ a ∈ keys l₂\n[PROOFSTEP]\nby_cases h : a = s.1 <;> [simp [h]; simp [h, ih]]\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ns : Sigma β\nl₁ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, a ∈ keys (kunion l₁ l₂) ↔ a ∈ keys l₁ ∨ a ∈ keys l₂\nl₂ : List (Sigma β)\n⊢ a ∈ keys (kunion (s :: l₁) l₂) ↔ a ∈ keys (s :: l₁) ∨ a ∈ keys l₂\n[PROOFSTEP]\nby_cases h : a = s.1\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ns : Sigma β\nl₁ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, a ∈ keys (kunion l₁ l₂) ↔ a ∈ keys l₁ ∨ a ∈ keys l₂\nl₂ : List (Sigma β)\nh : a = s.fst\n⊢ a ∈ keys (kunion (s :: l₁) l₂) ↔ a ∈ keys (s :: l₁) ∨ a ∈ keys l₂\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ns : Sigma β\nl₁ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, a ∈ keys (kunion l₁ l₂) ↔ a ∈ keys l₁ ∨ a ∈ keys l₂\nl₂ : List (Sigma β)\nh : ¬a = s.fst\n⊢ a ∈ keys (kunion (s :: l₁) l₂) ↔ a ∈ keys (s :: l₁) ∨ a ∈ keys l₂\n[PROOFSTEP]\nsimp [h, ih]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ns : Sigma β\ntail✝ : List (Sigma β)\nl : List (Sigma β)\n⊢ kunion (kerase a (s :: tail✝)) (kerase a l) = kerase a (kunion (s :: tail✝) l)\n[PROOFSTEP]\nby_cases h : a = s.1\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ns : Sigma β\ntail✝ : List (Sigma β)\nl : List (Sigma β)\nh : a = s.fst\n⊢ kunion (kerase a (s :: tail✝)) (kerase a l) = kerase a (kunion (s :: tail✝) l)\n[PROOFSTEP]\nsimp [h, kerase_comm a s.1 l, kunion_kerase]\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl✝ l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\ns : Sigma β\ntail✝ : List (Sigma β)\nl : List (Sigma β)\nh : ¬a = s.fst\n⊢ kunion (kerase a (s :: tail✝)) (kerase a l) = kerase a (kunion (s :: tail✝) l)\n[PROOFSTEP]\nsimp [h, kerase_comm a s.1 l, kunion_kerase]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nnd₁ : NodupKeys l₁\nnd₂ : NodupKeys l₂\n⊢ NodupKeys (List.kunion l₁ l₂)\n[PROOFSTEP]\ninduction l₁ generalizing l₂ with\n| nil => simp only [nil_kunion, nd₂]\n| cons s l₁ ih =>\n simp at nd₁ \n simp [not_or, nd₁.1, nd₂, ih nd₁.2 (nd₂.kerase s.1)]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁ l₂ : List (Sigma β)\ninst✝ : DecidableEq α\nnd₁ : NodupKeys l₁\nnd₂ : NodupKeys l₂\n⊢ NodupKeys (List.kunion l₁ l₂)\n[PROOFSTEP]\ninduction l₁ generalizing l₂ with\n| nil => simp only [nil_kunion, nd₂]\n| cons s l₁ ih =>\n simp at nd₁ \n simp [not_or, nd₁.1, nd₂, ih nd₁.2 (nd₂.kerase s.1)]\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl : List (Sigma β)\ninst✝ : DecidableEq α\nl₂ : List (Sigma β)\nnd₁ : NodupKeys []\nnd₂ : NodupKeys l₂\n⊢ NodupKeys (List.kunion [] l₂)\n[PROOFSTEP]\n\n| nil => simp only [nil_kunion, nd₂]\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl : List (Sigma β)\ninst✝ : DecidableEq α\nl₂ : List (Sigma β)\nnd₁ : NodupKeys []\nnd₂ : NodupKeys l₂\n⊢ NodupKeys (List.kunion [] l₂)\n[PROOFSTEP]\nsimp only [nil_kunion, nd₂]\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl : List (Sigma β)\ninst✝ : DecidableEq α\ns : Sigma β\nl₁ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, NodupKeys l₁ → NodupKeys l₂ → NodupKeys (List.kunion l₁ l₂)\nl₂ : List (Sigma β)\nnd₁ : NodupKeys (s :: l₁)\nnd₂ : NodupKeys l₂\n⊢ NodupKeys (List.kunion (s :: l₁) l₂)\n[PROOFSTEP]\n\n| cons s l₁ ih =>\n simp at nd₁ \n simp [not_or, nd₁.1, nd₂, ih nd₁.2 (nd₂.kerase s.1)]\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl : List (Sigma β)\ninst✝ : DecidableEq α\ns : Sigma β\nl₁ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, NodupKeys l₁ → NodupKeys l₂ → NodupKeys (List.kunion l₁ l₂)\nl₂ : List (Sigma β)\nnd₁ : NodupKeys (s :: l₁)\nnd₂ : NodupKeys l₂\n⊢ NodupKeys (List.kunion (s :: l₁) l₂)\n[PROOFSTEP]\nsimp at nd₁ \n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl : List (Sigma β)\ninst✝ : DecidableEq α\ns : Sigma β\nl₁ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, NodupKeys l₁ → NodupKeys l₂ → NodupKeys (List.kunion l₁ l₂)\nl₂ : List (Sigma β)\nnd₂ : NodupKeys l₂\nnd₁ : ¬s.fst ∈ keys l₁ ∧ NodupKeys l₁\n⊢ NodupKeys (List.kunion (s :: l₁) l₂)\n[PROOFSTEP]\nsimp [not_or, nd₁.1, nd₂, ih nd₁.2 (nd₂.kerase s.1)]\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\nl₁ l₂ : List (Sigma β)\np : l₁ ~ l₂\nl : List (Sigma β)\n⊢ kunion l₁ l ~ kunion l₂ l\n[PROOFSTEP]\ninduction p generalizing l with\n| nil => rfl\n| cons hd _ ih => simp [ih (List.kerase _ _), Perm.cons]\n| swap s₁ s₂ l => simp [kerase_comm, Perm.swap]\n| trans _ _ ih₁₂ ih₂₃ => exact Perm.trans (ih₁₂ l) (ih₂₃ l)\n[GOAL]\nα : Type u\nβ : α → Type v\nl✝ l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\nl₁ l₂ : List (Sigma β)\np : l₁ ~ l₂\nl : List (Sigma β)\n⊢ kunion l₁ l ~ kunion l₂ l\n[PROOFSTEP]\ninduction p generalizing l with\n| nil => rfl\n| cons hd _ ih => simp [ih (List.kerase _ _), Perm.cons]\n| swap s₁ s₂ l => simp [kerase_comm, Perm.swap]\n| trans _ _ ih₁₂ ih₂₃ => exact Perm.trans (ih₁₂ l) (ih₂₃ l)\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl✝ l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\nl₁ l₂ l : List (Sigma β)\n⊢ kunion [] l ~ kunion [] l\n[PROOFSTEP]\n\n| nil => rfl\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl✝ l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\nl₁ l₂ l : List (Sigma β)\n⊢ kunion [] l ~ kunion [] l\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl✝ l₁✝¹ l₂✝¹ : List (Sigma β)\ninst✝ : DecidableEq α\nl₁ l₂ : List (Sigma β)\nhd : Sigma β\nl₁✝ l₂✝ : List (Sigma β)\na✝ : l₁✝ ~ l₂✝\nih : ∀ (l : List (Sigma β)), kunion l₁✝ l ~ kunion l₂✝ l\nl : List (Sigma β)\n⊢ kunion (hd :: l₁✝) l ~ kunion (hd :: l₂✝) l\n[PROOFSTEP]\n\n| cons hd _ ih => simp [ih (List.kerase _ _), Perm.cons]\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl✝ l₁✝¹ l₂✝¹ : List (Sigma β)\ninst✝ : DecidableEq α\nl₁ l₂ : List (Sigma β)\nhd : Sigma β\nl₁✝ l₂✝ : List (Sigma β)\na✝ : l₁✝ ~ l₂✝\nih : ∀ (l : List (Sigma β)), kunion l₁✝ l ~ kunion l₂✝ l\nl : List (Sigma β)\n⊢ kunion (hd :: l₁✝) l ~ kunion (hd :: l₂✝) l\n[PROOFSTEP]\nsimp [ih (List.kerase _ _), Perm.cons]\n[GOAL]\ncase swap\nα : Type u\nβ : α → Type v\nl✝¹ l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\nl₁ l₂ : List (Sigma β)\ns₁ s₂ : Sigma β\nl✝ : List (Sigma β)\nl : List (Sigma β)\n⊢ kunion (s₂ :: s₁ :: l✝) l ~ kunion (s₁ :: s₂ :: l✝) l\n[PROOFSTEP]\n\n| swap s₁ s₂ l => simp [kerase_comm, Perm.swap]\n[GOAL]\ncase swap\nα : Type u\nβ : α → Type v\nl✝¹ l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\nl₁ l₂ : List (Sigma β)\ns₁ s₂ : Sigma β\nl✝ : List (Sigma β)\nl : List (Sigma β)\n⊢ kunion (s₂ :: s₁ :: l✝) l ~ kunion (s₁ :: s₂ :: l✝) l\n[PROOFSTEP]\nsimp [kerase_comm, Perm.swap]\n[GOAL]\ncase trans\nα : Type u\nβ : α → Type v\nl✝ l₁✝¹ l₂✝¹ : List (Sigma β)\ninst✝ : DecidableEq α\nl₁ l₂ : List (Sigma β)\nl₁✝ l₂✝ l₃✝ : List (Sigma β)\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\nih₁₂ : ∀ (l : List (Sigma β)), kunion l₁✝ l ~ kunion l₂✝ l\nih₂₃ : ∀ (l : List (Sigma β)), kunion l₂✝ l ~ kunion l₃✝ l\nl : List (Sigma β)\n⊢ kunion l₁✝ l ~ kunion l₃✝ l\n[PROOFSTEP]\n\n| trans _ _ ih₁₂ ih₂₃ => exact Perm.trans (ih₁₂ l) (ih₂₃ l)\n[GOAL]\ncase trans\nα : Type u\nβ : α → Type v\nl✝ l₁✝¹ l₂✝¹ : List (Sigma β)\ninst✝ : DecidableEq α\nl₁ l₂ : List (Sigma β)\nl₁✝ l₂✝ l₃✝ : List (Sigma β)\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\nih₁₂ : ∀ (l : List (Sigma β)), kunion l₁✝ l ~ kunion l₂✝ l\nih₂₃ : ∀ (l : List (Sigma β)), kunion l₂✝ l ~ kunion l₃✝ l\nl : List (Sigma β)\n⊢ kunion l₁✝ l ~ kunion l₃✝ l\n[PROOFSTEP]\nexact Perm.trans (ih₁₂ l) (ih₂₃ l)\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂ : List (Sigma β)\nh : a ∈ keys l₁\n⊢ dlookup a (kunion l₁ l₂) = dlookup a l₁\n[PROOFSTEP]\ninduction' l₁ with s _ ih generalizing l₂\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝¹ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂✝ : List (Sigma β)\nh✝ : a ∈ keys l₁\nl₂ : List (Sigma β)\nh : a ∈ keys []\n⊢ dlookup a (kunion [] l₂) = dlookup a []\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝¹ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂✝ : List (Sigma β)\nh✝ : a ∈ keys l₁\ns : Sigma β\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, a ∈ keys tail✝ → dlookup a (kunion tail✝ l₂) = dlookup a tail✝\nl₂ : List (Sigma β)\nh : a ∈ keys (s :: tail✝)\n⊢ dlookup a (kunion (s :: tail✝) l₂) = dlookup a (s :: tail✝)\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝¹ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂✝ : List (Sigma β)\nh✝ : a ∈ keys l₁\ns : Sigma β\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, a ∈ keys tail✝ → dlookup a (kunion tail✝ l₂) = dlookup a tail✝\nl₂ : List (Sigma β)\nh : a = s.fst ∨ a ∈ keys tail✝\n⊢ dlookup a (kunion (s :: tail✝) l₂) = dlookup a (s :: tail✝)\n[PROOFSTEP]\ncases' h with h h\n[GOAL]\ncase cons.inl\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝¹ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂✝ : List (Sigma β)\nh✝ : a ∈ keys l₁\ns : Sigma β\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, a ∈ keys tail✝ → dlookup a (kunion tail✝ l₂) = dlookup a tail✝\nl₂ : List (Sigma β)\nh : a = s.fst\n⊢ dlookup a (kunion (s :: tail✝) l₂) = dlookup a (s :: tail✝)\n[PROOFSTEP]\ncases' s with a'\n[GOAL]\ncase cons.inr\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝¹ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂✝ : List (Sigma β)\nh✝ : a ∈ keys l₁\ns : Sigma β\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, a ∈ keys tail✝ → dlookup a (kunion tail✝ l₂) = dlookup a tail✝\nl₂ : List (Sigma β)\nh : a ∈ keys tail✝\n⊢ dlookup a (kunion (s :: tail✝) l₂) = dlookup a (s :: tail✝)\n[PROOFSTEP]\ncases' s with a'\n[GOAL]\ncase cons.inl.mk\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝¹ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂✝ : List (Sigma β)\nh✝ : a ∈ keys l₁\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, a ∈ keys tail✝ → dlookup a (kunion tail✝ l₂) = dlookup a tail✝\nl₂ : List (Sigma β)\na' : α\nsnd✝ : β a'\nh : a = { fst := a', snd := snd✝ }.fst\n⊢ dlookup a (kunion ({ fst := a', snd := snd✝ } :: tail✝) l₂) = dlookup a ({ fst := a', snd := snd✝ } :: tail✝)\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase cons.inl.mk\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝¹ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂✝ : List (Sigma β)\nh : a ∈ keys l₁\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, a ∈ keys tail✝ → dlookup a (kunion tail✝ l₂) = dlookup a tail✝\nl₂ : List (Sigma β)\nsnd✝ : β a\n⊢ dlookup a (kunion ({ fst := a, snd := snd✝ } :: tail✝) l₂) = dlookup a ({ fst := a, snd := snd✝ } :: tail✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons.inr.mk\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝¹ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂✝ : List (Sigma β)\nh✝ : a ∈ keys l₁\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, a ∈ keys tail✝ → dlookup a (kunion tail✝ l₂) = dlookup a tail✝\nl₂ : List (Sigma β)\nh : a ∈ keys tail✝\na' : α\nsnd✝ : β a'\n⊢ dlookup a (kunion ({ fst := a', snd := snd✝ } :: tail✝) l₂) = dlookup a ({ fst := a', snd := snd✝ } :: tail✝)\n[PROOFSTEP]\nrw [kunion_cons]\n[GOAL]\ncase cons.inr.mk\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝¹ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂✝ : List (Sigma β)\nh✝ : a ∈ keys l₁\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, a ∈ keys tail✝ → dlookup a (kunion tail✝ l₂) = dlookup a tail✝\nl₂ : List (Sigma β)\nh : a ∈ keys tail✝\na' : α\nsnd✝ : β a'\n⊢ dlookup a ({ fst := a', snd := snd✝ } :: kunion tail✝ (kerase { fst := a', snd := snd✝ }.fst l₂)) =\n dlookup a ({ fst := a', snd := snd✝ } :: tail✝)\n[PROOFSTEP]\nby_cases h' : a = a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝¹ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂✝ : List (Sigma β)\nh✝ : a ∈ keys l₁\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, a ∈ keys tail✝ → dlookup a (kunion tail✝ l₂) = dlookup a tail✝\nl₂ : List (Sigma β)\nh : a ∈ keys tail✝\na' : α\nsnd✝ : β a'\nh' : a = a'\n⊢ dlookup a ({ fst := a', snd := snd✝ } :: kunion tail✝ (kerase { fst := a', snd := snd✝ }.fst l₂)) =\n dlookup a ({ fst := a', snd := snd✝ } :: tail✝)\n[PROOFSTEP]\nsubst h'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝¹ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂✝ : List (Sigma β)\nh✝ : a ∈ keys l₁\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, a ∈ keys tail✝ → dlookup a (kunion tail✝ l₂) = dlookup a tail✝\nl₂ : List (Sigma β)\nh : a ∈ keys tail✝\nsnd✝ : β a\n⊢ dlookup a ({ fst := a, snd := snd✝ } :: kunion tail✝ (kerase { fst := a, snd := snd✝ }.fst l₂)) =\n dlookup a ({ fst := a, snd := snd✝ } :: tail✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝¹ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂✝ : List (Sigma β)\nh✝ : a ∈ keys l₁\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, a ∈ keys tail✝ → dlookup a (kunion tail✝ l₂) = dlookup a tail✝\nl₂ : List (Sigma β)\nh : a ∈ keys tail✝\na' : α\nsnd✝ : β a'\nh' : ¬a = a'\n⊢ dlookup a ({ fst := a', snd := snd✝ } :: kunion tail✝ (kerase { fst := a', snd := snd✝ }.fst l₂)) =\n dlookup a ({ fst := a', snd := snd✝ } :: tail✝)\n[PROOFSTEP]\nsimp [h', ih h]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂ : List (Sigma β)\nh : ¬a ∈ keys l₁\n⊢ dlookup a (kunion l₁ l₂) = dlookup a l₂\n[PROOFSTEP]\ninduction l₁ generalizing l₂ with\n| nil => simp\n| cons _ _ ih => simp [not_or] at h ; simp [h.1, ih h.2]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₁ l₂ : List (Sigma β)\nh : ¬a ∈ keys l₁\n⊢ dlookup a (kunion l₁ l₂) = dlookup a l₂\n[PROOFSTEP]\ninduction l₁ generalizing l₂ with\n| nil => simp\n| cons _ _ ih => simp [not_or] at h ; simp [h.1, ih h.2]\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl l₁ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₂ : List (Sigma β)\nh : ¬a ∈ keys []\n⊢ dlookup a (kunion [] l₂) = dlookup a l₂\n[PROOFSTEP]\n\n| nil => simp\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl l₁ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nl₂ : List (Sigma β)\nh : ¬a ∈ keys []\n⊢ dlookup a (kunion [] l₂) = dlookup a l₂\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhead✝ : Sigma β\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, ¬a ∈ keys tail✝ → dlookup a (kunion tail✝ l₂) = dlookup a l₂\nl₂ : List (Sigma β)\nh : ¬a ∈ keys (head✝ :: tail✝)\n⊢ dlookup a (kunion (head✝ :: tail✝) l₂) = dlookup a l₂\n[PROOFSTEP]\n\n| cons _ _ ih => simp [not_or] at h ; simp [h.1, ih h.2]\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhead✝ : Sigma β\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, ¬a ∈ keys tail✝ → dlookup a (kunion tail✝ l₂) = dlookup a l₂\nl₂ : List (Sigma β)\nh : ¬a ∈ keys (head✝ :: tail✝)\n⊢ dlookup a (kunion (head✝ :: tail✝) l₂) = dlookup a l₂\n[PROOFSTEP]\nsimp [not_or] at h \n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nhead✝ : Sigma β\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, ¬a ∈ keys tail✝ → dlookup a (kunion tail✝ l₂) = dlookup a l₂\nl₂ : List (Sigma β)\nh : ¬a = head✝.fst ∧ ¬a ∈ keys tail✝\n⊢ dlookup a (kunion (head✝ :: tail✝) l₂) = dlookup a l₂\n[PROOFSTEP]\nsimp [h.1, ih h.2]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl₁ l₂ : List (Sigma β)\n⊢ b ∈ dlookup a (kunion l₁ l₂) ↔ b ∈ dlookup a l₁ ∨ ¬a ∈ keys l₁ ∧ b ∈ dlookup a l₂\n[PROOFSTEP]\ninduction l₁ generalizing l₂ with\n| nil => simp\n| cons s _ ih =>\n cases' s with a'\n by_cases h₁ : a = a'\n · subst h₁\n simp\n · let h₂ := @ih (kerase a' l₂)\n simp [h₁] at h₂ \n simp [h₁, h₂]\n[GOAL]\nα : Type u\nβ : α → Type v\nl l₁✝ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl₁ l₂ : List (Sigma β)\n⊢ b ∈ dlookup a (kunion l₁ l₂) ↔ b ∈ dlookup a l₁ ∨ ¬a ∈ keys l₁ ∧ b ∈ dlookup a l₂\n[PROOFSTEP]\ninduction l₁ generalizing l₂ with\n| nil => simp\n| cons s _ ih =>\n cases' s with a'\n by_cases h₁ : a = a'\n · subst h₁\n simp\n · let h₂ := @ih (kerase a' l₂)\n simp [h₁] at h₂ \n simp [h₁, h₂]\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl l₁ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl₂ : List (Sigma β)\n⊢ b ∈ dlookup a (kunion [] l₂) ↔ b ∈ dlookup a [] ∨ ¬a ∈ keys [] ∧ b ∈ dlookup a l₂\n[PROOFSTEP]\n\n| nil => simp\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\nl l₁ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\nl₂ : List (Sigma β)\n⊢ b ∈ dlookup a (kunion [] l₂) ↔ b ∈ dlookup a [] ∨ ¬a ∈ keys [] ∧ b ∈ dlookup a l₂\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\ns : Sigma β\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, b ∈ dlookup a (kunion tail✝ l₂) ↔ b ∈ dlookup a tail✝ ∨ ¬a ∈ keys tail✝ ∧ b ∈ dlookup a l₂\nl₂ : List (Sigma β)\n⊢ b ∈ dlookup a (kunion (s :: tail✝) l₂) ↔ b ∈ dlookup a (s :: tail✝) ∨ ¬a ∈ keys (s :: tail✝) ∧ b ∈ dlookup a l₂\n[PROOFSTEP]\n\n| cons s _ ih =>\n cases' s with a'\n by_cases h₁ : a = a'\n · subst h₁\n simp\n · let h₂ := @ih (kerase a' l₂)\n simp [h₁] at h₂ \n simp [h₁, h₂]\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\nl l₁ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\ns : Sigma β\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, b ∈ dlookup a (kunion tail✝ l₂) ↔ b ∈ dlookup a tail✝ ∨ ¬a ∈ keys tail✝ ∧ b ∈ dlookup a l₂\nl₂ : List (Sigma β)\n⊢ b ∈ dlookup a (kunion (s :: tail✝) l₂) ↔ b ∈ dlookup a (s :: tail✝) ∨ ¬a ∈ keys (s :: tail✝) ∧ b ∈ dlookup a l₂\n[PROOFSTEP]\ncases' s with a'\n[GOAL]\ncase cons.mk\nα : Type u\nβ : α → Type v\nl l₁ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, b ∈ dlookup a (kunion tail✝ l₂) ↔ b ∈ dlookup a tail✝ ∨ ¬a ∈ keys tail✝ ∧ b ∈ dlookup a l₂\nl₂ : List (Sigma β)\na' : α\nsnd✝ : β a'\n⊢ b ∈ dlookup a (kunion ({ fst := a', snd := snd✝ } :: tail✝) l₂) ↔\n b ∈ dlookup a ({ fst := a', snd := snd✝ } :: tail✝) ∨\n ¬a ∈ keys ({ fst := a', snd := snd✝ } :: tail✝) ∧ b ∈ dlookup a l₂\n[PROOFSTEP]\nby_cases h₁ : a = a'\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, b ∈ dlookup a (kunion tail✝ l₂) ↔ b ∈ dlookup a tail✝ ∨ ¬a ∈ keys tail✝ ∧ b ∈ dlookup a l₂\nl₂ : List (Sigma β)\na' : α\nsnd✝ : β a'\nh₁ : a = a'\n⊢ b ∈ dlookup a (kunion ({ fst := a', snd := snd✝ } :: tail✝) l₂) ↔\n b ∈ dlookup a ({ fst := a', snd := snd✝ } :: tail✝) ∨\n ¬a ∈ keys ({ fst := a', snd := snd✝ } :: tail✝) ∧ b ∈ dlookup a l₂\n[PROOFSTEP]\nsubst h₁\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\nl l₁ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, b ∈ dlookup a (kunion tail✝ l₂) ↔ b ∈ dlookup a tail✝ ∨ ¬a ∈ keys tail✝ ∧ b ∈ dlookup a l₂\nl₂ : List (Sigma β)\nsnd✝ : β a\n⊢ b ∈ dlookup a (kunion ({ fst := a, snd := snd✝ } :: tail✝) l₂) ↔\n b ∈ dlookup a ({ fst := a, snd := snd✝ } :: tail✝) ∨\n ¬a ∈ keys ({ fst := a, snd := snd✝ } :: tail✝) ∧ b ∈ dlookup a l₂\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl l₁ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, b ∈ dlookup a (kunion tail✝ l₂) ↔ b ∈ dlookup a tail✝ ∨ ¬a ∈ keys tail✝ ∧ b ∈ dlookup a l₂\nl₂ : List (Sigma β)\na' : α\nsnd✝ : β a'\nh₁ : ¬a = a'\n⊢ b ∈ dlookup a (kunion ({ fst := a', snd := snd✝ } :: tail✝) l₂) ↔\n b ∈ dlookup a ({ fst := a', snd := snd✝ } :: tail✝) ∨\n ¬a ∈ keys ({ fst := a', snd := snd✝ } :: tail✝) ∧ b ∈ dlookup a l₂\n[PROOFSTEP]\nlet h₂ := @ih (kerase a' l₂)\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl l₁ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, b ∈ dlookup a (kunion tail✝ l₂) ↔ b ∈ dlookup a tail✝ ∨ ¬a ∈ keys tail✝ ∧ b ∈ dlookup a l₂\nl₂ : List (Sigma β)\na' : α\nsnd✝ : β a'\nh₁ : ¬a = a'\nh₂ : b ∈ dlookup a (kunion tail✝ (kerase a' l₂)) ↔\n b ∈ dlookup a tail✝ ∨ ¬a ∈ keys tail✝ ∧ b ∈ dlookup a (kerase a' l₂) :=\n ih\n⊢ b ∈ dlookup a (kunion ({ fst := a', snd := snd✝ } :: tail✝) l₂) ↔\n b ∈ dlookup a ({ fst := a', snd := snd✝ } :: tail✝) ∨\n ¬a ∈ keys ({ fst := a', snd := snd✝ } :: tail✝) ∧ b ∈ dlookup a l₂\n[PROOFSTEP]\nsimp [h₁] at h₂ \n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\nl l₁ l₂✝ : List (Sigma β)\ninst✝ : DecidableEq α\na : α\nb : β a\ntail✝ : List (Sigma β)\nih : ∀ {l₂ : List (Sigma β)}, b ∈ dlookup a (kunion tail✝ l₂) ↔ b ∈ dlookup a tail✝ ∨ ¬a ∈ keys tail✝ ∧ b ∈ dlookup a l₂\nl₂ : List (Sigma β)\na' : α\nsnd✝ : β a'\nh₁ : ¬a = a'\nh₂ :\n dlookup a (kunion tail✝ (kerase a' l₂)) = some b ↔ dlookup a tail✝ = some b ∨ ¬a ∈ keys tail✝ ∧ dlookup a l₂ = some b\n⊢ b ∈ dlookup a (kunion ({ fst := a', snd := snd✝ } :: tail✝) l₂) ↔\n b ∈ dlookup a ({ fst := a', snd := snd✝ } :: tail✝) ∨\n ¬a ∈ keys ({ fst := a', snd := snd✝ } :: tail✝) ∧ b ∈ dlookup a l₂\n[PROOFSTEP]\nsimp [h₁, h₂]\n", "meta": {"mathlib_filename": "Mathlib.Data.List.Sigma", "llama_tokens": 51723, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.749087201911703, "lm_q2_score": 0.7461389930307512, "lm_q1q2_score": 0.558923170526621}} {"text": "[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ @UniversallyClosed = universally (topologically @IsClosedMap)\n[PROOFSTEP]\next X Y f\n[GOAL]\ncase h.h.h.a\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\n⊢ UniversallyClosed f ↔ universally (topologically @IsClosedMap) f\n[PROOFSTEP]\nrw [UniversallyClosed_iff]\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ StableUnderComposition @UniversallyClosed\n[PROOFSTEP]\nrw [universallyClosed_eq]\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ StableUnderComposition (universally (topologically @IsClosedMap))\n[PROOFSTEP]\nexact StableUnderComposition.universally (fun X Y Z f g hf hg => @IsClosedMap.comp _ _ _ _ _ _ g.1.base f.1.base hg hf)\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ PropertyIsLocalAtTarget @UniversallyClosed\n[PROOFSTEP]\nrw [universallyClosed_eq]\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ PropertyIsLocalAtTarget (universally (topologically @IsClosedMap))\n[PROOFSTEP]\napply universallyIsLocalAtTargetOfMorphismRestrict\n[GOAL]\ncase hP₁\nX Y : Scheme\nf : X ⟶ Y\n⊢ RespectsIso (topologically @IsClosedMap)\n[PROOFSTEP]\nexact\n StableUnderComposition.respectsIso (fun X Y Z f g hf hg => @IsClosedMap.comp _ _ _ _ _ _ g.1.base f.1.base hg hf)\n (fun f => (TopCat.homeoOfIso (Scheme.forgetToTop.mapIso f)).isClosedMap)\n[GOAL]\ncase hP₂\nX Y : Scheme\nf : X ⟶ Y\n⊢ ∀ {X Y : Scheme} (f : X ⟶ Y) {ι : Type u_1} (U : ι → Opens ↑↑Y.toPresheafedSpace),\n iSup U = ⊤ → (∀ (i : ι), topologically (@IsClosedMap) (f ∣_ U i)) → topologically (@IsClosedMap) f\n[PROOFSTEP]\nintro X Y f ι U hU H\n[GOAL]\ncase hP₂\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\nι : Type u_1\nU : ι → Opens ↑↑Y.toPresheafedSpace\nhU : iSup U = ⊤\nH : ∀ (i : ι), topologically (@IsClosedMap) (f ∣_ U i)\n⊢ topologically (@IsClosedMap) f\n[PROOFSTEP]\nsimp_rw [topologically, morphismRestrict_base] at H \n[GOAL]\ncase hP₂\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\nι : Type u_1\nU : ι → Opens ↑↑Y.toPresheafedSpace\nhU : iSup U = ⊤\nH : ∀ (i : ι), IsClosedMap (Set.restrictPreimage (U i).carrier ↑f.val.base)\n⊢ topologically (@IsClosedMap) f\n[PROOFSTEP]\nexact (isClosedMap_iff_isClosedMap_of_iSup_eq_top hU).mpr H\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicGeometry.Morphisms.UniversallyClosed", "llama_tokens": 991, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8104789178257654, "lm_q2_score": 0.689305616785446, "lm_q1q2_score": 0.5586676703434901}} {"text": "[GOAL]\nα : Type u_1\nn : ℕ\np q : Partition n\n⊢ Decidable (p = q)\n[PROOFSTEP]\nsimp [Partition.ext_iff]\n[GOAL]\nα : Type u_1\nn : ℕ\np q : Partition n\n⊢ Decidable (p.parts = q.parts)\n[PROOFSTEP]\nexact decidableEq p.parts q.parts\n[GOAL]\nα : Type u_1\nn : ℕ\nc : Composition n\n⊢ sum ↑c.blocks = n\n[PROOFSTEP]\nrw [Multiset.coe_sum, c.blocks_sum]\n[GOAL]\nα : Type u_1\nn : ℕ\n⊢ Function.Surjective (ofComposition n)\n[PROOFSTEP]\nrintro ⟨b, hb₁, hb₂⟩\n[GOAL]\ncase mk\nα : Type u_1\nn : ℕ\nb : Multiset ℕ\nhb₁ : ∀ {i : ℕ}, i ∈ b → 0 < i\nhb₂ : sum b = n\n⊢ ∃ a, ofComposition n a = { parts := b, parts_pos := hb₁, parts_sum := hb₂ }\n[PROOFSTEP]\nrcases Quotient.exists_rep b with ⟨b, rfl⟩\n[GOAL]\ncase mk.intro\nα : Type u_1\nn : ℕ\nb : List ℕ\nhb₁ : ∀ {i : ℕ}, i ∈ Quotient.mk (List.isSetoid ℕ) b → 0 < i\nhb₂ : sum (Quotient.mk (List.isSetoid ℕ) b) = n\n⊢ ∃ a, ofComposition n a = { parts := Quotient.mk (List.isSetoid ℕ) b, parts_pos := hb₁, parts_sum := hb₂ }\n[PROOFSTEP]\nrefine' ⟨⟨b, fun {i} hi => hb₁ hi, _⟩, Partition.ext _ _ rfl⟩\n[GOAL]\ncase mk.intro\nα : Type u_1\nn : ℕ\nb : List ℕ\nhb₁ : ∀ {i : ℕ}, i ∈ Quotient.mk (List.isSetoid ℕ) b → 0 < i\nhb₂ : sum (Quotient.mk (List.isSetoid ℕ) b) = n\n⊢ List.sum b = n\n[PROOFSTEP]\nsimpa using hb₂\n[GOAL]\nα : Type u_1\nn : ℕ\nl : Multiset ℕ\nhl : sum l = n\ni : ℕ\nhi : i ∈ filter (fun x => x ≠ 0) l\n⊢ i ≠ 0\n[PROOFSTEP]\napply of_mem_filter hi\n[GOAL]\nα : Type u_1\nn : ℕ\nl : Multiset ℕ\nhl : sum l = n\n⊢ sum (filter (fun x => x ≠ 0) l) = n\n[PROOFSTEP]\nhave lt : l.filter (· = 0) + l.filter (· ≠ 0) = l := filter_add_not _ l\n[GOAL]\nα : Type u_1\nn : ℕ\nl : Multiset ℕ\nhl : sum l = n\nlt : filter (fun x => x = 0) l + filter (fun x => x ≠ 0) l = l\n⊢ sum (filter (fun x => x ≠ 0) l) = n\n[PROOFSTEP]\napply_fun Multiset.sum at lt \n[GOAL]\nα : Type u_1\nn : ℕ\nl : Multiset ℕ\nhl : sum l = n\nlt : sum (filter (fun x => x = 0) l + filter (fun x => x ≠ 0) l) = sum l\n⊢ sum (filter (fun x => x ≠ 0) l) = n\n[PROOFSTEP]\nhave lz : (l.filter (· = 0)).sum = 0 := by\n rw [Multiset.sum_eq_zero_iff]\n simp\n[GOAL]\nα : Type u_1\nn : ℕ\nl : Multiset ℕ\nhl : sum l = n\nlt : sum (filter (fun x => x = 0) l + filter (fun x => x ≠ 0) l) = sum l\n⊢ sum (filter (fun x => x = 0) l) = 0\n[PROOFSTEP]\nrw [Multiset.sum_eq_zero_iff]\n[GOAL]\nα : Type u_1\nn : ℕ\nl : Multiset ℕ\nhl : sum l = n\nlt : sum (filter (fun x => x = 0) l + filter (fun x => x ≠ 0) l) = sum l\n⊢ ∀ (x : ℕ), x ∈ filter (fun x => x = 0) l → x = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nn : ℕ\nl : Multiset ℕ\nhl : sum l = n\nlt : sum (filter (fun x => x = 0) l + filter (fun x => x ≠ 0) l) = sum l\nlz : sum (filter (fun x => x = 0) l) = 0\n⊢ sum (filter (fun x => x ≠ 0) l) = n\n[PROOFSTEP]\nrwa [sum_add (filter (fun x => x = 0) l) (filter (fun x => ¬x = 0) l), lz, hl, zero_add] at lt \n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.Partition", "llama_tokens": 1395, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.787931185683219, "lm_q2_score": 0.7090191214879992, "lm_q1q2_score": 0.5586582770661135}} {"text": "[GOAL]\nn : ℕ\n⊢ Nat.IsSqrt n (sqrt n)\n[PROOFSTEP]\nmatch n with\n| 0 => simp [IsSqrt]\n| 1 => simp [IsSqrt]\n| n + 2 =>\n have h : ¬(n + 2) ≤ 1 := by simp\n simp only [IsSqrt, sqrt, h, ite_false]\n refine ⟨sqrt.iter_sq_le _ _, sqrt.lt_iter_succ_sq _ _ ?_⟩\n simp only [mul_add, add_mul, one_mul, mul_one, ← add_assoc]\n rw [lt_add_one_iff, add_assoc, ← mul_two]\n refine le_trans (div_add_mod' (n + 2) 2).ge ?_\n rw [add_comm, add_le_add_iff_right, add_mod_right]\n simp only [zero_lt_two, add_div_right, succ_mul_succ_eq]\n refine le_trans (b := 1) ?_ ?_\n · exact (lt_succ.1 $ mod_lt n zero_lt_two)\n · simp only [le_add_iff_nonneg_left]; exact zero_le _\n[GOAL]\nn : ℕ\n⊢ Nat.IsSqrt 0 (sqrt 0)\n[PROOFSTEP]\nsimp [IsSqrt]\n[GOAL]\nn : ℕ\n⊢ Nat.IsSqrt 1 (sqrt 1)\n[PROOFSTEP]\nsimp [IsSqrt]\n[GOAL]\nn✝ n : ℕ\n⊢ Nat.IsSqrt (n + 2) (sqrt (n + 2))\n[PROOFSTEP]\nhave h : ¬(n + 2) ≤ 1 := by simp\n[GOAL]\nn✝ n : ℕ\n⊢ ¬n + 2 ≤ 1\n[PROOFSTEP]\nsimp\n[GOAL]\nn✝ n : ℕ\nh : ¬n + 2 ≤ 1\n⊢ Nat.IsSqrt (n + 2) (sqrt (n + 2))\n[PROOFSTEP]\nsimp only [IsSqrt, sqrt, h, ite_false]\n[GOAL]\nn✝ n : ℕ\nh : ¬n + 2 ≤ 1\n⊢ sqrt.iter (n + 2) ((n + 2) / 2) * sqrt.iter (n + 2) ((n + 2) / 2) ≤ n + 2 ∧\n n + 2 < (sqrt.iter (n + 2) ((n + 2) / 2) + 1) * (sqrt.iter (n + 2) ((n + 2) / 2) + 1)\n[PROOFSTEP]\nrefine ⟨sqrt.iter_sq_le _ _, sqrt.lt_iter_succ_sq _ _ ?_⟩\n[GOAL]\nn✝ n : ℕ\nh : ¬n + 2 ≤ 1\n⊢ n + 2 < ((n + 2) / 2 + 1) * ((n + 2) / 2 + 1)\n[PROOFSTEP]\nsimp only [mul_add, add_mul, one_mul, mul_one, ← add_assoc]\n[GOAL]\nn✝ n : ℕ\nh : ¬n + 2 ≤ 1\n⊢ n + 2 < (n + 2) / 2 * ((n + 2) / 2) + (n + 2) / 2 + (n + 2) / 2 + 1\n[PROOFSTEP]\nrw [lt_add_one_iff, add_assoc, ← mul_two]\n[GOAL]\nn✝ n : ℕ\nh : ¬n + 2 ≤ 1\n⊢ n + 2 ≤ (n + 2) / 2 * ((n + 2) / 2) + (n + 2) / 2 * 2\n[PROOFSTEP]\nrefine le_trans (div_add_mod' (n + 2) 2).ge ?_\n[GOAL]\nn✝ n : ℕ\nh : ¬n + 2 ≤ 1\n⊢ (n + 2) / 2 * 2 + (n + 2) % 2 ≤ (n + 2) / 2 * ((n + 2) / 2) + (n + 2) / 2 * 2\n[PROOFSTEP]\nrw [add_comm, add_le_add_iff_right, add_mod_right]\n[GOAL]\nn✝ n : ℕ\nh : ¬n + 2 ≤ 1\n⊢ n % 2 ≤ (n + 2) / 2 * ((n + 2) / 2)\n[PROOFSTEP]\nsimp only [zero_lt_two, add_div_right, succ_mul_succ_eq]\n[GOAL]\nn✝ n : ℕ\nh : ¬n + 2 ≤ 1\n⊢ n % 2 ≤ n / 2 * (n / 2) + n / 2 + n / 2 + 1\n[PROOFSTEP]\nrefine le_trans (b := 1) ?_ ?_\n[GOAL]\ncase refine_1\nn✝ n : ℕ\nh : ¬n + 2 ≤ 1\n⊢ n % 2 ≤ 1\n[PROOFSTEP]\nexact (lt_succ.1 $ mod_lt n zero_lt_two)\n[GOAL]\ncase refine_2\nn✝ n : ℕ\nh : ¬n + 2 ≤ 1\n⊢ 1 ≤ n / 2 * (n / 2) + n / 2 + n / 2 + 1\n[PROOFSTEP]\nsimp only [le_add_iff_nonneg_left]\n[GOAL]\ncase refine_2\nn✝ n : ℕ\nh : ¬n + 2 ≤ 1\n⊢ 0 ≤ n / 2 * (n / 2) + n / 2 + n / 2\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\nn : ℕ\n⊢ n ≤ sqrt n * sqrt n + sqrt n + sqrt n\n[PROOFSTEP]\nrw [← succ_mul]\n[GOAL]\nn : ℕ\n⊢ n ≤ succ (sqrt n) * sqrt n + sqrt n\n[PROOFSTEP]\nexact le_of_lt_succ (lt_succ_sqrt n)\n[GOAL]\nm n : ℕ\n⊢ m ≤ sqrt n ↔ m ^ 2 ≤ n\n[PROOFSTEP]\nsimpa only [pow_two] using le_sqrt\n[GOAL]\nn : ℕ\nh : sqrt n = 0\n⊢ sqrt n < 1\n[PROOFSTEP]\nrw [h]\n[GOAL]\nn : ℕ\nh : sqrt n = 0\n⊢ 0 < 1\n[PROOFSTEP]\ndecide\n[GOAL]\nn : ℕ\n⊢ n = 0 → sqrt n = 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\n⊢ sqrt 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nn q : ℕ\n⊢ q = sqrt n ↔ q ^ 2 ≤ n ∧ n < (q + 1) ^ 2\n[PROOFSTEP]\nsimpa only [pow_two] using eq_sqrt\n[GOAL]\nn : ℕ\nh : sqrt n = 1\n⊢ sqrt n < 2\n[PROOFSTEP]\nrw [h]\n[GOAL]\nn : ℕ\nh : sqrt n = 1\n⊢ 1 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\nn : ℕ\nh : 1 < n\n⊢ n < n * n\n[PROOFSTEP]\nhave := Nat.mul_lt_mul_of_pos_left h (lt_of_succ_lt h)\n[GOAL]\nn : ℕ\nh : 1 < n\nthis : n * 1 < n * n\n⊢ n < n * n\n[PROOFSTEP]\nrwa [mul_one] at this \n[GOAL]\nn a : ℕ\nh : a ≤ n + n\n⊢ n * n + a < succ n * succ n\n[PROOFSTEP]\nrw [succ_mul, mul_succ, add_succ, add_assoc]\n[GOAL]\nn a : ℕ\nh : a ≤ n + n\n⊢ n * n + a < succ (n * n + (n + n))\n[PROOFSTEP]\nexact lt_succ_of_le (Nat.add_le_add_left h _)\n[GOAL]\nn : ℕ\n⊢ sqrt n * sqrt n + sqrt n ≤ Nat.mul (succ (succ (sqrt n))) (succ (sqrt n))\n[PROOFSTEP]\nrefine' add_le_add (Nat.mul_le_mul_right _ _) _\n[GOAL]\ncase refine'_1\nn : ℕ\n⊢ sqrt n ≤ succ (succ (sqrt n))\n[PROOFSTEP]\nexact Nat.le_add_right _ 2\n[GOAL]\ncase refine'_2\nn : ℕ\n⊢ sqrt n ≤ succ (succ (sqrt n))\n[PROOFSTEP]\nexact Nat.le_add_right _ 2\n[GOAL]\nx : ℕ\nx✝ : ∃ n, n * n = x\nn : ℕ\nhn : n * n = x\n⊢ sqrt x * sqrt x = x\n[PROOFSTEP]\nrw [← hn, sqrt_eq]\n[GOAL]\nx : ℕ\n⊢ (∃ n, n ^ 2 = x) ↔ sqrt x ^ 2 = x\n[PROOFSTEP]\nsimpa only [pow_two] using exists_mul_self x\n[GOAL]\nn m : ℕ\nhl : m * m < n\nhr : n < (m + 1) * (m + 1)\n⊢ ¬∃ t, t * t = n\n[PROOFSTEP]\nrintro ⟨t, rfl⟩\n[GOAL]\ncase intro\nm t : ℕ\nhl : m * m < t * t\nhr : t * t < (m + 1) * (m + 1)\n⊢ False\n[PROOFSTEP]\nhave h1 : m < t := Nat.mul_self_lt_mul_self_iff.mpr hl\n[GOAL]\ncase intro\nm t : ℕ\nhl : m * m < t * t\nhr : t * t < (m + 1) * (m + 1)\nh1 : m < t\n⊢ False\n[PROOFSTEP]\nhave h2 : t < m + 1 := Nat.mul_self_lt_mul_self_iff.mpr hr\n[GOAL]\ncase intro\nm t : ℕ\nhl : m * m < t * t\nhr : t * t < (m + 1) * (m + 1)\nh1 : m < t\nh2 : t < m + 1\n⊢ False\n[PROOFSTEP]\nexact (not_lt_of_ge <| le_of_lt_succ h2) h1\n[GOAL]\nn m : ℕ\nhl : m ^ 2 < n\nhr : n < (m + 1) ^ 2\n⊢ ¬∃ t, t ^ 2 = n\n[PROOFSTEP]\nsimpa only [pow_two] using not_exists_sq (by simpa only [pow_two] using hl) (by simpa only [pow_two] using hr)\n[GOAL]\nn m : ℕ\nhl : m ^ 2 < n\nhr : n < (m + 1) ^ 2\n⊢ ?m.11228 * ?m.11228 < n\n[PROOFSTEP]\nsimpa only [pow_two] using hl\n[GOAL]\nn m : ℕ\nhl : m ^ 2 < n\nhr : n < (m + 1) ^ 2\n⊢ n < (m + 1) * (m + 1)\n[PROOFSTEP]\nsimpa only [pow_two] using hr\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Sqrt", "llama_tokens": 3098, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8175744939732856, "lm_q2_score": 0.6825737408694988, "lm_q1q2_score": 0.5580548807908331}} {"text": "[GOAL]\nn : ℕ\ni : Fin n\nM : Type u_1\ninst✝ : Zero M\ny : M\nt : Fin (n + 1) →₀ M\ns : Fin n →₀ M\nk : Fin n\n⊢ ↑(tail (cons y s)) k = ↑s k\n[PROOFSTEP]\nsimp only [tail_apply, cons_succ]\n[GOAL]\nn : ℕ\ni : Fin n\nM : Type u_1\ninst✝ : Zero M\ny : M\nt : Fin (n + 1) →₀ M\ns : Fin n →₀ M\n⊢ cons (↑t 0) (tail t) = t\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nn : ℕ\ni : Fin n\nM : Type u_1\ninst✝ : Zero M\ny : M\nt : Fin (n + 1) →₀ M\ns : Fin n →₀ M\na : Fin (n + 1)\n⊢ ↑(cons (↑t 0) (tail t)) a = ↑t a\n[PROOFSTEP]\nby_cases c_a : a = 0\n[GOAL]\ncase pos\nn : ℕ\ni : Fin n\nM : Type u_1\ninst✝ : Zero M\ny : M\nt : Fin (n + 1) →₀ M\ns : Fin n →₀ M\na : Fin (n + 1)\nc_a : a = 0\n⊢ ↑(cons (↑t 0) (tail t)) a = ↑t a\n[PROOFSTEP]\nrw [c_a, cons_zero]\n[GOAL]\ncase neg\nn : ℕ\ni : Fin n\nM : Type u_1\ninst✝ : Zero M\ny : M\nt : Fin (n + 1) →₀ M\ns : Fin n →₀ M\na : Fin (n + 1)\nc_a : ¬a = 0\n⊢ ↑(cons (↑t 0) (tail t)) a = ↑t a\n[PROOFSTEP]\nrw [← Fin.succ_pred a c_a, cons_succ, ← tail_apply]\n[GOAL]\nn : ℕ\ni : Fin n\nM : Type u_1\ninst✝ : Zero M\ny : M\nt : Fin (n + 1) →₀ M\ns : Fin n →₀ M\n⊢ cons 0 0 = 0\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nn : ℕ\ni : Fin n\nM : Type u_1\ninst✝ : Zero M\ny : M\nt : Fin (n + 1) →₀ M\ns : Fin n →₀ M\na : Fin (n + 1)\n⊢ ↑(cons 0 0) a = ↑0 a\n[PROOFSTEP]\nby_cases c : a = 0\n[GOAL]\ncase pos\nn : ℕ\ni : Fin n\nM : Type u_1\ninst✝ : Zero M\ny : M\nt : Fin (n + 1) →₀ M\ns : Fin n →₀ M\na : Fin (n + 1)\nc : a = 0\n⊢ ↑(cons 0 0) a = ↑0 a\n[PROOFSTEP]\nsimp [c]\n[GOAL]\ncase neg\nn : ℕ\ni : Fin n\nM : Type u_1\ninst✝ : Zero M\ny : M\nt : Fin (n + 1) →₀ M\ns : Fin n →₀ M\na : Fin (n + 1)\nc : ¬a = 0\n⊢ ↑(cons 0 0) a = ↑0 a\n[PROOFSTEP]\nrw [← Fin.succ_pred a c, cons_succ]\n[GOAL]\ncase neg\nn : ℕ\ni : Fin n\nM : Type u_1\ninst✝ : Zero M\ny : M\nt : Fin (n + 1) →₀ M\ns : Fin n →₀ M\na : Fin (n + 1)\nc : ¬a = 0\n⊢ ↑0 (Fin.pred a c) = ↑0 (Fin.succ (Fin.pred a c))\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\ni : Fin n\nM : Type u_1\ninst✝ : Zero M\ny : M\nt : Fin (n + 1) →₀ M\ns : Fin n →₀ M\nh : y ≠ 0\n⊢ cons y s ≠ 0\n[PROOFSTEP]\ncontrapose! h with c\n[GOAL]\nn : ℕ\ni : Fin n\nM : Type u_1\ninst✝ : Zero M\ny : M\nt : Fin (n + 1) →₀ M\ns : Fin n →₀ M\nc : cons y s = 0\n⊢ y = 0\n[PROOFSTEP]\nrw [← cons_zero y s, c, Finsupp.coe_zero, Pi.zero_apply]\n[GOAL]\nn : ℕ\ni : Fin n\nM : Type u_1\ninst✝ : Zero M\ny : M\nt : Fin (n + 1) →₀ M\ns : Fin n →₀ M\nh : s ≠ 0\n⊢ cons y s ≠ 0\n[PROOFSTEP]\ncontrapose! h with c\n[GOAL]\nn : ℕ\ni : Fin n\nM : Type u_1\ninst✝ : Zero M\ny : M\nt : Fin (n + 1) →₀ M\ns : Fin n →₀ M\nc : cons y s = 0\n⊢ s = 0\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nn : ℕ\ni : Fin n\nM : Type u_1\ninst✝ : Zero M\ny : M\nt : Fin (n + 1) →₀ M\ns : Fin n →₀ M\nc : cons y s = 0\na : Fin n\n⊢ ↑s a = ↑0 a\n[PROOFSTEP]\nsimp [← cons_succ a y s, c]\n[GOAL]\nn : ℕ\ni : Fin n\nM : Type u_1\ninst✝ : Zero M\ny : M\nt : Fin (n + 1) →₀ M\ns : Fin n →₀ M\n⊢ cons y s ≠ 0 ↔ y ≠ 0 ∨ s ≠ 0\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => h.casesOn cons_ne_zero_of_left cons_ne_zero_of_right⟩\n[GOAL]\nn : ℕ\ni : Fin n\nM : Type u_1\ninst✝ : Zero M\ny : M\nt : Fin (n + 1) →₀ M\ns : Fin n →₀ M\nh : cons y s ≠ 0\n⊢ y ≠ 0 ∨ s ≠ 0\n[PROOFSTEP]\nrefine' imp_iff_not_or.1 fun h' c => h _\n[GOAL]\nn : ℕ\ni : Fin n\nM : Type u_1\ninst✝ : Zero M\ny : M\nt : Fin (n + 1) →₀ M\ns : Fin n →₀ M\nh : cons y s ≠ 0\nh' : y = 0\nc : s = 0\n⊢ cons y s = 0\n[PROOFSTEP]\nrw [h', c, Finsupp.cons_zero_zero]\n", "meta": {"mathlib_filename": "Mathlib.Data.Finsupp.Fin", "llama_tokens": 1852, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8175744939732856, "lm_q2_score": 0.6825737214979745, "lm_q1q2_score": 0.5580548649531689}} {"text": "[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\nr : R\nα : F ⟶ G\n⊢ ∀ ⦃X Y : C⦄ (f : X ⟶ Y), F.map f ≫ (fun X => r • NatTrans.app α X) Y = (fun X => r • NatTrans.app α X) X ≫ G.map f\n[PROOFSTEP]\nintros\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\nr : R\nα : F ⟶ G\nX✝ Y✝ : C\nf✝ : X✝ ⟶ Y✝\n⊢ F.map f✝ ≫ (fun X => r • NatTrans.app α X) Y✝ = (fun X => r • NatTrans.app α X) X✝ ≫ G.map f✝\n[PROOFSTEP]\nrw [comp_smul, smul_comp, α.naturality]\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\n⊢ ∀ (b : F ⟶ G), 1 • b = b\n[PROOFSTEP]\nintros\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\nb✝ : F ⟶ G\n⊢ 1 • b✝ = b✝\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\nb✝ : F ⟶ G\nx✝ : C\n⊢ NatTrans.app (1 • b✝) x✝ = NatTrans.app b✝ x✝\n[PROOFSTEP]\napply one_smul\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\n⊢ ∀ (x y : R) (b : F ⟶ G), (x * y) • b = x • y • b\n[PROOFSTEP]\nintros\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\nx✝ y✝ : R\nb✝ : F ⟶ G\n⊢ (x✝ * y✝) • b✝ = x✝ • y✝ • b✝\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\nx✝¹ y✝ : R\nb✝ : F ⟶ G\nx✝ : C\n⊢ NatTrans.app ((x✝¹ * y✝) • b✝) x✝ = NatTrans.app (x✝¹ • y✝ • b✝) x✝\n[PROOFSTEP]\napply mul_smul\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\n⊢ ∀ (a : R), a • 0 = 0\n[PROOFSTEP]\nintros\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\na✝ : R\n⊢ a✝ • 0 = 0\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\na✝ : R\nx✝ : C\n⊢ NatTrans.app (a✝ • 0) x✝ = NatTrans.app 0 x✝\n[PROOFSTEP]\napply smul_zero\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\n⊢ ∀ (a : R) (x y : F ⟶ G), a • (x + y) = a • x + a • y\n[PROOFSTEP]\nintros\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\na✝ : R\nx✝ y✝ : F ⟶ G\n⊢ a✝ • (x✝ + y✝) = a✝ • x✝ + a✝ • y✝\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\na✝ : R\nx✝¹ y✝ : F ⟶ G\nx✝ : C\n⊢ NatTrans.app (a✝ • (x✝¹ + y✝)) x✝ = NatTrans.app (a✝ • x✝¹ + a✝ • y✝) x✝\n[PROOFSTEP]\napply smul_add\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\n⊢ ∀ (r s : R) (x : F ⟶ G), (r + s) • x = r • x + s • x\n[PROOFSTEP]\nintros\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\nr✝ s✝ : R\nx✝ : F ⟶ G\n⊢ (r✝ + s✝) • x✝ = r✝ • x✝ + s✝ • x✝\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\nr✝ s✝ : R\nx✝¹ : F ⟶ G\nx✝ : C\n⊢ NatTrans.app ((r✝ + s✝) • x✝¹) x✝ = NatTrans.app (r✝ • x✝¹ + s✝ • x✝¹) x✝\n[PROOFSTEP]\napply add_smul\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\n⊢ ∀ (x : F ⟶ G), 0 • x = 0\n[PROOFSTEP]\nintros\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\nx✝ : F ⟶ G\n⊢ 0 • x✝ = 0\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF G : C ⥤ D\nx✝¹ : F ⟶ G\nx✝ : C\n⊢ NatTrans.app (0 • x✝¹) x✝ = NatTrans.app 0 x✝\n[PROOFSTEP]\napply zero_smul\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\n⊢ ∀ (X Y Z : C ⥤ D) (r : R) (f : X ⟶ Y) (g : Y ⟶ Z), (r • f) ≫ g = r • f ≫ g\n[PROOFSTEP]\nintros\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nX✝ Y✝ Z✝ : C ⥤ D\nr✝ : R\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\n⊢ (r✝ • f✝) ≫ g✝ = r✝ • f✝ ≫ g✝\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nX✝ Y✝ Z✝ : C ⥤ D\nr✝ : R\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\nx✝ : C\n⊢ NatTrans.app ((r✝ • f✝) ≫ g✝) x✝ = NatTrans.app (r✝ • f✝ ≫ g✝) x✝\n[PROOFSTEP]\napply smul_comp\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\n⊢ ∀ (X Y Z : C ⥤ D) (f : X ⟶ Y) (r : R) (g : Y ⟶ Z), f ≫ (r • g) = r • f ≫ g\n[PROOFSTEP]\nintros\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nX✝ Y✝ Z✝ : C ⥤ D\nf✝ : X✝ ⟶ Y✝\nr✝ : R\ng✝ : Y✝ ⟶ Z✝\n⊢ f✝ ≫ (r✝ • g✝) = r✝ • f✝ ≫ g✝\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nR : Type u_1\ninst✝⁴ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝³ : Category.{?u.87, u_2} C\ninst✝² : Category.{?u.91, u_3} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nX✝ Y✝ Z✝ : C ⥤ D\nf✝ : X✝ ⟶ Y✝\nr✝ : R\ng✝ : Y✝ ⟶ Z✝\nx✝ : C\n⊢ NatTrans.app (f✝ ≫ (r✝ • g✝)) x✝ = NatTrans.app (r✝ • f✝ ≫ g✝) x✝\n[PROOFSTEP]\napply comp_smul\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Linear.FunctorCategory", "llama_tokens": 4541, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8807970873650403, "lm_q2_score": 0.6334102636778401, "lm_q1q2_score": 0.5579059153545638}} {"text": "[GOAL]\nM : Type u_1\nS T : Set M\ninst✝ : MulOneClass M\n⊢ 1 ∈ centralizer S\n[PROOFSTEP]\nsimp [mem_centralizer_iff]\n[GOAL]\nM : Type u_1\nS T : Set M\ninst✝ : MulZeroClass M\n⊢ 0 ∈ centralizer S\n[PROOFSTEP]\nsimp [mem_centralizer_iff]\n[GOAL]\nM : Type u_1\nS T : Set M\na b : M\ninst✝ : Semigroup M\nha : a ∈ centralizer S\nhb : b ∈ centralizer S\ng : M\nhg : g ∈ S\n⊢ g * (a * b) = a * b * g\n[PROOFSTEP]\nrw [mul_assoc, ← hb g hg, ← mul_assoc, ha g hg, mul_assoc]\n[GOAL]\nM : Type u_1\nS T : Set M\na b : M\ninst✝ : Group M\nha : a ∈ centralizer S\ng : M\nhg : g ∈ S\n⊢ g * a⁻¹ = a⁻¹ * g\n[PROOFSTEP]\nrw [mul_inv_eq_iff_eq_mul, mul_assoc, eq_inv_mul_iff_mul_eq, ha g hg]\n[GOAL]\nM : Type u_1\nS T : Set M\na b : M\ninst✝ : Distrib M\nha : a ∈ centralizer S\nhb : b ∈ centralizer S\nc : M\nhc : c ∈ S\n⊢ c * (a + b) = (a + b) * c\n[PROOFSTEP]\nrw [add_mul, mul_add, ha c hc, hb c hc]\n[GOAL]\nM : Type u_1\nS T : Set M\na b : M\ninst✝¹ : Mul M\ninst✝ : HasDistribNeg M\nha : a ∈ centralizer S\nc : M\nhc : c ∈ S\n⊢ c * -a = -a * c\n[PROOFSTEP]\nrw [mul_neg, ha c hc, neg_mul]\n[GOAL]\nM : Type u_1\nS T : Set M\na b : M\ninst✝ : GroupWithZero M\nha : a ∈ centralizer S\nh : a = 0\n⊢ a⁻¹ ∈ centralizer S\n[PROOFSTEP]\nrw [h, inv_zero]\n[GOAL]\nM : Type u_1\nS T : Set M\na b : M\ninst✝ : GroupWithZero M\nha : a ∈ centralizer S\nh : a = 0\n⊢ 0 ∈ centralizer S\n[PROOFSTEP]\nexact zero_mem_centralizer S\n[GOAL]\nM : Type u_1\nS T : Set M\na b : M\ninst✝ : GroupWithZero M\nha : a ∈ centralizer S\nha0 : a ≠ 0\nc : M\nhc : c ∈ S\n⊢ c * a⁻¹ = a⁻¹ * c\n[PROOFSTEP]\nrw [mul_inv_eq_iff_eq_mul₀ ha0, mul_assoc, eq_inv_mul_iff_mul_eq₀ ha0, ha c hc]\n[GOAL]\nM : Type u_1\nS T : Set M\na b : M\ninst✝ : Group M\nha : a ∈ centralizer S\nhb : b ∈ centralizer S\n⊢ a / b ∈ centralizer S\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nM : Type u_1\nS T : Set M\na b : M\ninst✝ : Group M\nha : a ∈ centralizer S\nhb : b ∈ centralizer S\n⊢ a * b⁻¹ ∈ centralizer S\n[PROOFSTEP]\nexact mul_mem_centralizer ha (inv_mem_centralizer hb)\n[GOAL]\nM : Type u_1\nS T : Set M\na b : M\ninst✝ : GroupWithZero M\nha : a ∈ centralizer S\nhb : b ∈ centralizer S\n⊢ a / b ∈ centralizer S\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nM : Type u_1\nS T : Set M\na b : M\ninst✝ : GroupWithZero M\nha : a ∈ centralizer S\nhb : b ∈ centralizer S\n⊢ a * b⁻¹ ∈ centralizer S\n[PROOFSTEP]\nexact mul_mem_centralizer ha (inv_mem_centralizer₀ hb)\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.Subsemigroup.Centralizer", "llama_tokens": 1154, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7662936430859597, "lm_q2_score": 0.7279754430043072, "lm_q1q2_score": 0.5578429542968859}} {"text": "[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nx : M\n⊢ bilin B 0 x = 0\n[PROOFSTEP]\nrw [← @zero_smul R _ _ _ _ (0 : M), smul_left, zero_mul]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nx : M\n⊢ bilin B x 0 = 0\n[PROOFSTEP]\nrw [← @zero_smul R _ _ _ _ (0 : M), smul_right, zero_mul]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nx y : M₁\n⊢ bilin B₁ (-x) y = -bilin B₁ x y\n[PROOFSTEP]\nrw [← @neg_one_smul R₁ _ _, smul_left, neg_one_mul]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nx y : M₁\n⊢ bilin B₁ x (-y) = -bilin B₁ x y\n[PROOFSTEP]\nrw [← @neg_one_smul R₁ _ _, smul_right, neg_one_mul]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nx y z : M₁\n⊢ bilin B₁ (x - y) z = bilin B₁ x z - bilin B₁ y z\n[PROOFSTEP]\nrw [sub_eq_add_neg, sub_eq_add_neg, add_left, neg_left]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nx y z : M₁\n⊢ bilin B₁ x (y - z) = bilin B₁ x y - bilin B₁ x z\n[PROOFSTEP]\nrw [sub_eq_add_neg, sub_eq_add_neg, add_right, neg_right]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD✝ : BilinForm R M\nD₁ : BilinForm R₁ M₁\nB D : BilinForm R M\nh : B.bilin = D.bilin\n⊢ B = D\n[PROOFSTEP]\ncases B\n[GOAL]\ncase mk\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD✝ : BilinForm R M\nD₁ : BilinForm R₁ M₁\nD : BilinForm R M\nbilin✝ : M → M → R\nbilin_add_left✝ : ∀ (x y z : M), bilin✝ (x + y) z = bilin✝ x z + bilin✝ y z\nbilin_smul_left✝ : ∀ (a : R) (x y : M), bilin✝ (a • x) y = a * bilin✝ x y\nbilin_add_right✝ : ∀ (x y z : M), bilin✝ x (y + z) = bilin✝ x y + bilin✝ x z\nbilin_smul_right✝ : ∀ (a : R) (x y : M), bilin✝ x (a • y) = a * bilin✝ x y\nh :\n { bilin := bilin✝, bilin_add_left := bilin_add_left✝, bilin_smul_left := bilin_smul_left✝,\n bilin_add_right := bilin_add_right✝, bilin_smul_right := bilin_smul_right✝ }.bilin =\n D.bilin\n⊢ { bilin := bilin✝, bilin_add_left := bilin_add_left✝, bilin_smul_left := bilin_smul_left✝,\n bilin_add_right := bilin_add_right✝, bilin_smul_right := bilin_smul_right✝ } =\n D\n[PROOFSTEP]\ncases D\n[GOAL]\ncase mk.mk\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\nbilin✝¹ : M → M → R\nbilin_add_left✝¹ : ∀ (x y z : M), bilin✝¹ (x + y) z = bilin✝¹ x z + bilin✝¹ y z\nbilin_smul_left✝¹ : ∀ (a : R) (x y : M), bilin✝¹ (a • x) y = a * bilin✝¹ x y\nbilin_add_right✝¹ : ∀ (x y z : M), bilin✝¹ x (y + z) = bilin✝¹ x y + bilin✝¹ x z\nbilin_smul_right✝¹ : ∀ (a : R) (x y : M), bilin✝¹ x (a • y) = a * bilin✝¹ x y\nbilin✝ : M → M → R\nbilin_add_left✝ : ∀ (x y z : M), bilin✝ (x + y) z = bilin✝ x z + bilin✝ y z\nbilin_smul_left✝ : ∀ (a : R) (x y : M), bilin✝ (a • x) y = a * bilin✝ x y\nbilin_add_right✝ : ∀ (x y z : M), bilin✝ x (y + z) = bilin✝ x y + bilin✝ x z\nbilin_smul_right✝ : ∀ (a : R) (x y : M), bilin✝ x (a • y) = a * bilin✝ x y\nh :\n { bilin := bilin✝¹, bilin_add_left := bilin_add_left✝¹, bilin_smul_left := bilin_smul_left✝¹,\n bilin_add_right := bilin_add_right✝¹, bilin_smul_right := bilin_smul_right✝¹ }.bilin =\n { bilin := bilin✝, bilin_add_left := bilin_add_left✝, bilin_smul_left := bilin_smul_left✝,\n bilin_add_right := bilin_add_right✝, bilin_smul_right := bilin_smul_right✝ }.bilin\n⊢ { bilin := bilin✝¹, bilin_add_left := bilin_add_left✝¹, bilin_smul_left := bilin_smul_left✝¹,\n bilin_add_right := bilin_add_right✝¹, bilin_smul_right := bilin_smul_right✝¹ } =\n { bilin := bilin✝, bilin_add_left := bilin_add_left✝, bilin_smul_left := bilin_smul_left✝,\n bilin_add_right := bilin_add_right✝, bilin_smul_right := bilin_smul_right✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\nH : ∀ (x y : M), bilin B x y = bilin D x y\n⊢ B.bilin = D.bilin\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\nH : ∀ (x y : M), bilin B x y = bilin D x y\nx✝¹ x✝ : M\n⊢ bilin B x✝¹ x✝ = bilin D x✝¹ x✝\n[PROOFSTEP]\nexact H _ _\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD✝ : BilinForm R M\nD₁ : BilinForm R₁ M₁\nB D : BilinForm R M\nx y z : M\n⊢ (fun x y => bilin B x y + bilin D x y) (x + y) z =\n (fun x y => bilin B x y + bilin D x y) x z + (fun x y => bilin B x y + bilin D x y) y z\n[PROOFSTEP]\nsimp only [add_left, add_left, add_add_add_comm]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD✝ : BilinForm R M\nD₁ : BilinForm R₁ M₁\nB D : BilinForm R M\na : R\nx y : M\n⊢ (fun x y => bilin B x y + bilin D x y) (a • x) y = a * (fun x y => bilin B x y + bilin D x y) x y\n[PROOFSTEP]\nsimp only [smul_left, smul_left, mul_add]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD✝ : BilinForm R M\nD₁ : BilinForm R₁ M₁\nB D : BilinForm R M\nx y z : M\n⊢ (fun x y => bilin B x y + bilin D x y) x (y + z) =\n (fun x y => bilin B x y + bilin D x y) x y + (fun x y => bilin B x y + bilin D x y) x z\n[PROOFSTEP]\nsimp only [add_right, add_right, add_add_add_comm]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD✝ : BilinForm R M\nD₁ : BilinForm R₁ M₁\nB D : BilinForm R M\na : R\nx y : M\n⊢ (fun x y => bilin B x y + bilin D x y) x (a • y) = a * (fun x y => bilin B x y + bilin D x y) x y\n[PROOFSTEP]\nsimp only [smul_right, smul_right, mul_add]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\nα : Type ?u.105863\ninst✝² : Monoid α\ninst✝¹ : DistribMulAction α R\ninst✝ : SMulCommClass α R R\nc : α\nB : BilinForm R M\nx y z : M\n⊢ (fun x y => c • bilin B x y) (x + y) z = (fun x y => c • bilin B x y) x z + (fun x y => c • bilin B x y) y z\n[PROOFSTEP]\nsimp only [add_left, smul_add]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\nα : Type ?u.105863\ninst✝² : Monoid α\ninst✝¹ : DistribMulAction α R\ninst✝ : SMulCommClass α R R\nc : α\nB : BilinForm R M\na : R\nx y : M\n⊢ (fun x y => c • bilin B x y) (a • x) y = a * (fun x y => c • bilin B x y) x y\n[PROOFSTEP]\nsimp only [smul_left, mul_smul_comm]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\nα : Type ?u.105863\ninst✝² : Monoid α\ninst✝¹ : DistribMulAction α R\ninst✝ : SMulCommClass α R R\nc : α\nB : BilinForm R M\nx y z : M\n⊢ (fun x y => c • bilin B x y) x (y + z) = (fun x y => c • bilin B x y) x y + (fun x y => c • bilin B x y) x z\n[PROOFSTEP]\nsimp only [add_right, smul_add]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\nα : Type ?u.105863\ninst✝² : Monoid α\ninst✝¹ : DistribMulAction α R\ninst✝ : SMulCommClass α R R\nc : α\nB : BilinForm R M\na : R\nx y : M\n⊢ (fun x y => c • bilin B x y) x (a • y) = a * (fun x y => c • bilin B x y) x y\n[PROOFSTEP]\nsimp only [smul_right, mul_smul_comm]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ B : BilinForm R₁ M₁\nx y z : M₁\n⊢ (fun x y => -bilin B x y) (x + y) z = (fun x y => -bilin B x y) x z + (fun x y => -bilin B x y) y z\n[PROOFSTEP]\nsimp only [add_left, neg_add]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ B : BilinForm R₁ M₁\na : R₁\nx y : M₁\n⊢ (fun x y => -bilin B x y) (a • x) y = a * (fun x y => -bilin B x y) x y\n[PROOFSTEP]\nsimp only [smul_left, mul_neg]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ B : BilinForm R₁ M₁\nx y z : M₁\n⊢ (fun x y => -bilin B x y) x (y + z) = (fun x y => -bilin B x y) x y + (fun x y => -bilin B x y) x z\n[PROOFSTEP]\nsimp only [add_right, neg_add]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ B : BilinForm R₁ M₁\na : R₁\nx y : M₁\n⊢ (fun x y => -bilin B x y) x (a • y) = a * (fun x y => -bilin B x y) x y\n[PROOFSTEP]\nsimp only [smul_right, mul_neg]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD✝ : BilinForm R M\nD₁ B D : BilinForm R₁ M₁\nx y z : M₁\n⊢ (fun x y => bilin B x y - bilin D x y) (x + y) z =\n (fun x y => bilin B x y - bilin D x y) x z + (fun x y => bilin B x y - bilin D x y) y z\n[PROOFSTEP]\nsimp only [add_left, add_left, add_sub_add_comm]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD✝ : BilinForm R M\nD₁ B D : BilinForm R₁ M₁\na : R₁\nx y : M₁\n⊢ (fun x y => bilin B x y - bilin D x y) (a • x) y = a * (fun x y => bilin B x y - bilin D x y) x y\n[PROOFSTEP]\nsimp only [smul_left, smul_left, mul_sub]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD✝ : BilinForm R M\nD₁ B D : BilinForm R₁ M₁\nx y z : M₁\n⊢ (fun x y => bilin B x y - bilin D x y) x (y + z) =\n (fun x y => bilin B x y - bilin D x y) x y + (fun x y => bilin B x y - bilin D x y) x z\n[PROOFSTEP]\nsimp only [add_right, add_right, add_sub_add_comm]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD✝ : BilinForm R M\nD₁ B D : BilinForm R₁ M₁\na : R₁\nx y : M₁\n⊢ (fun x y => bilin B x y - bilin D x y) x (a • y) = a * (fun x y => bilin B x y - bilin D x y) x y\n[PROOFSTEP]\nsimp only [smul_right, smul_right, mul_sub]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹² : Ring R₁\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁹ : CommSemiring R₂\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁶ : CommRing R₃\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝ : Algebra R₂ R\nA₁ A₂ : BilinForm R M\n⊢ (fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })\n (A₁ + A₂) =\n (fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })\n A₁ +\n (fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })\n A₂\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u_1\nM : Type u_2\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹² : Ring R₁\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁹ : CommSemiring R₂\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁶ : CommRing R₃\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝ : Algebra R₂ R\nA₁ A₂ : BilinForm R M\nx✝ y✝ : M\n⊢ bilin\n ((fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })\n (A₁ + A₂))\n x✝ y✝ =\n bilin\n ((fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })\n A₁ +\n (fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })\n A₂)\n x✝ y✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹² : Ring R₁\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁹ : CommSemiring R₂\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁶ : CommRing R₃\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝ : Algebra R₂ R\nc : R₂\nA : BilinForm R M\n⊢ AddHom.toFun\n {\n toFun := fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) },\n map_add' :=\n (_ :\n ∀ (A₁ A₂ : BilinForm R M),\n (fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })\n (A₁ + A₂) =\n (fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })\n A₁ +\n (fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })\n A₂) }\n (c • A) =\n ↑(RingHom.id R₂) c •\n AddHom.toFun\n {\n toFun := fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) },\n map_add' :=\n (_ :\n ∀ (A₁ A₂ : BilinForm R M),\n (fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })\n (A₁ + A₂) =\n (fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })\n A₁ +\n (fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })\n A₂) }\n A\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u_1\nM : Type u_2\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹² : Ring R₁\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁹ : CommSemiring R₂\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁶ : CommRing R₃\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝ : Algebra R₂ R\nc : R₂\nA : BilinForm R M\nx✝ y✝ : M\n⊢ bilin\n (AddHom.toFun\n {\n toFun := fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) },\n map_add' :=\n (_ :\n ∀ (A₁ A₂ : BilinForm R M),\n (fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })\n (A₁ + A₂) =\n (fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })\n A₁ +\n (fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })\n A₂) }\n (c • A))\n x✝ y✝ =\n bilin\n (↑(RingHom.id R₂) c •\n AddHom.toFun\n {\n toFun := fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) },\n map_add' :=\n (_ :\n ∀ (A₁ A₂ : BilinForm R M),\n (fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })\n (A₁ + A₂) =\n (fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })\n A₁ +\n (fun A =>\n { bilin := fun i j => bilin A j i,\n bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),\n bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),\n bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),\n bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })\n A₂) }\n A)\n x✝ y✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹² : Ring R₁\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁹ : CommSemiring R₂\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁶ : CommRing R₃\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝ : Algebra R₂ R\nA : BilinForm R M\n⊢ ↑(flipHomAux R₂) (↑(flipHomAux R₂) A) = A\n[PROOFSTEP]\next A\n[GOAL]\ncase H\nR : Type u_1\nM : Type u_2\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹² : Ring R₁\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁹ : CommSemiring R₂\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁶ : CommRing R₃\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝ : Algebra R₂ R\nA✝ : BilinForm R M\nA y✝ : M\n⊢ bilin (↑(flipHomAux R₂) (↑(flipHomAux R₂) A✝)) A y✝ = bilin A✝ A y✝\n[PROOFSTEP]\nsimp [flipHomAux]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹² : Ring R₁\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁹ : CommSemiring R₂\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁶ : CommRing R₃\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝ : Algebra R₂ R\n⊢ LinearEquiv.trans (flipHom R₂) (flipHom R₂) = LinearEquiv.refl R₂ (BilinForm R M)\n[PROOFSTEP]\next A\n[GOAL]\ncase h.H\nR : Type u_1\nM : Type u_2\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹² : Ring R₁\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁹ : CommSemiring R₂\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁶ : CommRing R₃\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝ : Algebra R₂ R\nA : BilinForm R M\nx✝ y✝ : M\n⊢ bilin (↑(LinearEquiv.trans (flipHom R₂) (flipHom R₂)) A) x✝ y✝ =\n bilin (↑(LinearEquiv.refl R₂ (BilinForm R M)) A) x✝ y✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝² : Algebra R₂ R\ninst✝¹ : Module R₂ M\ninst✝ : IsScalarTower R₂ R M\nA : BilinForm R M\nx₁ x₂ x : M\n⊢ ↑(toLinHomAux₁ A (x₁ + x₂)) x = ↑(toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) x\n[PROOFSTEP]\nsimp only [toLinHomAux₁, LinearMap.coe_mk, LinearMap.add_apply, add_left, AddHom.coe_mk]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝² : Algebra R₂ R\ninst✝¹ : Module R₂ M\ninst✝ : IsScalarTower R₂ R M\nA : BilinForm R M\nc : R₂\nx : M\n⊢ ∀ (x_1 : M),\n ↑(AddHom.toFun\n { toFun := toLinHomAux₁ A,\n map_add' := (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) }\n (c • x))\n x_1 =\n ↑(↑(RingHom.id R₂) c •\n AddHom.toFun\n { toFun := toLinHomAux₁ A,\n map_add' := (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) }\n x)\n x_1\n[PROOFSTEP]\ndsimp [toLinHomAux₁]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝² : Algebra R₂ R\ninst✝¹ : Module R₂ M\ninst✝ : IsScalarTower R₂ R M\nA : BilinForm R M\nc : R₂\nx : M\n⊢ ∀ (x_1 : M), bilin A (c • x) x_1 = c • bilin A x x_1\n[PROOFSTEP]\nintros\n -- Porting note: moved out of `simp only`\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝² : Algebra R₂ R\ninst✝¹ : Module R₂ M\ninst✝ : IsScalarTower R₂ R M\nA : BilinForm R M\nc : R₂\nx x✝ : M\n⊢ bilin A (c • x) x✝ = c • bilin A x x✝\n[PROOFSTEP]\nrw [← algebraMap_smul R c x]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝² : Algebra R₂ R\ninst✝¹ : Module R₂ M\ninst✝ : IsScalarTower R₂ R M\nA : BilinForm R M\nc : R₂\nx x✝ : M\n⊢ bilin A (↑(algebraMap R₂ R) c • x) x✝ = c • bilin A x x✝\n[PROOFSTEP]\nsimp only [Algebra.smul_def, LinearMap.coe_mk, LinearMap.smul_apply, smul_left]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝² : Algebra R₂ R\ninst✝¹ : Module R₂ M\ninst✝ : IsScalarTower R₂ R M\nA₁ A₂ : BilinForm R M\nx : M\n⊢ ↑(toLinHomAux₂ (A₁ + A₂)) x = ↑(toLinHomAux₂ A₁ + toLinHomAux₂ A₂) x\n[PROOFSTEP]\ndsimp only [toLinHomAux₁, toLinHomAux₂]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝² : Algebra R₂ R\ninst✝¹ : Module R₂ M\ninst✝ : IsScalarTower R₂ R M\nA₁ A₂ : BilinForm R M\nx : M\n⊢ ↑{\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => bilin (A₁ + A₂) x y,\n map_add' :=\n (_ : ∀ (y z : M), bilin (A₁ + A₂) x (y + z) = bilin (A₁ + A₂) x y + bilin (A₁ + A₂) x z) },\n map_smul' := (_ : ∀ (c : R) (y : M), bilin (A₁ + A₂) x (c • y) = c * bilin (A₁ + A₂) x y) },\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (A₁ + A₂) (x₁ + x₂) = toLinHomAux₁ (A₁ + A₂) x₁ + toLinHomAux₁ (A₁ + A₂) x₂) },\n map_smul' :=\n (_ :\n ∀ (c : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ (A₁ + A₂),\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (A₁ + A₂) (x₁ + x₂) = toLinHomAux₁ (A₁ + A₂) x₁ + toLinHomAux₁ (A₁ + A₂) x₂) }\n (c • x) =\n ↑(RingHom.id R₂) c •\n AddHom.toFun\n { toFun := toLinHomAux₁ (A₁ + A₂),\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (A₁ + A₂) (x₁ + x₂) =\n toLinHomAux₁ (A₁ + A₂) x₁ + toLinHomAux₁ (A₁ + A₂) x₂) }\n x) }\n x =\n ↑({\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => bilin A₁ x y,\n map_add' := (_ : ∀ (y z : M), bilin A₁ x (y + z) = bilin A₁ x y + bilin A₁ x z) },\n map_smul' := (_ : ∀ (c : R) (y : M), bilin A₁ x (c • y) = c * bilin A₁ x y) },\n map_add' := (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A₁ (x₁ + x₂) = toLinHomAux₁ A₁ x₁ + toLinHomAux₁ A₁ x₂) },\n map_smul' :=\n (_ :\n ∀ (c : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ A₁,\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A₁ (x₁ + x₂) = toLinHomAux₁ A₁ x₁ + toLinHomAux₁ A₁ x₂) }\n (c • x) =\n ↑(RingHom.id R₂) c •\n AddHom.toFun\n { toFun := toLinHomAux₁ A₁,\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A₁ (x₁ + x₂) = toLinHomAux₁ A₁ x₁ + toLinHomAux₁ A₁ x₂) }\n x) } +\n {\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => bilin A₂ x y,\n map_add' := (_ : ∀ (y z : M), bilin A₂ x (y + z) = bilin A₂ x y + bilin A₂ x z) },\n map_smul' := (_ : ∀ (c : R) (y : M), bilin A₂ x (c • y) = c * bilin A₂ x y) },\n map_add' := (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A₂ (x₁ + x₂) = toLinHomAux₁ A₂ x₁ + toLinHomAux₁ A₂ x₂) },\n map_smul' :=\n (_ :\n ∀ (c : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ A₂,\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A₂ (x₁ + x₂) = toLinHomAux₁ A₂ x₁ + toLinHomAux₁ A₂ x₂) }\n (c • x) =\n ↑(RingHom.id R₂) c •\n AddHom.toFun\n { toFun := toLinHomAux₁ A₂,\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A₂ (x₁ + x₂) = toLinHomAux₁ A₂ x₁ + toLinHomAux₁ A₂ x₂) }\n x) })\n x\n[PROOFSTEP]\napply LinearMap.ext\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝² : Algebra R₂ R\ninst✝¹ : Module R₂ M\ninst✝ : IsScalarTower R₂ R M\nA₁ A₂ : BilinForm R M\nx : M\n⊢ ∀ (x_1 : M),\n ↑(↑{\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => bilin (A₁ + A₂) x y,\n map_add' :=\n (_ :\n ∀ (y z : M), bilin (A₁ + A₂) x (y + z) = bilin (A₁ + A₂) x y + bilin (A₁ + A₂) x z) },\n map_smul' := (_ : ∀ (c : R) (y : M), bilin (A₁ + A₂) x (c • y) = c * bilin (A₁ + A₂) x y) },\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (A₁ + A₂) (x₁ + x₂) = toLinHomAux₁ (A₁ + A₂) x₁ + toLinHomAux₁ (A₁ + A₂) x₂) },\n map_smul' :=\n (_ :\n ∀ (c : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ (A₁ + A₂),\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (A₁ + A₂) (x₁ + x₂) =\n toLinHomAux₁ (A₁ + A₂) x₁ + toLinHomAux₁ (A₁ + A₂) x₂) }\n (c • x) =\n ↑(RingHom.id R₂) c •\n AddHom.toFun\n { toFun := toLinHomAux₁ (A₁ + A₂),\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (A₁ + A₂) (x₁ + x₂) =\n toLinHomAux₁ (A₁ + A₂) x₁ + toLinHomAux₁ (A₁ + A₂) x₂) }\n x) }\n x)\n x_1 =\n ↑(↑({\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => bilin A₁ x y,\n map_add' := (_ : ∀ (y z : M), bilin A₁ x (y + z) = bilin A₁ x y + bilin A₁ x z) },\n map_smul' := (_ : ∀ (c : R) (y : M), bilin A₁ x (c • y) = c * bilin A₁ x y) },\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A₁ (x₁ + x₂) = toLinHomAux₁ A₁ x₁ + toLinHomAux₁ A₁ x₂) },\n map_smul' :=\n (_ :\n ∀ (c : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ A₁,\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M), toLinHomAux₁ A₁ (x₁ + x₂) = toLinHomAux₁ A₁ x₁ + toLinHomAux₁ A₁ x₂) }\n (c • x) =\n ↑(RingHom.id R₂) c •\n AddHom.toFun\n { toFun := toLinHomAux₁ A₁,\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ A₁ (x₁ + x₂) = toLinHomAux₁ A₁ x₁ + toLinHomAux₁ A₁ x₂) }\n x) } +\n {\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => bilin A₂ x y,\n map_add' := (_ : ∀ (y z : M), bilin A₂ x (y + z) = bilin A₂ x y + bilin A₂ x z) },\n map_smul' := (_ : ∀ (c : R) (y : M), bilin A₂ x (c • y) = c * bilin A₂ x y) },\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A₂ (x₁ + x₂) = toLinHomAux₁ A₂ x₁ + toLinHomAux₁ A₂ x₂) },\n map_smul' :=\n (_ :\n ∀ (c : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ A₂,\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M), toLinHomAux₁ A₂ (x₁ + x₂) = toLinHomAux₁ A₂ x₁ + toLinHomAux₁ A₂ x₂) }\n (c • x) =\n ↑(RingHom.id R₂) c •\n AddHom.toFun\n { toFun := toLinHomAux₁ A₂,\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ A₂ (x₁ + x₂) = toLinHomAux₁ A₂ x₁ + toLinHomAux₁ A₂ x₂) }\n x) })\n x)\n x_1\n[PROOFSTEP]\nintro y\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝² : Algebra R₂ R\ninst✝¹ : Module R₂ M\ninst✝ : IsScalarTower R₂ R M\nA₁ A₂ : BilinForm R M\nx y : M\n⊢ ↑(↑{\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => bilin (A₁ + A₂) x y,\n map_add' :=\n (_ : ∀ (y z : M), bilin (A₁ + A₂) x (y + z) = bilin (A₁ + A₂) x y + bilin (A₁ + A₂) x z) },\n map_smul' := (_ : ∀ (c : R) (y : M), bilin (A₁ + A₂) x (c • y) = c * bilin (A₁ + A₂) x y) },\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (A₁ + A₂) (x₁ + x₂) = toLinHomAux₁ (A₁ + A₂) x₁ + toLinHomAux₁ (A₁ + A₂) x₂) },\n map_smul' :=\n (_ :\n ∀ (c : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ (A₁ + A₂),\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (A₁ + A₂) (x₁ + x₂) =\n toLinHomAux₁ (A₁ + A₂) x₁ + toLinHomAux₁ (A₁ + A₂) x₂) }\n (c • x) =\n ↑(RingHom.id R₂) c •\n AddHom.toFun\n { toFun := toLinHomAux₁ (A₁ + A₂),\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (A₁ + A₂) (x₁ + x₂) =\n toLinHomAux₁ (A₁ + A₂) x₁ + toLinHomAux₁ (A₁ + A₂) x₂) }\n x) }\n x)\n y =\n ↑(↑({\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => bilin A₁ x y,\n map_add' := (_ : ∀ (y z : M), bilin A₁ x (y + z) = bilin A₁ x y + bilin A₁ x z) },\n map_smul' := (_ : ∀ (c : R) (y : M), bilin A₁ x (c • y) = c * bilin A₁ x y) },\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A₁ (x₁ + x₂) = toLinHomAux₁ A₁ x₁ + toLinHomAux₁ A₁ x₂) },\n map_smul' :=\n (_ :\n ∀ (c : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ A₁,\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A₁ (x₁ + x₂) = toLinHomAux₁ A₁ x₁ + toLinHomAux₁ A₁ x₂) }\n (c • x) =\n ↑(RingHom.id R₂) c •\n AddHom.toFun\n { toFun := toLinHomAux₁ A₁,\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M), toLinHomAux₁ A₁ (x₁ + x₂) = toLinHomAux₁ A₁ x₁ + toLinHomAux₁ A₁ x₂) }\n x) } +\n {\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => bilin A₂ x y,\n map_add' := (_ : ∀ (y z : M), bilin A₂ x (y + z) = bilin A₂ x y + bilin A₂ x z) },\n map_smul' := (_ : ∀ (c : R) (y : M), bilin A₂ x (c • y) = c * bilin A₂ x y) },\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A₂ (x₁ + x₂) = toLinHomAux₁ A₂ x₁ + toLinHomAux₁ A₂ x₂) },\n map_smul' :=\n (_ :\n ∀ (c : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ A₂,\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A₂ (x₁ + x₂) = toLinHomAux₁ A₂ x₁ + toLinHomAux₁ A₂ x₂) }\n (c • x) =\n ↑(RingHom.id R₂) c •\n AddHom.toFun\n { toFun := toLinHomAux₁ A₂,\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M), toLinHomAux₁ A₂ (x₁ + x₂) = toLinHomAux₁ A₂ x₁ + toLinHomAux₁ A₂ x₂) }\n x) })\n x)\n y\n[PROOFSTEP]\nsimp only [toLinHomAux₂, toLinHomAux₁, LinearMap.coe_mk, LinearMap.add_apply, add_apply, AddHom.coe_mk]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝² : Algebra R₂ R\ninst✝¹ : Module R₂ M\ninst✝ : IsScalarTower R₂ R M\nc : R₂\nA : BilinForm R M\n⊢ AddHom.toFun\n { toFun := toLinHomAux₂,\n map_add' := (_ : ∀ (A₁ A₂ : BilinForm R M), toLinHomAux₂ (A₁ + A₂) = toLinHomAux₂ A₁ + toLinHomAux₂ A₂) }\n (c • A) =\n ↑(RingHom.id R₂) c •\n AddHom.toFun\n { toFun := toLinHomAux₂,\n map_add' := (_ : ∀ (A₁ A₂ : BilinForm R M), toLinHomAux₂ (A₁ + A₂) = toLinHomAux₂ A₁ + toLinHomAux₂ A₂) }\n A\n[PROOFSTEP]\ndsimp [toLinHomAux₁, toLinHomAux₂]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝² : Algebra R₂ R\ninst✝¹ : Module R₂ M\ninst✝ : IsScalarTower R₂ R M\nc : R₂\nA : BilinForm R M\n⊢ {\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => c • bilin A x y,\n map_add' := (_ : ∀ (y z : M), bilin (c • A) x (y + z) = bilin (c • A) x y + bilin (c • A) x z) },\n map_smul' := (_ : ∀ (c_1 : R) (y : M), bilin (c • A) x (c_1 • y) = c_1 * bilin (c • A) x y) },\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ (c • A) (x₁ + x₂) = toLinHomAux₁ (c • A) x₁ + toLinHomAux₁ (c • A) x₂) },\n map_smul' :=\n (_ :\n ∀ (c_1 : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ (c • A),\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (c • A) (x₁ + x₂) = toLinHomAux₁ (c • A) x₁ + toLinHomAux₁ (c • A) x₂) }\n (c_1 • x) =\n ↑(RingHom.id R₂) c_1 •\n AddHom.toFun\n { toFun := toLinHomAux₁ (c • A),\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (c • A) (x₁ + x₂) = toLinHomAux₁ (c • A) x₁ + toLinHomAux₁ (c • A) x₂) }\n x) } =\n c •\n {\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => bilin A x y,\n map_add' := (_ : ∀ (y z : M), bilin A x (y + z) = bilin A x y + bilin A x z) },\n map_smul' := (_ : ∀ (c : R) (y : M), bilin A x (c • y) = c * bilin A x y) },\n map_add' := (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) },\n map_smul' :=\n (_ :\n ∀ (c : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ A,\n map_add' := (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) }\n (c • x) =\n ↑(RingHom.id R₂) c •\n AddHom.toFun\n { toFun := toLinHomAux₁ A,\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) }\n x) }\n[PROOFSTEP]\napply LinearMap.ext\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝² : Algebra R₂ R\ninst✝¹ : Module R₂ M\ninst✝ : IsScalarTower R₂ R M\nc : R₂\nA : BilinForm R M\n⊢ ∀ (x : M),\n ↑{\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => c • bilin A x y,\n map_add' :=\n (_ : ∀ (y z : M), bilin (c • A) x (y + z) = bilin (c • A) x y + bilin (c • A) x z) },\n map_smul' := (_ : ∀ (c_1 : R) (y : M), bilin (c • A) x (c_1 • y) = c_1 * bilin (c • A) x y) },\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (c • A) (x₁ + x₂) = toLinHomAux₁ (c • A) x₁ + toLinHomAux₁ (c • A) x₂) },\n map_smul' :=\n (_ :\n ∀ (c_1 : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ (c • A),\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (c • A) (x₁ + x₂) = toLinHomAux₁ (c • A) x₁ + toLinHomAux₁ (c • A) x₂) }\n (c_1 • x) =\n ↑(RingHom.id R₂) c_1 •\n AddHom.toFun\n { toFun := toLinHomAux₁ (c • A),\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (c • A) (x₁ + x₂) = toLinHomAux₁ (c • A) x₁ + toLinHomAux₁ (c • A) x₂) }\n x) }\n x =\n ↑(c •\n {\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => bilin A x y,\n map_add' := (_ : ∀ (y z : M), bilin A x (y + z) = bilin A x y + bilin A x z) },\n map_smul' := (_ : ∀ (c : R) (y : M), bilin A x (c • y) = c * bilin A x y) },\n map_add' := (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) },\n map_smul' :=\n (_ :\n ∀ (c : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ A,\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) }\n (c • x) =\n ↑(RingHom.id R₂) c •\n AddHom.toFun\n { toFun := toLinHomAux₁ A,\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) }\n x) })\n x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝² : Algebra R₂ R\ninst✝¹ : Module R₂ M\ninst✝ : IsScalarTower R₂ R M\nc : R₂\nA : BilinForm R M\nx : M\n⊢ ↑{\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => c • bilin A x y,\n map_add' := (_ : ∀ (y z : M), bilin (c • A) x (y + z) = bilin (c • A) x y + bilin (c • A) x z) },\n map_smul' := (_ : ∀ (c_1 : R) (y : M), bilin (c • A) x (c_1 • y) = c_1 * bilin (c • A) x y) },\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M), toLinHomAux₁ (c • A) (x₁ + x₂) = toLinHomAux₁ (c • A) x₁ + toLinHomAux₁ (c • A) x₂) },\n map_smul' :=\n (_ :\n ∀ (c_1 : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ (c • A),\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (c • A) (x₁ + x₂) = toLinHomAux₁ (c • A) x₁ + toLinHomAux₁ (c • A) x₂) }\n (c_1 • x) =\n ↑(RingHom.id R₂) c_1 •\n AddHom.toFun\n { toFun := toLinHomAux₁ (c • A),\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (c • A) (x₁ + x₂) = toLinHomAux₁ (c • A) x₁ + toLinHomAux₁ (c • A) x₂) }\n x) }\n x =\n ↑(c •\n {\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => bilin A x y,\n map_add' := (_ : ∀ (y z : M), bilin A x (y + z) = bilin A x y + bilin A x z) },\n map_smul' := (_ : ∀ (c : R) (y : M), bilin A x (c • y) = c * bilin A x y) },\n map_add' := (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) },\n map_smul' :=\n (_ :\n ∀ (c : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ A,\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) }\n (c • x) =\n ↑(RingHom.id R₂) c •\n AddHom.toFun\n { toFun := toLinHomAux₁ A,\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) }\n x) })\n x\n[PROOFSTEP]\napply LinearMap.ext\n[GOAL]\ncase h.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝² : Algebra R₂ R\ninst✝¹ : Module R₂ M\ninst✝ : IsScalarTower R₂ R M\nc : R₂\nA : BilinForm R M\nx : M\n⊢ ∀ (x_1 : M),\n ↑(↑{\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => c • bilin A x y,\n map_add' :=\n (_ : ∀ (y z : M), bilin (c • A) x (y + z) = bilin (c • A) x y + bilin (c • A) x z) },\n map_smul' := (_ : ∀ (c_1 : R) (y : M), bilin (c • A) x (c_1 • y) = c_1 * bilin (c • A) x y) },\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (c • A) (x₁ + x₂) = toLinHomAux₁ (c • A) x₁ + toLinHomAux₁ (c • A) x₂) },\n map_smul' :=\n (_ :\n ∀ (c_1 : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ (c • A),\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (c • A) (x₁ + x₂) = toLinHomAux₁ (c • A) x₁ + toLinHomAux₁ (c • A) x₂) }\n (c_1 • x) =\n ↑(RingHom.id R₂) c_1 •\n AddHom.toFun\n { toFun := toLinHomAux₁ (c • A),\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (c • A) (x₁ + x₂) =\n toLinHomAux₁ (c • A) x₁ + toLinHomAux₁ (c • A) x₂) }\n x) }\n x)\n x_1 =\n ↑(↑(c •\n {\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => bilin A x y,\n map_add' := (_ : ∀ (y z : M), bilin A x (y + z) = bilin A x y + bilin A x z) },\n map_smul' := (_ : ∀ (c : R) (y : M), bilin A x (c • y) = c * bilin A x y) },\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) },\n map_smul' :=\n (_ :\n ∀ (c : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ A,\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) }\n (c • x) =\n ↑(RingHom.id R₂) c •\n AddHom.toFun\n { toFun := toLinHomAux₁ A,\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) }\n x) })\n x)\n x_1\n[PROOFSTEP]\nintro y\n[GOAL]\ncase h.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nD : BilinForm R M\nD₁ : BilinForm R₁ M₁\ninst✝² : Algebra R₂ R\ninst✝¹ : Module R₂ M\ninst✝ : IsScalarTower R₂ R M\nc : R₂\nA : BilinForm R M\nx y : M\n⊢ ↑(↑{\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => c • bilin A x y,\n map_add' :=\n (_ : ∀ (y z : M), bilin (c • A) x (y + z) = bilin (c • A) x y + bilin (c • A) x z) },\n map_smul' := (_ : ∀ (c_1 : R) (y : M), bilin (c • A) x (c_1 • y) = c_1 * bilin (c • A) x y) },\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (c • A) (x₁ + x₂) = toLinHomAux₁ (c • A) x₁ + toLinHomAux₁ (c • A) x₂) },\n map_smul' :=\n (_ :\n ∀ (c_1 : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ (c • A),\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (c • A) (x₁ + x₂) = toLinHomAux₁ (c • A) x₁ + toLinHomAux₁ (c • A) x₂) }\n (c_1 • x) =\n ↑(RingHom.id R₂) c_1 •\n AddHom.toFun\n { toFun := toLinHomAux₁ (c • A),\n map_add' :=\n (_ :\n ∀ (x₁ x₂ : M),\n toLinHomAux₁ (c • A) (x₁ + x₂) = toLinHomAux₁ (c • A) x₁ + toLinHomAux₁ (c • A) x₂) }\n x) }\n x)\n y =\n ↑(↑(c •\n {\n toAddHom :=\n {\n toFun := fun x =>\n {\n toAddHom :=\n { toFun := fun y => bilin A x y,\n map_add' := (_ : ∀ (y z : M), bilin A x (y + z) = bilin A x y + bilin A x z) },\n map_smul' := (_ : ∀ (c : R) (y : M), bilin A x (c • y) = c * bilin A x y) },\n map_add' := (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) },\n map_smul' :=\n (_ :\n ∀ (c : R₂) (x : M),\n AddHom.toFun\n { toFun := toLinHomAux₁ A,\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) }\n (c • x) =\n ↑(RingHom.id R₂) c •\n AddHom.toFun\n { toFun := toLinHomAux₁ A,\n map_add' :=\n (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) }\n x) })\n x)\n y\n[PROOFSTEP]\nsimp only [toLinHomAux₂, toLinHomAux₁, LinearMap.coe_mk, LinearMap.smul_apply, smul_apply, AddHom.coe_mk]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nf : M₂ →ₗ[R₂] M₂ →ₗ[R₂] R₂\nx y z : M₂\n⊢ (fun x y => ↑(↑f x) y) (x + y) z = (fun x y => ↑(↑f x) y) x z + (fun x y => ↑(↑f x) y) y z\n[PROOFSTEP]\nsimp only\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nf : M₂ →ₗ[R₂] M₂ →ₗ[R₂] R₂\nx y z : M₂\n⊢ ↑(↑f (x + y)) z = ↑(↑f x) z + ↑(↑f y) z\n[PROOFSTEP]\nexact (LinearMap.map_add f x y).symm ▸ LinearMap.add_apply (f x) (f y) z\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nf : M₂ →ₗ[R₂] M₂ →ₗ[R₂] R₂\na : R₂\nx y : M₂\n⊢ (fun x y => ↑(↑f x) y) (a • x) y = a * (fun x y => ↑(↑f x) y) x y\n[PROOFSTEP]\nsimp only [LinearMap.map_smul, LinearMap.smul_apply, smul_eq_mul]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nsrc✝ : BilinForm R₂ M₂ →ₗ[R₂] M₂ →ₗ[R₂] M₂ →ₗ[R₂] R₂ := toLinHom R₂\nB : BilinForm R₂ M₂\n⊢ LinearMap.toBilinAux\n (AddHom.toFun\n { toAddHom := src✝.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R₂) (x : BilinForm R₂ M₂),\n AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R₂) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n B) =\n B\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nsrc✝ : BilinForm R₂ M₂ →ₗ[R₂] M₂ →ₗ[R₂] M₂ →ₗ[R₂] R₂ := toLinHom R₂\nB : BilinForm R₂ M₂\nx✝ y✝ : M₂\n⊢ bilin\n (LinearMap.toBilinAux\n (AddHom.toFun\n { toAddHom := src✝.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R₂) (x : BilinForm R₂ M₂),\n AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R₂) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n B))\n x✝ y✝ =\n bilin B x✝ y✝\n[PROOFSTEP]\nsimp [LinearMap.toBilinAux]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nsrc✝ : BilinForm R₂ M₂ →ₗ[R₂] M₂ →ₗ[R₂] M₂ →ₗ[R₂] R₂ := toLinHom R₂\nB : M₂ →ₗ[R₂] M₂ →ₗ[R₂] R₂\n⊢ AddHom.toFun\n { toAddHom := src✝.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R₂) (x : BilinForm R₂ M₂),\n AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R₂) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n (LinearMap.toBilinAux B) =\n B\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nsrc✝ : BilinForm R₂ M₂ →ₗ[R₂] M₂ →ₗ[R₂] M₂ →ₗ[R₂] R₂ := toLinHom R₂\nB : M₂ →ₗ[R₂] M₂ →ₗ[R₂] R₂\nx✝¹ x✝ : M₂\n⊢ ↑(↑(AddHom.toFun\n { toAddHom := src✝.toAddHom,\n map_smul' :=\n (_ :\n ∀ (r : R₂) (x : BilinForm R₂ M₂),\n AddHom.toFun src✝.toAddHom (r • x) =\n ↑(RingHom.id R₂) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n (LinearMap.toBilinAux B))\n x✝¹)\n x✝ =\n ↑(↑B x✝¹) x✝\n[PROOFSTEP]\nsimp [LinearMap.toBilinAux]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nR' : Type u_11\ninst✝³ : CommSemiring R'\ninst✝² : Algebra R' R\ninst✝¹ : Module R' M\ninst✝ : IsScalarTower R' R M\nf : R →ₗ[R'] R'\nB : BilinForm R M\nx y z : M\n⊢ (fun x y => ↑f (BilinForm.bilin B x y)) (x + y) z =\n (fun x y => ↑f (BilinForm.bilin B x y)) x z + (fun x y => ↑f (BilinForm.bilin B x y)) y z\n[PROOFSTEP]\nsimp only [BilinForm.add_left, map_add]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nR' : Type u_11\ninst✝³ : CommSemiring R'\ninst✝² : Algebra R' R\ninst✝¹ : Module R' M\ninst✝ : IsScalarTower R' R M\nf : R →ₗ[R'] R'\nB : BilinForm R M\nr : R'\nx y : M\n⊢ (fun x y => ↑f (BilinForm.bilin B x y)) (r • x) y = r * (fun x y => ↑f (BilinForm.bilin B x y)) x y\n[PROOFSTEP]\nsimp only\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nR' : Type u_11\ninst✝³ : CommSemiring R'\ninst✝² : Algebra R' R\ninst✝¹ : Module R' M\ninst✝ : IsScalarTower R' R M\nf : R →ₗ[R'] R'\nB : BilinForm R M\nr : R'\nx y : M\n⊢ ↑f (BilinForm.bilin B (r • x) y) = r * ↑f (BilinForm.bilin B x y)\n[PROOFSTEP]\nrw [← smul_one_smul R r (_ : M), BilinForm.smul_left, smul_one_mul r (_ : R), map_smul, smul_eq_mul]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nR' : Type u_11\ninst✝³ : CommSemiring R'\ninst✝² : Algebra R' R\ninst✝¹ : Module R' M\ninst✝ : IsScalarTower R' R M\nf : R →ₗ[R'] R'\nB : BilinForm R M\nx y z : M\n⊢ (fun x y => ↑f (BilinForm.bilin B x y)) x (y + z) =\n (fun x y => ↑f (BilinForm.bilin B x y)) x y + (fun x y => ↑f (BilinForm.bilin B x y)) x z\n[PROOFSTEP]\nsimp only [BilinForm.add_right, map_add]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nR' : Type u_11\ninst✝³ : CommSemiring R'\ninst✝² : Algebra R' R\ninst✝¹ : Module R' M\ninst✝ : IsScalarTower R' R M\nf : R →ₗ[R'] R'\nB : BilinForm R M\nr : R'\nx y : M\n⊢ (fun x y => ↑f (BilinForm.bilin B x y)) x (r • y) = r * (fun x y => ↑f (BilinForm.bilin B x y)) x y\n[PROOFSTEP]\nsimp only\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nR' : Type u_11\ninst✝³ : CommSemiring R'\ninst✝² : Algebra R' R\ninst✝¹ : Module R' M\ninst✝ : IsScalarTower R' R M\nf : R →ₗ[R'] R'\nB : BilinForm R M\nr : R'\nx y : M\n⊢ ↑f (BilinForm.bilin B x (r • y)) = r * ↑f (BilinForm.bilin B x y)\n[PROOFSTEP]\nrw [← smul_one_smul R r (_ : M), BilinForm.smul_right, smul_one_mul r (_ : R), map_smul, smul_eq_mul]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB : BilinForm R M'\nl r : M →ₗ[R] M'\nx y z : M\n⊢ (fun x y => bilin B (↑l x) (↑r y)) (x + y) z =\n (fun x y => bilin B (↑l x) (↑r y)) x z + (fun x y => bilin B (↑l x) (↑r y)) y z\n[PROOFSTEP]\nsimp only [LinearMap.map_add, add_left]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB : BilinForm R M'\nl r : M →ₗ[R] M'\nx : R\ny z : M\n⊢ (fun x y => bilin B (↑l x) (↑r y)) (x • y) z = x * (fun x y => bilin B (↑l x) (↑r y)) y z\n[PROOFSTEP]\nsimp only [LinearMap.map_smul, smul_left]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB : BilinForm R M'\nl r : M →ₗ[R] M'\nx y z : M\n⊢ (fun x y => bilin B (↑l x) (↑r y)) x (y + z) =\n (fun x y => bilin B (↑l x) (↑r y)) x y + (fun x y => bilin B (↑l x) (↑r y)) x z\n[PROOFSTEP]\nsimp only [LinearMap.map_add, add_right]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB : BilinForm R M'\nl r : M →ₗ[R] M'\nx : R\ny z : M\n⊢ (fun x y => bilin B (↑l x) (↑r y)) y (x • z) = x * (fun x y => bilin B (↑l x) (↑r y)) y z\n[PROOFSTEP]\nsimp only [LinearMap.map_smul, smul_right]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB : BilinForm R M\nr : M →ₗ[R] M\n⊢ comp B LinearMap.id r = compRight B r\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB : BilinForm R M\nr : M →ₗ[R] M\nx✝ y✝ : M\n⊢ bilin (comp B LinearMap.id r) x✝ y✝ = bilin (compRight B r) x✝ y✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB : BilinForm R M\nl : M →ₗ[R] M\n⊢ comp B l LinearMap.id = compLeft B l\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB : BilinForm R M\nl : M →ₗ[R] M\nx✝ y✝ : M\n⊢ bilin (comp B l LinearMap.id) x✝ y✝ = bilin (compLeft B l) x✝ y✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB : BilinForm R M\n⊢ compLeft B LinearMap.id = B\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB : BilinForm R M\nx✝ y✝ : M\n⊢ bilin (compLeft B LinearMap.id) x✝ y✝ = bilin B x✝ y✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB : BilinForm R M\n⊢ compRight B LinearMap.id = B\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB : BilinForm R M\nx✝ y✝ : M\n⊢ bilin (compRight B LinearMap.id) x✝ y✝ = bilin B x✝ y✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB : BilinForm R M\n⊢ comp B LinearMap.id LinearMap.id = B\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB : BilinForm R M\nx✝ y✝ : M\n⊢ bilin (comp B LinearMap.id LinearMap.id) x✝ y✝ = bilin B x✝ y✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁✝ : BilinForm R₁ M₁\nB₂✝ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB₁ B₂ : BilinForm R M'\nl r : M →ₗ[R] M'\nhₗ : Function.Surjective ↑l\nhᵣ : Function.Surjective ↑r\n⊢ comp B₁ l r = comp B₂ l r ↔ B₁ = B₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁✝ : BilinForm R₁ M₁\nB₂✝ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB₁ B₂ : BilinForm R M'\nl r : M →ₗ[R] M'\nhₗ : Function.Surjective ↑l\nhᵣ : Function.Surjective ↑r\n⊢ comp B₁ l r = comp B₂ l r → B₁ = B₂\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁✝ : BilinForm R₁ M₁\nB₂✝ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB₁ B₂ : BilinForm R M'\nl r : M →ₗ[R] M'\nhₗ : Function.Surjective ↑l\nhᵣ : Function.Surjective ↑r\n⊢ B₁ = B₂ → comp B₁ l r = comp B₂ l r\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁✝ : BilinForm R₁ M₁\nB₂✝ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB₁ B₂ : BilinForm R M'\nl r : M →ₗ[R] M'\nhₗ : Function.Surjective ↑l\nhᵣ : Function.Surjective ↑r\nh : comp B₁ l r = comp B₂ l r\n⊢ B₁ = B₂\n[PROOFSTEP]\next x y\n[GOAL]\ncase mp.H\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁✝ : BilinForm R₁ M₁\nB₂✝ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB₁ B₂ : BilinForm R M'\nl r : M →ₗ[R] M'\nhₗ : Function.Surjective ↑l\nhᵣ : Function.Surjective ↑r\nh : comp B₁ l r = comp B₂ l r\nx y : M'\n⊢ bilin B₁ x y = bilin B₂ x y\n[PROOFSTEP]\ncases' hₗ x with x' hx\n[GOAL]\ncase mp.H.intro\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁✝ : BilinForm R₁ M₁\nB₂✝ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB₁ B₂ : BilinForm R M'\nl r : M →ₗ[R] M'\nhₗ : Function.Surjective ↑l\nhᵣ : Function.Surjective ↑r\nh : comp B₁ l r = comp B₂ l r\nx y : M'\nx' : M\nhx : ↑l x' = x\n⊢ bilin B₁ x y = bilin B₂ x y\n[PROOFSTEP]\nsubst hx\n[GOAL]\ncase mp.H.intro\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁✝ : BilinForm R₁ M₁\nB₂✝ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB₁ B₂ : BilinForm R M'\nl r : M →ₗ[R] M'\nhₗ : Function.Surjective ↑l\nhᵣ : Function.Surjective ↑r\nh : comp B₁ l r = comp B₂ l r\ny : M'\nx' : M\n⊢ bilin B₁ (↑l x') y = bilin B₂ (↑l x') y\n[PROOFSTEP]\ncases' hᵣ y with y' hy\n[GOAL]\ncase mp.H.intro.intro\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁✝ : BilinForm R₁ M₁\nB₂✝ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB₁ B₂ : BilinForm R M'\nl r : M →ₗ[R] M'\nhₗ : Function.Surjective ↑l\nhᵣ : Function.Surjective ↑r\nh : comp B₁ l r = comp B₂ l r\ny : M'\nx' y' : M\nhy : ↑r y' = y\n⊢ bilin B₁ (↑l x') y = bilin B₂ (↑l x') y\n[PROOFSTEP]\nsubst hy\n[GOAL]\ncase mp.H.intro.intro\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁✝ : BilinForm R₁ M₁\nB₂✝ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB₁ B₂ : BilinForm R M'\nl r : M →ₗ[R] M'\nhₗ : Function.Surjective ↑l\nhᵣ : Function.Surjective ↑r\nh : comp B₁ l r = comp B₂ l r\nx' y' : M\n⊢ bilin B₁ (↑l x') (↑r y') = bilin B₂ (↑l x') (↑r y')\n[PROOFSTEP]\nrw [← comp_apply, ← comp_apply, h]\n[GOAL]\ncase mpr\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁✝ : BilinForm R₁ M₁\nB₂✝ : BilinForm R₂ M₂\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB₁ B₂ : BilinForm R M'\nl r : M →ₗ[R] M'\nhₗ : Function.Surjective ↑l\nhᵣ : Function.Surjective ↑r\nh : B₁ = B₂\n⊢ comp B₁ l r = comp B₂ l r\n[PROOFSTEP]\nrw [h]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\ne : M₂ ≃ₗ[R₂] M₂'\nB B' : BilinForm R₂ M₂\nx y : M₂'\n⊢ bilin ((fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) (B + B')) x y =\n bilin\n ((fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) B +\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) B')\n x y\n[PROOFSTEP]\nsimp only [comp_apply, add_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\ne : M₂ ≃ₗ[R₂] M₂'\nB : R₂\nB' : BilinForm R₂ M₂\nx y : M₂'\n⊢ bilin\n (AddHom.toFun\n { toFun := fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e),\n map_add' :=\n (_ :\n ∀ (B B' : BilinForm R₂ M₂),\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) (B + B') =\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) B +\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) B') }\n (B • B'))\n x y =\n bilin\n (↑(RingHom.id R₂) B •\n AddHom.toFun\n { toFun := fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e),\n map_add' :=\n (_ :\n ∀ (B B' : BilinForm R₂ M₂),\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) (B + B') =\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) B +\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) B') }\n B')\n x y\n[PROOFSTEP]\nsimp [comp_apply, smul_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\ne : M₂ ≃ₗ[R₂] M₂'\nB : BilinForm R₂ M₂\nx y : M₂\n⊢ bilin\n ((fun B => comp B ↑e ↑e)\n (AddHom.toFun\n {\n toAddHom :=\n { toFun := fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e),\n map_add' :=\n (_ :\n ∀ (B B' : BilinForm R₂ M₂),\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) (B + B') =\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) B +\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) B') },\n map_smul' :=\n (_ :\n ∀ (B : R₂) (B' : BilinForm R₂ M₂),\n AddHom.toFun\n { toFun := fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e),\n map_add' :=\n (_ :\n ∀ (B B' : BilinForm R₂ M₂),\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) (B + B') =\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) B +\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) B') }\n (B • B') =\n ↑(RingHom.id R₂) B •\n AddHom.toFun\n { toFun := fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e),\n map_add' :=\n (_ :\n ∀ (B B' : BilinForm R₂ M₂),\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) (B + B') =\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) B +\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) B') }\n B') }.toAddHom\n B))\n x y =\n bilin B x y\n[PROOFSTEP]\nsimp only [comp_apply, LinearEquiv.coe_coe, e.symm_apply_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\ne : M₂ ≃ₗ[R₂] M₂'\nB : BilinForm R₂ M₂'\nx y : M₂'\n⊢ bilin\n (AddHom.toFun\n {\n toAddHom :=\n { toFun := fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e),\n map_add' :=\n (_ :\n ∀ (B B' : BilinForm R₂ M₂),\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) (B + B') =\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) B +\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) B') },\n map_smul' :=\n (_ :\n ∀ (B : R₂) (B' : BilinForm R₂ M₂),\n AddHom.toFun\n { toFun := fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e),\n map_add' :=\n (_ :\n ∀ (B B' : BilinForm R₂ M₂),\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) (B + B') =\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) B +\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) B') }\n (B • B') =\n ↑(RingHom.id R₂) B •\n AddHom.toFun\n { toFun := fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e),\n map_add' :=\n (_ :\n ∀ (B B' : BilinForm R₂ M₂),\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) (B + B') =\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) B +\n (fun B => comp B ↑(LinearEquiv.symm e) ↑(LinearEquiv.symm e)) B') }\n B') }.toAddHom\n ((fun B => comp B ↑e ↑e) B))\n x y =\n bilin B x y\n[PROOFSTEP]\nsimp only [comp_apply, LinearEquiv.coe_coe, e.apply_symm_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\ne : M₂ ≃ₗ[R₂] M₂'\n⊢ LinearEquiv.symm (congr e) = congr (LinearEquiv.symm e)\n[PROOFSTEP]\next\n[GOAL]\ncase h.H\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\ne : M₂ ≃ₗ[R₂] M₂'\nx✝¹ : BilinForm R₂ M₂'\nx✝ y✝ : M₂\n⊢ bilin (↑(LinearEquiv.symm (congr e)) x✝¹) x✝ y✝ = bilin (↑(congr (LinearEquiv.symm e)) x✝¹) x✝ y✝\n[PROOFSTEP]\nsimp only [congr_apply, LinearEquiv.symm_symm]\n[GOAL]\ncase h.H\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\ne : M₂ ≃ₗ[R₂] M₂'\nx✝¹ : BilinForm R₂ M₂'\nx✝ y✝ : M₂\n⊢ bilin (↑(LinearEquiv.symm (congr e)) x✝¹) x✝ y✝ = bilin x✝¹ (↑e x✝) (↑e y✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\nf g : M₂ →ₗ[R₂] R₂\nx y z : M₂\n⊢ (fun x y => ↑f x * ↑g y) (x + y) z = (fun x y => ↑f x * ↑g y) x z + (fun x y => ↑f x * ↑g y) y z\n[PROOFSTEP]\nsimp only [LinearMap.map_add, add_mul]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\nf g : M₂ →ₗ[R₂] R₂\nx : R₂\ny z : M₂\n⊢ (fun x y => ↑f x * ↑g y) (x • y) z = x * (fun x y => ↑f x * ↑g y) y z\n[PROOFSTEP]\nsimp only [LinearMap.map_smul, smul_eq_mul, mul_assoc]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\nf g : M₂ →ₗ[R₂] R₂\nx y z : M₂\n⊢ (fun x y => ↑f x * ↑g y) x (y + z) = (fun x y => ↑f x * ↑g y) x y + (fun x y => ↑f x * ↑g y) x z\n[PROOFSTEP]\nsimp only [LinearMap.map_add, mul_add]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\nf g : M₂ →ₗ[R₂] R₂\nx : R₂\ny z : M₂\n⊢ (fun x y => ↑f x * ↑g y) y (x • z) = x * (fun x y => ↑f x * ↑g y) y z\n[PROOFSTEP]\nsimp only [LinearMap.map_smul, smul_eq_mul, mul_left_comm]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²² : Semiring R\ninst✝²¹ : AddCommMonoid M\ninst✝²⁰ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁹ : Ring R₁\ninst✝¹⁸ : AddCommGroup M₁\ninst✝¹⁷ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁶ : CommSemiring R₂\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹³ : CommRing R₃\ninst✝¹² : AddCommGroup M₃\ninst✝¹¹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹⁰ : Field K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁷ : AddCommMonoid M₂'\ninst✝⁶ : AddCommMonoid M₂''\ninst✝⁵ : Module R₂ M₂'\ninst✝⁴ : Module R₂ M₂''\nR₄ : Type u_13\nM₄ : Type u_14\ninst✝³ : Ring R₄\ninst✝² : IsDomain R₄\ninst✝¹ : AddCommGroup M₄\ninst✝ : Module R₄ M₄\nG : BilinForm R₄ M₄\nx y : M₄\na : R₄\nha : a ≠ 0\n⊢ IsOrtho G (a • x) y ↔ IsOrtho G x y\n[PROOFSTEP]\ndsimp only [IsOrtho]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²² : Semiring R\ninst✝²¹ : AddCommMonoid M\ninst✝²⁰ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁹ : Ring R₁\ninst✝¹⁸ : AddCommGroup M₁\ninst✝¹⁷ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁶ : CommSemiring R₂\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹³ : CommRing R₃\ninst✝¹² : AddCommGroup M₃\ninst✝¹¹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹⁰ : Field K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁷ : AddCommMonoid M₂'\ninst✝⁶ : AddCommMonoid M₂''\ninst✝⁵ : Module R₂ M₂'\ninst✝⁴ : Module R₂ M₂''\nR₄ : Type u_13\nM₄ : Type u_14\ninst✝³ : Ring R₄\ninst✝² : IsDomain R₄\ninst✝¹ : AddCommGroup M₄\ninst✝ : Module R₄ M₄\nG : BilinForm R₄ M₄\nx y : M₄\na : R₄\nha : a ≠ 0\n⊢ bilin G (a • x) y = 0 ↔ bilin G x y = 0\n[PROOFSTEP]\nrw [smul_left, mul_eq_zero, or_iff_right ha]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²² : Semiring R\ninst✝²¹ : AddCommMonoid M\ninst✝²⁰ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁹ : Ring R₁\ninst✝¹⁸ : AddCommGroup M₁\ninst✝¹⁷ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁶ : CommSemiring R₂\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹³ : CommRing R₃\ninst✝¹² : AddCommGroup M₃\ninst✝¹¹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹⁰ : Field K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁷ : AddCommMonoid M₂'\ninst✝⁶ : AddCommMonoid M₂''\ninst✝⁵ : Module R₂ M₂'\ninst✝⁴ : Module R₂ M₂''\nR₄ : Type u_13\nM₄ : Type u_14\ninst✝³ : Ring R₄\ninst✝² : IsDomain R₄\ninst✝¹ : AddCommGroup M₄\ninst✝ : Module R₄ M₄\nG : BilinForm R₄ M₄\nx y : M₄\na : R₄\nha : a ≠ 0\n⊢ IsOrtho G x (a • y) ↔ IsOrtho G x y\n[PROOFSTEP]\ndsimp only [IsOrtho]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²² : Semiring R\ninst✝²¹ : AddCommMonoid M\ninst✝²⁰ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁹ : Ring R₁\ninst✝¹⁸ : AddCommGroup M₁\ninst✝¹⁷ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁶ : CommSemiring R₂\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹³ : CommRing R₃\ninst✝¹² : AddCommGroup M₃\ninst✝¹¹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹⁰ : Field K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁷ : AddCommMonoid M₂'\ninst✝⁶ : AddCommMonoid M₂''\ninst✝⁵ : Module R₂ M₂'\ninst✝⁴ : Module R₂ M₂''\nR₄ : Type u_13\nM₄ : Type u_14\ninst✝³ : Ring R₄\ninst✝² : IsDomain R₄\ninst✝¹ : AddCommGroup M₄\ninst✝ : Module R₄ M₄\nG : BilinForm R₄ M₄\nx y : M₄\na : R₄\nha : a ≠ 0\n⊢ bilin G x (a • y) = 0 ↔ bilin G x y = 0\n[PROOFSTEP]\nrw [smul_right, mul_eq_zero, or_iff_right ha]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²² : Semiring R\ninst✝²¹ : AddCommMonoid M\ninst✝²⁰ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁹ : Ring R₁\ninst✝¹⁸ : AddCommGroup M₁\ninst✝¹⁷ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁶ : CommSemiring R₂\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹³ : CommRing R₃\ninst✝¹² : AddCommGroup M₃\ninst✝¹¹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹⁰ : Field K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁷ : AddCommMonoid M₂'\ninst✝⁶ : AddCommMonoid M₂''\ninst✝⁵ : Module R₂ M₂'\ninst✝⁴ : Module R₂ M₂''\nR₄ : Type u_13\nM₄ : Type u_14\ninst✝³ : Ring R₄\ninst✝² : IsDomain R₄\ninst✝¹ : AddCommGroup M₄\ninst✝ : Module R₄ M₄\nG : BilinForm R₄ M₄\nn : Type w\nB : BilinForm K V\nv : n → V\nhv₁ : iIsOrtho B v\nhv₂ : ∀ (i : n), ¬IsOrtho B (v i) (v i)\n⊢ LinearIndependent K v\n[PROOFSTEP]\nclassical\nrw [linearIndependent_iff']\nintro s w hs i hi\nhave : B (s.sum fun i : n => w i • v i) (v i) = 0 := by rw [hs, zero_left]\nhave hsum : (s.sum fun j : n => w j * B (v j) (v i)) = w i * B (v i) (v i) :=\n by\n apply Finset.sum_eq_single_of_mem i hi\n intro j _ hij\n rw [iIsOrtho_def.1 hv₁ _ _ hij, mul_zero]\nsimp_rw [sum_left, smul_left, hsum] at this \nexact eq_zero_of_ne_zero_of_mul_right_eq_zero (hv₂ i) this\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²² : Semiring R\ninst✝²¹ : AddCommMonoid M\ninst✝²⁰ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁹ : Ring R₁\ninst✝¹⁸ : AddCommGroup M₁\ninst✝¹⁷ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁶ : CommSemiring R₂\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹³ : CommRing R₃\ninst✝¹² : AddCommGroup M₃\ninst✝¹¹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹⁰ : Field K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁷ : AddCommMonoid M₂'\ninst✝⁶ : AddCommMonoid M₂''\ninst✝⁵ : Module R₂ M₂'\ninst✝⁴ : Module R₂ M₂''\nR₄ : Type u_13\nM₄ : Type u_14\ninst✝³ : Ring R₄\ninst✝² : IsDomain R₄\ninst✝¹ : AddCommGroup M₄\ninst✝ : Module R₄ M₄\nG : BilinForm R₄ M₄\nn : Type w\nB : BilinForm K V\nv : n → V\nhv₁ : iIsOrtho B v\nhv₂ : ∀ (i : n), ¬IsOrtho B (v i) (v i)\n⊢ LinearIndependent K v\n[PROOFSTEP]\nrw [linearIndependent_iff']\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²² : Semiring R\ninst✝²¹ : AddCommMonoid M\ninst✝²⁰ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁹ : Ring R₁\ninst✝¹⁸ : AddCommGroup M₁\ninst✝¹⁷ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁶ : CommSemiring R₂\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹³ : CommRing R₃\ninst✝¹² : AddCommGroup M₃\ninst✝¹¹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹⁰ : Field K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁷ : AddCommMonoid M₂'\ninst✝⁶ : AddCommMonoid M₂''\ninst✝⁵ : Module R₂ M₂'\ninst✝⁴ : Module R₂ M₂''\nR₄ : Type u_13\nM₄ : Type u_14\ninst✝³ : Ring R₄\ninst✝² : IsDomain R₄\ninst✝¹ : AddCommGroup M₄\ninst✝ : Module R₄ M₄\nG : BilinForm R₄ M₄\nn : Type w\nB : BilinForm K V\nv : n → V\nhv₁ : iIsOrtho B v\nhv₂ : ∀ (i : n), ¬IsOrtho B (v i) (v i)\n⊢ ∀ (s : Finset n) (g : n → K), ∑ i in s, g i • v i = 0 → ∀ (i : n), i ∈ s → g i = 0\n[PROOFSTEP]\nintro s w hs i hi\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²² : Semiring R\ninst✝²¹ : AddCommMonoid M\ninst✝²⁰ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁹ : Ring R₁\ninst✝¹⁸ : AddCommGroup M₁\ninst✝¹⁷ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁶ : CommSemiring R₂\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹³ : CommRing R₃\ninst✝¹² : AddCommGroup M₃\ninst✝¹¹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹⁰ : Field K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁷ : AddCommMonoid M₂'\ninst✝⁶ : AddCommMonoid M₂''\ninst✝⁵ : Module R₂ M₂'\ninst✝⁴ : Module R₂ M₂''\nR₄ : Type u_13\nM₄ : Type u_14\ninst✝³ : Ring R₄\ninst✝² : IsDomain R₄\ninst✝¹ : AddCommGroup M₄\ninst✝ : Module R₄ M₄\nG : BilinForm R₄ M₄\nn : Type w\nB : BilinForm K V\nv : n → V\nhv₁ : iIsOrtho B v\nhv₂ : ∀ (i : n), ¬IsOrtho B (v i) (v i)\ns : Finset n\nw : n → K\nhs : ∑ i in s, w i • v i = 0\ni : n\nhi : i ∈ s\n⊢ w i = 0\n[PROOFSTEP]\nhave : B (s.sum fun i : n => w i • v i) (v i) = 0 := by rw [hs, zero_left]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²² : Semiring R\ninst✝²¹ : AddCommMonoid M\ninst✝²⁰ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁹ : Ring R₁\ninst✝¹⁸ : AddCommGroup M₁\ninst✝¹⁷ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁶ : CommSemiring R₂\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹³ : CommRing R₃\ninst✝¹² : AddCommGroup M₃\ninst✝¹¹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹⁰ : Field K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁷ : AddCommMonoid M₂'\ninst✝⁶ : AddCommMonoid M₂''\ninst✝⁵ : Module R₂ M₂'\ninst✝⁴ : Module R₂ M₂''\nR₄ : Type u_13\nM₄ : Type u_14\ninst✝³ : Ring R₄\ninst✝² : IsDomain R₄\ninst✝¹ : AddCommGroup M₄\ninst✝ : Module R₄ M₄\nG : BilinForm R₄ M₄\nn : Type w\nB : BilinForm K V\nv : n → V\nhv₁ : iIsOrtho B v\nhv₂ : ∀ (i : n), ¬IsOrtho B (v i) (v i)\ns : Finset n\nw : n → K\nhs : ∑ i in s, w i • v i = 0\ni : n\nhi : i ∈ s\n⊢ bilin B (∑ i in s, w i • v i) (v i) = 0\n[PROOFSTEP]\nrw [hs, zero_left]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²² : Semiring R\ninst✝²¹ : AddCommMonoid M\ninst✝²⁰ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁹ : Ring R₁\ninst✝¹⁸ : AddCommGroup M₁\ninst✝¹⁷ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁶ : CommSemiring R₂\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹³ : CommRing R₃\ninst✝¹² : AddCommGroup M₃\ninst✝¹¹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹⁰ : Field K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁷ : AddCommMonoid M₂'\ninst✝⁶ : AddCommMonoid M₂''\ninst✝⁵ : Module R₂ M₂'\ninst✝⁴ : Module R₂ M₂''\nR₄ : Type u_13\nM₄ : Type u_14\ninst✝³ : Ring R₄\ninst✝² : IsDomain R₄\ninst✝¹ : AddCommGroup M₄\ninst✝ : Module R₄ M₄\nG : BilinForm R₄ M₄\nn : Type w\nB : BilinForm K V\nv : n → V\nhv₁ : iIsOrtho B v\nhv₂ : ∀ (i : n), ¬IsOrtho B (v i) (v i)\ns : Finset n\nw : n → K\nhs : ∑ i in s, w i • v i = 0\ni : n\nhi : i ∈ s\nthis : bilin B (∑ i in s, w i • v i) (v i) = 0\n⊢ w i = 0\n[PROOFSTEP]\nhave hsum : (s.sum fun j : n => w j * B (v j) (v i)) = w i * B (v i) (v i) :=\n by\n apply Finset.sum_eq_single_of_mem i hi\n intro j _ hij\n rw [iIsOrtho_def.1 hv₁ _ _ hij, mul_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²² : Semiring R\ninst✝²¹ : AddCommMonoid M\ninst✝²⁰ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁹ : Ring R₁\ninst✝¹⁸ : AddCommGroup M₁\ninst✝¹⁷ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁶ : CommSemiring R₂\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹³ : CommRing R₃\ninst✝¹² : AddCommGroup M₃\ninst✝¹¹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹⁰ : Field K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁷ : AddCommMonoid M₂'\ninst✝⁶ : AddCommMonoid M₂''\ninst✝⁵ : Module R₂ M₂'\ninst✝⁴ : Module R₂ M₂''\nR₄ : Type u_13\nM₄ : Type u_14\ninst✝³ : Ring R₄\ninst✝² : IsDomain R₄\ninst✝¹ : AddCommGroup M₄\ninst✝ : Module R₄ M₄\nG : BilinForm R₄ M₄\nn : Type w\nB : BilinForm K V\nv : n → V\nhv₁ : iIsOrtho B v\nhv₂ : ∀ (i : n), ¬IsOrtho B (v i) (v i)\ns : Finset n\nw : n → K\nhs : ∑ i in s, w i • v i = 0\ni : n\nhi : i ∈ s\nthis : bilin B (∑ i in s, w i • v i) (v i) = 0\n⊢ ∑ j in s, w j * bilin B (v j) (v i) = w i * bilin B (v i) (v i)\n[PROOFSTEP]\napply Finset.sum_eq_single_of_mem i hi\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²² : Semiring R\ninst✝²¹ : AddCommMonoid M\ninst✝²⁰ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁹ : Ring R₁\ninst✝¹⁸ : AddCommGroup M₁\ninst✝¹⁷ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁶ : CommSemiring R₂\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹³ : CommRing R₃\ninst✝¹² : AddCommGroup M₃\ninst✝¹¹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹⁰ : Field K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁷ : AddCommMonoid M₂'\ninst✝⁶ : AddCommMonoid M₂''\ninst✝⁵ : Module R₂ M₂'\ninst✝⁴ : Module R₂ M₂''\nR₄ : Type u_13\nM₄ : Type u_14\ninst✝³ : Ring R₄\ninst✝² : IsDomain R₄\ninst✝¹ : AddCommGroup M₄\ninst✝ : Module R₄ M₄\nG : BilinForm R₄ M₄\nn : Type w\nB : BilinForm K V\nv : n → V\nhv₁ : iIsOrtho B v\nhv₂ : ∀ (i : n), ¬IsOrtho B (v i) (v i)\ns : Finset n\nw : n → K\nhs : ∑ i in s, w i • v i = 0\ni : n\nhi : i ∈ s\nthis : bilin B (∑ i in s, w i • v i) (v i) = 0\n⊢ ∀ (b : n), b ∈ s → b ≠ i → w b * bilin B (v b) (v i) = 0\n[PROOFSTEP]\nintro j _ hij\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²² : Semiring R\ninst✝²¹ : AddCommMonoid M\ninst✝²⁰ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁹ : Ring R₁\ninst✝¹⁸ : AddCommGroup M₁\ninst✝¹⁷ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁶ : CommSemiring R₂\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹³ : CommRing R₃\ninst✝¹² : AddCommGroup M₃\ninst✝¹¹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹⁰ : Field K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁷ : AddCommMonoid M₂'\ninst✝⁶ : AddCommMonoid M₂''\ninst✝⁵ : Module R₂ M₂'\ninst✝⁴ : Module R₂ M₂''\nR₄ : Type u_13\nM₄ : Type u_14\ninst✝³ : Ring R₄\ninst✝² : IsDomain R₄\ninst✝¹ : AddCommGroup M₄\ninst✝ : Module R₄ M₄\nG : BilinForm R₄ M₄\nn : Type w\nB : BilinForm K V\nv : n → V\nhv₁ : iIsOrtho B v\nhv₂ : ∀ (i : n), ¬IsOrtho B (v i) (v i)\ns : Finset n\nw : n → K\nhs : ∑ i in s, w i • v i = 0\ni : n\nhi : i ∈ s\nthis : bilin B (∑ i in s, w i • v i) (v i) = 0\nj : n\na✝ : j ∈ s\nhij : j ≠ i\n⊢ w j * bilin B (v j) (v i) = 0\n[PROOFSTEP]\nrw [iIsOrtho_def.1 hv₁ _ _ hij, mul_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²² : Semiring R\ninst✝²¹ : AddCommMonoid M\ninst✝²⁰ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁹ : Ring R₁\ninst✝¹⁸ : AddCommGroup M₁\ninst✝¹⁷ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁶ : CommSemiring R₂\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹³ : CommRing R₃\ninst✝¹² : AddCommGroup M₃\ninst✝¹¹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹⁰ : Field K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁷ : AddCommMonoid M₂'\ninst✝⁶ : AddCommMonoid M₂''\ninst✝⁵ : Module R₂ M₂'\ninst✝⁴ : Module R₂ M₂''\nR₄ : Type u_13\nM₄ : Type u_14\ninst✝³ : Ring R₄\ninst✝² : IsDomain R₄\ninst✝¹ : AddCommGroup M₄\ninst✝ : Module R₄ M₄\nG : BilinForm R₄ M₄\nn : Type w\nB : BilinForm K V\nv : n → V\nhv₁ : iIsOrtho B v\nhv₂ : ∀ (i : n), ¬IsOrtho B (v i) (v i)\ns : Finset n\nw : n → K\nhs : ∑ i in s, w i • v i = 0\ni : n\nhi : i ∈ s\nthis : bilin B (∑ i in s, w i • v i) (v i) = 0\nhsum : ∑ j in s, w j * bilin B (v j) (v i) = w i * bilin B (v i) (v i)\n⊢ w i = 0\n[PROOFSTEP]\nsimp_rw [sum_left, smul_left, hsum] at this \n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²² : Semiring R\ninst✝²¹ : AddCommMonoid M\ninst✝²⁰ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁹ : Ring R₁\ninst✝¹⁸ : AddCommGroup M₁\ninst✝¹⁷ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁶ : CommSemiring R₂\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹³ : CommRing R₃\ninst✝¹² : AddCommGroup M₃\ninst✝¹¹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹⁰ : Field K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁷ : AddCommMonoid M₂'\ninst✝⁶ : AddCommMonoid M₂''\ninst✝⁵ : Module R₂ M₂'\ninst✝⁴ : Module R₂ M₂''\nR₄ : Type u_13\nM₄ : Type u_14\ninst✝³ : Ring R₄\ninst✝² : IsDomain R₄\ninst✝¹ : AddCommGroup M₄\ninst✝ : Module R₄ M₄\nG : BilinForm R₄ M₄\nn : Type w\nB : BilinForm K V\nv : n → V\nhv₁ : iIsOrtho B v\nhv₂ : ∀ (i : n), ¬IsOrtho B (v i) (v i)\ns : Finset n\nw : n → K\nhs : ∑ i in s, w i • v i = 0\ni : n\nhi : i ∈ s\nhsum : ∑ j in s, w j * bilin B (v j) (v i) = w i * bilin B (v i) (v i)\nthis : w i * bilin B (v i) (v i) = 0\n⊢ w i = 0\n[PROOFSTEP]\nexact eq_zero_of_ne_zero_of_mul_right_eq_zero (hv₂ i) this\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\nF₂ : BilinForm R₂ M₂\nι : Type u_13\nb : Basis ι R₂ M₂\nx y : M₂\n⊢ (Finsupp.sum (↑b.repr x) fun i xi => Finsupp.sum (↑b.repr y) fun j yj => xi • yj • bilin B₂ (↑b i) (↑b j)) =\n bilin B₂ x y\n[PROOFSTEP]\nconv_rhs => rw [← b.total_repr x, ← b.total_repr y]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\nF₂ : BilinForm R₂ M₂\nι : Type u_13\nb : Basis ι R₂ M₂\nx y : M₂\n| bilin B₂ x y\n[PROOFSTEP]\nrw [← b.total_repr x, ← b.total_repr y]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\nF₂ : BilinForm R₂ M₂\nι : Type u_13\nb : Basis ι R₂ M₂\nx y : M₂\n| bilin B₂ x y\n[PROOFSTEP]\nrw [← b.total_repr x, ← b.total_repr y]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\nF₂ : BilinForm R₂ M₂\nι : Type u_13\nb : Basis ι R₂ M₂\nx y : M₂\n| bilin B₂ x y\n[PROOFSTEP]\nrw [← b.total_repr x, ← b.total_repr y]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\nF₂ : BilinForm R₂ M₂\nι : Type u_13\nb : Basis ι R₂ M₂\nx y : M₂\n⊢ (Finsupp.sum (↑b.repr x) fun i xi => Finsupp.sum (↑b.repr y) fun j yj => xi • yj • bilin B₂ (↑b i) (↑b j)) =\n bilin B₂ (↑(Finsupp.total ι M₂ R₂ ↑b) (↑b.repr x)) (↑(Finsupp.total ι M₂ R₂ ↑b) (↑b.repr y))\n[PROOFSTEP]\nsimp_rw [Finsupp.total_apply, Finsupp.sum, sum_left, sum_right, smul_left, smul_right, smul_eq_mul]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁹ : Semiring R\ninst✝¹⁸ : AddCommMonoid M\ninst✝¹⁷ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁶ : Ring R₁\ninst✝¹⁵ : AddCommGroup M₁\ninst✝¹⁴ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹³ : CommSemiring R₂\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁰ : CommRing R₃\ninst✝⁹ : AddCommGroup M₃\ninst✝⁸ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁴ : AddCommMonoid M₂'\ninst✝³ : AddCommMonoid M₂''\ninst✝² : Module R₂ M₂'\ninst✝¹ : Module R₂ M₂''\ninst✝ : Algebra R₂ R\nx✝¹ x✝ : M\n⊢ bilin B x✝¹ x✝ = bilin B x✝ x✝¹ ↔ bilin (↑(flipHom R₂) B) x✝¹ x✝ = bilin B x✝¹ x✝\n[PROOFSTEP]\nexact eq_comm\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\nH : IsAlt B₁\nx y : M₁\n⊢ -bilin B₁ x y = bilin B₁ y x\n[PROOFSTEP]\nhave H1 : B₁ (x + y) (x + y) = 0 := self_eq_zero H (x + y)\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\nH : IsAlt B₁\nx y : M₁\nH1 : bilin B₁ (x + y) (x + y) = 0\n⊢ -bilin B₁ x y = bilin B₁ y x\n[PROOFSTEP]\nrw [add_left, add_right, add_right, self_eq_zero H, self_eq_zero H, zero_add, add_zero, add_eq_zero_iff_neg_eq] at H1 \n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\nH : IsAlt B₁\nx y : M₁\nH1 : -bilin B₁ x y = bilin B₁ y x\n⊢ -bilin B₁ x y = bilin B₁ y x\n[PROOFSTEP]\nexact H1\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\nH : IsAlt B₁\n⊢ IsRefl B₁\n[PROOFSTEP]\nintro x y h\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝³ : AddCommMonoid M₂'\ninst✝² : AddCommMonoid M₂''\ninst✝¹ : Module R₂ M₂'\ninst✝ : Module R₂ M₂''\nH : IsAlt B₁\nx y : M₁\nh : bilin B₁ x y = 0\n⊢ bilin B₁ y x = 0\n[PROOFSTEP]\nrw [← neg_eq H, h, neg_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : AddCommMonoid M₂''\ninst✝³ : Module R₂ M₂'\ninst✝² : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng✝ g' : M' →ₗ[R] M\nf g : Module.End R M\n⊢ IsAdjointPair B F f g ↔ compLeft F f = compRight B g\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : AddCommMonoid M₂''\ninst✝³ : Module R₂ M₂'\ninst✝² : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng✝ g' : M' →ₗ[R] M\nf g : Module.End R M\n⊢ IsAdjointPair B F f g → compLeft F f = compRight B g\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : AddCommMonoid M₂''\ninst✝³ : Module R₂ M₂'\ninst✝² : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng✝ g' : M' →ₗ[R] M\nf g : Module.End R M\n⊢ compLeft F f = compRight B g → IsAdjointPair B F f g\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : AddCommMonoid M₂''\ninst✝³ : Module R₂ M₂'\ninst✝² : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng✝ g' : M' →ₗ[R] M\nf g : Module.End R M\nh : IsAdjointPair B F f g\n⊢ compLeft F f = compRight B g\n[PROOFSTEP]\next x\n[GOAL]\ncase mp.H\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : AddCommMonoid M₂''\ninst✝³ : Module R₂ M₂'\ninst✝² : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng✝ g' : M' →ₗ[R] M\nf g : Module.End R M\nh : IsAdjointPair B F f g\nx y✝ : M\n⊢ bilin (compLeft F f) x y✝ = bilin (compRight B g) x y✝\n[PROOFSTEP]\nsimp only [compLeft_apply, compRight_apply]\n[GOAL]\ncase mp.H\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : AddCommMonoid M₂''\ninst✝³ : Module R₂ M₂'\ninst✝² : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng✝ g' : M' →ₗ[R] M\nf g : Module.End R M\nh : IsAdjointPair B F f g\nx y✝ : M\n⊢ bilin F (↑f x) y✝ = bilin B x (↑g y✝)\n[PROOFSTEP]\napply h\n[GOAL]\ncase mpr\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : AddCommMonoid M₂''\ninst✝³ : Module R₂ M₂'\ninst✝² : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng✝ g' : M' →ₗ[R] M\nf g : Module.End R M\nh : compLeft F f = compRight B g\n⊢ IsAdjointPair B F f g\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase mpr\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : AddCommMonoid M₂''\ninst✝³ : Module R₂ M₂'\ninst✝² : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng✝ g' : M' →ₗ[R] M\nf g : Module.End R M\nh : compLeft F f = compRight B g\nx y : M\n⊢ bilin F (↑f x) y = bilin B x (↑g y)\n[PROOFSTEP]\nrw [← compLeft_apply, ← compRight_apply]\n[GOAL]\ncase mpr\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : AddCommMonoid M₂''\ninst✝³ : Module R₂ M₂'\ninst✝² : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng✝ g' : M' →ₗ[R] M\nf g : Module.End R M\nh : compLeft F f = compRight B g\nx y : M\n⊢ bilin (compLeft F f) x y = bilin (compRight B g) x y\n[PROOFSTEP]\nrw [h]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : AddCommMonoid M₂''\ninst✝³ : Module R₂ M₂'\ninst✝² : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB' : BilinForm R M'\nf f' : M →ₗ[R] M'\ng g' : M' →ₗ[R] M\nx : M\ny : M'\n⊢ bilin B' (↑0 x) y = bilin B x (↑0 y)\n[PROOFSTEP]\nsimp only [BilinForm.zero_left, BilinForm.zero_right, LinearMap.zero_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : AddCommMonoid M₂''\ninst✝³ : Module R₂ M₂'\ninst✝² : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nB' : BilinForm R M'\nf f' : M →ₗ[R] M'\ng g' : M' →ₗ[R] M\nh : IsAdjointPair B B' f g\nh' : IsAdjointPair B B' f' g'\nx : M\ny : M'\n⊢ bilin B' (↑(f + f') x) y = bilin B x (↑(g + g') y)\n[PROOFSTEP]\nrw [LinearMap.add_apply, LinearMap.add_apply, add_left, add_right, h, h']\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²² : Semiring R\ninst✝²¹ : AddCommMonoid M\ninst✝²⁰ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁹ : Ring R₁\ninst✝¹⁸ : AddCommGroup M₁\ninst✝¹⁷ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁶ : CommSemiring R₂\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹³ : CommRing R₃\ninst✝¹² : AddCommGroup M₃\ninst✝¹¹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹⁰ : Field K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁷ : AddCommMonoid M₂'\ninst✝⁶ : AddCommMonoid M₂''\ninst✝⁵ : Module R₂ M₂'\ninst✝⁴ : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nB' : BilinForm R M'\nf f' : M →ₗ[R] M'\ng g' : M' →ₗ[R] M\nM₁' : Type u_14\ninst✝¹ : AddCommGroup M₁'\ninst✝ : Module R₁ M₁'\nB₁' : BilinForm R₁ M₁'\nf₁ f₁' : M₁ →ₗ[R₁] M₁'\ng₁ g₁' : M₁' →ₗ[R₁] M₁\nh : IsAdjointPair B₁ B₁' f₁ g₁\nh' : IsAdjointPair B₁ B₁' f₁' g₁'\nx : M₁\ny : M₁'\n⊢ bilin B₁' (↑(f₁ - f₁') x) y = bilin B₁ x (↑(g₁ - g₁') y)\n[PROOFSTEP]\nrw [LinearMap.sub_apply, LinearMap.sub_apply, sub_left, sub_right, h, h']\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²² : Semiring R\ninst✝²¹ : AddCommMonoid M\ninst✝²⁰ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁹ : Ring R₁\ninst✝¹⁸ : AddCommGroup M₁\ninst✝¹⁷ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁶ : CommSemiring R₂\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹³ : CommRing R₃\ninst✝¹² : AddCommGroup M₃\ninst✝¹¹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹⁰ : Field K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁷ : AddCommMonoid M₂'\ninst✝⁶ : AddCommMonoid M₂''\ninst✝⁵ : Module R₂ M₂'\ninst✝⁴ : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nB' : BilinForm R M'\nf f' : M →ₗ[R] M'\ng g' : M' →ₗ[R] M\nM₁' : Type u_14\ninst✝¹ : AddCommGroup M₁'\ninst✝ : Module R₁ M₁'\nB₁' : BilinForm R₁ M₁'\nf₁ f₁' : M₁ →ₗ[R₁] M₁'\ng₁ g₁' : M₁' →ₗ[R₁] M₁\nB₂' : BilinForm R₂ M₂'\nf₂ f₂' : M₂ →ₗ[R₂] M₂'\ng₂ g₂' : M₂' →ₗ[R₂] M₂\nc : R₂\nh : IsAdjointPair B₂ B₂' f₂ g₂\nx : M₂\ny : M₂'\n⊢ bilin B₂' (↑(c • f₂) x) y = bilin B₂ x (↑(c • g₂) y)\n[PROOFSTEP]\nrw [LinearMap.smul_apply, LinearMap.smul_apply, smul_left, smul_right, h]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁴ : Semiring R\ninst✝²³ : AddCommMonoid M\ninst✝²² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝²¹ : Ring R₁\ninst✝²⁰ : AddCommGroup M₁\ninst✝¹⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁸ : CommSemiring R₂\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁵ : CommRing R₃\ninst✝¹⁴ : AddCommGroup M₃\ninst✝¹³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹² : Field K\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁹ : AddCommMonoid M₂'\ninst✝⁸ : AddCommMonoid M₂''\ninst✝⁷ : Module R₂ M₂'\ninst✝⁶ : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : Module R M'\nB' : BilinForm R M'\nf f'✝ : M →ₗ[R] M'\ng g'✝ : M' →ₗ[R] M\nM₁' : Type u_14\ninst✝³ : AddCommGroup M₁'\ninst✝² : Module R₁ M₁'\nB₁' : BilinForm R₁ M₁'\nf₁ f₁' : M₁ →ₗ[R₁] M₁'\ng₁ g₁' : M₁' →ₗ[R₁] M₁\nB₂' : BilinForm R₂ M₂'\nf₂ f₂' : M₂ →ₗ[R₂] M₂'\ng₂ g₂' : M₂' →ₗ[R₂] M₂\nM'' : Type u_15\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\nB'' : BilinForm R M''\nf' : M' →ₗ[R] M''\ng' : M'' →ₗ[R] M'\nh : IsAdjointPair B B' f g\nh' : IsAdjointPair B' B'' f' g'\nx : M\ny : M''\n⊢ bilin B'' (↑(LinearMap.comp f' f) x) y = bilin B x (↑(LinearMap.comp g g') y)\n[PROOFSTEP]\nrw [LinearMap.comp_apply, LinearMap.comp_apply, h', h]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁴ : Semiring R\ninst✝²³ : AddCommMonoid M\ninst✝²² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝²¹ : Ring R₁\ninst✝²⁰ : AddCommGroup M₁\ninst✝¹⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁸ : CommSemiring R₂\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁵ : CommRing R₃\ninst✝¹⁴ : AddCommGroup M₃\ninst✝¹³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹² : Field K\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁹ : AddCommMonoid M₂'\ninst✝⁸ : AddCommMonoid M₂''\ninst✝⁷ : Module R₂ M₂'\ninst✝⁶ : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : Module R M'\nB' : BilinForm R M'\nf✝ f'✝ : M →ₗ[R] M'\ng✝ g'✝ : M' →ₗ[R] M\nM₁' : Type u_14\ninst✝³ : AddCommGroup M₁'\ninst✝² : Module R₁ M₁'\nB₁' : BilinForm R₁ M₁'\nf₁ f₁' : M₁ →ₗ[R₁] M₁'\ng₁ g₁' : M₁' →ₗ[R₁] M₁\nB₂' : BilinForm R₂ M₂'\nf₂ f₂' : M₂ →ₗ[R₂] M₂'\ng₂ g₂' : M₂' →ₗ[R₂] M₂\nM'' : Type u_15\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\nB'' : BilinForm R M''\nf g f' g' : Module.End R M\nh : IsAdjointPair B B f g\nh' : IsAdjointPair B B f' g'\nx y : M\n⊢ bilin B (↑(f * f') x) y = bilin B x (↑(g' * g) y)\n[PROOFSTEP]\nrw [LinearMap.mul_apply, LinearMap.mul_apply, h, h']\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁴ : Semiring R\ninst✝²³ : AddCommMonoid M\ninst✝²² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝²¹ : Ring R₁\ninst✝²⁰ : AddCommGroup M₁\ninst✝¹⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁸ : CommSemiring R₂\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁵ : CommRing R₃\ninst✝¹⁴ : AddCommGroup M₃\ninst✝¹³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹² : Field K\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁹ : AddCommMonoid M₂'\ninst✝⁸ : AddCommMonoid M₂''\ninst✝⁷ : Module R₂ M₂'\ninst✝⁶ : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng g' : M' →ₗ[R] M\nM₁' : Type u_14\ninst✝³ : AddCommGroup M₁'\ninst✝² : Module R₁ M₁'\nB₁' : BilinForm R₁ M₁'\nf₁ f₁' : M₁ →ₗ[R₁] M₁'\ng₁ g₁' : M₁' →ₗ[R₁] M₁\nB₂' : BilinForm R₂ M₂'\nf₂ f₂' : M₂ →ₗ[R₂] M₂'\ng₂ g₂' : M₂' →ₗ[R₂] M₂\nM'' : Type u_15\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\nB'' : BilinForm R M''\nF₂ : BilinForm R₂ M₂\nf : Module.End R₂ M₂\n⊢ f ∈ isPairSelfAdjointSubmodule B₂ F₂ ↔ IsPairSelfAdjoint B₂ F₂ f\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁴ : Semiring R\ninst✝²³ : AddCommMonoid M\ninst✝²² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝²¹ : Ring R₁\ninst✝²⁰ : AddCommGroup M₁\ninst✝¹⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁸ : CommSemiring R₂\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁵ : CommRing R₃\ninst✝¹⁴ : AddCommGroup M₃\ninst✝¹³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹² : Field K\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁹ : AddCommMonoid M₂'\ninst✝⁸ : AddCommMonoid M₂''\ninst✝⁷ : Module R₂ M₂'\ninst✝⁶ : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng g' : M' →ₗ[R] M\nM₁' : Type u_14\ninst✝³ : AddCommGroup M₁'\ninst✝² : Module R₁ M₁'\nB₁' : BilinForm R₁ M₁'\nf₁ f₁' : M₁ →ₗ[R₁] M₁'\ng₁ g₁' : M₁' →ₗ[R₁] M₁\nB₂' : BilinForm R₂ M₂'\nf₂ f₂' : M₂ →ₗ[R₂] M₂'\ng₂ g₂' : M₂' →ₗ[R₂] M₂\nM'' : Type u_15\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\nB'' : BilinForm R M''\nF₂ : BilinForm R₂ M₂\ne : M₂' ≃ₗ[R₂] M₂\nf : Module.End R₂ M₂\n⊢ IsPairSelfAdjoint B₂ F₂ f ↔\n IsPairSelfAdjoint (comp B₂ ↑e ↑e) (comp F₂ ↑e ↑e) (↑(LinearEquiv.conj (LinearEquiv.symm e)) f)\n[PROOFSTEP]\nhave hₗ : (F₂.comp ↑e ↑e).compLeft (e.symm.conj f) = (F₂.compLeft f).comp ↑e ↑e :=\n by\n ext\n simp [LinearEquiv.symm_conj_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁴ : Semiring R\ninst✝²³ : AddCommMonoid M\ninst✝²² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝²¹ : Ring R₁\ninst✝²⁰ : AddCommGroup M₁\ninst✝¹⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁸ : CommSemiring R₂\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁵ : CommRing R₃\ninst✝¹⁴ : AddCommGroup M₃\ninst✝¹³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹² : Field K\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁹ : AddCommMonoid M₂'\ninst✝⁸ : AddCommMonoid M₂''\ninst✝⁷ : Module R₂ M₂'\ninst✝⁶ : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng g' : M' →ₗ[R] M\nM₁' : Type u_14\ninst✝³ : AddCommGroup M₁'\ninst✝² : Module R₁ M₁'\nB₁' : BilinForm R₁ M₁'\nf₁ f₁' : M₁ →ₗ[R₁] M₁'\ng₁ g₁' : M₁' →ₗ[R₁] M₁\nB₂' : BilinForm R₂ M₂'\nf₂ f₂' : M₂ →ₗ[R₂] M₂'\ng₂ g₂' : M₂' →ₗ[R₂] M₂\nM'' : Type u_15\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\nB'' : BilinForm R M''\nF₂ : BilinForm R₂ M₂\ne : M₂' ≃ₗ[R₂] M₂\nf : Module.End R₂ M₂\n⊢ compLeft (comp F₂ ↑e ↑e) (↑(LinearEquiv.conj (LinearEquiv.symm e)) f) = comp (compLeft F₂ f) ↑e ↑e\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u_1\nM : Type u_2\ninst✝²⁴ : Semiring R\ninst✝²³ : AddCommMonoid M\ninst✝²² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝²¹ : Ring R₁\ninst✝²⁰ : AddCommGroup M₁\ninst✝¹⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁸ : CommSemiring R₂\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁵ : CommRing R₃\ninst✝¹⁴ : AddCommGroup M₃\ninst✝¹³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹² : Field K\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁹ : AddCommMonoid M₂'\ninst✝⁸ : AddCommMonoid M₂''\ninst✝⁷ : Module R₂ M₂'\ninst✝⁶ : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng g' : M' →ₗ[R] M\nM₁' : Type u_14\ninst✝³ : AddCommGroup M₁'\ninst✝² : Module R₁ M₁'\nB₁' : BilinForm R₁ M₁'\nf₁ f₁' : M₁ →ₗ[R₁] M₁'\ng₁ g₁' : M₁' →ₗ[R₁] M₁\nB₂' : BilinForm R₂ M₂'\nf₂ f₂' : M₂ →ₗ[R₂] M₂'\ng₂ g₂' : M₂' →ₗ[R₂] M₂\nM'' : Type u_15\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\nB'' : BilinForm R M''\nF₂ : BilinForm R₂ M₂\ne : M₂' ≃ₗ[R₂] M₂\nf : Module.End R₂ M₂\nx✝ y✝ : M₂'\n⊢ bilin (compLeft (comp F₂ ↑e ↑e) (↑(LinearEquiv.conj (LinearEquiv.symm e)) f)) x✝ y✝ =\n bilin (comp (compLeft F₂ f) ↑e ↑e) x✝ y✝\n[PROOFSTEP]\nsimp [LinearEquiv.symm_conj_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁴ : Semiring R\ninst✝²³ : AddCommMonoid M\ninst✝²² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝²¹ : Ring R₁\ninst✝²⁰ : AddCommGroup M₁\ninst✝¹⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁸ : CommSemiring R₂\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁵ : CommRing R₃\ninst✝¹⁴ : AddCommGroup M₃\ninst✝¹³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹² : Field K\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁹ : AddCommMonoid M₂'\ninst✝⁸ : AddCommMonoid M₂''\ninst✝⁷ : Module R₂ M₂'\ninst✝⁶ : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng g' : M' →ₗ[R] M\nM₁' : Type u_14\ninst✝³ : AddCommGroup M₁'\ninst✝² : Module R₁ M₁'\nB₁' : BilinForm R₁ M₁'\nf₁ f₁' : M₁ →ₗ[R₁] M₁'\ng₁ g₁' : M₁' →ₗ[R₁] M₁\nB₂' : BilinForm R₂ M₂'\nf₂ f₂' : M₂ →ₗ[R₂] M₂'\ng₂ g₂' : M₂' →ₗ[R₂] M₂\nM'' : Type u_15\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\nB'' : BilinForm R M''\nF₂ : BilinForm R₂ M₂\ne : M₂' ≃ₗ[R₂] M₂\nf : Module.End R₂ M₂\nhₗ : compLeft (comp F₂ ↑e ↑e) (↑(LinearEquiv.conj (LinearEquiv.symm e)) f) = comp (compLeft F₂ f) ↑e ↑e\n⊢ IsPairSelfAdjoint B₂ F₂ f ↔\n IsPairSelfAdjoint (comp B₂ ↑e ↑e) (comp F₂ ↑e ↑e) (↑(LinearEquiv.conj (LinearEquiv.symm e)) f)\n[PROOFSTEP]\nhave hᵣ : (B₂.comp ↑e ↑e).compRight (e.symm.conj f) = (B₂.compRight f).comp ↑e ↑e :=\n by\n ext\n simp [LinearEquiv.conj_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁴ : Semiring R\ninst✝²³ : AddCommMonoid M\ninst✝²² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝²¹ : Ring R₁\ninst✝²⁰ : AddCommGroup M₁\ninst✝¹⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁸ : CommSemiring R₂\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁵ : CommRing R₃\ninst✝¹⁴ : AddCommGroup M₃\ninst✝¹³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹² : Field K\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁹ : AddCommMonoid M₂'\ninst✝⁸ : AddCommMonoid M₂''\ninst✝⁷ : Module R₂ M₂'\ninst✝⁶ : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng g' : M' →ₗ[R] M\nM₁' : Type u_14\ninst✝³ : AddCommGroup M₁'\ninst✝² : Module R₁ M₁'\nB₁' : BilinForm R₁ M₁'\nf₁ f₁' : M₁ →ₗ[R₁] M₁'\ng₁ g₁' : M₁' →ₗ[R₁] M₁\nB₂' : BilinForm R₂ M₂'\nf₂ f₂' : M₂ →ₗ[R₂] M₂'\ng₂ g₂' : M₂' →ₗ[R₂] M₂\nM'' : Type u_15\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\nB'' : BilinForm R M''\nF₂ : BilinForm R₂ M₂\ne : M₂' ≃ₗ[R₂] M₂\nf : Module.End R₂ M₂\nhₗ : compLeft (comp F₂ ↑e ↑e) (↑(LinearEquiv.conj (LinearEquiv.symm e)) f) = comp (compLeft F₂ f) ↑e ↑e\n⊢ compRight (comp B₂ ↑e ↑e) (↑(LinearEquiv.conj (LinearEquiv.symm e)) f) = comp (compRight B₂ f) ↑e ↑e\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u_1\nM : Type u_2\ninst✝²⁴ : Semiring R\ninst✝²³ : AddCommMonoid M\ninst✝²² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝²¹ : Ring R₁\ninst✝²⁰ : AddCommGroup M₁\ninst✝¹⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁸ : CommSemiring R₂\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁵ : CommRing R₃\ninst✝¹⁴ : AddCommGroup M₃\ninst✝¹³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹² : Field K\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁹ : AddCommMonoid M₂'\ninst✝⁸ : AddCommMonoid M₂''\ninst✝⁷ : Module R₂ M₂'\ninst✝⁶ : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng g' : M' →ₗ[R] M\nM₁' : Type u_14\ninst✝³ : AddCommGroup M₁'\ninst✝² : Module R₁ M₁'\nB₁' : BilinForm R₁ M₁'\nf₁ f₁' : M₁ →ₗ[R₁] M₁'\ng₁ g₁' : M₁' →ₗ[R₁] M₁\nB₂' : BilinForm R₂ M₂'\nf₂ f₂' : M₂ →ₗ[R₂] M₂'\ng₂ g₂' : M₂' →ₗ[R₂] M₂\nM'' : Type u_15\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\nB'' : BilinForm R M''\nF₂ : BilinForm R₂ M₂\ne : M₂' ≃ₗ[R₂] M₂\nf : Module.End R₂ M₂\nhₗ : compLeft (comp F₂ ↑e ↑e) (↑(LinearEquiv.conj (LinearEquiv.symm e)) f) = comp (compLeft F₂ f) ↑e ↑e\nx✝ y✝ : M₂'\n⊢ bilin (compRight (comp B₂ ↑e ↑e) (↑(LinearEquiv.conj (LinearEquiv.symm e)) f)) x✝ y✝ =\n bilin (comp (compRight B₂ f) ↑e ↑e) x✝ y✝\n[PROOFSTEP]\nsimp [LinearEquiv.conj_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁴ : Semiring R\ninst✝²³ : AddCommMonoid M\ninst✝²² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝²¹ : Ring R₁\ninst✝²⁰ : AddCommGroup M₁\ninst✝¹⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁸ : CommSemiring R₂\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁵ : CommRing R₃\ninst✝¹⁴ : AddCommGroup M₃\ninst✝¹³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹² : Field K\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁹ : AddCommMonoid M₂'\ninst✝⁸ : AddCommMonoid M₂''\ninst✝⁷ : Module R₂ M₂'\ninst✝⁶ : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng g' : M' →ₗ[R] M\nM₁' : Type u_14\ninst✝³ : AddCommGroup M₁'\ninst✝² : Module R₁ M₁'\nB₁' : BilinForm R₁ M₁'\nf₁ f₁' : M₁ →ₗ[R₁] M₁'\ng₁ g₁' : M₁' →ₗ[R₁] M₁\nB₂' : BilinForm R₂ M₂'\nf₂ f₂' : M₂ →ₗ[R₂] M₂'\ng₂ g₂' : M₂' →ₗ[R₂] M₂\nM'' : Type u_15\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\nB'' : BilinForm R M''\nF₂ : BilinForm R₂ M₂\ne : M₂' ≃ₗ[R₂] M₂\nf : Module.End R₂ M₂\nhₗ : compLeft (comp F₂ ↑e ↑e) (↑(LinearEquiv.conj (LinearEquiv.symm e)) f) = comp (compLeft F₂ f) ↑e ↑e\nhᵣ : compRight (comp B₂ ↑e ↑e) (↑(LinearEquiv.conj (LinearEquiv.symm e)) f) = comp (compRight B₂ f) ↑e ↑e\n⊢ IsPairSelfAdjoint B₂ F₂ f ↔\n IsPairSelfAdjoint (comp B₂ ↑e ↑e) (comp F₂ ↑e ↑e) (↑(LinearEquiv.conj (LinearEquiv.symm e)) f)\n[PROOFSTEP]\nhave he : Function.Surjective (⇑(↑e : M₂' →ₗ[R₂] M₂) : M₂' → M₂) := e.surjective\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁴ : Semiring R\ninst✝²³ : AddCommMonoid M\ninst✝²² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝²¹ : Ring R₁\ninst✝²⁰ : AddCommGroup M₁\ninst✝¹⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁸ : CommSemiring R₂\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁵ : CommRing R₃\ninst✝¹⁴ : AddCommGroup M₃\ninst✝¹³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹² : Field K\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁹ : AddCommMonoid M₂'\ninst✝⁸ : AddCommMonoid M₂''\ninst✝⁷ : Module R₂ M₂'\ninst✝⁶ : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng g' : M' →ₗ[R] M\nM₁' : Type u_14\ninst✝³ : AddCommGroup M₁'\ninst✝² : Module R₁ M₁'\nB₁' : BilinForm R₁ M₁'\nf₁ f₁' : M₁ →ₗ[R₁] M₁'\ng₁ g₁' : M₁' →ₗ[R₁] M₁\nB₂' : BilinForm R₂ M₂'\nf₂ f₂' : M₂ →ₗ[R₂] M₂'\ng₂ g₂' : M₂' →ₗ[R₂] M₂\nM'' : Type u_15\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\nB'' : BilinForm R M''\nF₂ : BilinForm R₂ M₂\ne : M₂' ≃ₗ[R₂] M₂\nf : Module.End R₂ M₂\nhₗ : compLeft (comp F₂ ↑e ↑e) (↑(LinearEquiv.conj (LinearEquiv.symm e)) f) = comp (compLeft F₂ f) ↑e ↑e\nhᵣ : compRight (comp B₂ ↑e ↑e) (↑(LinearEquiv.conj (LinearEquiv.symm e)) f) = comp (compRight B₂ f) ↑e ↑e\nhe : Function.Surjective ↑↑e\n⊢ IsPairSelfAdjoint B₂ F₂ f ↔\n IsPairSelfAdjoint (comp B₂ ↑e ↑e) (comp F₂ ↑e ↑e) (↑(LinearEquiv.conj (LinearEquiv.symm e)) f)\n[PROOFSTEP]\nshow BilinForm.IsAdjointPair _ _ _ _ ↔ BilinForm.IsAdjointPair _ _ _ _\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁴ : Semiring R\ninst✝²³ : AddCommMonoid M\ninst✝²² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝²¹ : Ring R₁\ninst✝²⁰ : AddCommGroup M₁\ninst✝¹⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁸ : CommSemiring R₂\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁵ : CommRing R₃\ninst✝¹⁴ : AddCommGroup M₃\ninst✝¹³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹² : Field K\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁹ : AddCommMonoid M₂'\ninst✝⁸ : AddCommMonoid M₂''\ninst✝⁷ : Module R₂ M₂'\ninst✝⁶ : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng g' : M' →ₗ[R] M\nM₁' : Type u_14\ninst✝³ : AddCommGroup M₁'\ninst✝² : Module R₁ M₁'\nB₁' : BilinForm R₁ M₁'\nf₁ f₁' : M₁ →ₗ[R₁] M₁'\ng₁ g₁' : M₁' →ₗ[R₁] M₁\nB₂' : BilinForm R₂ M₂'\nf₂ f₂' : M₂ →ₗ[R₂] M₂'\ng₂ g₂' : M₂' →ₗ[R₂] M₂\nM'' : Type u_15\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\nB'' : BilinForm R M''\nF₂ : BilinForm R₂ M₂\ne : M₂' ≃ₗ[R₂] M₂\nf : Module.End R₂ M₂\nhₗ : compLeft (comp F₂ ↑e ↑e) (↑(LinearEquiv.conj (LinearEquiv.symm e)) f) = comp (compLeft F₂ f) ↑e ↑e\nhᵣ : compRight (comp B₂ ↑e ↑e) (↑(LinearEquiv.conj (LinearEquiv.symm e)) f) = comp (compRight B₂ f) ↑e ↑e\nhe : Function.Surjective ↑↑e\n⊢ IsAdjointPair B₂ F₂ f f ↔\n IsAdjointPair (comp B₂ ↑e ↑e) (comp F₂ ↑e ↑e) (↑(LinearEquiv.conj (LinearEquiv.symm e)) f)\n (↑(LinearEquiv.conj (LinearEquiv.symm e)) f)\n[PROOFSTEP]\nrw [isAdjointPair_iff_compLeft_eq_compRight, isAdjointPair_iff_compLeft_eq_compRight, hᵣ, hₗ, comp_inj _ _ he he]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁴ : Semiring R\ninst✝²³ : AddCommMonoid M\ninst✝²² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝²¹ : Ring R₁\ninst✝²⁰ : AddCommGroup M₁\ninst✝¹⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁸ : CommSemiring R₂\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁵ : CommRing R₃\ninst✝¹⁴ : AddCommGroup M₃\ninst✝¹³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹² : Field K\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁹ : AddCommMonoid M₂'\ninst✝⁸ : AddCommMonoid M₂''\ninst✝⁷ : Module R₂ M₂'\ninst✝⁶ : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng g' : M' →ₗ[R] M\nM₁' : Type u_14\ninst✝³ : AddCommGroup M₁'\ninst✝² : Module R₁ M₁'\nB₁' : BilinForm R₁ M₁'\nf₁ f₁' : M₁ →ₗ[R₁] M₁'\ng₁ g₁' : M₁' →ₗ[R₁] M₁\nB₂' : BilinForm R₂ M₂'\nf₂ f₂' : M₂ →ₗ[R₂] M₂'\ng₂ g₂' : M₂' →ₗ[R₂] M₂\nM'' : Type u_15\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\nB'' : BilinForm R M''\nF₂ : BilinForm R₂ M₂\nf : Module.End R₁ M₁\n⊢ (∀ (x y : M₁), bilin B₁ (↑f x) y = bilin B₁ x (↑(-f) y)) ↔ ∀ (x y : M₁), bilin B₁ (↑f x) y = bilin (-B₁) x (↑f y)\n[PROOFSTEP]\nsimp only [LinearMap.neg_apply, BilinForm.neg_apply, BilinForm.neg_right]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁴ : Semiring R\ninst✝²³ : AddCommMonoid M\ninst✝²² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝²¹ : Ring R₁\ninst✝²⁰ : AddCommGroup M₁\ninst✝¹⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁸ : CommSemiring R₂\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁵ : CommRing R₃\ninst✝¹⁴ : AddCommGroup M₃\ninst✝¹³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹² : Field K\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁹ : AddCommMonoid M₂'\ninst✝⁸ : AddCommMonoid M₂''\ninst✝⁷ : Module R₂ M₂'\ninst✝⁶ : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng g' : M' →ₗ[R] M\nM₁' : Type u_14\ninst✝³ : AddCommGroup M₁'\ninst✝² : Module R₁ M₁'\nB₁' : BilinForm R₁ M₁'\nf₁ f₁' : M₁ →ₗ[R₁] M₁'\ng₁ g₁' : M₁' →ₗ[R₁] M₁\nB₂' : BilinForm R₂ M₂'\nf₂ f₂' : M₂ →ₗ[R₂] M₂'\ng₂ g₂' : M₂' →ₗ[R₂] M₂\nM'' : Type u_15\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\nB'' : BilinForm R M''\nF₂ : BilinForm R₂ M₂\nB₃ : BilinForm R₃ M₃\nf : Module.End R₃ M₃\n⊢ f ∈ skewAdjointSubmodule B₃ ↔ IsSkewAdjoint B₃ f\n[PROOFSTEP]\nrw [isSkewAdjoint_iff_neg_self_adjoint]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁴ : Semiring R\ninst✝²³ : AddCommMonoid M\ninst✝²² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝²¹ : Ring R₁\ninst✝²⁰ : AddCommGroup M₁\ninst✝¹⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁸ : CommSemiring R₂\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁵ : CommRing R₃\ninst✝¹⁴ : AddCommGroup M₃\ninst✝¹³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝¹² : Field K\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\nM₂'' : Type u_12\ninst✝⁹ : AddCommMonoid M₂'\ninst✝⁸ : AddCommMonoid M₂''\ninst✝⁷ : Module R₂ M₂'\ninst✝⁶ : Module R₂ M₂''\nF : BilinForm R M\nM' : Type u_13\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : Module R M'\nB' : BilinForm R M'\nf✝ f' : M →ₗ[R] M'\ng g' : M' →ₗ[R] M\nM₁' : Type u_14\ninst✝³ : AddCommGroup M₁'\ninst✝² : Module R₁ M₁'\nB₁' : BilinForm R₁ M₁'\nf₁ f₁' : M₁ →ₗ[R₁] M₁'\ng₁ g₁' : M₁' →ₗ[R₁] M₁\nB₂' : BilinForm R₂ M₂'\nf₂ f₂' : M₂ →ₗ[R₂] M₂'\ng₂ g₂' : M₂' →ₗ[R₂] M₂\nM'' : Type u_15\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\nB'' : BilinForm R M''\nF₂ : BilinForm R₂ M₂\nB₃ : BilinForm R₃ M₃\nf : Module.End R₃ M₃\n⊢ f ∈ skewAdjointSubmodule B₃ ↔ IsAdjointPair (-B₃) B₃ f f\n[PROOFSTEP]\nexact Iff.rfl\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nB : BilinForm R M\nN : Submodule R M\nx y : M\nhx : x ∈ {m | ∀ (n : M), n ∈ N → IsOrtho B n m}\nhy : y ∈ {m | ∀ (n : M), n ∈ N → IsOrtho B n m}\nn : M\nhn : n ∈ N\n⊢ IsOrtho B n (x + y)\n[PROOFSTEP]\nrw [IsOrtho, add_right, show B n x = 0 from hx n hn, show B n y = 0 from hy n hn, zero_add]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nB : BilinForm R M\nN : Submodule R M\nc : R\nx : M\nhx :\n x ∈\n {\n toAddSubsemigroup :=\n { carrier := {m | ∀ (n : M), n ∈ N → IsOrtho B n m},\n add_mem' :=\n (_ :\n ∀ {x y : M},\n x ∈ {m | ∀ (n : M), n ∈ N → IsOrtho B n m} →\n y ∈ {m | ∀ (n : M), n ∈ N → IsOrtho B n m} → ∀ (n : M), n ∈ N → IsOrtho B n (x + y)) },\n zero_mem' := (_ : ∀ (x : M), x ∈ N → IsOrtho B x 0) }.toAddSubsemigroup.carrier\nn : M\nhn : n ∈ N\n⊢ IsOrtho B n (c • x)\n[PROOFSTEP]\nrw [IsOrtho, smul_right, show B n x = 0 from hx n hn, mul_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx : V\nhx : ¬IsOrtho B x x\n⊢ Submodule.span K {x} ⊓ orthogonal B (Submodule.span K {x}) = ⊥\n[PROOFSTEP]\nrw [← Finset.coe_singleton]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx : V\nhx : ¬IsOrtho B x x\n⊢ Submodule.span K ↑{x} ⊓ orthogonal B (Submodule.span K ↑{x}) = ⊥\n[PROOFSTEP]\nrefine' eq_bot_iff.2 fun y h => _\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx : V\nhx : ¬IsOrtho B x x\ny : V\nh : y ∈ Submodule.span K ↑{x} ⊓ orthogonal B (Submodule.span K ↑{x})\n⊢ y ∈ ⊥\n[PROOFSTEP]\nrcases mem_span_finset.1 h.1 with ⟨μ, rfl⟩\n[GOAL]\ncase intro\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx : V\nhx : ¬IsOrtho B x x\nμ : V → K\nh : ∑ i in {x}, μ i • i ∈ Submodule.span K ↑{x} ⊓ orthogonal B (Submodule.span K ↑{x})\n⊢ ∑ i in {x}, μ i • i ∈ ⊥\n[PROOFSTEP]\nhave := h.2 x ?_\n[GOAL]\ncase intro.refine_2\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx : V\nhx : ¬IsOrtho B x x\nμ : V → K\nh : ∑ i in {x}, μ i • i ∈ Submodule.span K ↑{x} ⊓ orthogonal B (Submodule.span K ↑{x})\nthis : IsOrtho B x (∑ i in {x}, μ i • i)\n⊢ ∑ i in {x}, μ i • i ∈ ⊥\n[PROOFSTEP]\nrw [Finset.sum_singleton] at this ⊢\n[GOAL]\ncase intro.refine_2\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx : V\nhx : ¬IsOrtho B x x\nμ : V → K\nh : ∑ i in {x}, μ i • i ∈ Submodule.span K ↑{x} ⊓ orthogonal B (Submodule.span K ↑{x})\nthis : IsOrtho B x (μ x • x)\n⊢ μ x • x ∈ ⊥\n[PROOFSTEP]\nsuffices hμzero : μ x = 0\n[GOAL]\ncase intro.refine_2\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx : V\nhx : ¬IsOrtho B x x\nμ : V → K\nh : ∑ i in {x}, μ i • i ∈ Submodule.span K ↑{x} ⊓ orthogonal B (Submodule.span K ↑{x})\nthis : IsOrtho B x (μ x • x)\nhμzero : μ x = 0\n⊢ μ x • x ∈ ⊥\n[PROOFSTEP]\nrw [hμzero, zero_smul, Submodule.mem_bot]\n[GOAL]\ncase hμzero\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx : V\nhx : ¬IsOrtho B x x\nμ : V → K\nh : ∑ i in {x}, μ i • i ∈ Submodule.span K ↑{x} ⊓ orthogonal B (Submodule.span K ↑{x})\nthis : IsOrtho B x (μ x • x)\n⊢ μ x = 0\n[PROOFSTEP]\nchange B x (μ x • x) = 0 at this \n[GOAL]\ncase hμzero\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx : V\nhx : ¬IsOrtho B x x\nμ : V → K\nh : ∑ i in {x}, μ i • i ∈ Submodule.span K ↑{x} ⊓ orthogonal B (Submodule.span K ↑{x})\nthis : bilin B x (μ x • x) = 0\n⊢ μ x = 0\n[PROOFSTEP]\nrw [smul_right] at this \n[GOAL]\ncase hμzero\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx : V\nhx : ¬IsOrtho B x x\nμ : V → K\nh : ∑ i in {x}, μ i • i ∈ Submodule.span K ↑{x} ⊓ orthogonal B (Submodule.span K ↑{x})\nthis : μ x * bilin B x x = 0\n⊢ μ x = 0\n[PROOFSTEP]\nexact eq_zero_of_ne_zero_of_mul_right_eq_zero hx this\n[GOAL]\ncase intro.refine_1\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx : V\nhx : ¬IsOrtho B x x\nμ : V → K\nh : ∑ i in {x}, μ i • i ∈ Submodule.span K ↑{x} ⊓ orthogonal B (Submodule.span K ↑{x})\n⊢ x ∈ Submodule.span K ↑{x}\n[PROOFSTEP]\nrw [Submodule.mem_span]\n[GOAL]\ncase intro.refine_1\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx : V\nhx : ¬IsOrtho B x x\nμ : V → K\nh : ∑ i in {x}, μ i • i ∈ Submodule.span K ↑{x} ⊓ orthogonal B (Submodule.span K ↑{x})\n⊢ ∀ (p : Submodule K V), ↑{x} ⊆ ↑p → x ∈ p\n[PROOFSTEP]\nexact fun _ hp => hp <| Finset.mem_singleton_self _\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx : V\n⊢ orthogonal B (Submodule.span K {x}) = LinearMap.ker (↑(↑toLin B) x)\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx y : V\n⊢ y ∈ orthogonal B (Submodule.span K {x}) ↔ y ∈ LinearMap.ker (↑(↑toLin B) x)\n[PROOFSTEP]\nsimp_rw [mem_orthogonal_iff, LinearMap.mem_ker, Submodule.mem_span_singleton]\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx y : V\n⊢ (∀ (n : V), (∃ a, a • x = n) → IsOrtho B n y) ↔ ↑(↑(↑toLin B) x) y = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx y : V\n⊢ (∀ (n : V), (∃ a, a • x = n) → IsOrtho B n y) → ↑(↑(↑toLin B) x) y = 0\n[PROOFSTEP]\nexact fun h => h x ⟨1, one_smul _ _⟩\n[GOAL]\ncase h.mpr\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx y : V\n⊢ ↑(↑(↑toLin B) x) y = 0 → ∀ (n : V), (∃ a, a • x = n) → IsOrtho B n y\n[PROOFSTEP]\nrintro h _ ⟨z, rfl⟩\n[GOAL]\ncase h.mpr.intro\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx y : V\nh : ↑(↑(↑toLin B) x) y = 0\nz : K\n⊢ IsOrtho B (z • x) y\n[PROOFSTEP]\nrw [IsOrtho, smul_left, mul_eq_zero]\n[GOAL]\ncase h.mpr.intro\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx y : V\nh : ↑(↑(↑toLin B) x) y = 0\nz : K\n⊢ z = 0 ∨ bilin B x y = 0\n[PROOFSTEP]\nexact Or.intro_right _ h\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx : V\nhx : ¬IsOrtho B x x\n⊢ Submodule.span K {x} ⊔ orthogonal B (Submodule.span K {x}) = ⊤\n[PROOFSTEP]\nrw [orthogonal_span_singleton_eq_toLin_ker]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹¹ : Ring R₁\ninst✝¹⁰ : AddCommGroup M₁\ninst✝⁹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁸ : CommSemiring R₂\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁵ : CommRing R₃\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nN L : Submodule R M\nB : BilinForm K V\nx : V\nhx : ¬IsOrtho B x x\n⊢ Submodule.span K {x} ⊔ LinearMap.ker (↑(↑toLin B) x) = ⊤\n[PROOFSTEP]\nexact LinearMap.span_singleton_sup_ker_eq_top _ hx\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₂ M₂\ne : M₂ ≃ₗ[R₂] M₂'\nh : Nondegenerate (↑(congr e) B)\n⊢ Nondegenerate B\n[PROOFSTEP]\nconvert h.congr e.symm\n[GOAL]\ncase h.e'_6\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₂ M₂\ne : M₂ ≃ₗ[R₂] M₂'\nh : Nondegenerate (↑(congr e) B)\n⊢ B = ↑(congr (LinearEquiv.symm e)) (↑(congr e) B)\n[PROOFSTEP]\nrw [congr_congr, e.self_trans_symm, congr_refl, LinearEquiv.refl_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₂ M₂\n⊢ Nondegenerate B ↔ LinearMap.ker (↑toLin B) = ⊥\n[PROOFSTEP]\nrw [LinearMap.ker_eq_bot']\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₂ M₂\n⊢ Nondegenerate B ↔ ∀ (m : M₂), ↑(↑toLin B) m = 0 → m = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₂ M₂\n⊢ Nondegenerate B → ∀ (m : M₂), ↑(↑toLin B) m = 0 → m = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₂ M₂\n⊢ (∀ (m : M₂), ↑(↑toLin B) m = 0 → m = 0) → Nondegenerate B\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₂ M₂\nh : Nondegenerate B\n⊢ ∀ (m : M₂), ↑(↑toLin B) m = 0 → m = 0\n[PROOFSTEP]\nrefine' fun m hm => h _ fun x => _\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₂ M₂\nh : Nondegenerate B\nm : M₂\nhm : ↑(↑toLin B) m = 0\nx : M₂\n⊢ bilin B m x = 0\n[PROOFSTEP]\nrw [← toLin_apply, hm]\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₂ M₂\nh : Nondegenerate B\nm : M₂\nhm : ↑(↑toLin B) m = 0\nx : M₂\n⊢ ↑0 x = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₂ M₂\nh : ∀ (m : M₂), ↑(↑toLin B) m = 0 → m = 0\n⊢ Nondegenerate B\n[PROOFSTEP]\nintro m hm\n[GOAL]\ncase mpr\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₂ M₂\nh : ∀ (m : M₂), ↑(↑toLin B) m = 0 → m = 0\nm : M₂\nhm : ∀ (n : M₂), bilin B m n = 0\n⊢ m = 0\n[PROOFSTEP]\napply h\n[GOAL]\ncase mpr.a\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₂ M₂\nh : ∀ (m : M₂), ↑(↑toLin B) m = 0 → m = 0\nm : M₂\nhm : ∀ (n : M₂), bilin B m n = 0\n⊢ ↑(↑toLin B) m = 0\n[PROOFSTEP]\next x\n[GOAL]\ncase mpr.a.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₂ M₂\nh : ∀ (m : M₂), ↑(↑toLin B) m = 0 → m = 0\nm : M₂\nhm : ∀ (n : M₂), bilin B m n = 0\nx : M₂\n⊢ ↑(↑(↑toLin B) m) x = ↑0 x\n[PROOFSTEP]\nexact hm x\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₁ M₁\nb : IsRefl B\nW : Submodule R₁ M₁\nhW : Disjoint W (orthogonal B W)\n⊢ Nondegenerate (restrict B W)\n[PROOFSTEP]\nrintro ⟨x, hx⟩ b₁\n[GOAL]\ncase mk\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₁ M₁\nb : IsRefl B\nW : Submodule R₁ M₁\nhW : Disjoint W (orthogonal B W)\nx : M₁\nhx : x ∈ W\nb₁ : ∀ (n : { x // x ∈ W }), bilin (restrict B W) { val := x, property := hx } n = 0\n⊢ { val := x, property := hx } = 0\n[PROOFSTEP]\nrw [Submodule.mk_eq_zero, ← Submodule.mem_bot R₁]\n[GOAL]\ncase mk\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₁ M₁\nb : IsRefl B\nW : Submodule R₁ M₁\nhW : Disjoint W (orthogonal B W)\nx : M₁\nhx : x ∈ W\nb₁ : ∀ (n : { x // x ∈ W }), bilin (restrict B W) { val := x, property := hx } n = 0\n⊢ x ∈ ⊥\n[PROOFSTEP]\nrefine' hW.le_bot ⟨hx, fun y hy => _⟩\n[GOAL]\ncase mk\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₁ M₁\nb : IsRefl B\nW : Submodule R₁ M₁\nhW : Disjoint W (orthogonal B W)\nx : M₁\nhx : x ∈ W\nb₁ : ∀ (n : { x // x ∈ W }), bilin (restrict B W) { val := x, property := hx } n = 0\ny : M₁\nhy : y ∈ W\n⊢ IsOrtho B y x\n[PROOFSTEP]\nspecialize b₁ ⟨y, hy⟩\n[GOAL]\ncase mk\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₁ M₁\nb : IsRefl B\nW : Submodule R₁ M₁\nhW : Disjoint W (orthogonal B W)\nx : M₁\nhx : x ∈ W\ny : M₁\nhy : y ∈ W\nb₁ : bilin (restrict B W) { val := x, property := hx } { val := y, property := hy } = 0\n⊢ IsOrtho B y x\n[PROOFSTEP]\nrw [restrict_apply, Submodule.coe_mk, Submodule.coe_mk] at b₁ \n[GOAL]\ncase mk\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₁ M₁\nb : IsRefl B\nW : Submodule R₁ M₁\nhW : Disjoint W (orthogonal B W)\nx : M₁\nhx : x ∈ W\ny : M₁\nhy : y ∈ W\nb₁ : bilin B x y = 0\n⊢ IsOrtho B y x\n[PROOFSTEP]\nexact isOrtho_def.mpr (b x y b₁)\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nn : Type w\ninst✝ : Nontrivial R\nB : BilinForm R M\nv : Basis n R M\nh : iIsOrtho B ↑v\nhB : Nondegenerate B\ni : n\n⊢ ¬IsOrtho B (↑v i) (↑v i)\n[PROOFSTEP]\nintro ho\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nn : Type w\ninst✝ : Nontrivial R\nB : BilinForm R M\nv : Basis n R M\nh : iIsOrtho B ↑v\nhB : Nondegenerate B\ni : n\nho : IsOrtho B (↑v i) (↑v i)\n⊢ False\n[PROOFSTEP]\nrefine' v.ne_zero i (hB (v i) fun m => _)\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nn : Type w\ninst✝ : Nontrivial R\nB : BilinForm R M\nv : Basis n R M\nh : iIsOrtho B ↑v\nhB : Nondegenerate B\ni : n\nho : IsOrtho B (↑v i) (↑v i)\nm : M\n⊢ bilin B (↑v i) m = 0\n[PROOFSTEP]\nobtain ⟨vi, rfl⟩ := v.repr.symm.surjective m\n[GOAL]\ncase intro\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nn : Type w\ninst✝ : Nontrivial R\nB : BilinForm R M\nv : Basis n R M\nh : iIsOrtho B ↑v\nhB : Nondegenerate B\ni : n\nho : IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\n⊢ bilin B (↑v i) (↑(LinearEquiv.symm v.repr) vi) = 0\n[PROOFSTEP]\nrw [Basis.repr_symm_apply, Finsupp.total_apply, Finsupp.sum, sum_right]\n[GOAL]\ncase intro\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nn : Type w\ninst✝ : Nontrivial R\nB : BilinForm R M\nv : Basis n R M\nh : iIsOrtho B ↑v\nhB : Nondegenerate B\ni : n\nho : IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\n⊢ ∑ i_1 in vi.support, bilin B (↑v i) (↑vi i_1 • ↑v i_1) = 0\n[PROOFSTEP]\napply Finset.sum_eq_zero\n[GOAL]\ncase intro.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nn : Type w\ninst✝ : Nontrivial R\nB : BilinForm R M\nv : Basis n R M\nh : iIsOrtho B ↑v\nhB : Nondegenerate B\ni : n\nho : IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\n⊢ ∀ (x : n), x ∈ vi.support → bilin B (↑v i) (↑vi x • ↑v x) = 0\n[PROOFSTEP]\nrintro j -\n[GOAL]\ncase intro.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nn : Type w\ninst✝ : Nontrivial R\nB : BilinForm R M\nv : Basis n R M\nh : iIsOrtho B ↑v\nhB : Nondegenerate B\ni : n\nho : IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\nj : n\n⊢ bilin B (↑v i) (↑vi j • ↑v j) = 0\n[PROOFSTEP]\nrw [smul_right]\n[GOAL]\ncase intro.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nn : Type w\ninst✝ : Nontrivial R\nB : BilinForm R M\nv : Basis n R M\nh : iIsOrtho B ↑v\nhB : Nondegenerate B\ni : n\nho : IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\nj : n\n⊢ ↑vi j * bilin B (↑v i) (↑v j) = 0\n[PROOFSTEP]\nconvert mul_zero (vi j) using 2\n[GOAL]\ncase h.e'_2.h.e'_6\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nn : Type w\ninst✝ : Nontrivial R\nB : BilinForm R M\nv : Basis n R M\nh : iIsOrtho B ↑v\nhB : Nondegenerate B\ni : n\nho : IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\nj : n\n⊢ bilin B (↑v i) (↑v j) = 0\n[PROOFSTEP]\nobtain rfl | hij := eq_or_ne i j\n[GOAL]\ncase h.e'_2.h.e'_6.inl\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nn : Type w\ninst✝ : Nontrivial R\nB : BilinForm R M\nv : Basis n R M\nh : iIsOrtho B ↑v\nhB : Nondegenerate B\ni : n\nho : IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\n⊢ bilin B (↑v i) (↑v i) = 0\n[PROOFSTEP]\nexact ho\n[GOAL]\ncase h.e'_2.h.e'_6.inr\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nn : Type w\ninst✝ : Nontrivial R\nB : BilinForm R M\nv : Basis n R M\nh : iIsOrtho B ↑v\nhB : Nondegenerate B\ni : n\nho : IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\nj : n\nhij : i ≠ j\n⊢ bilin B (↑v i) (↑v j) = 0\n[PROOFSTEP]\nexact h hij\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝³ : AddCommMonoid M₂'\ninst✝² : Module R₂ M₂'\nn : Type w\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroDivisors R\nB : BilinForm R M\nv : Basis n R M\nhO : iIsOrtho B ↑v\n⊢ Nondegenerate B ↔ ∀ (i : n), ¬IsOrtho B (↑v i) (↑v i)\n[PROOFSTEP]\nrefine' ⟨hO.not_isOrtho_basis_self_of_nondegenerate, fun ho m hB => _⟩\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝³ : AddCommMonoid M₂'\ninst✝² : Module R₂ M₂'\nn : Type w\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroDivisors R\nB : BilinForm R M\nv : Basis n R M\nhO : iIsOrtho B ↑v\nho : ∀ (i : n), ¬IsOrtho B (↑v i) (↑v i)\nm : M\nhB : ∀ (n : M), bilin B m n = 0\n⊢ m = 0\n[PROOFSTEP]\nobtain ⟨vi, rfl⟩ := v.repr.symm.surjective m\n[GOAL]\ncase intro\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝³ : AddCommMonoid M₂'\ninst✝² : Module R₂ M₂'\nn : Type w\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroDivisors R\nB : BilinForm R M\nv : Basis n R M\nhO : iIsOrtho B ↑v\nho : ∀ (i : n), ¬IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\nhB : ∀ (n_1 : M), bilin B (↑(LinearEquiv.symm v.repr) vi) n_1 = 0\n⊢ ↑(LinearEquiv.symm v.repr) vi = 0\n[PROOFSTEP]\nrw [LinearEquiv.map_eq_zero_iff]\n[GOAL]\ncase intro\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝³ : AddCommMonoid M₂'\ninst✝² : Module R₂ M₂'\nn : Type w\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroDivisors R\nB : BilinForm R M\nv : Basis n R M\nhO : iIsOrtho B ↑v\nho : ∀ (i : n), ¬IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\nhB : ∀ (n_1 : M), bilin B (↑(LinearEquiv.symm v.repr) vi) n_1 = 0\n⊢ vi = 0\n[PROOFSTEP]\next i\n[GOAL]\ncase intro.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝³ : AddCommMonoid M₂'\ninst✝² : Module R₂ M₂'\nn : Type w\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroDivisors R\nB : BilinForm R M\nv : Basis n R M\nhO : iIsOrtho B ↑v\nho : ∀ (i : n), ¬IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\nhB : ∀ (n_1 : M), bilin B (↑(LinearEquiv.symm v.repr) vi) n_1 = 0\ni : n\n⊢ ↑vi i = ↑0 i\n[PROOFSTEP]\nrw [Finsupp.zero_apply]\n[GOAL]\ncase intro.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝³ : AddCommMonoid M₂'\ninst✝² : Module R₂ M₂'\nn : Type w\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroDivisors R\nB : BilinForm R M\nv : Basis n R M\nhO : iIsOrtho B ↑v\nho : ∀ (i : n), ¬IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\nhB : ∀ (n_1 : M), bilin B (↑(LinearEquiv.symm v.repr) vi) n_1 = 0\ni : n\n⊢ ↑vi i = 0\n[PROOFSTEP]\nspecialize hB (v i)\n[GOAL]\ncase intro.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝³ : AddCommMonoid M₂'\ninst✝² : Module R₂ M₂'\nn : Type w\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroDivisors R\nB : BilinForm R M\nv : Basis n R M\nhO : iIsOrtho B ↑v\nho : ∀ (i : n), ¬IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\ni : n\nhB : bilin B (↑(LinearEquiv.symm v.repr) vi) (↑v i) = 0\n⊢ ↑vi i = 0\n[PROOFSTEP]\nsimp_rw [Basis.repr_symm_apply, Finsupp.total_apply, Finsupp.sum, sum_left, smul_left] at hB \n[GOAL]\ncase intro.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝³ : AddCommMonoid M₂'\ninst✝² : Module R₂ M₂'\nn : Type w\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroDivisors R\nB : BilinForm R M\nv : Basis n R M\nhO : iIsOrtho B ↑v\nho : ∀ (i : n), ¬IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\ni : n\nhB : ∑ x in vi.support, ↑vi x * bilin B (↑v x) (↑v i) = 0\n⊢ ↑vi i = 0\n[PROOFSTEP]\nrw [Finset.sum_eq_single i] at hB \n[GOAL]\ncase intro.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝³ : AddCommMonoid M₂'\ninst✝² : Module R₂ M₂'\nn : Type w\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroDivisors R\nB : BilinForm R M\nv : Basis n R M\nhO : iIsOrtho B ↑v\nho : ∀ (i : n), ¬IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\ni : n\nhB : ↑vi i * bilin B (↑v i) (↑v i) = 0\n⊢ ↑vi i = 0\n[PROOFSTEP]\nexact eq_zero_of_ne_zero_of_mul_right_eq_zero (ho i) hB\n[GOAL]\ncase intro.h.h₀\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝³ : AddCommMonoid M₂'\ninst✝² : Module R₂ M₂'\nn : Type w\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroDivisors R\nB : BilinForm R M\nv : Basis n R M\nhO : iIsOrtho B ↑v\nho : ∀ (i : n), ¬IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\ni : n\nhB : ∑ x in vi.support, ↑vi x * bilin B (↑v x) (↑v i) = 0\n⊢ ∀ (b : n), b ∈ vi.support → b ≠ i → ↑vi b * bilin B (↑v b) (↑v i) = 0\n[PROOFSTEP]\nintro j _ hij\n[GOAL]\ncase intro.h.h₀\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝³ : AddCommMonoid M₂'\ninst✝² : Module R₂ M₂'\nn : Type w\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroDivisors R\nB : BilinForm R M\nv : Basis n R M\nhO : iIsOrtho B ↑v\nho : ∀ (i : n), ¬IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\ni : n\nhB : ∑ x in vi.support, ↑vi x * bilin B (↑v x) (↑v i) = 0\nj : n\na✝ : j ∈ vi.support\nhij : j ≠ i\n⊢ ↑vi j * bilin B (↑v j) (↑v i) = 0\n[PROOFSTEP]\nconvert mul_zero (vi j) using 2\n[GOAL]\ncase h.e'_2.h.e'_6\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝³ : AddCommMonoid M₂'\ninst✝² : Module R₂ M₂'\nn : Type w\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroDivisors R\nB : BilinForm R M\nv : Basis n R M\nhO : iIsOrtho B ↑v\nho : ∀ (i : n), ¬IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\ni : n\nhB : ∑ x in vi.support, ↑vi x * bilin B (↑v x) (↑v i) = 0\nj : n\na✝ : j ∈ vi.support\nhij : j ≠ i\n⊢ bilin B (↑v j) (↑v i) = 0\n[PROOFSTEP]\nexact hO hij\n[GOAL]\ncase intro.h.h₁\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝³ : AddCommMonoid M₂'\ninst✝² : Module R₂ M₂'\nn : Type w\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroDivisors R\nB : BilinForm R M\nv : Basis n R M\nhO : iIsOrtho B ↑v\nho : ∀ (i : n), ¬IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\ni : n\nhB : ∑ x in vi.support, ↑vi x * bilin B (↑v x) (↑v i) = 0\n⊢ ¬i ∈ vi.support → ↑vi i * bilin B (↑v i) (↑v i) = 0\n[PROOFSTEP]\nintro hi\n[GOAL]\ncase intro.h.h₁\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝³ : AddCommMonoid M₂'\ninst✝² : Module R₂ M₂'\nn : Type w\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroDivisors R\nB : BilinForm R M\nv : Basis n R M\nhO : iIsOrtho B ↑v\nho : ∀ (i : n), ¬IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\ni : n\nhB : ∑ x in vi.support, ↑vi x * bilin B (↑v x) (↑v i) = 0\nhi : ¬i ∈ vi.support\n⊢ ↑vi i * bilin B (↑v i) (↑v i) = 0\n[PROOFSTEP]\nconvert zero_mul (M₀ := R) _ using 2\n[GOAL]\ncase h.e'_2.h.e'_5\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝³ : AddCommMonoid M₂'\ninst✝² : Module R₂ M₂'\nn : Type w\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroDivisors R\nB : BilinForm R M\nv : Basis n R M\nhO : iIsOrtho B ↑v\nho : ∀ (i : n), ¬IsOrtho B (↑v i) (↑v i)\nvi : n →₀ R\ni : n\nhB : ∑ x in vi.support, ↑vi x * bilin B (↑v x) (↑v i) = 0\nhi : ¬i ∈ vi.support\n⊢ ↑vi i = 0\n[PROOFSTEP]\nexact Finsupp.not_mem_support_iff.mp hi\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\n⊢ Submodule.map (Submodule.subtype W) (LinearMap.ker (LinearMap.domRestrict (↑toLin B) W)) = W ⊓ orthogonal B ⊤\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\nx : V\n⊢ x ∈ Submodule.map (Submodule.subtype W) (LinearMap.ker (LinearMap.domRestrict (↑toLin B) W)) ↔ x ∈ W ⊓ orthogonal B ⊤\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\nx : V\n⊢ x ∈ Submodule.map (Submodule.subtype W) (LinearMap.ker (LinearMap.domRestrict (↑toLin B) W)) → x ∈ W ⊓ orthogonal B ⊤\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase h.mpr\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\nx : V\n⊢ x ∈ W ⊓ orthogonal B ⊤ → x ∈ Submodule.map (Submodule.subtype W) (LinearMap.ker (LinearMap.domRestrict (↑toLin B) W))\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase h.mp\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\nx : V\nhx : x ∈ Submodule.map (Submodule.subtype W) (LinearMap.ker (LinearMap.domRestrict (↑toLin B) W))\n⊢ x ∈ W ⊓ orthogonal B ⊤\n[PROOFSTEP]\nrcases hx with ⟨⟨x, hx⟩, hker, rfl⟩\n[GOAL]\ncase h.mp.intro.mk.intro\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\nx : V\nhx : x ∈ W\nhker : { val := x, property := hx } ∈ ↑(LinearMap.ker (LinearMap.domRestrict (↑toLin B) W))\n⊢ ↑(Submodule.subtype W) { val := x, property := hx } ∈ W ⊓ orthogonal B ⊤\n[PROOFSTEP]\nerw [LinearMap.mem_ker] at hker \n[GOAL]\ncase h.mp.intro.mk.intro\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\nx : V\nhx : x ∈ W\nhker : ↑(LinearMap.domRestrict (↑toLin B) W) { val := x, property := hx } = 0\n⊢ ↑(Submodule.subtype W) { val := x, property := hx } ∈ W ⊓ orthogonal B ⊤\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp.intro.mk.intro.left\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\nx : V\nhx : x ∈ W\nhker : ↑(LinearMap.domRestrict (↑toLin B) W) { val := x, property := hx } = 0\n⊢ ↑(Submodule.subtype W) { val := x, property := hx } ∈ ↑W\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase h.mp.intro.mk.intro.right\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\nx : V\nhx : x ∈ W\nhker : ↑(LinearMap.domRestrict (↑toLin B) W) { val := x, property := hx } = 0\n⊢ ↑(Submodule.subtype W) { val := x, property := hx } ∈ ↑(orthogonal B ⊤)\n[PROOFSTEP]\nintro y _\n[GOAL]\ncase h.mp.intro.mk.intro.right\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\nx : V\nhx : x ∈ W\nhker : ↑(LinearMap.domRestrict (↑toLin B) W) { val := x, property := hx } = 0\ny : V\na✝ : y ∈ ⊤\n⊢ IsOrtho B y (↑(Submodule.subtype W) { val := x, property := hx })\n[PROOFSTEP]\nrw [IsOrtho, b]\n[GOAL]\ncase h.mp.intro.mk.intro.right.a\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\nx : V\nhx : x ∈ W\nhker : ↑(LinearMap.domRestrict (↑toLin B) W) { val := x, property := hx } = 0\ny : V\na✝ : y ∈ ⊤\n⊢ bilin B (↑(Submodule.subtype W) { val := x, property := hx }) y = 0\n[PROOFSTEP]\nchange (B.toLin.domRestrict W) ⟨x, hx⟩ y = 0\n[GOAL]\ncase h.mp.intro.mk.intro.right.a\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\nx : V\nhx : x ∈ W\nhker : ↑(LinearMap.domRestrict (↑toLin B) W) { val := x, property := hx } = 0\ny : V\na✝ : y ∈ ⊤\n⊢ ↑(↑(LinearMap.domRestrict (↑toLin B) W) { val := x, property := hx }) y = 0\n[PROOFSTEP]\nrw [hker]\n[GOAL]\ncase h.mp.intro.mk.intro.right.a\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\nx : V\nhx : x ∈ W\nhker : ↑(LinearMap.domRestrict (↑toLin B) W) { val := x, property := hx } = 0\ny : V\na✝ : y ∈ ⊤\n⊢ ↑0 y = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.mpr\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\nx : V\nhx : x ∈ W ⊓ orthogonal B ⊤\n⊢ x ∈ Submodule.map (Submodule.subtype W) (LinearMap.ker (LinearMap.domRestrict (↑toLin B) W))\n[PROOFSTEP]\nsimp_rw [Submodule.mem_map, LinearMap.mem_ker]\n[GOAL]\ncase h.mpr\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\nx : V\nhx : x ∈ W ⊓ orthogonal B ⊤\n⊢ ∃ y, ↑(LinearMap.domRestrict (↑toLin B) W) y = 0 ∧ ↑(Submodule.subtype W) y = x\n[PROOFSTEP]\nrefine' ⟨⟨x, hx.1⟩, _, rfl⟩\n[GOAL]\ncase h.mpr\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\nx : V\nhx : x ∈ W ⊓ orthogonal B ⊤\n⊢ ↑(LinearMap.domRestrict (↑toLin B) W) { val := x, property := (_ : x ∈ ↑W) } = 0\n[PROOFSTEP]\next y\n[GOAL]\ncase h.mpr.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\nx : V\nhx : x ∈ W ⊓ orthogonal B ⊤\ny : V\n⊢ ↑(↑(LinearMap.domRestrict (↑toLin B) W) { val := x, property := (_ : x ∈ ↑W) }) y = ↑0 y\n[PROOFSTEP]\nchange B x y = 0\n[GOAL]\ncase h.mpr.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\nx : V\nhx : x ∈ W ⊓ orthogonal B ⊤\ny : V\n⊢ bilin B x y = 0\n[PROOFSTEP]\nrw [b]\n[GOAL]\ncase h.mpr.h.a\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nb : IsRefl B\nx : V\nhx : x ∈ W ⊓ orthogonal B ⊤\ny : V\n⊢ bilin B y x = 0\n[PROOFSTEP]\nexact hx.2 _ Submodule.mem_top\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\n⊢ Submodule.dualCoannihilator (LinearMap.range (LinearMap.domRestrict (↑toLin B) W)) = orthogonal B W\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nx : V\n⊢ x ∈ Submodule.dualCoannihilator (LinearMap.range (LinearMap.domRestrict (↑toLin B) W)) ↔ x ∈ orthogonal B W\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nx : V\n⊢ x ∈ Submodule.dualCoannihilator (LinearMap.range (LinearMap.domRestrict (↑toLin B) W)) → x ∈ orthogonal B W\n[PROOFSTEP]\nrw [mem_orthogonal_iff]\n[GOAL]\ncase h.mpr\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nx : V\n⊢ x ∈ orthogonal B W → x ∈ Submodule.dualCoannihilator (LinearMap.range (LinearMap.domRestrict (↑toLin B) W))\n[PROOFSTEP]\nrw [mem_orthogonal_iff]\n[GOAL]\ncase h.mp\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nx : V\n⊢ x ∈ Submodule.dualCoannihilator (LinearMap.range (LinearMap.domRestrict (↑toLin B) W)) →\n ∀ (n : V), n ∈ W → IsOrtho B n x\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase h.mpr\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nx : V\n⊢ (∀ (n : V), n ∈ W → IsOrtho B n x) →\n x ∈ Submodule.dualCoannihilator (LinearMap.range (LinearMap.domRestrict (↑toLin B) W))\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase h.mp\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nx : V\nhx : x ∈ Submodule.dualCoannihilator (LinearMap.range (LinearMap.domRestrict (↑toLin B) W))\n⊢ ∀ (n : V), n ∈ W → IsOrtho B n x\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase h.mp\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nx : V\nhx : x ∈ Submodule.dualCoannihilator (LinearMap.range (LinearMap.domRestrict (↑toLin B) W))\ny : V\nhy : y ∈ W\n⊢ IsOrtho B y x\n[PROOFSTEP]\nrw [Submodule.mem_dualCoannihilator] at hx \n[GOAL]\ncase h.mp\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nx : V\nhx : ∀ (φ : Module.Dual K V), φ ∈ LinearMap.range (LinearMap.domRestrict (↑toLin B) W) → ↑φ x = 0\ny : V\nhy : y ∈ W\n⊢ IsOrtho B y x\n[PROOFSTEP]\nrefine' hx (B.toLin.domRestrict W ⟨y, hy⟩) ⟨⟨y, hy⟩, rfl⟩\n[GOAL]\ncase h.mpr\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nx : V\nhx : ∀ (n : V), n ∈ W → IsOrtho B n x\n⊢ x ∈ Submodule.dualCoannihilator (LinearMap.range (LinearMap.domRestrict (↑toLin B) W))\n[PROOFSTEP]\nrw [Submodule.mem_dualCoannihilator]\n[GOAL]\ncase h.mpr\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nx : V\nhx : ∀ (n : V), n ∈ W → IsOrtho B n x\n⊢ ∀ (φ : Module.Dual K V), φ ∈ LinearMap.range (LinearMap.domRestrict (↑toLin B) W) → ↑φ x = 0\n[PROOFSTEP]\nrintro _ ⟨⟨w, hw⟩, rfl⟩\n[GOAL]\ncase h.mpr.intro.mk\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nW : Subspace K V\nx : V\nhx : ∀ (n : V), n ∈ W → IsOrtho B n x\nw : V\nhw : w ∈ W\n⊢ ↑(↑(LinearMap.domRestrict (↑toLin B) W) { val := w, property := hw }) x = 0\n[PROOFSTEP]\nexact hx w hw\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\n⊢ finrank K { x // x ∈ W } + finrank K { x // x ∈ orthogonal B W } =\n finrank K V + finrank K { x // x ∈ W ⊓ orthogonal B ⊤ }\n[PROOFSTEP]\nrw [← toLin_restrict_ker_eq_inf_orthogonal _ _ b₁, ← toLin_restrict_range_dualCoannihilator_eq_orthogonal _ _,\n finrank_map_subtype_eq]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\n⊢ finrank K { x // x ∈ W } +\n finrank K { x // x ∈ dualCoannihilator (LinearMap.range (LinearMap.domRestrict (↑toLin B) W)) } =\n finrank K V + finrank K { x // x ∈ LinearMap.ker (LinearMap.domRestrict (↑toLin B) W) }\n[PROOFSTEP]\nconv_rhs =>\n rw [← @Subspace.finrank_add_finrank_dualCoannihilator_eq K V _ _ _ _ (LinearMap.range (B.toLin.domRestrict W)),\n add_comm, ← add_assoc, add_comm (finrank K (LinearMap.ker (B.toLin.domRestrict W))),\n LinearMap.finrank_range_add_finrank_ker]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\n| finrank K V + finrank K { x // x ∈ LinearMap.ker (LinearMap.domRestrict (↑toLin B) W) }\n[PROOFSTEP]\nrw [← @Subspace.finrank_add_finrank_dualCoannihilator_eq K V _ _ _ _ (LinearMap.range (B.toLin.domRestrict W)),\n add_comm, ← add_assoc, add_comm (finrank K (LinearMap.ker (B.toLin.domRestrict W))),\n LinearMap.finrank_range_add_finrank_ker]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\n| finrank K V + finrank K { x // x ∈ LinearMap.ker (LinearMap.domRestrict (↑toLin B) W) }\n[PROOFSTEP]\nrw [← @Subspace.finrank_add_finrank_dualCoannihilator_eq K V _ _ _ _ (LinearMap.range (B.toLin.domRestrict W)),\n add_comm, ← add_assoc, add_comm (finrank K (LinearMap.ker (B.toLin.domRestrict W))),\n LinearMap.finrank_range_add_finrank_ker]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\n| finrank K V + finrank K { x // x ∈ LinearMap.ker (LinearMap.domRestrict (↑toLin B) W) }\n[PROOFSTEP]\nrw [← @Subspace.finrank_add_finrank_dualCoannihilator_eq K V _ _ _ _ (LinearMap.range (B.toLin.domRestrict W)),\n add_comm, ← add_assoc, add_comm (finrank K (LinearMap.ker (B.toLin.domRestrict W))),\n LinearMap.finrank_range_add_finrank_ker]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\nb₂ : Nondegenerate (restrict B W)\n⊢ IsCompl W (orthogonal B W)\n[PROOFSTEP]\nhave : W ⊓ B.orthogonal W = ⊥ := by\n rw [eq_bot_iff]\n intro x hx\n obtain ⟨hx₁, hx₂⟩ := mem_inf.1 hx\n refine' Subtype.mk_eq_mk.1 (b₂ ⟨x, hx₁⟩ _)\n rintro ⟨n, hn⟩\n rw [restrict_apply, coe_mk, coe_mk, b₁]\n exact hx₂ n hn\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\nb₂ : Nondegenerate (restrict B W)\n⊢ W ⊓ orthogonal B W = ⊥\n[PROOFSTEP]\nrw [eq_bot_iff]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\nb₂ : Nondegenerate (restrict B W)\n⊢ W ⊓ orthogonal B W ≤ ⊥\n[PROOFSTEP]\nintro x hx\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\nb₂ : Nondegenerate (restrict B W)\nx : V\nhx : x ∈ W ⊓ orthogonal B W\n⊢ x ∈ ⊥\n[PROOFSTEP]\nobtain ⟨hx₁, hx₂⟩ := mem_inf.1 hx\n[GOAL]\ncase intro\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\nb₂ : Nondegenerate (restrict B W)\nx : V\nhx : x ∈ W ⊓ orthogonal B W\nhx₁ : x ∈ W\nhx₂ : x ∈ orthogonal B W\n⊢ x ∈ ⊥\n[PROOFSTEP]\nrefine' Subtype.mk_eq_mk.1 (b₂ ⟨x, hx₁⟩ _)\n[GOAL]\ncase intro\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\nb₂ : Nondegenerate (restrict B W)\nx : V\nhx : x ∈ W ⊓ orthogonal B W\nhx₁ : x ∈ W\nhx₂ : x ∈ orthogonal B W\n⊢ ∀ (n : { x // x ∈ W }), bilin (restrict B W) { val := x, property := hx₁ } n = 0\n[PROOFSTEP]\nrintro ⟨n, hn⟩\n[GOAL]\ncase intro.mk\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\nb₂ : Nondegenerate (restrict B W)\nx : V\nhx : x ∈ W ⊓ orthogonal B W\nhx₁ : x ∈ W\nhx₂ : x ∈ orthogonal B W\nn : V\nhn : n ∈ W\n⊢ bilin (restrict B W) { val := x, property := hx₁ } { val := n, property := hn } = 0\n[PROOFSTEP]\nrw [restrict_apply, coe_mk, coe_mk, b₁]\n[GOAL]\ncase intro.mk.a\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\nb₂ : Nondegenerate (restrict B W)\nx : V\nhx : x ∈ W ⊓ orthogonal B W\nhx₁ : x ∈ W\nhx₂ : x ∈ orthogonal B W\nn : V\nhn : n ∈ W\n⊢ bilin B n x = 0\n[PROOFSTEP]\nexact hx₂ n hn\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\nb₂ : Nondegenerate (restrict B W)\nthis : W ⊓ orthogonal B W = ⊥\n⊢ IsCompl W (orthogonal B W)\n[PROOFSTEP]\nrefine' IsCompl.of_eq this (eq_top_of_finrank_eq <| (finrank_le _).antisymm _)\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\nb₂ : Nondegenerate (restrict B W)\nthis : W ⊓ orthogonal B W = ⊥\n⊢ finrank K V ≤ finrank K { x // x ∈ W ⊔ orthogonal B W }\n[PROOFSTEP]\nconv_rhs => rw [← add_zero (finrank K _)]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\nb₂ : Nondegenerate (restrict B W)\nthis : W ⊓ orthogonal B W = ⊥\n| finrank K { x // x ∈ W ⊔ orthogonal B W }\n[PROOFSTEP]\nrw [← add_zero (finrank K _)]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\nb₂ : Nondegenerate (restrict B W)\nthis : W ⊓ orthogonal B W = ⊥\n| finrank K { x // x ∈ W ⊔ orthogonal B W }\n[PROOFSTEP]\nrw [← add_zero (finrank K _)]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\nb₂ : Nondegenerate (restrict B W)\nthis : W ⊓ orthogonal B W = ⊥\n| finrank K { x // x ∈ W ⊔ orthogonal B W }\n[PROOFSTEP]\nrw [← add_zero (finrank K _)]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\nb₂ : Nondegenerate (restrict B W)\nthis : W ⊓ orthogonal B W = ⊥\n⊢ finrank K V ≤ finrank K { x // x ∈ W ⊔ orthogonal B W } + 0\n[PROOFSTEP]\nrw [← finrank_bot K V, ← this, finrank_sup_add_finrank_inf_eq, finrank_add_finrank_orthogonal b₁]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB : BilinForm K V\nW : Subspace K V\nb₁ : IsRefl B\nb₂ : Nondegenerate (restrict B W)\nthis : W ⊓ orthogonal B W = ⊥\n⊢ finrank K V ≤ finrank K V + finrank K { x // x ∈ W ⊓ orthogonal B ⊤ }\n[PROOFSTEP]\nexact le_self_add\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁹ : Semiring R\ninst✝¹⁸ : AddCommMonoid M\ninst✝¹⁷ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁶ : Ring R₁\ninst✝¹⁵ : AddCommGroup M₁\ninst✝¹⁴ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹³ : CommSemiring R₂\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁰ : CommRing R₃\ninst✝⁹ : AddCommGroup M₃\ninst✝⁸ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝⁴ : AddCommMonoid M₂'\ninst✝³ : Module R₂ M₂'\ninst✝² : FiniteDimensional K V\nι : Type u_12\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nB : BilinForm K V\nhB : Nondegenerate B\nb : Basis ι K V\nx : V\ni : ι\n⊢ ↑(↑(dualBasis B hB b).repr x) i = bilin B x (↑b i)\n[PROOFSTEP]\nrw [dualBasis, Basis.map_repr, LinearEquiv.symm_symm, LinearEquiv.trans_apply, Basis.dualBasis_repr, toDual_def]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁹ : Semiring R\ninst✝¹⁸ : AddCommMonoid M\ninst✝¹⁷ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁶ : Ring R₁\ninst✝¹⁵ : AddCommGroup M₁\ninst✝¹⁴ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹³ : CommSemiring R₂\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁰ : CommRing R₃\ninst✝⁹ : AddCommGroup M₃\ninst✝⁸ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝⁴ : AddCommMonoid M₂'\ninst✝³ : Module R₂ M₂'\ninst✝² : FiniteDimensional K V\nι : Type u_12\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nB : BilinForm K V\nhB : Nondegenerate B\nb : Basis ι K V\ni j : ι\n⊢ bilin B (↑(dualBasis B hB b) i) (↑b j) = if j = i then 1 else 0\n[PROOFSTEP]\nrw [dualBasis, Basis.map_apply, Basis.coe_dualBasis, ← toDual_def hB, LinearEquiv.apply_symm_apply, Basis.coord_apply,\n Basis.repr_self, Finsupp.single_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁹ : Semiring R\ninst✝¹⁸ : AddCommMonoid M\ninst✝¹⁷ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁶ : Ring R₁\ninst✝¹⁵ : AddCommGroup M₁\ninst✝¹⁴ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹³ : CommSemiring R₂\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁰ : CommRing R₃\ninst✝⁹ : AddCommGroup M₃\ninst✝⁸ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝⁴ : AddCommMonoid M₂'\ninst✝³ : Module R₂ M₂'\ninst✝² : FiniteDimensional K V\nι : Type u_12\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nB : BilinForm K V\nhB : Nondegenerate B\nsym : IsSymm B\nb : Basis ι K V\ni j : ι\n⊢ bilin B (↑b i) (↑(dualBasis B hB b) j) = if i = j then 1 else 0\n[PROOFSTEP]\nrw [sym, apply_dualBasis_left]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nb₁ : Nondegenerate B\nb₂ : IsRefl B\nx : V\nhx : ¬IsOrtho B x x\n⊢ Nondegenerate (restrict B (orthogonal B (Submodule.span K {x})))\n[PROOFSTEP]\nrefine' fun m hm => Submodule.coe_eq_zero.1 (b₁ m.1 fun n => _)\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nb₁ : Nondegenerate B\nb₂ : IsRefl B\nx : V\nhx : ¬IsOrtho B x x\nm : { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhm :\n ∀ (n : { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }),\n bilin (restrict B (orthogonal B (Submodule.span K {x}))) m n = 0\nn : V\n⊢ bilin B (↑m) n = 0\n[PROOFSTEP]\nhave : n ∈ (K ∙ x) ⊔ B.orthogonal (K ∙ x) := (span_singleton_sup_orthogonal_eq_top hx).symm ▸ Submodule.mem_top\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nb₁ : Nondegenerate B\nb₂ : IsRefl B\nx : V\nhx : ¬IsOrtho B x x\nm : { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhm :\n ∀ (n : { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }),\n bilin (restrict B (orthogonal B (Submodule.span K {x}))) m n = 0\nn : V\nthis : n ∈ Submodule.span K {x} ⊔ orthogonal B (Submodule.span K {x})\n⊢ bilin B (↑m) n = 0\n[PROOFSTEP]\nrcases Submodule.mem_sup.1 this with ⟨y, hy, z, hz, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nb₁ : Nondegenerate B\nb₂ : IsRefl B\nx : V\nhx : ¬IsOrtho B x x\nm : { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\nhm :\n ∀ (n : { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }),\n bilin (restrict B (orthogonal B (Submodule.span K {x}))) m n = 0\ny : V\nhy : y ∈ Submodule.span K {x}\nz : V\nhz : z ∈ orthogonal B (Submodule.span K {x})\nthis : y + z ∈ Submodule.span K {x} ⊔ orthogonal B (Submodule.span K {x})\n⊢ bilin B (↑m) (y + z) = 0\n[PROOFSTEP]\nspecialize hm ⟨z, hz⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nb₁ : Nondegenerate B\nb₂ : IsRefl B\nx : V\nhx : ¬IsOrtho B x x\nm : { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\ny : V\nhy : y ∈ Submodule.span K {x}\nz : V\nhz : z ∈ orthogonal B (Submodule.span K {x})\nthis : y + z ∈ Submodule.span K {x} ⊔ orthogonal B (Submodule.span K {x})\nhm : bilin (restrict B (orthogonal B (Submodule.span K {x}))) m { val := z, property := hz } = 0\n⊢ bilin B (↑m) (y + z) = 0\n[PROOFSTEP]\nrw [restrict] at hm \n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nb₁ : Nondegenerate B\nb₂ : IsRefl B\nx : V\nhx : ¬IsOrtho B x x\nm : { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\ny : V\nhy : y ∈ Submodule.span K {x}\nz : V\nhz : z ∈ orthogonal B (Submodule.span K {x})\nthis : y + z ∈ Submodule.span K {x} ⊔ orthogonal B (Submodule.span K {x})\nhm :\n bilin\n { bilin := fun a b => bilin B ↑a ↑b,\n bilin_add_left :=\n (_ :\n ∀ (x_1 x_2 x_3 : { x_3 // x_3 ∈ orthogonal B (Submodule.span K {x}) }),\n bilin B (↑x_1 + ↑x_2) ↑x_3 = bilin B ↑x_1 ↑x_3 + bilin B ↑x_2 ↑x_3),\n bilin_smul_left :=\n (_ :\n ∀ (x_1 : K) (x_2 x_3 : { x_3 // x_3 ∈ orthogonal B (Submodule.span K {x}) }),\n bilin B (x_1 • ↑x_2) ↑x_3 = x_1 * bilin B ↑x_2 ↑x_3),\n bilin_add_right :=\n (_ :\n ∀ (x_1 x_2 x_3 : { x_3 // x_3 ∈ orthogonal B (Submodule.span K {x}) }),\n bilin B (↑x_1) (↑x_2 + ↑x_3) = bilin B ↑x_1 ↑x_2 + bilin B ↑x_1 ↑x_3),\n bilin_smul_right :=\n (_ :\n ∀ (x_1 : K) (x_2 x_3 : { x_3 // x_3 ∈ orthogonal B (Submodule.span K {x}) }),\n bilin B (↑x_2) (x_1 • ↑x_3) = x_1 * bilin B ↑x_2 ↑x_3) }\n m { val := z, property := hz } =\n 0\n⊢ bilin B (↑m) (y + z) = 0\n[PROOFSTEP]\nerw [add_right, show B m.1 y = 0 by rw [b₂]; exact m.2 y hy, hm, add_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nb₁ : Nondegenerate B\nb₂ : IsRefl B\nx : V\nhx : ¬IsOrtho B x x\nm : { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\ny : V\nhy : y ∈ Submodule.span K {x}\nz : V\nhz : z ∈ orthogonal B (Submodule.span K {x})\nthis : y + z ∈ Submodule.span K {x} ⊔ orthogonal B (Submodule.span K {x})\nhm :\n bilin\n { bilin := fun a b => bilin B ↑a ↑b,\n bilin_add_left :=\n (_ :\n ∀ (x_1 x_2 x_3 : { x_3 // x_3 ∈ orthogonal B (Submodule.span K {x}) }),\n bilin B (↑x_1 + ↑x_2) ↑x_3 = bilin B ↑x_1 ↑x_3 + bilin B ↑x_2 ↑x_3),\n bilin_smul_left :=\n (_ :\n ∀ (x_1 : K) (x_2 x_3 : { x_3 // x_3 ∈ orthogonal B (Submodule.span K {x}) }),\n bilin B (x_1 • ↑x_2) ↑x_3 = x_1 * bilin B ↑x_2 ↑x_3),\n bilin_add_right :=\n (_ :\n ∀ (x_1 x_2 x_3 : { x_3 // x_3 ∈ orthogonal B (Submodule.span K {x}) }),\n bilin B (↑x_1) (↑x_2 + ↑x_3) = bilin B ↑x_1 ↑x_2 + bilin B ↑x_1 ↑x_3),\n bilin_smul_right :=\n (_ :\n ∀ (x_1 : K) (x_2 x_3 : { x_3 // x_3 ∈ orthogonal B (Submodule.span K {x}) }),\n bilin B (↑x_2) (x_1 • ↑x_3) = x_1 * bilin B ↑x_2 ↑x_3) }\n m { val := z, property := hz } =\n 0\n⊢ bilin B (↑m) y = 0\n[PROOFSTEP]\nrw [b₂]\n[GOAL]\ncase a\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm K V\nb₁ : Nondegenerate B\nb₂ : IsRefl B\nx : V\nhx : ¬IsOrtho B x x\nm : { x_1 // x_1 ∈ orthogonal B (Submodule.span K {x}) }\ny : V\nhy : y ∈ Submodule.span K {x}\nz : V\nhz : z ∈ orthogonal B (Submodule.span K {x})\nthis : y + z ∈ Submodule.span K {x} ⊔ orthogonal B (Submodule.span K {x})\nhm :\n bilin\n { bilin := fun a b => bilin B ↑a ↑b,\n bilin_add_left :=\n (_ :\n ∀ (x_1 x_2 x_3 : { x_3 // x_3 ∈ orthogonal B (Submodule.span K {x}) }),\n bilin B (↑x_1 + ↑x_2) ↑x_3 = bilin B ↑x_1 ↑x_3 + bilin B ↑x_2 ↑x_3),\n bilin_smul_left :=\n (_ :\n ∀ (x_1 : K) (x_2 x_3 : { x_3 // x_3 ∈ orthogonal B (Submodule.span K {x}) }),\n bilin B (x_1 • ↑x_2) ↑x_3 = x_1 * bilin B ↑x_2 ↑x_3),\n bilin_add_right :=\n (_ :\n ∀ (x_1 x_2 x_3 : { x_3 // x_3 ∈ orthogonal B (Submodule.span K {x}) }),\n bilin B (↑x_1) (↑x_2 + ↑x_3) = bilin B ↑x_1 ↑x_2 + bilin B ↑x_1 ↑x_3),\n bilin_smul_right :=\n (_ :\n ∀ (x_1 : K) (x_2 x_3 : { x_3 // x_3 ∈ orthogonal B (Submodule.span K {x}) }),\n bilin B (↑x_2) (x_1 • ↑x_3) = x_1 * bilin B ↑x_2 ↑x_3) }\n m { val := z, property := hz } =\n 0\n⊢ bilin B y ↑m = 0\n[PROOFSTEP]\nexact m.2 y hy\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₁ M₁\nb : Nondegenerate B\nφ ψ : M₁ →ₗ[R₁] M₁\nh : compLeft B φ = compLeft B ψ\n⊢ φ = ψ\n[PROOFSTEP]\next w\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₁ M₁\nb : Nondegenerate B\nφ ψ : M₁ →ₗ[R₁] M₁\nh : compLeft B φ = compLeft B ψ\nw : M₁\n⊢ ↑φ w = ↑ψ w\n[PROOFSTEP]\nrefine' eq_of_sub_eq_zero (b _ _)\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₁ M₁\nb : Nondegenerate B\nφ ψ : M₁ →ₗ[R₁] M₁\nh : compLeft B φ = compLeft B ψ\nw : M₁\n⊢ ∀ (n : M₁), bilin B (↑φ w - ↑ψ w) n = 0\n[PROOFSTEP]\nintro v\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₁ M₁\nb : Nondegenerate B\nφ ψ : M₁ →ₗ[R₁] M₁\nh : compLeft B φ = compLeft B ψ\nw v : M₁\n⊢ bilin B (↑φ w - ↑ψ w) v = 0\n[PROOFSTEP]\nrw [sub_left, ← compLeft_apply, ← compLeft_apply, ← h, sub_self]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝¹ : AddCommMonoid M₂'\ninst✝ : Module R₂ M₂'\nB : BilinForm R₁ M₁\nb : Nondegenerate B\nφ ψ₁ ψ₂ : M₁ →ₗ[R₁] M₁\nhψ₁ : IsAdjointPair B B ψ₁ φ\nhψ₂ : IsAdjointPair B B ψ₂ φ\nv w : M₁\n⊢ bilin (compLeft B ψ₁) v w = bilin (compLeft B ψ₂) v w\n[PROOFSTEP]\nrw [compLeft_apply, compLeft_apply, hψ₁, hψ₂]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁✝ : BilinForm R₁ M₁\nB₂✝ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB₁ B₂ : BilinForm K V\nb₂ : Nondegenerate B₂\nv : V\n⊢ ↑(↑toLin B₂) (↑(symmCompOfNondegenerate B₁ B₂ b₂) v) = ↑(↑toLin B₁) v\n[PROOFSTEP]\nerw [symmCompOfNondegenerate, LinearEquiv.apply_symm_apply (B₂.toDual b₂) _]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁✝ : BilinForm R₁ M₁\nB₂✝ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB₁ B₂ : BilinForm K V\nb₂ : Nondegenerate B₂\nv w : V\n⊢ bilin B₂ (↑(symmCompOfNondegenerate B₁ B₂ b₂) w) v = bilin B₁ w v\n[PROOFSTEP]\nconv_lhs => rw [← BilinForm.toLin_apply, comp_symmCompOfNondegenerate_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁✝ : BilinForm R₁ M₁\nB₂✝ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB₁ B₂ : BilinForm K V\nb₂ : Nondegenerate B₂\nv w : V\n| bilin B₂ (↑(symmCompOfNondegenerate B₁ B₂ b₂) w) v\n[PROOFSTEP]\nrw [← BilinForm.toLin_apply, comp_symmCompOfNondegenerate_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁✝ : BilinForm R₁ M₁\nB₂✝ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB₁ B₂ : BilinForm K V\nb₂ : Nondegenerate B₂\nv w : V\n| bilin B₂ (↑(symmCompOfNondegenerate B₁ B₂ b₂) w) v\n[PROOFSTEP]\nrw [← BilinForm.toLin_apply, comp_symmCompOfNondegenerate_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁✝ : BilinForm R₁ M₁\nB₂✝ : BilinForm R₂ M₂\nM₂' : Type u_11\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\ninst✝ : FiniteDimensional K V\nB₁ B₂ : BilinForm K V\nb₂ : Nondegenerate B₂\nv w : V\n| bilin B₂ (↑(symmCompOfNondegenerate B₁ B₂ b₂) w) v\n[PROOFSTEP]\nrw [← BilinForm.toLin_apply, comp_symmCompOfNondegenerate_apply]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.BilinearForm", "llama_tokens": 153991, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8289387914176258, "lm_q2_score": 0.672331699179286, "lm_q1q2_score": 0.5573218261494362}} {"text": "[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix l m α\nD : Matrix l n α\ninst✝ : Invertible A\n⊢ fromBlocks A B C D = fromBlocks 1 0 (C * ⅟A) 1 * fromBlocks A 0 0 (D - C * ⅟A * B) * fromBlocks 1 (⅟A * B) 0 1\n[PROOFSTEP]\nsimp only [fromBlocks_multiply, Matrix.mul_zero, Matrix.zero_mul, add_zero, zero_add, Matrix.one_mul, Matrix.mul_one,\n invOf_mul_self, Matrix.mul_invOf_self_assoc, Matrix.mul_invOf_mul_self_cancel, Matrix.mul_assoc,\n add_sub_cancel'_right]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix l m α\nB : Matrix l n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible D\n⊢ ↑(reindex (Equiv.sumComm l n) (Equiv.sumComm m n)) (fromBlocks A B C D) =\n ↑(reindex (Equiv.sumComm l n) (Equiv.sumComm m n))\n (fromBlocks 1 (B * ⅟D) 0 1 * fromBlocks (A - B * ⅟D * C) 0 0 D * fromBlocks 1 0 (⅟D * C) 1)\n[PROOFSTEP]\nsimpa [reindex_apply, Equiv.sumComm_symm, ← submatrix_mul_equiv _ _ _ (Equiv.sumComm n m), ←\n submatrix_mul_equiv _ _ _ (Equiv.sumComm n l), Equiv.sumComm_apply, fromBlocks_submatrix_sum_swap_sum_swap] using\n fromBlocks_eq_of_invertible₁₁ D C B A\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\ninst✝¹ : Invertible A\ninst✝ : Invertible D\n⊢ fromBlocks (⅟A) (-(⅟A * B * ⅟D)) 0 ⅟D * fromBlocks A B 0 D = 1\n[PROOFSTEP]\nsimp_rw [fromBlocks_multiply, Matrix.mul_zero, Matrix.zero_mul, zero_add, add_zero, Matrix.neg_mul, invOf_mul_self,\n Matrix.mul_invOf_mul_self_cancel, add_right_neg, fromBlocks_one]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible A\ninst✝ : Invertible D\n⊢ fromBlocks (⅟A) 0 (-(⅟D * C * ⅟A)) ⅟D * fromBlocks A 0 C D = 1\n[PROOFSTEP]\nsimp_rw [fromBlocks_multiply, Matrix.mul_zero, Matrix.zero_mul, zero_add, add_zero, Matrix.neg_mul, invOf_mul_self,\n Matrix.mul_invOf_mul_self_cancel, add_left_neg, fromBlocks_one]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁹ : Fintype l\ninst✝⁸ : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : DecidableEq l\ninst✝⁵ : DecidableEq m\ninst✝⁴ : DecidableEq n\ninst✝³ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\ninst✝² : Invertible A\ninst✝¹ : Invertible D\ninst✝ : Invertible (fromBlocks A B 0 D)\n⊢ ⅟(fromBlocks A B 0 D) = fromBlocks (⅟A) (-(⅟A * B * ⅟D)) 0 ⅟D\n[PROOFSTEP]\nletI := fromBlocksZero₂₁Invertible A B D\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁹ : Fintype l\ninst✝⁸ : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : DecidableEq l\ninst✝⁵ : DecidableEq m\ninst✝⁴ : DecidableEq n\ninst✝³ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\ninst✝² : Invertible A\ninst✝¹ : Invertible D\ninst✝ : Invertible (fromBlocks A B 0 D)\nthis : Invertible (fromBlocks A B 0 D) := fromBlocksZero₂₁Invertible A B D\n⊢ ⅟(fromBlocks A B 0 D) = fromBlocks (⅟A) (-(⅟A * B * ⅟D)) 0 ⅟D\n[PROOFSTEP]\nconvert (rfl : ⅟(fromBlocks A B 0 D) = _)\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁹ : Fintype l\ninst✝⁸ : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : DecidableEq l\ninst✝⁵ : DecidableEq m\ninst✝⁴ : DecidableEq n\ninst✝³ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\ninst✝² : Invertible A\ninst✝¹ : Invertible D\ninst✝ : Invertible (fromBlocks A 0 C D)\n⊢ ⅟(fromBlocks A 0 C D) = fromBlocks (⅟A) 0 (-(⅟D * C * ⅟A)) ⅟D\n[PROOFSTEP]\nletI := fromBlocksZero₁₂Invertible A C D\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁹ : Fintype l\ninst✝⁸ : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : DecidableEq l\ninst✝⁵ : DecidableEq m\ninst✝⁴ : DecidableEq n\ninst✝³ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\ninst✝² : Invertible A\ninst✝¹ : Invertible D\ninst✝ : Invertible (fromBlocks A 0 C D)\nthis : Invertible (fromBlocks A 0 C D) := fromBlocksZero₁₂Invertible A C D\n⊢ ⅟(fromBlocks A 0 C D) = fromBlocks (⅟A) 0 (-(⅟D * C * ⅟A)) ⅟D\n[PROOFSTEP]\nconvert (rfl : ⅟(fromBlocks A 0 C D) = _)\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\ninst✝ : Invertible (fromBlocks A B 0 D)\n⊢ toBlocks₁₁ ⅟(fromBlocks A B 0 D) * A = 1\n[PROOFSTEP]\nhave := invOf_mul_self (fromBlocks A B 0 D)\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\ninst✝ : Invertible (fromBlocks A B 0 D)\nthis : ⅟(fromBlocks A B 0 D) * fromBlocks A B 0 D = 1\n⊢ toBlocks₁₁ ⅟(fromBlocks A B 0 D) * A = 1\n[PROOFSTEP]\nrw [← fromBlocks_toBlocks (⅟(fromBlocks A B 0 D)), fromBlocks_multiply] at this \n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\ninst✝ : Invertible (fromBlocks A B 0 D)\nthis :\n fromBlocks (toBlocks₁₁ ⅟(fromBlocks A B 0 D) * A + toBlocks₁₂ ⅟(fromBlocks A B 0 D) * 0)\n (toBlocks₁₁ ⅟(fromBlocks A B 0 D) * B + toBlocks₁₂ ⅟(fromBlocks A B 0 D) * D)\n (toBlocks₂₁ ⅟(fromBlocks A B 0 D) * A + toBlocks₂₂ ⅟(fromBlocks A B 0 D) * 0)\n (toBlocks₂₁ ⅟(fromBlocks A B 0 D) * B + toBlocks₂₂ ⅟(fromBlocks A B 0 D) * D) =\n 1\n⊢ toBlocks₁₁ ⅟(fromBlocks A B 0 D) * A = 1\n[PROOFSTEP]\nreplace := congr_arg Matrix.toBlocks₁₁ this\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\ninst✝ : Invertible (fromBlocks A B 0 D)\nthis :\n toBlocks₁₁\n (fromBlocks (toBlocks₁₁ ⅟(fromBlocks A B 0 D) * A + toBlocks₁₂ ⅟(fromBlocks A B 0 D) * 0)\n (toBlocks₁₁ ⅟(fromBlocks A B 0 D) * B + toBlocks₁₂ ⅟(fromBlocks A B 0 D) * D)\n (toBlocks₂₁ ⅟(fromBlocks A B 0 D) * A + toBlocks₂₂ ⅟(fromBlocks A B 0 D) * 0)\n (toBlocks₂₁ ⅟(fromBlocks A B 0 D) * B + toBlocks₂₂ ⅟(fromBlocks A B 0 D) * D)) =\n toBlocks₁₁ 1\n⊢ toBlocks₁₁ ⅟(fromBlocks A B 0 D) * A = 1\n[PROOFSTEP]\nsimpa only [Matrix.toBlocks_fromBlocks₁₁, Matrix.mul_zero, add_zero, ← fromBlocks_one] using this\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\ninst✝ : Invertible (fromBlocks A B 0 D)\n⊢ D * toBlocks₂₂ ⅟(fromBlocks A B 0 D) = 1\n[PROOFSTEP]\nhave := mul_invOf_self (fromBlocks A B 0 D)\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\ninst✝ : Invertible (fromBlocks A B 0 D)\nthis : fromBlocks A B 0 D * ⅟(fromBlocks A B 0 D) = 1\n⊢ D * toBlocks₂₂ ⅟(fromBlocks A B 0 D) = 1\n[PROOFSTEP]\nrw [← fromBlocks_toBlocks (⅟(fromBlocks A B 0 D)), fromBlocks_multiply] at this \n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\ninst✝ : Invertible (fromBlocks A B 0 D)\nthis :\n fromBlocks (A * toBlocks₁₁ ⅟(fromBlocks A B 0 D) + B * toBlocks₂₁ ⅟(fromBlocks A B 0 D))\n (A * toBlocks₁₂ ⅟(fromBlocks A B 0 D) + B * toBlocks₂₂ ⅟(fromBlocks A B 0 D))\n (0 * toBlocks₁₁ ⅟(fromBlocks A B 0 D) + D * toBlocks₂₁ ⅟(fromBlocks A B 0 D))\n (0 * toBlocks₁₂ ⅟(fromBlocks A B 0 D) + D * toBlocks₂₂ ⅟(fromBlocks A B 0 D)) =\n 1\n⊢ D * toBlocks₂₂ ⅟(fromBlocks A B 0 D) = 1\n[PROOFSTEP]\nreplace := congr_arg Matrix.toBlocks₂₂ this\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\ninst✝ : Invertible (fromBlocks A B 0 D)\nthis :\n toBlocks₂₂\n (fromBlocks (A * toBlocks₁₁ ⅟(fromBlocks A B 0 D) + B * toBlocks₂₁ ⅟(fromBlocks A B 0 D))\n (A * toBlocks₁₂ ⅟(fromBlocks A B 0 D) + B * toBlocks₂₂ ⅟(fromBlocks A B 0 D))\n (0 * toBlocks₁₁ ⅟(fromBlocks A B 0 D) + D * toBlocks₂₁ ⅟(fromBlocks A B 0 D))\n (0 * toBlocks₁₂ ⅟(fromBlocks A B 0 D) + D * toBlocks₂₂ ⅟(fromBlocks A B 0 D))) =\n toBlocks₂₂ 1\n⊢ D * toBlocks₂₂ ⅟(fromBlocks A B 0 D) = 1\n[PROOFSTEP]\nsimpa only [Matrix.toBlocks_fromBlocks₂₂, Matrix.zero_mul, zero_add, ← fromBlocks_one] using this\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible (fromBlocks A 0 C D)\n⊢ A * toBlocks₁₁ ⅟(fromBlocks A 0 C D) = 1\n[PROOFSTEP]\nhave := mul_invOf_self (fromBlocks A 0 C D)\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible (fromBlocks A 0 C D)\nthis : fromBlocks A 0 C D * ⅟(fromBlocks A 0 C D) = 1\n⊢ A * toBlocks₁₁ ⅟(fromBlocks A 0 C D) = 1\n[PROOFSTEP]\nrw [← fromBlocks_toBlocks (⅟(fromBlocks A 0 C D)), fromBlocks_multiply] at this \n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible (fromBlocks A 0 C D)\nthis :\n fromBlocks (A * toBlocks₁₁ ⅟(fromBlocks A 0 C D) + 0 * toBlocks₂₁ ⅟(fromBlocks A 0 C D))\n (A * toBlocks₁₂ ⅟(fromBlocks A 0 C D) + 0 * toBlocks₂₂ ⅟(fromBlocks A 0 C D))\n (C * toBlocks₁₁ ⅟(fromBlocks A 0 C D) + D * toBlocks₂₁ ⅟(fromBlocks A 0 C D))\n (C * toBlocks₁₂ ⅟(fromBlocks A 0 C D) + D * toBlocks₂₂ ⅟(fromBlocks A 0 C D)) =\n 1\n⊢ A * toBlocks₁₁ ⅟(fromBlocks A 0 C D) = 1\n[PROOFSTEP]\nreplace := congr_arg Matrix.toBlocks₁₁ this\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible (fromBlocks A 0 C D)\nthis :\n toBlocks₁₁\n (fromBlocks (A * toBlocks₁₁ ⅟(fromBlocks A 0 C D) + 0 * toBlocks₂₁ ⅟(fromBlocks A 0 C D))\n (A * toBlocks₁₂ ⅟(fromBlocks A 0 C D) + 0 * toBlocks₂₂ ⅟(fromBlocks A 0 C D))\n (C * toBlocks₁₁ ⅟(fromBlocks A 0 C D) + D * toBlocks₂₁ ⅟(fromBlocks A 0 C D))\n (C * toBlocks₁₂ ⅟(fromBlocks A 0 C D) + D * toBlocks₂₂ ⅟(fromBlocks A 0 C D))) =\n toBlocks₁₁ 1\n⊢ A * toBlocks₁₁ ⅟(fromBlocks A 0 C D) = 1\n[PROOFSTEP]\nsimpa only [Matrix.toBlocks_fromBlocks₁₁, Matrix.zero_mul, add_zero, ← fromBlocks_one] using this\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible (fromBlocks A 0 C D)\n⊢ toBlocks₂₂ ⅟(fromBlocks A 0 C D) * D = 1\n[PROOFSTEP]\nhave := invOf_mul_self (fromBlocks A 0 C D)\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible (fromBlocks A 0 C D)\nthis : ⅟(fromBlocks A 0 C D) * fromBlocks A 0 C D = 1\n⊢ toBlocks₂₂ ⅟(fromBlocks A 0 C D) * D = 1\n[PROOFSTEP]\nrw [← fromBlocks_toBlocks (⅟(fromBlocks A 0 C D)), fromBlocks_multiply] at this \n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible (fromBlocks A 0 C D)\nthis :\n fromBlocks (toBlocks₁₁ ⅟(fromBlocks A 0 C D) * A + toBlocks₁₂ ⅟(fromBlocks A 0 C D) * C)\n (toBlocks₁₁ ⅟(fromBlocks A 0 C D) * 0 + toBlocks₁₂ ⅟(fromBlocks A 0 C D) * D)\n (toBlocks₂₁ ⅟(fromBlocks A 0 C D) * A + toBlocks₂₂ ⅟(fromBlocks A 0 C D) * C)\n (toBlocks₂₁ ⅟(fromBlocks A 0 C D) * 0 + toBlocks₂₂ ⅟(fromBlocks A 0 C D) * D) =\n 1\n⊢ toBlocks₂₂ ⅟(fromBlocks A 0 C D) * D = 1\n[PROOFSTEP]\nreplace := congr_arg Matrix.toBlocks₂₂ this\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible (fromBlocks A 0 C D)\nthis :\n toBlocks₂₂\n (fromBlocks (toBlocks₁₁ ⅟(fromBlocks A 0 C D) * A + toBlocks₁₂ ⅟(fromBlocks A 0 C D) * C)\n (toBlocks₁₁ ⅟(fromBlocks A 0 C D) * 0 + toBlocks₁₂ ⅟(fromBlocks A 0 C D) * D)\n (toBlocks₂₁ ⅟(fromBlocks A 0 C D) * A + toBlocks₂₂ ⅟(fromBlocks A 0 C D) * C)\n (toBlocks₂₁ ⅟(fromBlocks A 0 C D) * 0 + toBlocks₂₂ ⅟(fromBlocks A 0 C D) * D)) =\n toBlocks₂₂ 1\n⊢ toBlocks₂₂ ⅟(fromBlocks A 0 C D) * D = 1\n[PROOFSTEP]\nsimpa only [Matrix.toBlocks_fromBlocks₂₂, Matrix.mul_zero, zero_add, ← fromBlocks_one] using this\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\ni : Invertible A × Invertible D\n⊢ Invertible (fromBlocks A B 0 D)\n[PROOFSTEP]\nletI := i.1\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\ni : Invertible A × Invertible D\nthis : Invertible A := i.fst\n⊢ Invertible (fromBlocks A B 0 D)\n[PROOFSTEP]\nletI := i.2\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\ni : Invertible A × Invertible D\nthis✝ : Invertible A := i.fst\nthis : Invertible D := i.snd\n⊢ Invertible (fromBlocks A B 0 D)\n[PROOFSTEP]\nexact fromBlocksZero₂₁Invertible A B D\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\ni : Invertible A × Invertible D\n⊢ Invertible (fromBlocks A 0 C D)\n[PROOFSTEP]\nletI := i.1\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\ni : Invertible A × Invertible D\nthis : Invertible A := i.fst\n⊢ Invertible (fromBlocks A 0 C D)\n[PROOFSTEP]\nletI := i.2\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\ni : Invertible A × Invertible D\nthis✝ : Invertible A := i.fst\nthis : Invertible D := i.snd\n⊢ Invertible (fromBlocks A 0 C D)\n[PROOFSTEP]\nexact fromBlocksZero₁₂Invertible A C D\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\n⊢ IsUnit (fromBlocks A B 0 D) ↔ IsUnit A ∧ IsUnit D\n[PROOFSTEP]\nsimp only [← nonempty_invertible_iff_isUnit, ← nonempty_prod, (fromBlocksZero₂₁InvertibleEquiv _ _ _).nonempty_congr]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\n⊢ IsUnit (fromBlocks A 0 C D) ↔ IsUnit A ∧ IsUnit D\n[PROOFSTEP]\nsimp only [← nonempty_invertible_iff_isUnit, ← nonempty_prod, (fromBlocksZero₁₂InvertibleEquiv _ _ _).nonempty_congr]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\nhAD : IsUnit A ↔ IsUnit D\n⊢ (fromBlocks A B 0 D)⁻¹ = fromBlocks A⁻¹ (-(A⁻¹ * B * D⁻¹)) 0 D⁻¹\n[PROOFSTEP]\nby_cases hA : IsUnit A\n[GOAL]\ncase pos\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\nhAD : IsUnit A ↔ IsUnit D\nhA : IsUnit A\n⊢ (fromBlocks A B 0 D)⁻¹ = fromBlocks A⁻¹ (-(A⁻¹ * B * D⁻¹)) 0 D⁻¹\n[PROOFSTEP]\nhave hD := hAD.mp hA\n[GOAL]\ncase pos\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\nhAD : IsUnit A ↔ IsUnit D\nhA : IsUnit A\nhD : IsUnit D\n⊢ (fromBlocks A B 0 D)⁻¹ = fromBlocks A⁻¹ (-(A⁻¹ * B * D⁻¹)) 0 D⁻¹\n[PROOFSTEP]\ncases hA.nonempty_invertible\n[GOAL]\ncase pos.intro\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\nhAD : IsUnit A ↔ IsUnit D\nhA : IsUnit A\nhD : IsUnit D\nval✝ : Invertible A\n⊢ (fromBlocks A B 0 D)⁻¹ = fromBlocks A⁻¹ (-(A⁻¹ * B * D⁻¹)) 0 D⁻¹\n[PROOFSTEP]\ncases hD.nonempty_invertible\n[GOAL]\ncase pos.intro.intro\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\nhAD : IsUnit A ↔ IsUnit D\nhA : IsUnit A\nhD : IsUnit D\nval✝¹ : Invertible A\nval✝ : Invertible D\n⊢ (fromBlocks A B 0 D)⁻¹ = fromBlocks A⁻¹ (-(A⁻¹ * B * D⁻¹)) 0 D⁻¹\n[PROOFSTEP]\nletI := fromBlocksZero₂₁Invertible A B D\n[GOAL]\ncase pos.intro.intro\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\nhAD : IsUnit A ↔ IsUnit D\nhA : IsUnit A\nhD : IsUnit D\nval✝¹ : Invertible A\nval✝ : Invertible D\nthis : Invertible (fromBlocks A B 0 D) := fromBlocksZero₂₁Invertible A B D\n⊢ (fromBlocks A B 0 D)⁻¹ = fromBlocks A⁻¹ (-(A⁻¹ * B * D⁻¹)) 0 D⁻¹\n[PROOFSTEP]\nsimp_rw [← invOf_eq_nonsing_inv, invOf_fromBlocks_zero₂₁_eq]\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\nhAD : IsUnit A ↔ IsUnit D\nhA : ¬IsUnit A\n⊢ (fromBlocks A B 0 D)⁻¹ = fromBlocks A⁻¹ (-(A⁻¹ * B * D⁻¹)) 0 D⁻¹\n[PROOFSTEP]\nhave hD := hAD.not.mp hA\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\nhAD : IsUnit A ↔ IsUnit D\nhA : ¬IsUnit A\nhD : ¬IsUnit D\n⊢ (fromBlocks A B 0 D)⁻¹ = fromBlocks A⁻¹ (-(A⁻¹ * B * D⁻¹)) 0 D⁻¹\n[PROOFSTEP]\nhave : ¬IsUnit (fromBlocks A B 0 D) := isUnit_fromBlocks_zero₂₁.not.mpr (not_and'.mpr fun _ => hA)\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nD : Matrix n n α\nhAD : IsUnit A ↔ IsUnit D\nhA : ¬IsUnit A\nhD : ¬IsUnit D\nthis : ¬IsUnit (fromBlocks A B 0 D)\n⊢ (fromBlocks A B 0 D)⁻¹ = fromBlocks A⁻¹ (-(A⁻¹ * B * D⁻¹)) 0 D⁻¹\n[PROOFSTEP]\nsimp_rw [nonsing_inv_eq_ring_inverse, Ring.inverse_non_unit _ hA, Ring.inverse_non_unit _ hD,\n Ring.inverse_non_unit _ this, Matrix.zero_mul, neg_zero, fromBlocks_zero]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\nhAD : IsUnit A ↔ IsUnit D\n⊢ (fromBlocks A 0 C D)⁻¹ = fromBlocks A⁻¹ 0 (-(D⁻¹ * C * A⁻¹)) D⁻¹\n[PROOFSTEP]\nby_cases hA : IsUnit A\n[GOAL]\ncase pos\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\nhAD : IsUnit A ↔ IsUnit D\nhA : IsUnit A\n⊢ (fromBlocks A 0 C D)⁻¹ = fromBlocks A⁻¹ 0 (-(D⁻¹ * C * A⁻¹)) D⁻¹\n[PROOFSTEP]\nhave hD := hAD.mp hA\n[GOAL]\ncase pos\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\nhAD : IsUnit A ↔ IsUnit D\nhA : IsUnit A\nhD : IsUnit D\n⊢ (fromBlocks A 0 C D)⁻¹ = fromBlocks A⁻¹ 0 (-(D⁻¹ * C * A⁻¹)) D⁻¹\n[PROOFSTEP]\ncases hA.nonempty_invertible\n[GOAL]\ncase pos.intro\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\nhAD : IsUnit A ↔ IsUnit D\nhA : IsUnit A\nhD : IsUnit D\nval✝ : Invertible A\n⊢ (fromBlocks A 0 C D)⁻¹ = fromBlocks A⁻¹ 0 (-(D⁻¹ * C * A⁻¹)) D⁻¹\n[PROOFSTEP]\ncases hD.nonempty_invertible\n[GOAL]\ncase pos.intro.intro\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\nhAD : IsUnit A ↔ IsUnit D\nhA : IsUnit A\nhD : IsUnit D\nval✝¹ : Invertible A\nval✝ : Invertible D\n⊢ (fromBlocks A 0 C D)⁻¹ = fromBlocks A⁻¹ 0 (-(D⁻¹ * C * A⁻¹)) D⁻¹\n[PROOFSTEP]\nletI := fromBlocksZero₁₂Invertible A C D\n[GOAL]\ncase pos.intro.intro\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\nhAD : IsUnit A ↔ IsUnit D\nhA : IsUnit A\nhD : IsUnit D\nval✝¹ : Invertible A\nval✝ : Invertible D\nthis : Invertible (fromBlocks A 0 C D) := fromBlocksZero₁₂Invertible A C D\n⊢ (fromBlocks A 0 C D)⁻¹ = fromBlocks A⁻¹ 0 (-(D⁻¹ * C * A⁻¹)) D⁻¹\n[PROOFSTEP]\nsimp_rw [← invOf_eq_nonsing_inv, invOf_fromBlocks_zero₁₂_eq]\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\nhAD : IsUnit A ↔ IsUnit D\nhA : ¬IsUnit A\n⊢ (fromBlocks A 0 C D)⁻¹ = fromBlocks A⁻¹ 0 (-(D⁻¹ * C * A⁻¹)) D⁻¹\n[PROOFSTEP]\nhave hD := hAD.not.mp hA\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\nhAD : IsUnit A ↔ IsUnit D\nhA : ¬IsUnit A\nhD : ¬IsUnit D\n⊢ (fromBlocks A 0 C D)⁻¹ = fromBlocks A⁻¹ 0 (-(D⁻¹ * C * A⁻¹)) D⁻¹\n[PROOFSTEP]\nhave : ¬IsUnit (fromBlocks A 0 C D) := isUnit_fromBlocks_zero₁₂.not.mpr (not_and'.mpr fun _ => hA)\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nC : Matrix n m α\nD : Matrix n n α\nhAD : IsUnit A ↔ IsUnit D\nhA : ¬IsUnit A\nhD : ¬IsUnit D\nthis : ¬IsUnit (fromBlocks A 0 C D)\n⊢ (fromBlocks A 0 C D)⁻¹ = fromBlocks A⁻¹ 0 (-(D⁻¹ * C * A⁻¹)) D⁻¹\n[PROOFSTEP]\nsimp_rw [nonsing_inv_eq_ring_inverse, Ring.inverse_non_unit _ hA, Ring.inverse_non_unit _ hD,\n Ring.inverse_non_unit _ this, Matrix.zero_mul, neg_zero, fromBlocks_zero]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible D\ninst✝ : Invertible (A - B * ⅟D * C)\n⊢ Invertible (fromBlocks A B C D)\n[PROOFSTEP]\nrefine'\n Invertible.copy' _ _\n (fromBlocks (⅟(A - B * ⅟D * C)) (-(⅟(A - B * ⅟D * C) * B * ⅟D)) (-(⅟D * C * ⅟(A - B * ⅟D * C)))\n (⅟D + ⅟D * C * ⅟(A - B * ⅟D * C) * B * ⅟D))\n (fromBlocks_eq_of_invertible₂₂ _ _ _ _) _\n[GOAL]\ncase refine'_1\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible D\ninst✝ : Invertible (A - B * ⅟D * C)\n⊢ Invertible (fromBlocks 1 (B * ⅟D) 0 1 * fromBlocks (A - B * ⅟D * C) 0 0 D * fromBlocks 1 0 (⅟D * C) 1)\n[PROOFSTEP]\nletI : Invertible (1 : Matrix n n α) := invertibleOne\n[GOAL]\ncase refine'_1\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible D\ninst✝ : Invertible (A - B * ⅟D * C)\nthis : Invertible 1 := invertibleOne\n⊢ Invertible (fromBlocks 1 (B * ⅟D) 0 1 * fromBlocks (A - B * ⅟D * C) 0 0 D * fromBlocks 1 0 (⅟D * C) 1)\n[PROOFSTEP]\nletI : Invertible (1 : Matrix m m α) := invertibleOne\n[GOAL]\ncase refine'_1\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible D\ninst✝ : Invertible (A - B * ⅟D * C)\nthis✝ : Invertible 1 := invertibleOne\nthis : Invertible 1 := invertibleOne\n⊢ Invertible (fromBlocks 1 (B * ⅟D) 0 1 * fromBlocks (A - B * ⅟D * C) 0 0 D * fromBlocks 1 0 (⅟D * C) 1)\n[PROOFSTEP]\nrefine' Invertible.mul _ (fromBlocksZero₁₂Invertible _ _ _)\n[GOAL]\ncase refine'_1\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible D\ninst✝ : Invertible (A - B * ⅟D * C)\nthis✝ : Invertible 1 := invertibleOne\nthis : Invertible 1 := invertibleOne\n⊢ Invertible (fromBlocks 1 (B * ⅟D) 0 1 * fromBlocks (A - B * ⅟D * C) 0 0 D)\n[PROOFSTEP]\nexact Invertible.mul (fromBlocksZero₂₁Invertible _ _ _) (fromBlocksZero₂₁Invertible _ _ _)\n[GOAL]\ncase refine'_2\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible D\ninst✝ : Invertible (A - B * ⅟D * C)\n⊢ fromBlocks (⅟(A - B * ⅟D * C)) (-(⅟(A - B * ⅟D * C) * B * ⅟D)) (-(⅟D * C * ⅟(A - B * ⅟D * C)))\n (⅟D + ⅟D * C * ⅟(A - B * ⅟D * C) * B * ⅟D) =\n ⅟(fromBlocks 1 (B * ⅟D) 0 1 * fromBlocks (A - B * ⅟D * C) 0 0 D * fromBlocks 1 0 (⅟D * C) 1)\n[PROOFSTEP]\nshow\n _ =\n fromBlocks 1 0 (-(1 * (⅟D * C) * 1)) 1 *\n (fromBlocks (⅟(A - B * ⅟D * C)) (-(⅟(A - B * ⅟D * C) * 0 * ⅟D)) 0 (⅟D) * fromBlocks 1 (-(1 * (B * ⅟D) * 1)) 0 1)\n -- combine into a single block matrix\n[GOAL]\ncase refine'_2\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible D\ninst✝ : Invertible (A - B * ⅟D * C)\n⊢ fromBlocks (⅟(A - B * ⅟D * C)) (-(⅟(A - B * ⅟D * C) * B * ⅟D)) (-(⅟D * C * ⅟(A - B * ⅟D * C)))\n (⅟D + ⅟D * C * ⅟(A - B * ⅟D * C) * B * ⅟D) =\n fromBlocks 1 0 (-(1 * (⅟D * C) * 1)) 1 *\n (fromBlocks (⅟(A - B * ⅟D * C)) (-(⅟(A - B * ⅟D * C) * 0 * ⅟D)) 0 ⅟D * fromBlocks 1 (-(1 * (B * ⅟D) * 1)) 0 1)\n[PROOFSTEP]\nsimp only [fromBlocks_multiply, invOf_one, Matrix.one_mul, Matrix.mul_one, Matrix.zero_mul, Matrix.mul_zero, add_zero,\n zero_add, neg_zero, Matrix.mul_neg, Matrix.neg_mul, neg_neg, ← Matrix.mul_assoc, add_comm (⅟D)]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible A\ninst✝ : Invertible (D - C * ⅟A * B)\n⊢ Invertible (fromBlocks A B C D)\n[PROOFSTEP]\nletI := fromBlocks₂₂Invertible D C B A\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible A\ninst✝ : Invertible (D - C * ⅟A * B)\nthis : Invertible (fromBlocks D C B A) := fromBlocks₂₂Invertible D C B A\n⊢ Invertible (fromBlocks A B C D)\n[PROOFSTEP]\nletI iDCBA := submatrixEquivInvertible (fromBlocks D C B A) (Equiv.sumComm _ _) (Equiv.sumComm _ _)\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible A\ninst✝ : Invertible (D - C * ⅟A * B)\nthis : Invertible (fromBlocks D C B A) := fromBlocks₂₂Invertible D C B A\niDCBA : Invertible (submatrix (fromBlocks D C B A) ↑(Equiv.sumComm m n) ↑(Equiv.sumComm m n)) :=\n submatrixEquivInvertible (fromBlocks D C B A) (Equiv.sumComm m n) (Equiv.sumComm m n)\n⊢ Invertible (fromBlocks A B C D)\n[PROOFSTEP]\nexact\n iDCBA.copy' _\n (fromBlocks (⅟A + ⅟A * B * ⅟(D - C * ⅟A * B) * C * ⅟A) (-(⅟A * B * ⅟(D - C * ⅟A * B)))\n (-(⅟(D - C * ⅟A * B) * C * ⅟A)) (⅟(D - C * ⅟A * B)))\n (fromBlocks_submatrix_sum_swap_sum_swap _ _ _ _).symm (fromBlocks_submatrix_sum_swap_sum_swap _ _ _ _).symm\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁹ : Fintype l\ninst✝⁸ : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : DecidableEq l\ninst✝⁵ : DecidableEq m\ninst✝⁴ : DecidableEq n\ninst✝³ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝² : Invertible D\ninst✝¹ : Invertible (A - B * ⅟D * C)\ninst✝ : Invertible (fromBlocks A B C D)\n⊢ ⅟(fromBlocks A B C D) =\n fromBlocks (⅟(A - B * ⅟D * C)) (-(⅟(A - B * ⅟D * C) * B * ⅟D)) (-(⅟D * C * ⅟(A - B * ⅟D * C)))\n (⅟D + ⅟D * C * ⅟(A - B * ⅟D * C) * B * ⅟D)\n[PROOFSTEP]\nletI := fromBlocks₂₂Invertible A B C D\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁹ : Fintype l\ninst✝⁸ : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : DecidableEq l\ninst✝⁵ : DecidableEq m\ninst✝⁴ : DecidableEq n\ninst✝³ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝² : Invertible D\ninst✝¹ : Invertible (A - B * ⅟D * C)\ninst✝ : Invertible (fromBlocks A B C D)\nthis : Invertible (fromBlocks A B C D) := fromBlocks₂₂Invertible A B C D\n⊢ ⅟(fromBlocks A B C D) =\n fromBlocks (⅟(A - B * ⅟D * C)) (-(⅟(A - B * ⅟D * C) * B * ⅟D)) (-(⅟D * C * ⅟(A - B * ⅟D * C)))\n (⅟D + ⅟D * C * ⅟(A - B * ⅟D * C) * B * ⅟D)\n[PROOFSTEP]\nconvert (rfl : ⅟(fromBlocks A B C D) = _)\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁹ : Fintype l\ninst✝⁸ : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : DecidableEq l\ninst✝⁵ : DecidableEq m\ninst✝⁴ : DecidableEq n\ninst✝³ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝² : Invertible A\ninst✝¹ : Invertible (D - C * ⅟A * B)\ninst✝ : Invertible (fromBlocks A B C D)\n⊢ ⅟(fromBlocks A B C D) =\n fromBlocks (⅟A + ⅟A * B * ⅟(D - C * ⅟A * B) * C * ⅟A) (-(⅟A * B * ⅟(D - C * ⅟A * B)))\n (-(⅟(D - C * ⅟A * B) * C * ⅟A)) ⅟(D - C * ⅟A * B)\n[PROOFSTEP]\nletI := fromBlocks₁₁Invertible A B C D\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁹ : Fintype l\ninst✝⁸ : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : DecidableEq l\ninst✝⁵ : DecidableEq m\ninst✝⁴ : DecidableEq n\ninst✝³ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝² : Invertible A\ninst✝¹ : Invertible (D - C * ⅟A * B)\ninst✝ : Invertible (fromBlocks A B C D)\nthis : Invertible (fromBlocks A B C D) := fromBlocks₁₁Invertible A B C D\n⊢ ⅟(fromBlocks A B C D) =\n fromBlocks (⅟A + ⅟A * B * ⅟(D - C * ⅟A * B) * C * ⅟A) (-(⅟A * B * ⅟(D - C * ⅟A * B)))\n (-(⅟(D - C * ⅟A * B) * C * ⅟A)) ⅟(D - C * ⅟A * B)\n[PROOFSTEP]\nconvert (rfl : ⅟(fromBlocks A B C D) = _)\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible D\ninst✝ : Invertible (fromBlocks A B C D)\n⊢ Invertible (A - B * ⅟D * C)\n[PROOFSTEP]\nsuffices Invertible (fromBlocks (A - B * ⅟D * C) 0 0 D) by\n exact (invertibleOfFromBlocksZero₁₂Invertible (A - B * ⅟D * C) 0 D).1\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible D\ninst✝ : Invertible (fromBlocks A B C D)\nthis : Invertible (fromBlocks (A - B * ⅟D * C) 0 0 D)\n⊢ Invertible (A - B * ⅟D * C)\n[PROOFSTEP]\nexact (invertibleOfFromBlocksZero₁₂Invertible (A - B * ⅟D * C) 0 D).1\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible D\ninst✝ : Invertible (fromBlocks A B C D)\n⊢ Invertible (fromBlocks (A - B * ⅟D * C) 0 0 D)\n[PROOFSTEP]\nletI : Invertible (1 : Matrix n n α) := invertibleOne\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible D\ninst✝ : Invertible (fromBlocks A B C D)\nthis : Invertible 1 := invertibleOne\n⊢ Invertible (fromBlocks (A - B * ⅟D * C) 0 0 D)\n[PROOFSTEP]\nletI : Invertible (1 : Matrix m m α) := invertibleOne\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible D\ninst✝ : Invertible (fromBlocks A B C D)\nthis✝ : Invertible 1 := invertibleOne\nthis : Invertible 1 := invertibleOne\n⊢ Invertible (fromBlocks (A - B * ⅟D * C) 0 0 D)\n[PROOFSTEP]\nletI iDC : Invertible (fromBlocks 1 0 (⅟D * C) 1 : Matrix (Sum m n) (Sum m n) α) := fromBlocksZero₁₂Invertible _ _ _\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible D\ninst✝ : Invertible (fromBlocks A B C D)\nthis✝ : Invertible 1 := invertibleOne\nthis : Invertible 1 := invertibleOne\niDC : Invertible (fromBlocks 1 0 (⅟D * C) 1) := fromBlocksZero₁₂Invertible 1 (⅟D * C) 1\n⊢ Invertible (fromBlocks (A - B * ⅟D * C) 0 0 D)\n[PROOFSTEP]\nletI iBD : Invertible (fromBlocks 1 (B * ⅟D) 0 1 : Matrix (Sum m n) (Sum m n) α) := fromBlocksZero₂₁Invertible _ _ _\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible D\ninst✝ : Invertible (fromBlocks A B C D)\nthis✝ : Invertible 1 := invertibleOne\nthis : Invertible 1 := invertibleOne\niDC : Invertible (fromBlocks 1 0 (⅟D * C) 1) := fromBlocksZero₁₂Invertible 1 (⅟D * C) 1\niBD : Invertible (fromBlocks 1 (B * ⅟D) 0 1) := fromBlocksZero₂₁Invertible 1 (B * ⅟D) 1\n⊢ Invertible (fromBlocks (A - B * ⅟D * C) 0 0 D)\n[PROOFSTEP]\nletI iBDC := Invertible.copy ‹_› _ (fromBlocks_eq_of_invertible₂₂ A B C D).symm\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible D\ninst✝ : Invertible (fromBlocks A B C D)\nthis✝ : Invertible 1 := invertibleOne\nthis : Invertible 1 := invertibleOne\niDC : Invertible (fromBlocks 1 0 (⅟D * C) 1) := fromBlocksZero₁₂Invertible 1 (⅟D * C) 1\niBD : Invertible (fromBlocks 1 (B * ⅟D) 0 1) := fromBlocksZero₂₁Invertible 1 (B * ⅟D) 1\niBDC : Invertible (fromBlocks 1 (B * ⅟D) 0 1 * fromBlocks (A - B * ⅟D * C) 0 0 D * fromBlocks 1 0 (⅟D * C) 1) :=\n Invertible.copy inst✝ (fromBlocks 1 (B * ⅟D) 0 1 * fromBlocks (A - B * ⅟D * C) 0 0 D * fromBlocks 1 0 (⅟D * C) 1)\n (_ : fromBlocks 1 (B * ⅟D) 0 1 * fromBlocks (A - B * ⅟D * C) 0 0 D * fromBlocks 1 0 (⅟D * C) 1 = fromBlocks A B C D)\n⊢ Invertible (fromBlocks (A - B * ⅟D * C) 0 0 D)\n[PROOFSTEP]\nrefine' (iBD.mulLeft _).symm _\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible D\ninst✝ : Invertible (fromBlocks A B C D)\nthis✝ : Invertible 1 := invertibleOne\nthis : Invertible 1 := invertibleOne\niDC : Invertible (fromBlocks 1 0 (⅟D * C) 1) := fromBlocksZero₁₂Invertible 1 (⅟D * C) 1\niBD : Invertible (fromBlocks 1 (B * ⅟D) 0 1) := fromBlocksZero₂₁Invertible 1 (B * ⅟D) 1\niBDC : Invertible (fromBlocks 1 (B * ⅟D) 0 1 * fromBlocks (A - B * ⅟D * C) 0 0 D * fromBlocks 1 0 (⅟D * C) 1) :=\n Invertible.copy inst✝ (fromBlocks 1 (B * ⅟D) 0 1 * fromBlocks (A - B * ⅟D * C) 0 0 D * fromBlocks 1 0 (⅟D * C) 1)\n (_ : fromBlocks 1 (B * ⅟D) 0 1 * fromBlocks (A - B * ⅟D * C) 0 0 D * fromBlocks 1 0 (⅟D * C) 1 = fromBlocks A B C D)\n⊢ Invertible (fromBlocks 1 (B * ⅟D) 0 1 * fromBlocks (A - B * ⅟D * C) 0 0 D)\n[PROOFSTEP]\nrefine' (iDC.mulRight _).symm iBDC\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible A\ninst✝ : Invertible (fromBlocks A B C D)\n⊢ Invertible (D - C * ⅟A * B)\n[PROOFSTEP]\nletI iABCD' := submatrixEquivInvertible (fromBlocks A B C D) (Equiv.sumComm _ _) (Equiv.sumComm _ _)\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible A\ninst✝ : Invertible (fromBlocks A B C D)\niABCD' : Invertible (submatrix (fromBlocks A B C D) ↑(Equiv.sumComm n m) ↑(Equiv.sumComm n m)) :=\n submatrixEquivInvertible (fromBlocks A B C D) (Equiv.sumComm n m) (Equiv.sumComm n m)\n⊢ Invertible (D - C * ⅟A * B)\n[PROOFSTEP]\nletI iDCBA := iABCD'.copy _ (fromBlocks_submatrix_sum_swap_sum_swap _ _ _ _).symm\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁸ : Fintype l\ninst✝⁷ : Fintype m\ninst✝⁶ : Fintype n\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝¹ : Invertible A\ninst✝ : Invertible (fromBlocks A B C D)\niABCD' : Invertible (submatrix (fromBlocks A B C D) ↑(Equiv.sumComm n m) ↑(Equiv.sumComm n m)) :=\n submatrixEquivInvertible (fromBlocks A B C D) (Equiv.sumComm n m) (Equiv.sumComm n m)\niDCBA : Invertible (fromBlocks D C B A) :=\n Invertible.copy iABCD' (fromBlocks D C B A)\n (_ : fromBlocks D C B A = submatrix (fromBlocks A B C D) Sum.swap Sum.swap)\n⊢ Invertible (D - C * ⅟A * B)\n[PROOFSTEP]\nrefine' invertibleOfFromBlocks₂₂Invertible D C B A\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible D\n⊢ IsUnit (fromBlocks A B C D) ↔ IsUnit (A - B * ⅟D * C)\n[PROOFSTEP]\nsimp only [← nonempty_invertible_iff_isUnit, (invertibleEquivFromBlocks₂₂Invertible A B C D).nonempty_congr]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible A\n⊢ IsUnit (fromBlocks A B C D) ↔ IsUnit (D - C * ⅟A * B)\n[PROOFSTEP]\nsimp only [← nonempty_invertible_iff_isUnit, (invertibleEquivFromBlocks₁₁Invertible A B C D).nonempty_congr]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible A\n⊢ det (fromBlocks A B C D) = det A * det (D - C * ⅟A * B)\n[PROOFSTEP]\nrw [fromBlocks_eq_of_invertible₁₁ (A := A), det_mul, det_mul, det_fromBlocks_zero₂₁, det_fromBlocks_zero₂₁,\n det_fromBlocks_zero₁₂, det_one, det_one, one_mul, one_mul, mul_one]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\n⊢ det (fromBlocks 1 B C D) = det (D - C * B)\n[PROOFSTEP]\nhaveI : Invertible (1 : Matrix m m α) := invertibleOne\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\nthis : Invertible 1\n⊢ det (fromBlocks 1 B C D) = det (D - C * B)\n[PROOFSTEP]\nrw [det_fromBlocks₁₁, invOf_one, Matrix.mul_one, det_one, one_mul]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible D\n⊢ det (fromBlocks A B C D) = det D * det (A - B * ⅟D * C)\n[PROOFSTEP]\nhave : fromBlocks A B C D = (fromBlocks D C B A).submatrix (Equiv.sumComm _ _) (Equiv.sumComm _ _) :=\n by\n ext (i j)\n cases i <;> cases j <;> rfl\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible D\n⊢ fromBlocks A B C D = submatrix (fromBlocks D C B A) ↑(Equiv.sumComm m n) ↑(Equiv.sumComm m n)\n[PROOFSTEP]\next (i j)\n[GOAL]\ncase a.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible D\ni j : m ⊕ n\n⊢ fromBlocks A B C D i j = submatrix (fromBlocks D C B A) (↑(Equiv.sumComm m n)) (↑(Equiv.sumComm m n)) i j\n[PROOFSTEP]\ncases i\n[GOAL]\ncase a.h.inl\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible D\nj : m ⊕ n\nval✝ : m\n⊢ fromBlocks A B C D (Sum.inl val✝) j =\n submatrix (fromBlocks D C B A) (↑(Equiv.sumComm m n)) (↑(Equiv.sumComm m n)) (Sum.inl val✝) j\n[PROOFSTEP]\ncases j\n[GOAL]\ncase a.h.inr\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible D\nj : m ⊕ n\nval✝ : n\n⊢ fromBlocks A B C D (Sum.inr val✝) j =\n submatrix (fromBlocks D C B A) (↑(Equiv.sumComm m n)) (↑(Equiv.sumComm m n)) (Sum.inr val✝) j\n[PROOFSTEP]\ncases j\n[GOAL]\ncase a.h.inl.inl\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible D\nval✝¹ val✝ : m\n⊢ fromBlocks A B C D (Sum.inl val✝¹) (Sum.inl val✝) =\n submatrix (fromBlocks D C B A) (↑(Equiv.sumComm m n)) (↑(Equiv.sumComm m n)) (Sum.inl val✝¹) (Sum.inl val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.h.inl.inr\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible D\nval✝¹ : m\nval✝ : n\n⊢ fromBlocks A B C D (Sum.inl val✝¹) (Sum.inr val✝) =\n submatrix (fromBlocks D C B A) (↑(Equiv.sumComm m n)) (↑(Equiv.sumComm m n)) (Sum.inl val✝¹) (Sum.inr val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.h.inr.inl\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible D\nval✝¹ : n\nval✝ : m\n⊢ fromBlocks A B C D (Sum.inr val✝¹) (Sum.inl val✝) =\n submatrix (fromBlocks D C B A) (↑(Equiv.sumComm m n)) (↑(Equiv.sumComm m n)) (Sum.inr val✝¹) (Sum.inl val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.h.inr.inr\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible D\nval✝¹ val✝ : n\n⊢ fromBlocks A B C D (Sum.inr val✝¹) (Sum.inr val✝) =\n submatrix (fromBlocks D C B A) (↑(Equiv.sumComm m n)) (↑(Equiv.sumComm m n)) (Sum.inr val✝¹) (Sum.inr val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁷ : Fintype l\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\ninst✝ : Invertible D\nthis : fromBlocks A B C D = submatrix (fromBlocks D C B A) ↑(Equiv.sumComm m n) ↑(Equiv.sumComm m n)\n⊢ det (fromBlocks A B C D) = det D * det (A - B * ⅟D * C)\n[PROOFSTEP]\nrw [this, det_submatrix_equiv_self, det_fromBlocks₁₁]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\n⊢ det (fromBlocks A B C 1) = det (A - B * C)\n[PROOFSTEP]\nhaveI : Invertible (1 : Matrix n n α) := invertibleOne\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nthis : Invertible 1\n⊢ det (fromBlocks A B C 1) = det (A - B * C)\n[PROOFSTEP]\nrw [det_fromBlocks₂₂, invOf_one, Matrix.mul_one, det_one, one_mul]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m n α\nB : Matrix n m α\n⊢ det (1 + A * B) = det (fromBlocks 1 (-A) B 1)\n[PROOFSTEP]\nrw [det_fromBlocks_one₂₂, Matrix.neg_mul, sub_neg_eq_add]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m n α\nB : Matrix n m α\n⊢ det (fromBlocks 1 (-A) B 1) = det (1 + B * A)\n[PROOFSTEP]\nrw [det_fromBlocks_one₁₁, Matrix.mul_neg, sub_neg_eq_add]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m n α\nB : Matrix n m α\n⊢ det (A * B + 1) = det (B * A + 1)\n[PROOFSTEP]\nrw [add_comm, det_one_add_mul_comm, add_comm]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nA : Matrix m n α\nB : Matrix n m α\n⊢ det (1 - A * B) = det (1 - B * A)\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← Matrix.neg_mul, det_one_add_mul_comm, Matrix.mul_neg, ← sub_eq_add_neg]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\ninst✝⁶ : Fintype l\ninst✝⁵ : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : CommRing α\nu v : m → α\n⊢ det (1 + col u * row v) = 1 + v ⬝ᵥ u\n[PROOFSTEP]\nrw [det_one_add_mul_comm, det_unique, Pi.add_apply, Pi.add_apply, Matrix.one_apply_eq, Matrix.row_mul_col_apply]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nx : m → 𝕜\ny : n → 𝕜\ninst✝ : Invertible A\nhA : IsHermitian A\n⊢ vecMul (star (x ⊕ᵥ y)) (fromBlocks A B Bᴴ D) ⬝ᵥ (x ⊕ᵥ y) =\n vecMul (star (x + mulVec (A⁻¹ * B) y)) A ⬝ᵥ (x + mulVec (A⁻¹ * B) y) + vecMul (star y) (D - Bᴴ * A⁻¹ * B) ⬝ᵥ y\n[PROOFSTEP]\nsimp [Function.star_sum_elim, fromBlocks_mulVec, vecMul_fromBlocks, add_vecMul, dotProduct_mulVec, vecMul_sub,\n Matrix.mul_assoc, vecMul_mulVec, hA.eq, conjTranspose_nonsing_inv, star_mulVec]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nx : m → 𝕜\ny : n → 𝕜\ninst✝ : Invertible A\nhA : IsHermitian A\n⊢ vecMul (star x) A ⬝ᵥ x + vecMul (star y) Bᴴ ⬝ᵥ x + (vecMul (star x) B ⬝ᵥ y + vecMul (star y) D ⬝ᵥ y) =\n vecMul (star x) A ⬝ᵥ x + vecMul (star y) Bᴴ ⬝ᵥ x +\n (vecMul (star x) B ⬝ᵥ y + vecMul (star y) (Bᴴ * (A⁻¹ * B)) ⬝ᵥ y) +\n (vecMul (star y) D ⬝ᵥ y - vecMul (star y) (Bᴴ * (A⁻¹ * B)) ⬝ᵥ y)\n[PROOFSTEP]\nabel\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nx : m → 𝕜\ny : n → 𝕜\ninst✝ : Invertible A\nhA : IsHermitian A\n⊢ vecMul (star x) A ⬝ᵥ x + vecMul (star y) Bᴴ ⬝ᵥ x + (vecMul (star x) B ⬝ᵥ y + vecMul (star y) D ⬝ᵥ y) =\n vecMul (star x) A ⬝ᵥ x + vecMul (star y) Bᴴ ⬝ᵥ x +\n (vecMul (star x) B ⬝ᵥ y + vecMul (star y) (Bᴴ * (A⁻¹ * B)) ⬝ᵥ y) +\n (vecMul (star y) D ⬝ᵥ y - vecMul (star y) (Bᴴ * (A⁻¹ * B)) ⬝ᵥ y)\n[PROOFSTEP]\nabel\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nx : m → 𝕜\ny : n → 𝕜\ninst✝ : Invertible D\nhD : IsHermitian D\n⊢ vecMul (star (x ⊕ᵥ y)) (fromBlocks A B Bᴴ D) ⬝ᵥ (x ⊕ᵥ y) =\n vecMul (star (mulVec (D⁻¹ * Bᴴ) x + y)) D ⬝ᵥ (mulVec (D⁻¹ * Bᴴ) x + y) + vecMul (star x) (A - B * D⁻¹ * Bᴴ) ⬝ᵥ x\n[PROOFSTEP]\nsimp [Function.star_sum_elim, fromBlocks_mulVec, vecMul_fromBlocks, add_vecMul, dotProduct_mulVec, vecMul_sub,\n Matrix.mul_assoc, vecMul_mulVec, hD.eq, conjTranspose_nonsing_inv, star_mulVec]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nx : m → 𝕜\ny : n → 𝕜\ninst✝ : Invertible D\nhD : IsHermitian D\n⊢ vecMul (star x) A ⬝ᵥ x + vecMul (star y) Bᴴ ⬝ᵥ x + (vecMul (star x) B ⬝ᵥ y + vecMul (star y) D ⬝ᵥ y) =\n vecMul (star x) (B * (D⁻¹ * Bᴴ)) ⬝ᵥ x + vecMul (star y) Bᴴ ⬝ᵥ x +\n (vecMul (star x) B ⬝ᵥ y + vecMul (star y) D ⬝ᵥ y) +\n (vecMul (star x) A ⬝ᵥ x - vecMul (star x) (B * (D⁻¹ * Bᴴ)) ⬝ᵥ x)\n[PROOFSTEP]\nabel\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nx : m → 𝕜\ny : n → 𝕜\ninst✝ : Invertible D\nhD : IsHermitian D\n⊢ vecMul (star x) A ⬝ᵥ x + vecMul (star y) Bᴴ ⬝ᵥ x + (vecMul (star x) B ⬝ᵥ y + vecMul (star y) D ⬝ᵥ y) =\n vecMul (star x) (B * (D⁻¹ * Bᴴ)) ⬝ᵥ x + vecMul (star y) Bᴴ ⬝ᵥ x +\n (vecMul (star x) B ⬝ᵥ y + vecMul (star y) D ⬝ᵥ y) +\n (vecMul (star x) A ⬝ᵥ x - vecMul (star x) (B * (D⁻¹ * Bᴴ)) ⬝ᵥ x)\n[PROOFSTEP]\nabel\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁴ : CommRing 𝕜\ninst✝³ : PartialOrder 𝕜\ninst✝² : StarOrderedRing 𝕜\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : IsHermitian A\n⊢ IsHermitian (Matrix.fromBlocks A B Bᴴ D) ↔ IsHermitian (D - Bᴴ * A⁻¹ * B)\n[PROOFSTEP]\nhave hBAB : (Bᴴ * A⁻¹ * B).IsHermitian :=\n by\n apply isHermitian_conjTranspose_mul_mul\n apply hA.inv\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁴ : CommRing 𝕜\ninst✝³ : PartialOrder 𝕜\ninst✝² : StarOrderedRing 𝕜\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : IsHermitian A\n⊢ IsHermitian (Bᴴ * A⁻¹ * B)\n[PROOFSTEP]\napply isHermitian_conjTranspose_mul_mul\n[GOAL]\ncase hA\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁴ : CommRing 𝕜\ninst✝³ : PartialOrder 𝕜\ninst✝² : StarOrderedRing 𝕜\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : IsHermitian A\n⊢ IsHermitian A⁻¹\n[PROOFSTEP]\napply hA.inv\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁴ : CommRing 𝕜\ninst✝³ : PartialOrder 𝕜\ninst✝² : StarOrderedRing 𝕜\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : IsHermitian A\nhBAB : IsHermitian (Bᴴ * A⁻¹ * B)\n⊢ IsHermitian (Matrix.fromBlocks A B Bᴴ D) ↔ IsHermitian (D - Bᴴ * A⁻¹ * B)\n[PROOFSTEP]\nrw [isHermitian_fromBlocks_iff]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁴ : CommRing 𝕜\ninst✝³ : PartialOrder 𝕜\ninst✝² : StarOrderedRing 𝕜\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : IsHermitian A\nhBAB : IsHermitian (Bᴴ * A⁻¹ * B)\n⊢ IsHermitian A ∧ Bᴴ = Bᴴ ∧ Bᴴᴴ = B ∧ IsHermitian D ↔ IsHermitian (D - Bᴴ * A⁻¹ * B)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁴ : CommRing 𝕜\ninst✝³ : PartialOrder 𝕜\ninst✝² : StarOrderedRing 𝕜\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : IsHermitian A\nhBAB : IsHermitian (Bᴴ * A⁻¹ * B)\n⊢ IsHermitian A ∧ Bᴴ = Bᴴ ∧ Bᴴᴴ = B ∧ IsHermitian D → IsHermitian (D - Bᴴ * A⁻¹ * B)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁴ : CommRing 𝕜\ninst✝³ : PartialOrder 𝕜\ninst✝² : StarOrderedRing 𝕜\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : IsHermitian A\nhBAB : IsHermitian (Bᴴ * A⁻¹ * B)\nh : IsHermitian A ∧ Bᴴ = Bᴴ ∧ Bᴴᴴ = B ∧ IsHermitian D\n⊢ IsHermitian (D - Bᴴ * A⁻¹ * B)\n[PROOFSTEP]\napply IsHermitian.sub h.2.2.2 hBAB\n[GOAL]\ncase mpr\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁴ : CommRing 𝕜\ninst✝³ : PartialOrder 𝕜\ninst✝² : StarOrderedRing 𝕜\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : IsHermitian A\nhBAB : IsHermitian (Bᴴ * A⁻¹ * B)\n⊢ IsHermitian (D - Bᴴ * A⁻¹ * B) → IsHermitian A ∧ Bᴴ = Bᴴ ∧ Bᴴᴴ = B ∧ IsHermitian D\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁴ : CommRing 𝕜\ninst✝³ : PartialOrder 𝕜\ninst✝² : StarOrderedRing 𝕜\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : IsHermitian A\nhBAB : IsHermitian (Bᴴ * A⁻¹ * B)\nh : IsHermitian (D - Bᴴ * A⁻¹ * B)\n⊢ IsHermitian A ∧ Bᴴ = Bᴴ ∧ Bᴴᴴ = B ∧ IsHermitian D\n[PROOFSTEP]\nrefine' ⟨hA, rfl, conjTranspose_conjTranspose B, _⟩\n[GOAL]\ncase mpr\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁴ : CommRing 𝕜\ninst✝³ : PartialOrder 𝕜\ninst✝² : StarOrderedRing 𝕜\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : IsHermitian A\nhBAB : IsHermitian (Bᴴ * A⁻¹ * B)\nh : IsHermitian (D - Bᴴ * A⁻¹ * B)\n⊢ IsHermitian D\n[PROOFSTEP]\nrw [← sub_add_cancel D]\n[GOAL]\ncase mpr\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁴ : CommRing 𝕜\ninst✝³ : PartialOrder 𝕜\ninst✝² : StarOrderedRing 𝕜\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : IsHermitian A\nhBAB : IsHermitian (Bᴴ * A⁻¹ * B)\nh : IsHermitian (D - Bᴴ * A⁻¹ * B)\n⊢ IsHermitian (D - ?mpr + ?mpr)\ncase mpr\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁴ : CommRing 𝕜\ninst✝³ : PartialOrder 𝕜\ninst✝² : StarOrderedRing 𝕜\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : IsHermitian A\nhBAB : IsHermitian (Bᴴ * A⁻¹ * B)\nh : IsHermitian (D - Bᴴ * A⁻¹ * B)\n⊢ Matrix n n 𝕜\n[PROOFSTEP]\napply IsHermitian.add h hBAB\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁴ : CommRing 𝕜\ninst✝³ : PartialOrder 𝕜\ninst✝² : StarOrderedRing 𝕜\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhD : IsHermitian D\n⊢ IsHermitian (Matrix.fromBlocks A B Bᴴ D) ↔ IsHermitian (A - B * D⁻¹ * Bᴴ)\n[PROOFSTEP]\nrw [← isHermitian_submatrix_equiv (Equiv.sumComm n m), Equiv.sumComm_apply, fromBlocks_submatrix_sum_swap_sum_swap]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁴ : CommRing 𝕜\ninst✝³ : PartialOrder 𝕜\ninst✝² : StarOrderedRing 𝕜\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhD : IsHermitian D\n⊢ IsHermitian (Matrix.fromBlocks D Bᴴ B A) ↔ IsHermitian (A - B * D⁻¹ * Bᴴ)\n[PROOFSTEP]\nconvert IsHermitian.fromBlocks₁₁ _ _ hD\n[GOAL]\ncase h.e'_1.h.e'_4.h.e'_8\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁴ : CommRing 𝕜\ninst✝³ : PartialOrder 𝕜\ninst✝² : StarOrderedRing 𝕜\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhD : IsHermitian D\n⊢ B = Bᴴᴴ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_2.h.e'_4.h.e'_6.h.e'_5.h.e'_5\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁴ : CommRing 𝕜\ninst✝³ : PartialOrder 𝕜\ninst✝² : StarOrderedRing 𝕜\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhD : IsHermitian D\n⊢ B = Bᴴᴴ\n[PROOFSTEP]\nsimp\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : PosDef A\ninst✝ : Invertible A\n⊢ PosSemidef (fromBlocks A B Bᴴ D) ↔ PosSemidef (D - Bᴴ * A⁻¹ * B)\n[PROOFSTEP]\nrw [PosSemidef, IsHermitian.fromBlocks₁₁ _ _ hA.1]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : PosDef A\ninst✝ : Invertible A\n⊢ (IsHermitian (D - Bᴴ * A⁻¹ * B) ∧ ∀ (x : m ⊕ n → 𝕜), 0 ≤ star x ⬝ᵥ mulVec (fromBlocks A B Bᴴ D) x) ↔\n PosSemidef (D - Bᴴ * A⁻¹ * B)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : PosDef A\ninst✝ : Invertible A\n⊢ (IsHermitian (D - Bᴴ * A⁻¹ * B) ∧ ∀ (x : m ⊕ n → 𝕜), 0 ≤ star x ⬝ᵥ mulVec (fromBlocks A B Bᴴ D) x) →\n PosSemidef (D - Bᴴ * A⁻¹ * B)\n[PROOFSTEP]\nrefine' fun h => ⟨h.1, fun x => _⟩\n[GOAL]\ncase mp\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : PosDef A\ninst✝ : Invertible A\nh : IsHermitian (D - Bᴴ * A⁻¹ * B) ∧ ∀ (x : m ⊕ n → 𝕜), 0 ≤ star x ⬝ᵥ mulVec (fromBlocks A B Bᴴ D) x\nx : n → 𝕜\n⊢ 0 ≤ star x ⬝ᵥ mulVec (D - Bᴴ * A⁻¹ * B) x\n[PROOFSTEP]\nhave := h.2 (-(A⁻¹ * B).mulVec x ⊕ᵥ x)\n[GOAL]\ncase mp\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : PosDef A\ninst✝ : Invertible A\nh : IsHermitian (D - Bᴴ * A⁻¹ * B) ∧ ∀ (x : m ⊕ n → 𝕜), 0 ≤ star x ⬝ᵥ mulVec (fromBlocks A B Bᴴ D) x\nx : n → 𝕜\nthis : 0 ≤ star (-mulVec (A⁻¹ * B) x ⊕ᵥ x) ⬝ᵥ mulVec (fromBlocks A B Bᴴ D) (-mulVec (A⁻¹ * B) x ⊕ᵥ x)\n⊢ 0 ≤ star x ⬝ᵥ mulVec (D - Bᴴ * A⁻¹ * B) x\n[PROOFSTEP]\nrw [dotProduct_mulVec, schur_complement_eq₁₁ B D _ _ hA.1, neg_add_self, dotProduct_zero, zero_add] at this \n[GOAL]\ncase mp\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : PosDef A\ninst✝ : Invertible A\nh : IsHermitian (D - Bᴴ * A⁻¹ * B) ∧ ∀ (x : m ⊕ n → 𝕜), 0 ≤ star x ⬝ᵥ mulVec (fromBlocks A B Bᴴ D) x\nx : n → 𝕜\nthis : 0 ≤ vecMul (star x) (D - Bᴴ * A⁻¹ * B) ⬝ᵥ x\n⊢ 0 ≤ star x ⬝ᵥ mulVec (D - Bᴴ * A⁻¹ * B) x\n[PROOFSTEP]\nrw [dotProduct_mulVec]\n[GOAL]\ncase mp\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : PosDef A\ninst✝ : Invertible A\nh : IsHermitian (D - Bᴴ * A⁻¹ * B) ∧ ∀ (x : m ⊕ n → 𝕜), 0 ≤ star x ⬝ᵥ mulVec (fromBlocks A B Bᴴ D) x\nx : n → 𝕜\nthis : 0 ≤ vecMul (star x) (D - Bᴴ * A⁻¹ * B) ⬝ᵥ x\n⊢ 0 ≤ vecMul (star x) (D - Bᴴ * A⁻¹ * B) ⬝ᵥ x\n[PROOFSTEP]\nexact this\n[GOAL]\ncase mpr\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : PosDef A\ninst✝ : Invertible A\n⊢ PosSemidef (D - Bᴴ * A⁻¹ * B) →\n IsHermitian (D - Bᴴ * A⁻¹ * B) ∧ ∀ (x : m ⊕ n → 𝕜), 0 ≤ star x ⬝ᵥ mulVec (fromBlocks A B Bᴴ D) x\n[PROOFSTEP]\nrefine' fun h => ⟨h.1, fun x => _⟩\n[GOAL]\ncase mpr\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : PosDef A\ninst✝ : Invertible A\nh : PosSemidef (D - Bᴴ * A⁻¹ * B)\nx : m ⊕ n → 𝕜\n⊢ 0 ≤ star x ⬝ᵥ mulVec (fromBlocks A B Bᴴ D) x\n[PROOFSTEP]\nrw [dotProduct_mulVec, ← Sum.elim_comp_inl_inr x, schur_complement_eq₁₁ B D _ _ hA.1]\n[GOAL]\ncase mpr\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : PosDef A\ninst✝ : Invertible A\nh : PosSemidef (D - Bᴴ * A⁻¹ * B)\nx : m ⊕ n → 𝕜\n⊢ 0 ≤\n vecMul (star (x ∘ Sum.inl + mulVec (A⁻¹ * B) (x ∘ Sum.inr))) A ⬝ᵥ (x ∘ Sum.inl + mulVec (A⁻¹ * B) (x ∘ Sum.inr)) +\n vecMul (star (x ∘ Sum.inr)) (D - Bᴴ * A⁻¹ * B) ⬝ᵥ x ∘ Sum.inr\n[PROOFSTEP]\napply le_add_of_nonneg_of_le\n[GOAL]\ncase mpr.ha\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : PosDef A\ninst✝ : Invertible A\nh : PosSemidef (D - Bᴴ * A⁻¹ * B)\nx : m ⊕ n → 𝕜\n⊢ 0 ≤ vecMul (star (x ∘ Sum.inl + mulVec (A⁻¹ * B) (x ∘ Sum.inr))) A ⬝ᵥ (x ∘ Sum.inl + mulVec (A⁻¹ * B) (x ∘ Sum.inr))\n[PROOFSTEP]\nrw [← dotProduct_mulVec]\n[GOAL]\ncase mpr.ha\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : PosDef A\ninst✝ : Invertible A\nh : PosSemidef (D - Bᴴ * A⁻¹ * B)\nx : m ⊕ n → 𝕜\n⊢ 0 ≤ star (x ∘ Sum.inl + mulVec (A⁻¹ * B) (x ∘ Sum.inr)) ⬝ᵥ mulVec A (x ∘ Sum.inl + mulVec (A⁻¹ * B) (x ∘ Sum.inr))\n[PROOFSTEP]\napply hA.posSemidef.2\n[GOAL]\ncase mpr.hbc\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : PosDef A\ninst✝ : Invertible A\nh : PosSemidef (D - Bᴴ * A⁻¹ * B)\nx : m ⊕ n → 𝕜\n⊢ 0 ≤ vecMul (star (x ∘ Sum.inr)) (D - Bᴴ * A⁻¹ * B) ⬝ᵥ x ∘ Sum.inr\n[PROOFSTEP]\nrw [← dotProduct_mulVec (star (x ∘ Sum.inr))]\n[GOAL]\ncase mpr.hbc\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhA : PosDef A\ninst✝ : Invertible A\nh : PosSemidef (D - Bᴴ * A⁻¹ * B)\nx : m ⊕ n → 𝕜\n⊢ 0 ≤ star (x ∘ Sum.inr) ⬝ᵥ mulVec (D - Bᴴ * A⁻¹ * B) (x ∘ Sum.inr)\n[PROOFSTEP]\napply h.2\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhD : PosDef D\ninst✝ : Invertible D\n⊢ PosSemidef (fromBlocks A B Bᴴ D) ↔ PosSemidef (A - B * D⁻¹ * Bᴴ)\n[PROOFSTEP]\nrw [← posSemidef_submatrix_equiv (Equiv.sumComm n m), Equiv.sumComm_apply, fromBlocks_submatrix_sum_swap_sum_swap]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhD : PosDef D\ninst✝ : Invertible D\n⊢ PosSemidef (fromBlocks D Bᴴ B A) ↔ PosSemidef (A - B * D⁻¹ * Bᴴ)\n[PROOFSTEP]\nconvert PosSemidef.fromBlocks₁₁ Bᴴ A hD\n[GOAL]\ncase h.e'_1.h.e'_7.h.e'_8\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhD : PosDef D\ninst✝ : Invertible D\n⊢ B = Bᴴᴴ\n[PROOFSTEP]\nfirst\n| infer_instance\n| simp\n[GOAL]\ncase h.e'_1.h.e'_7.h.e'_8\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhD : PosDef D\ninst✝ : Invertible D\n⊢ B = Bᴴᴴ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase h.e'_1.h.e'_7.h.e'_8\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhD : PosDef D\ninst✝ : Invertible D\n⊢ B = Bᴴᴴ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_2.h.e'_7.h.e'_6.h.e'_5.h.e'_5\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhD : PosDef D\ninst✝ : Invertible D\n⊢ B = Bᴴᴴ\n[PROOFSTEP]\nfirst\n| infer_instance\n| simp\n[GOAL]\ncase h.e'_2.h.e'_7.h.e'_6.h.e'_5.h.e'_5\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhD : PosDef D\ninst✝ : Invertible D\n⊢ B = Bᴴᴴ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase h.e'_2.h.e'_7.h.e'_6.h.e'_5.h.e'_5\nl : Type u_1\nm : Type u_2\nn : Type u_3\nα : Type u_4\n𝕜 : Type u_5\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : PartialOrder 𝕜\ninst✝⁴ : StarOrderedRing 𝕜\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nA : Matrix m m 𝕜\nB : Matrix m n 𝕜\nD : Matrix n n 𝕜\nhD : PosDef D\ninst✝ : Invertible D\n⊢ B = Bᴴᴴ\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.SchurComplement", "llama_tokens": 38573, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7718435083355188, "lm_q2_score": 0.7217432122827967, "lm_q1q2_score": 0.5570728130857009}} {"text": "[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\na✝ n✝ : ℕ\nx✝ : 0 ≤ a✝\n⊢ n✝ ≤ id a✝ ↔ ↑n✝ ≤ a✝\n[PROOFSTEP]\nrw [Nat.cast_id]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\na✝ n✝ : ℕ\nx✝ : 0 ≤ a✝\n⊢ n✝ ≤ id a✝ ↔ n✝ ≤ a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nn a : ℕ\n⊢ id n ≤ a ↔ n ≤ ↑a\n[PROOFSTEP]\nrw [Nat.cast_id]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nn a : ℕ\n⊢ id n ≤ a ↔ n ≤ a\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : 0 ≤ a\n⊢ a < ↑1 ↔ a < 1\n[PROOFSTEP]\nrw [Nat.cast_one]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nh : ⌊a⌋₊ < 1\n⊢ a < 1\n[PROOFSTEP]\nexact_mod_cast lt_of_floor_lt h\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na : α\n⊢ a < ↑⌊a⌋₊ + 1\n[PROOFSTEP]\nsimpa using lt_succ_floor a\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn✝ n a : ℕ\n⊢ a ≤ ⌊↑n⌋₊ ↔ a ≤ n\n[PROOFSTEP]\nrw [le_floor_iff, Nat.cast_le]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn✝ n a : ℕ\n⊢ 0 ≤ ↑n\n[PROOFSTEP]\nexact n.cast_nonneg\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\n⊢ ⌊0⌋₊ = 0\n[PROOFSTEP]\nrw [← Nat.cast_zero, floor_coe]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\n⊢ ⌊1⌋₊ = 1\n[PROOFSTEP]\nrw [← Nat.cast_one, floor_coe]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : a ≤ 0\n⊢ a = 0 → ⌊a⌋₊ = 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\nn : ℕ\nha : 0 ≤ 0\n⊢ ⌊0⌋₊ = 0\n[PROOFSTEP]\nexact floor_zero\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na b : α\nh : a ≤ b\n⊢ ⌊a⌋₊ ≤ ⌊b⌋₊\n[PROOFSTEP]\nobtain ha | ha := le_total a 0\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na b : α\nh : a ≤ b\nha : a ≤ 0\n⊢ ⌊a⌋₊ ≤ ⌊b⌋₊\n[PROOFSTEP]\nrw [floor_of_nonpos ha]\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na b : α\nh : a ≤ b\nha : a ≤ 0\n⊢ 0 ≤ ⌊b⌋₊\n[PROOFSTEP]\nexact Nat.zero_le _\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na b : α\nh : a ≤ b\nha : 0 ≤ a\n⊢ ⌊a⌋₊ ≤ ⌊b⌋₊\n[PROOFSTEP]\nexact le_floor ((floor_le ha).trans h)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nhn : n ≠ 0\n⊢ n ≤ ⌊a⌋₊ ↔ ↑n ≤ a\n[PROOFSTEP]\nobtain ha | ha := le_total a 0\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nhn : n ≠ 0\nha : a ≤ 0\n⊢ n ≤ ⌊a⌋₊ ↔ ↑n ≤ a\n[PROOFSTEP]\nrw [floor_of_nonpos ha]\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nhn : n ≠ 0\nha : a ≤ 0\n⊢ n ≤ 0 ↔ ↑n ≤ a\n[PROOFSTEP]\nexact iff_of_false (Nat.pos_of_ne_zero hn).not_le (not_le_of_lt <| ha.trans_lt <| cast_pos.2 <| Nat.pos_of_ne_zero hn)\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nhn : n ≠ 0\nha : 0 ≤ a\n⊢ n ≤ ⌊a⌋₊ ↔ ↑n ≤ a\n[PROOFSTEP]\nexact le_floor_iff ha\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nx : α\n⊢ 1 ≤ ⌊x⌋₊ ↔ 1 ≤ x\n[PROOFSTEP]\nexact_mod_cast @le_floor_iff' α _ _ x 1 one_ne_zero\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\n⊢ 0 < ⌊a⌋₊ ↔ 1 ≤ a\n[PROOFSTEP]\nrw [Nat.lt_iff_add_one_le, zero_add, le_floor_iff' Nat.one_ne_zero, cast_one]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nh : 0 < ⌊a⌋₊\nha : a ≤ 0\n⊢ 0 < 0\n[PROOFSTEP]\nrwa [floor_of_nonpos ha] at h \n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\n⊢ ⌊a⌋₊ = 0 ↔ a < 1\n[PROOFSTEP]\nrw [← lt_one_iff, ← @cast_one α]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\n⊢ ⌊a⌋₊ < 1 ↔ a < ↑1\n[PROOFSTEP]\nexact floor_lt' Nat.one_ne_zero\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : 0 ≤ a\n⊢ ⌊a⌋₊ = n ↔ ↑n ≤ a ∧ a < ↑n + 1\n[PROOFSTEP]\nrw [← le_floor_iff ha, ← Nat.cast_one, ← Nat.cast_add, ← floor_lt ha, Nat.lt_add_one_iff, le_antisymm_iff, and_comm]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nhn : n ≠ 0\n⊢ ⌊a⌋₊ = n ↔ ↑n ≤ a ∧ a < ↑n + 1\n[PROOFSTEP]\nrw [← le_floor_iff' hn, ← Nat.cast_one, ← Nat.cast_add, ← floor_lt' (Nat.add_one_ne_zero n), Nat.lt_add_one_iff,\n le_antisymm_iff, and_comm]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn✝ n : ℕ\nx : α\nhx : x ∈ Ico (↑n) (↑n + 1)\n⊢ ↑⌊x⌋₊ = ↑n\n[PROOFSTEP]\nexact_mod_cast floor_eq_on_Ico n x hx\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\n⊢ n + 1 ≤ ⌈a⌉₊ ↔ ↑n < a\n[PROOFSTEP]\nrw [← Nat.lt_ceil, Nat.add_one_le_iff]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\n⊢ 1 ≤ ⌈a⌉₊ ↔ 0 < a\n[PROOFSTEP]\nrw [← zero_add 1, Nat.add_one_le_ceil_iff, Nat.cast_zero]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na : α\n⊢ ⌈a⌉₊ ≤ ⌊a⌋₊ + 1\n[PROOFSTEP]\nrw [ceil_le, Nat.cast_add, Nat.cast_one]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na : α\n⊢ a ≤ ↑⌊a⌋₊ + 1\n[PROOFSTEP]\nexact (lt_floor_add_one a).le\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedSemiring α✝\ninst✝² : FloorSemiring α✝\na✝ : α✝\nn : ℕ\nα : Type u_4\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorSemiring α\nz : ℤ\na : ℕ\n⊢ ⌈↑z⌉₊ ≤ a ↔ Int.toNat z ≤ a\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedSemiring α✝\ninst✝² : FloorSemiring α✝\na✝ : α✝\nn : ℕ\nα : Type u_4\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorSemiring α\nz : ℤ\na : ℕ\n⊢ ↑z ≤ ↑a ↔ z ≤ ↑a\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn✝ n a : ℕ\n⊢ ⌈↑n⌉₊ ≤ a ↔ n ≤ a\n[PROOFSTEP]\nrw [ceil_le, cast_le]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\n⊢ ⌈0⌉₊ = 0\n[PROOFSTEP]\nrw [← Nat.cast_zero, ceil_natCast]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\n⊢ ⌈1⌉₊ = 1\n[PROOFSTEP]\nrw [← Nat.cast_one, ceil_natCast]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\n⊢ ⌈a⌉₊ = 0 ↔ a ≤ 0\n[PROOFSTEP]\nrw [← le_zero_iff, ceil_le, Nat.cast_zero]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\n⊢ 0 < ⌈a⌉₊ ↔ 0 < a\n[PROOFSTEP]\nrw [lt_ceil, cast_zero]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na : α\n⊢ ⌊a⌋₊ ≤ ⌈a⌉₊\n[PROOFSTEP]\nobtain ha | ha := le_total a 0\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na : α\nha : a ≤ 0\n⊢ ⌊a⌋₊ ≤ ⌈a⌉₊\n[PROOFSTEP]\nrw [floor_of_nonpos ha]\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na : α\nha : a ≤ 0\n⊢ 0 ≤ ⌈a⌉₊\n[PROOFSTEP]\nexact Nat.zero_le _\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na : α\nha : 0 ≤ a\n⊢ ⌊a⌋₊ ≤ ⌈a⌉₊\n[PROOFSTEP]\nexact cast_le.1 ((floor_le ha).trans <| le_ceil _)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na b : α\nh : a < b\nh' : 0 < b\n⊢ ⌊a⌋₊ < ⌈b⌉₊\n[PROOFSTEP]\nrcases le_or_lt 0 a with (ha | ha)\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na b : α\nh : a < b\nh' : 0 < b\nha : 0 ≤ a\n⊢ ⌊a⌋₊ < ⌈b⌉₊\n[PROOFSTEP]\nrw [floor_lt ha]\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na b : α\nh : a < b\nh' : 0 < b\nha : 0 ≤ a\n⊢ a < ↑⌈b⌉₊\n[PROOFSTEP]\nexact h.trans_le (le_ceil _)\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na b : α\nh : a < b\nh' : 0 < b\nha : a < 0\n⊢ ⌊a⌋₊ < ⌈b⌉₊\n[PROOFSTEP]\nrwa [floor_of_nonpos ha.le, lt_ceil, Nat.cast_zero]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nhn : n ≠ 0\n⊢ ⌈a⌉₊ = n ↔ ↑(n - 1) < a ∧ a ≤ ↑n\n[PROOFSTEP]\nrw [← ceil_le, ← not_le, ← ceil_le, not_le, tsub_lt_iff_right (Nat.add_one_le_iff.2 (pos_iff_ne_zero.2 hn)),\n Nat.lt_add_one_iff, le_antisymm_iff, and_comm]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na b : α\nha : 0 ≤ a\n⊢ Nat.cast ⁻¹' Ioo a b = Ioo ⌊a⌋₊ ⌈b⌉₊\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na b : α\nha : 0 ≤ a\nx✝ : ℕ\n⊢ x✝ ∈ Nat.cast ⁻¹' Ioo a b ↔ x✝ ∈ Ioo ⌊a⌋₊ ⌈b⌉₊\n[PROOFSTEP]\nsimp [floor_lt, lt_ceil, ha]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na b : α\n⊢ Nat.cast ⁻¹' Ico a b = Ico ⌈a⌉₊ ⌈b⌉₊\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na b : α\nx✝ : ℕ\n⊢ x✝ ∈ Nat.cast ⁻¹' Ico a b ↔ x✝ ∈ Ico ⌈a⌉₊ ⌈b⌉₊\n[PROOFSTEP]\nsimp [ceil_le, lt_ceil]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na b : α\nha : 0 ≤ a\nhb : 0 ≤ b\n⊢ Nat.cast ⁻¹' Ioc a b = Ioc ⌊a⌋₊ ⌊b⌋₊\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na b : α\nha : 0 ≤ a\nhb : 0 ≤ b\nx✝ : ℕ\n⊢ x✝ ∈ Nat.cast ⁻¹' Ioc a b ↔ x✝ ∈ Ioc ⌊a⌋₊ ⌊b⌋₊\n[PROOFSTEP]\nsimp [floor_lt, le_floor_iff, hb, ha]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na b : α\nhb : 0 ≤ b\n⊢ Nat.cast ⁻¹' Icc a b = Icc ⌈a⌉₊ ⌊b⌋₊\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na b : α\nhb : 0 ≤ b\nx✝ : ℕ\n⊢ x✝ ∈ Nat.cast ⁻¹' Icc a b ↔ x✝ ∈ Icc ⌈a⌉₊ ⌊b⌋₊\n[PROOFSTEP]\nsimp [ceil_le, hb, le_floor_iff]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na : α\nha : 0 ≤ a\n⊢ Nat.cast ⁻¹' Ioi a = Ioi ⌊a⌋₊\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na : α\nha : 0 ≤ a\nx✝ : ℕ\n⊢ x✝ ∈ Nat.cast ⁻¹' Ioi a ↔ x✝ ∈ Ioi ⌊a⌋₊\n[PROOFSTEP]\nsimp [floor_lt, ha]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na : α\n⊢ Nat.cast ⁻¹' Ici a = Ici ⌈a⌉₊\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na : α\nx✝ : ℕ\n⊢ x✝ ∈ Nat.cast ⁻¹' Ici a ↔ x✝ ∈ Ici ⌈a⌉₊\n[PROOFSTEP]\nsimp [ceil_le]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na : α\n⊢ Nat.cast ⁻¹' Iio a = Iio ⌈a⌉₊\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na : α\nx✝ : ℕ\n⊢ x✝ ∈ Nat.cast ⁻¹' Iio a ↔ x✝ ∈ Iio ⌈a⌉₊\n[PROOFSTEP]\nsimp [lt_ceil]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na : α\nha : 0 ≤ a\n⊢ Nat.cast ⁻¹' Iic a = Iic ⌊a⌋₊\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na : α\nha : 0 ≤ a\nx✝ : ℕ\n⊢ x✝ ∈ Nat.cast ⁻¹' Iic a ↔ x✝ ∈ Iic ⌊a⌋₊\n[PROOFSTEP]\nsimp [le_floor_iff, ha]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn✝ : ℕ\nha : 0 ≤ a\nn b : ℕ\n⊢ b ≤ ⌊a + ↑n⌋₊ ↔ b ≤ ⌊a⌋₊ + n\n[PROOFSTEP]\nrw [le_floor_iff (add_nonneg ha n.cast_nonneg)]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn✝ : ℕ\nha : 0 ≤ a\nn b : ℕ\n⊢ ↑b ≤ a + ↑n ↔ b ≤ ⌊a⌋₊ + n\n[PROOFSTEP]\nobtain hb | hb := le_total n b\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn✝ : ℕ\nha : 0 ≤ a\nn b : ℕ\nhb : n ≤ b\n⊢ ↑b ≤ a + ↑n ↔ b ≤ ⌊a⌋₊ + n\n[PROOFSTEP]\nobtain ⟨d, rfl⟩ := exists_add_of_le hb\n[GOAL]\ncase inl.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn✝ : ℕ\nha : 0 ≤ a\nn d : ℕ\nhb : n ≤ n + d\n⊢ ↑(n + d) ≤ a + ↑n ↔ n + d ≤ ⌊a⌋₊ + n\n[PROOFSTEP]\nrw [Nat.cast_add, add_comm n, add_comm (n : α), add_le_add_iff_right, add_le_add_iff_right, le_floor_iff ha]\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn✝ : ℕ\nha : 0 ≤ a\nn b : ℕ\nhb : b ≤ n\n⊢ ↑b ≤ a + ↑n ↔ b ≤ ⌊a⌋₊ + n\n[PROOFSTEP]\nobtain ⟨d, rfl⟩ := exists_add_of_le hb\n[GOAL]\ncase inr.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : 0 ≤ a\nb d : ℕ\nhb : b ≤ b + d\n⊢ ↑b ≤ a + ↑(b + d) ↔ b ≤ ⌊a⌋₊ + (b + d)\n[PROOFSTEP]\nrw [Nat.cast_add, add_left_comm _ b, add_left_comm _ (b : α)]\n[GOAL]\ncase inr.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : 0 ≤ a\nb d : ℕ\nhb : b ≤ b + d\n⊢ ↑b ≤ ↑b + (a + ↑d) ↔ b ≤ b + (⌊a⌋₊ + d)\n[PROOFSTEP]\nrefine' iff_of_true _ le_self_add\n[GOAL]\ncase inr.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : 0 ≤ a\nb d : ℕ\nhb : b ≤ b + d\n⊢ ↑b ≤ ↑b + (a + ↑d)\n[PROOFSTEP]\nexact le_add_of_nonneg_right <| ha.trans <| le_add_of_nonneg_right d.cast_nonneg\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : 0 ≤ a\n⊢ ⌊a + 1⌋₊ = ⌊a⌋₊ + 1\n[PROOFSTEP]\nrw [← cast_one, floor_add_nat ha 1]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedSemiring α\ninst✝³ : FloorSemiring α\na✝ : α\nn✝ : ℕ\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\ninst✝ : ExistsAddOfLE α\na : α\nn : ℕ\n⊢ ⌊a - ↑n⌋₊ = ⌊a⌋₊ - n\n[PROOFSTEP]\nobtain ha | ha := le_total a 0\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedSemiring α\ninst✝³ : FloorSemiring α\na✝ : α\nn✝ : ℕ\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\ninst✝ : ExistsAddOfLE α\na : α\nn : ℕ\nha : a ≤ 0\n⊢ ⌊a - ↑n⌋₊ = ⌊a⌋₊ - n\n[PROOFSTEP]\nrw [floor_of_nonpos ha, floor_of_nonpos (tsub_nonpos_of_le (ha.trans n.cast_nonneg)), zero_tsub]\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedSemiring α\ninst✝³ : FloorSemiring α\na✝ : α\nn✝ : ℕ\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\ninst✝ : ExistsAddOfLE α\na : α\nn : ℕ\nha : 0 ≤ a\n⊢ ⌊a - ↑n⌋₊ = ⌊a⌋₊ - n\n[PROOFSTEP]\ncases' le_total a n with h h\n[GOAL]\ncase inr.inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedSemiring α\ninst✝³ : FloorSemiring α\na✝ : α\nn✝ : ℕ\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\ninst✝ : ExistsAddOfLE α\na : α\nn : ℕ\nha : 0 ≤ a\nh : a ≤ ↑n\n⊢ ⌊a - ↑n⌋₊ = ⌊a⌋₊ - n\n[PROOFSTEP]\nrw [floor_of_nonpos (tsub_nonpos_of_le h), eq_comm, tsub_eq_zero_iff_le]\n[GOAL]\ncase inr.inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedSemiring α\ninst✝³ : FloorSemiring α\na✝ : α\nn✝ : ℕ\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\ninst✝ : ExistsAddOfLE α\na : α\nn : ℕ\nha : 0 ≤ a\nh : a ≤ ↑n\n⊢ ⌊a⌋₊ ≤ n\n[PROOFSTEP]\nexact Nat.cast_le.1 ((Nat.floor_le ha).trans h)\n[GOAL]\ncase inr.inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedSemiring α\ninst✝³ : FloorSemiring α\na✝ : α\nn✝ : ℕ\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\ninst✝ : ExistsAddOfLE α\na : α\nn : ℕ\nha : 0 ≤ a\nh : ↑n ≤ a\n⊢ ⌊a - ↑n⌋₊ = ⌊a⌋₊ - n\n[PROOFSTEP]\nrw [eq_tsub_iff_add_eq_of_le (le_floor h), ← floor_add_nat _, tsub_add_cancel_of_le h]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedSemiring α\ninst✝³ : FloorSemiring α\na✝ : α\nn✝ : ℕ\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\ninst✝ : ExistsAddOfLE α\na : α\nn : ℕ\nha : 0 ≤ a\nh : ↑n ≤ a\n⊢ 0 ≤ a - ↑n\n[PROOFSTEP]\nexact le_tsub_of_add_le_left ((add_zero _).trans_le h)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedSemiring α\ninst✝³ : FloorSemiring α\na✝ : α\nn : ℕ\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\ninst✝ : ExistsAddOfLE α\na : α\n⊢ ⌊a - 1⌋₊ = ⌊a⌋₊ - 1\n[PROOFSTEP]\nexact_mod_cast floor_sub_nat a 1\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn✝ : ℕ\nha : 0 ≤ a\nn b : ℕ\n⊢ ⌈a + ↑n⌉₊ ≤ b ↔ ⌈a⌉₊ + n ≤ b\n[PROOFSTEP]\nrw [← not_lt, ← not_lt, not_iff_not, lt_ceil]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn✝ : ℕ\nha : 0 ≤ a\nn b : ℕ\n⊢ ↑b < a + ↑n ↔ b < ⌈a⌉₊ + n\n[PROOFSTEP]\nobtain hb | hb := le_or_lt n b\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn✝ : ℕ\nha : 0 ≤ a\nn b : ℕ\nhb : n ≤ b\n⊢ ↑b < a + ↑n ↔ b < ⌈a⌉₊ + n\n[PROOFSTEP]\nobtain ⟨d, rfl⟩ := exists_add_of_le hb\n[GOAL]\ncase inl.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn✝ : ℕ\nha : 0 ≤ a\nn d : ℕ\nhb : n ≤ n + d\n⊢ ↑(n + d) < a + ↑n ↔ n + d < ⌈a⌉₊ + n\n[PROOFSTEP]\nrw [Nat.cast_add, add_comm n, add_comm (n : α), add_lt_add_iff_right, add_lt_add_iff_right, lt_ceil]\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn✝ : ℕ\nha : 0 ≤ a\nn b : ℕ\nhb : b < n\n⊢ ↑b < a + ↑n ↔ b < ⌈a⌉₊ + n\n[PROOFSTEP]\nexact iff_of_true (lt_add_of_nonneg_of_lt ha <| cast_lt.2 hb) (lt_add_left _ _ _ hb)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : 0 ≤ a\n⊢ ⌈a + 1⌉₊ = ⌈a⌉₊ + 1\n[PROOFSTEP]\nrw [cast_one.symm, ceil_add_nat ha 1]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na b : α\n⊢ ⌈a + b⌉₊ ≤ ⌈a⌉₊ + ⌈b⌉₊\n[PROOFSTEP]\nrw [ceil_le, Nat.cast_add]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemiring α\ninst✝ : FloorSemiring α\na✝ : α\nn : ℕ\na b : α\n⊢ a + b ≤ ↑⌈a⌉₊ + ↑⌈b⌉₊\n[PROOFSTEP]\nexact _root_.add_le_add (le_ceil _) (le_ceil _)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemifield α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\n⊢ ⌊a / ↑n⌋₊ = ⌊a⌋₊ / n\n[PROOFSTEP]\ncases' le_total a 0 with ha ha\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemifield α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : a ≤ 0\n⊢ ⌊a / ↑n⌋₊ = ⌊a⌋₊ / n\n[PROOFSTEP]\nrw [floor_of_nonpos, floor_of_nonpos ha]\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemifield α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : a ≤ 0\n⊢ 0 = 0 / n\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemifield α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : a ≤ 0\n⊢ a / ↑n ≤ 0\n[PROOFSTEP]\napply div_nonpos_of_nonpos_of_nonneg ha n.cast_nonneg\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemifield α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : 0 ≤ a\n⊢ ⌊a / ↑n⌋₊ = ⌊a⌋₊ / n\n[PROOFSTEP]\nobtain rfl | hn := n.eq_zero_or_pos\n[GOAL]\ncase inr.inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemifield α\ninst✝ : FloorSemiring α\na : α\nha : 0 ≤ a\n⊢ ⌊a / ↑0⌋₊ = ⌊a⌋₊ / 0\n[PROOFSTEP]\nrw [cast_zero, div_zero, Nat.div_zero, floor_zero]\n[GOAL]\ncase inr.inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemifield α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : 0 ≤ a\nhn : n > 0\n⊢ ⌊a / ↑n⌋₊ = ⌊a⌋₊ / n\n[PROOFSTEP]\nrefine' (floor_eq_iff _).2 _\n[GOAL]\ncase inr.inr.refine'_1\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemifield α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : 0 ≤ a\nhn : n > 0\n⊢ 0 ≤ a / ↑n\n[PROOFSTEP]\nexact div_nonneg ha n.cast_nonneg\n[GOAL]\ncase inr.inr.refine'_2\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemifield α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : 0 ≤ a\nhn : n > 0\n⊢ ↑(⌊a⌋₊ / n) ≤ a / ↑n ∧ a / ↑n < ↑(⌊a⌋₊ / n) + 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase inr.inr.refine'_2.left\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemifield α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : 0 ≤ a\nhn : n > 0\n⊢ ↑(⌊a⌋₊ / n) ≤ a / ↑n\n[PROOFSTEP]\nexact cast_div_le.trans (div_le_div_of_le_of_nonneg (floor_le ha) n.cast_nonneg)\n[GOAL]\ncase inr.inr.refine'_2.right\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemifield α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : 0 ≤ a\nhn : n > 0\n⊢ a / ↑n < ↑(⌊a⌋₊ / n) + 1\n[PROOFSTEP]\nrw [div_lt_iff, add_mul, one_mul, ← cast_mul, ← cast_add, ← floor_lt ha]\n[GOAL]\ncase inr.inr.refine'_2.right\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemifield α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : 0 ≤ a\nhn : n > 0\n⊢ ⌊a⌋₊ < ⌊a⌋₊ / n * n + n\n[PROOFSTEP]\nexact lt_div_mul_add hn\n[GOAL]\ncase inr.inr.refine'_2.right\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemifield α\ninst✝ : FloorSemiring α\na : α\nn : ℕ\nha : 0 ≤ a\nhn : n > 0\n⊢ 0 < ↑n\n[PROOFSTEP]\nexact cast_pos.2 hn\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemifield α\ninst✝ : FloorSemiring α\nm n : ℕ\n⊢ ⌊↑m / ↑n⌋₊ = m / n\n[PROOFSTEP]\nconvert floor_div_nat (m : α) n\n[GOAL]\ncase h.e'_3.h.e'_5\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedSemifield α\ninst✝ : FloorSemiring α\nm n : ℕ\n⊢ m = ⌊↑m⌋₊\n[PROOFSTEP]\nrw [m.floor_coe]\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedSemiring α\n⊢ Subsingleton (FloorSemiring α)\n[PROOFSTEP]\nrefine' ⟨fun H₁ H₂ => _⟩\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedSemiring α\nH₁ H₂ : FloorSemiring α\n⊢ H₁ = H₂\n[PROOFSTEP]\nhave : H₁.ceil = H₂.ceil := funext fun a => (H₁.gc_ceil.l_unique H₂.gc_ceil) fun n => rfl\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedSemiring α\nH₁ H₂ : FloorSemiring α\nthis : FloorSemiring.ceil = FloorSemiring.ceil\n⊢ H₁ = H₂\n[PROOFSTEP]\nhave : H₁.floor = H₂.floor := by\n ext a\n cases' lt_or_le a 0 with h h\n · rw [H₁.floor_of_neg, H₂.floor_of_neg] <;> exact h\n · refine' eq_of_forall_le_iff fun n => _\n rw [H₁.gc_floor, H₂.gc_floor] <;> exact h\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedSemiring α\nH₁ H₂ : FloorSemiring α\nthis : FloorSemiring.ceil = FloorSemiring.ceil\n⊢ FloorSemiring.floor = FloorSemiring.floor\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedSemiring α\nH₁ H₂ : FloorSemiring α\nthis : FloorSemiring.ceil = FloorSemiring.ceil\na : α\n⊢ FloorSemiring.floor a = FloorSemiring.floor a\n[PROOFSTEP]\ncases' lt_or_le a 0 with h h\n[GOAL]\ncase h.inl\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedSemiring α\nH₁ H₂ : FloorSemiring α\nthis : FloorSemiring.ceil = FloorSemiring.ceil\na : α\nh : a < 0\n⊢ FloorSemiring.floor a = FloorSemiring.floor a\n[PROOFSTEP]\nrw [H₁.floor_of_neg, H₂.floor_of_neg]\n[GOAL]\ncase h.inl\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedSemiring α\nH₁ H₂ : FloorSemiring α\nthis : FloorSemiring.ceil = FloorSemiring.ceil\na : α\nh : a < 0\n⊢ a < 0\n[PROOFSTEP]\nexact h\n[GOAL]\ncase h.inl\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedSemiring α\nH₁ H₂ : FloorSemiring α\nthis : FloorSemiring.ceil = FloorSemiring.ceil\na : α\nh : a < 0\n⊢ a < 0\n[PROOFSTEP]\nexact h\n[GOAL]\ncase h.inr\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedSemiring α\nH₁ H₂ : FloorSemiring α\nthis : FloorSemiring.ceil = FloorSemiring.ceil\na : α\nh : 0 ≤ a\n⊢ FloorSemiring.floor a = FloorSemiring.floor a\n[PROOFSTEP]\nrefine' eq_of_forall_le_iff fun n => _\n[GOAL]\ncase h.inr\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedSemiring α\nH₁ H₂ : FloorSemiring α\nthis : FloorSemiring.ceil = FloorSemiring.ceil\na : α\nh : 0 ≤ a\nn : ℕ\n⊢ n ≤ FloorSemiring.floor a ↔ n ≤ FloorSemiring.floor a\n[PROOFSTEP]\nrw [H₁.gc_floor, H₂.gc_floor]\n[GOAL]\ncase h.inr\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedSemiring α\nH₁ H₂ : FloorSemiring α\nthis : FloorSemiring.ceil = FloorSemiring.ceil\na : α\nh : 0 ≤ a\nn : ℕ\n⊢ 0 ≤ a\n[PROOFSTEP]\nexact h\n[GOAL]\ncase h.inr\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedSemiring α\nH₁ H₂ : FloorSemiring α\nthis : FloorSemiring.ceil = FloorSemiring.ceil\na : α\nh : 0 ≤ a\nn : ℕ\n⊢ 0 ≤ a\n[PROOFSTEP]\nexact h\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedSemiring α\nH₁ H₂ : FloorSemiring α\nthis✝ : FloorSemiring.ceil = FloorSemiring.ceil\nthis : FloorSemiring.floor = FloorSemiring.floor\n⊢ H₁ = H₂\n[PROOFSTEP]\ncases H₁\n[GOAL]\ncase mk\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedSemiring α\nH₂ : FloorSemiring α\nfloor✝ ceil✝ : α → ℕ\nfloor_of_neg✝ : ∀ {a : α}, a < 0 → floor✝ a = 0\ngc_floor✝ : ∀ {a : α} {n : ℕ}, 0 ≤ a → (n ≤ floor✝ a ↔ ↑n ≤ a)\ngc_ceil✝ : GaloisConnection ceil✝ Nat.cast\nthis✝ : FloorSemiring.ceil = FloorSemiring.ceil\nthis : FloorSemiring.floor = FloorSemiring.floor\n⊢ { floor := floor✝, ceil := ceil✝, floor_of_neg := floor_of_neg✝, gc_floor := gc_floor✝, gc_ceil := gc_ceil✝ } = H₂\n[PROOFSTEP]\ncases H₂\n[GOAL]\ncase mk.mk\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedSemiring α\nfloor✝¹ ceil✝¹ : α → ℕ\nfloor_of_neg✝¹ : ∀ {a : α}, a < 0 → floor✝¹ a = 0\ngc_floor✝¹ : ∀ {a : α} {n : ℕ}, 0 ≤ a → (n ≤ floor✝¹ a ↔ ↑n ≤ a)\ngc_ceil✝¹ : GaloisConnection ceil✝¹ Nat.cast\nfloor✝ ceil✝ : α → ℕ\nfloor_of_neg✝ : ∀ {a : α}, a < 0 → floor✝ a = 0\ngc_floor✝ : ∀ {a : α} {n : ℕ}, 0 ≤ a → (n ≤ floor✝ a ↔ ↑n ≤ a)\ngc_ceil✝ : GaloisConnection ceil✝ Nat.cast\nthis✝ : FloorSemiring.ceil = FloorSemiring.ceil\nthis : FloorSemiring.floor = FloorSemiring.floor\n⊢ { floor := floor✝¹, ceil := ceil✝¹, floor_of_neg := floor_of_neg✝¹, gc_floor := gc_floor✝¹, gc_ceil := gc_ceil✝¹ } =\n { floor := floor✝, ceil := ceil✝, floor_of_neg := floor_of_neg✝, gc_floor := gc_floor✝, gc_ceil := gc_ceil✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\na b : ℤ\n⊢ ↑a ≤ b ↔ a ≤ id b\n[PROOFSTEP]\nrw [Int.cast_id]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\na b : ℤ\n⊢ a ≤ b ↔ a ≤ id b\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\na b : ℤ\n⊢ id a ≤ b ↔ a ≤ ↑b\n[PROOFSTEP]\nrw [Int.cast_id]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\na b : ℤ\n⊢ id a ≤ b ↔ a ≤ b\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type ?u.109134\ninst✝ : LinearOrderedRing α\nfloor : α → ℤ\ngc_coe_floor : GaloisConnection Int.cast floor\na : α\nz : ℤ\n⊢ (fun a => -floor (-a)) a ≤ z ↔ a ≤ ↑z\n[PROOFSTEP]\nrw [neg_le, ← gc_coe_floor, Int.cast_neg, neg_le_neg_iff]\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type ?u.110495\ninst✝ : LinearOrderedRing α\nceil : α → ℤ\ngc_ceil_coe : GaloisConnection ceil Int.cast\na : ℤ\nz : α\n⊢ ↑a ≤ z ↔ a ≤ (fun a => -ceil (-a)) z\n[PROOFSTEP]\nrw [le_neg, gc_ceil_coe, Int.cast_neg, neg_le_neg_iff]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\nx : ℤ\n⊢ fract x = OfNat.ofNat 0 x\n[PROOFSTEP]\nsimp [fract]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ 0 ≤ ⌊a⌋ ↔ 0 ≤ a\n[PROOFSTEP]\nrw [le_floor, Int.cast_zero]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ ⌊a⌋ ≤ z - 1 ↔ a < ↑z\n[PROOFSTEP]\nrw [← floor_lt, le_sub_one_iff]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ ⌊a⌋ ≤ -1 ↔ a < 0\n[PROOFSTEP]\nrw [← zero_sub (1 : ℤ), floor_le_sub_one_iff, cast_zero]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\nha : a ≤ 0\n⊢ ⌊a⌋ ≤ 0\n[PROOFSTEP]\nrw [← @cast_le α, Int.cast_zero]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\nha : a ≤ 0\n⊢ ↑⌊a⌋ ≤ 0\n[PROOFSTEP]\nexact (floor_le a).trans ha\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\n⊢ a < ↑⌊a⌋ + 1\n[PROOFSTEP]\nsimpa only [Int.succ, Int.cast_add, Int.cast_one] using lt_succ_floor a\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ : α\nz a : ℤ\n⊢ a ≤ ⌊↑z⌋ ↔ a ≤ z\n[PROOFSTEP]\nrw [le_floor, Int.cast_le]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ : α\nn : ℕ\na : ℤ\n⊢ a ≤ ⌊↑n⌋ ↔ a ≤ ↑n\n[PROOFSTEP]\nrw [le_floor, ← cast_ofNat, cast_le]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ ⌊0⌋ = 0\n[PROOFSTEP]\nrw [← cast_zero, floor_intCast]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ ⌊1⌋ = 1\n[PROOFSTEP]\nrw [← cast_one, floor_intCast]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ 0 < ⌊a⌋ ↔ 1 ≤ a\n[PROOFSTEP]\nrw [Int.lt_iff_add_one_le, zero_add, le_floor, cast_one]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝¹ a✝ : α\nz a : ℤ\n⊢ a ≤ ⌊a✝ + ↑z⌋ ↔ a ≤ ⌊a✝⌋ + z\n[PROOFSTEP]\nrw [le_floor, ← sub_le_iff_le_add, ← sub_le_iff_le_add, le_floor, Int.cast_sub]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\n⊢ ⌊a + 1⌋ = ⌊a⌋ + 1\n[PROOFSTEP]\nrw [← cast_one, floor_add_int]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ ⌊a⌋ + ⌊b⌋ ≤ ⌊a + b⌋\n[PROOFSTEP]\nrw [le_floor, Int.cast_add]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ ↑⌊a⌋ + ↑⌊b⌋ ≤ a + b\n[PROOFSTEP]\nexact add_le_add (floor_le _) (floor_le _)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ ⌊a + b⌋ - 1 ≤ ⌊a⌋ + ⌊b⌋\n[PROOFSTEP]\nrw [← sub_le_iff_le_add, le_floor, Int.cast_sub, sub_le_comm, Int.cast_sub, Int.cast_one]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ ↑⌊a + b⌋ - 1 - a ≤ ↑⌊b⌋\n[PROOFSTEP]\nrefine' le_trans _ (sub_one_lt_floor _).le\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ ↑⌊a + b⌋ - 1 - a ≤ b - 1\n[PROOFSTEP]\nrw [sub_le_iff_le_add', ← add_sub_assoc, sub_le_sub_iff_right]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ ↑⌊a + b⌋ ≤ a + b\n[PROOFSTEP]\nexact floor_le _\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ : α\nz : ℤ\na : α\n⊢ ⌊↑z + a⌋ = z + ⌊a⌋\n[PROOFSTEP]\nsimpa only [add_comm] using floor_add_int a z\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nn : ℕ\n⊢ ⌊a + ↑n⌋ = ⌊a⌋ + ↑n\n[PROOFSTEP]\nrw [← Int.cast_ofNat, floor_add_int]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ : α\nn : ℕ\na : α\n⊢ ⌊↑n + a⌋ = ↑n + ⌊a⌋\n[PROOFSTEP]\nrw [← Int.cast_ofNat, floor_int_add]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ a : α\nz : ℤ\n⊢ ⌊a - ↑z⌋ = ⌊a + ↑(-z)⌋\n[PROOFSTEP]\nrw [Int.cast_neg, sub_eq_add_neg]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nn : ℕ\n⊢ ⌊a - ↑n⌋ = ⌊a⌋ - ↑n\n[PROOFSTEP]\nrw [← Int.cast_ofNat, floor_sub_int]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\n⊢ ⌊a - 1⌋ = ⌊a⌋ - 1\n[PROOFSTEP]\nexact_mod_cast floor_sub_nat a 1\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α✝\ninst✝² : FloorRing α✝\nz : ℤ\na✝ : α✝\nα : Type u_4\ninst✝¹ : LinearOrderedCommRing α\ninst✝ : FloorRing α\na b : α\nh : ⌊a⌋ = ⌊b⌋\n⊢ |a - b| < 1\n[PROOFSTEP]\nhave : a < ⌊a⌋ + 1 := lt_floor_add_one a\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α✝\ninst✝² : FloorRing α✝\nz : ℤ\na✝ : α✝\nα : Type u_4\ninst✝¹ : LinearOrderedCommRing α\ninst✝ : FloorRing α\na b : α\nh : ⌊a⌋ = ⌊b⌋\nthis : a < ↑⌊a⌋ + 1\n⊢ |a - b| < 1\n[PROOFSTEP]\nhave : b < ⌊b⌋ + 1 := lt_floor_add_one b\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α✝\ninst✝² : FloorRing α✝\nz : ℤ\na✝ : α✝\nα : Type u_4\ninst✝¹ : LinearOrderedCommRing α\ninst✝ : FloorRing α\na b : α\nh : ⌊a⌋ = ⌊b⌋\nthis✝ : a < ↑⌊a⌋ + 1\nthis : b < ↑⌊b⌋ + 1\n⊢ |a - b| < 1\n[PROOFSTEP]\nhave : (⌊a⌋ : α) = ⌊b⌋ := Int.cast_inj.2 h\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α✝\ninst✝² : FloorRing α✝\nz : ℤ\na✝ : α✝\nα : Type u_4\ninst✝¹ : LinearOrderedCommRing α\ninst✝ : FloorRing α\na b : α\nh : ⌊a⌋ = ⌊b⌋\nthis✝¹ : a < ↑⌊a⌋ + 1\nthis✝ : b < ↑⌊b⌋ + 1\nthis : ↑⌊a⌋ = ↑⌊b⌋\n⊢ |a - b| < 1\n[PROOFSTEP]\nhave : (⌊a⌋ : α) ≤ a := floor_le a\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α✝\ninst✝² : FloorRing α✝\nz : ℤ\na✝ : α✝\nα : Type u_4\ninst✝¹ : LinearOrderedCommRing α\ninst✝ : FloorRing α\na b : α\nh : ⌊a⌋ = ⌊b⌋\nthis✝² : a < ↑⌊a⌋ + 1\nthis✝¹ : b < ↑⌊b⌋ + 1\nthis✝ : ↑⌊a⌋ = ↑⌊b⌋\nthis : ↑⌊a⌋ ≤ a\n⊢ |a - b| < 1\n[PROOFSTEP]\nhave : (⌊b⌋ : α) ≤ b := floor_le b\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α✝\ninst✝² : FloorRing α✝\nz : ℤ\na✝ : α✝\nα : Type u_4\ninst✝¹ : LinearOrderedCommRing α\ninst✝ : FloorRing α\na b : α\nh : ⌊a⌋ = ⌊b⌋\nthis✝³ : a < ↑⌊a⌋ + 1\nthis✝² : b < ↑⌊b⌋ + 1\nthis✝¹ : ↑⌊a⌋ = ↑⌊b⌋\nthis✝ : ↑⌊a⌋ ≤ a\nthis : ↑⌊b⌋ ≤ b\n⊢ |a - b| < 1\n[PROOFSTEP]\nexact abs_sub_lt_iff.2 ⟨by linarith, by linarith⟩\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α✝\ninst✝² : FloorRing α✝\nz : ℤ\na✝ : α✝\nα : Type u_4\ninst✝¹ : LinearOrderedCommRing α\ninst✝ : FloorRing α\na b : α\nh : ⌊a⌋ = ⌊b⌋\nthis✝³ : a < ↑⌊a⌋ + 1\nthis✝² : b < ↑⌊b⌋ + 1\nthis✝¹ : ↑⌊a⌋ = ↑⌊b⌋\nthis✝ : ↑⌊a⌋ ≤ a\nthis : ↑⌊b⌋ ≤ b\n⊢ a - b < 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α✝\ninst✝² : FloorRing α✝\nz : ℤ\na✝ : α✝\nα : Type u_4\ninst✝¹ : LinearOrderedCommRing α\ninst✝ : FloorRing α\na b : α\nh : ⌊a⌋ = ⌊b⌋\nthis✝³ : a < ↑⌊a⌋ + 1\nthis✝² : b < ↑⌊b⌋ + 1\nthis✝¹ : ↑⌊a⌋ = ↑⌊b⌋\nthis✝ : ↑⌊a⌋ ≤ a\nthis : ↑⌊b⌋ ≤ b\n⊢ b - a < 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ ⌊a⌋ = z ↔ ↑z ≤ a ∧ a < ↑z + 1\n[PROOFSTEP]\nrw [le_antisymm_iff, le_floor, ← Int.lt_add_one_iff, floor_lt, Int.cast_add, Int.cast_one, and_comm]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ ⌊a⌋ = 0 ↔ a ∈ Ico 0 1\n[PROOFSTEP]\nsimp [floor_eq_iff]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nm : ℤ\n⊢ fract (a + ↑m) = fract a\n[PROOFSTEP]\nrw [fract]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nm : ℤ\n⊢ a + ↑m - ↑⌊a + ↑m⌋ = fract a\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nm : ℕ\n⊢ fract (a + ↑m) = fract a\n[PROOFSTEP]\nrw [fract]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nm : ℕ\n⊢ a + ↑m - ↑⌊a + ↑m⌋ = fract a\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\n⊢ fract (a + 1) = fract a\n[PROOFSTEP]\nexact_mod_cast fract_add_nat a 1\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ : α\nm : ℤ\na : α\n⊢ fract (↑m + a) = fract a\n[PROOFSTEP]\nrw [add_comm, fract_add_int]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ : α\nn : ℕ\na : α\n⊢ fract (↑n + a) = fract a\n[PROOFSTEP]\nrw [add_comm, fract_add_nat]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\n⊢ fract (1 + a) = fract a\n[PROOFSTEP]\nexact_mod_cast fract_nat_add 1 a\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nm : ℤ\n⊢ fract (a - ↑m) = fract a\n[PROOFSTEP]\nrw [fract]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nm : ℤ\n⊢ a - ↑m - ↑⌊a - ↑m⌋ = fract a\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nn : ℕ\n⊢ fract (a - ↑n) = fract a\n[PROOFSTEP]\nrw [fract]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nn : ℕ\n⊢ a - ↑n - ↑⌊a - ↑n⌋ = fract a\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\n⊢ fract (a - 1) = fract a\n[PROOFSTEP]\nexact_mod_cast fract_sub_nat a 1\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ fract (a + b) ≤ fract a + fract b\n[PROOFSTEP]\nrw [fract, fract, fract, sub_add_sub_comm, sub_le_sub_iff_left, ← Int.cast_add, Int.cast_le]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ ⌊a⌋ + ⌊b⌋ ≤ ⌊a + b⌋\n[PROOFSTEP]\nexact le_floor_add _ _\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ fract a + fract b ≤ fract (a + b) + 1\n[PROOFSTEP]\nrw [fract, fract, fract, sub_add_sub_comm, sub_add, sub_le_sub_iff_left]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ ↑⌊a + b⌋ - 1 ≤ ↑⌊a⌋ + ↑⌊b⌋\n[PROOFSTEP]\nexact_mod_cast le_floor_add_floor a b\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ fract 0 = 0\n[PROOFSTEP]\nrw [fract, floor_zero, cast_zero, sub_self]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ fract 1 = 0\n[PROOFSTEP]\nsimp [fract]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na : α\nz : ℤ\n⊢ fract ↑z = 0\n[PROOFSTEP]\nunfold fract\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na : α\nz : ℤ\n⊢ ↑z - ↑⌊↑z⌋ = 0\n[PROOFSTEP]\nrw [floor_intCast]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na : α\nz : ℤ\n⊢ ↑z - ↑z = 0\n[PROOFSTEP]\nexact sub_self _\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\nn : ℕ\n⊢ fract ↑n = 0\n[PROOFSTEP]\nsimp [fract]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\n⊢ ⌊fract a⌋ = 0\n[PROOFSTEP]\nrw [floor_eq_iff, Int.cast_zero, zero_add]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\n⊢ 0 ≤ fract a ∧ fract a < 1\n[PROOFSTEP]\nexact ⟨fract_nonneg _, fract_lt_one _⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\nh : fract a = b\n⊢ 0 ≤ b ∧ b < 1 ∧ ∃ z, a - b = ↑z\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\nh : fract a = b\n⊢ 0 ≤ fract a ∧ fract a < 1 ∧ ∃ z, a - fract a = ↑z\n[PROOFSTEP]\nexact ⟨fract_nonneg _, fract_lt_one _, ⟨⌊a⌋, sub_sub_cancel _ _⟩⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ (0 ≤ b ∧ b < 1 ∧ ∃ z, a - b = ↑z) → fract a = b\n[PROOFSTEP]\nrintro ⟨h₀, h₁, z, hz⟩\n[GOAL]\ncase intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ a b : α\nh₀ : 0 ≤ b\nh₁ : b < 1\nz : ℤ\nhz : a - b = ↑z\n⊢ fract a = b\n[PROOFSTEP]\nrw [← self_sub_floor, eq_comm, eq_sub_iff_add_eq, add_comm, ← eq_sub_iff_add_eq, hz, Int.cast_inj, floor_eq_iff, ← hz]\n[GOAL]\ncase intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ a b : α\nh₀ : 0 ≤ b\nh₁ : b < 1\nz : ℤ\nhz : a - b = ↑z\n⊢ a - b ≤ a ∧ a < a - b + 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.intro.intro.left\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ a b : α\nh₀ : 0 ≤ b\nh₁ : b < 1\nz : ℤ\nhz : a - b = ↑z\n⊢ a - b ≤ a\n[PROOFSTEP]\nsimpa [sub_eq_add_neg, add_assoc]\n[GOAL]\ncase intro.intro.intro.right\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ a b : α\nh₀ : 0 ≤ b\nh₁ : b < 1\nz : ℤ\nhz : a - b = ↑z\n⊢ a < a - b + 1\n[PROOFSTEP]\nsimpa [sub_eq_add_neg, add_assoc]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\nh : fract a = fract b\n⊢ a - b = ↑(⌊a⌋ - ⌊b⌋)\n[PROOFSTEP]\nunfold fract at h \n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\nh : a - ↑⌊a⌋ = b - ↑⌊b⌋\n⊢ a - b = ↑(⌊a⌋ - ⌊b⌋)\n[PROOFSTEP]\nrw [Int.cast_sub, sub_eq_sub_iff_sub_eq_sub.1 h]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ (∃ z, a - b = ↑z) → fract a = fract b\n[PROOFSTEP]\nrintro ⟨z, hz⟩\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ a b : α\nz : ℤ\nhz : a - b = ↑z\n⊢ fract a = fract b\n[PROOFSTEP]\nrefine' fract_eq_iff.2 ⟨fract_nonneg _, fract_lt_one _, z + ⌊b⌋, _⟩\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ a b : α\nz : ℤ\nhz : a - b = ↑z\n⊢ a - fract b = ↑(z + ⌊b⌋)\n[PROOFSTEP]\nrw [eq_add_of_sub_eq hz, add_comm, Int.cast_add]\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ a b : α\nz : ℤ\nhz : a - b = ↑z\n⊢ b + ↑z - fract b = ↑z + ↑⌊b⌋\n[PROOFSTEP]\nexact add_sub_sub_cancel _ _ _\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\n⊢ a - a = ↑0\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ fract (a + b) - fract a - fract b = ↑(⌊a⌋ + ⌊b⌋ - ⌊a + b⌋)\n[PROOFSTEP]\nunfold fract\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ a + b - ↑⌊a + b⌋ - (a - ↑⌊a⌋) - (b - ↑⌊b⌋) = ↑(⌊a⌋ + ⌊b⌋ - ⌊a + b⌋)\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ a + b + -↑⌊a + b⌋ + (↑⌊a⌋ + -a) + (↑⌊b⌋ + -b) = ↑⌊a⌋ + ↑⌊b⌋ + -↑⌊a + b⌋\n[PROOFSTEP]\nabel\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ a + b + -↑⌊a + b⌋ + (↑⌊a⌋ + -a) + (↑⌊b⌋ + -b) = ↑⌊a⌋ + ↑⌊b⌋ + -↑⌊a + b⌋\n[PROOFSTEP]\nabel\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na x : α\nhx : fract x ≠ 0\n⊢ fract (-x) = 1 - fract x\n[PROOFSTEP]\nrw [fract_eq_iff]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na x : α\nhx : fract x ≠ 0\n⊢ 0 ≤ 1 - fract x ∧ 1 - fract x < 1 ∧ ∃ z, -x - (1 - fract x) = ↑z\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na x : α\nhx : fract x ≠ 0\n⊢ 0 ≤ 1 - fract x\n[PROOFSTEP]\nrw [le_sub_iff_add_le, zero_add]\n[GOAL]\ncase left\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na x : α\nhx : fract x ≠ 0\n⊢ fract x ≤ 1\n[PROOFSTEP]\nexact (fract_lt_one x).le\n[GOAL]\ncase right\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na x : α\nhx : fract x ≠ 0\n⊢ 1 - fract x < 1 ∧ ∃ z, -x - (1 - fract x) = ↑z\n[PROOFSTEP]\nrefine' ⟨sub_lt_self _ (lt_of_le_of_ne' (fract_nonneg x) hx), -⌊x⌋ - 1, _⟩\n[GOAL]\ncase right\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na x : α\nhx : fract x ≠ 0\n⊢ -x - (1 - fract x) = ↑(-⌊x⌋ - 1)\n[PROOFSTEP]\nsimp only [sub_sub_eq_add_sub, cast_sub, cast_neg, cast_one, sub_left_inj]\n[GOAL]\ncase right\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na x : α\nhx : fract x ≠ 0\n⊢ -x + fract x = -↑⌊x⌋\n[PROOFSTEP]\nconv in -x => rw [← floor_add_fract x]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na x : α\nhx : fract x ≠ 0\n| -x\n[PROOFSTEP]\nrw [← floor_add_fract x]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na x : α\nhx : fract x ≠ 0\n| -x\n[PROOFSTEP]\nrw [← floor_add_fract x]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na x : α\nhx : fract x ≠ 0\n| -x\n[PROOFSTEP]\nrw [← floor_add_fract x]\n[GOAL]\ncase right\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na x : α\nhx : fract x ≠ 0\n⊢ -(↑⌊x⌋ + fract x) + fract x = -↑⌊x⌋\n[PROOFSTEP]\nsimp [-floor_add_fract]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na x : α\n⊢ fract (-x) = 0 ↔ fract x = 0\n[PROOFSTEP]\nsimp only [fract_eq_iff, le_refl, zero_lt_one, tsub_zero, true_and_iff]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na x : α\n⊢ (∃ z, -x = ↑z) ↔ ∃ z, x = ↑z\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na x : α\n⊢ (∃ z, -x = ↑z) → ∃ z, x = ↑z\n[PROOFSTEP]\nrintro ⟨z, hz⟩\n[GOAL]\ncase mpr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na x : α\n⊢ (∃ z, x = ↑z) → ∃ z, -x = ↑z\n[PROOFSTEP]\nrintro ⟨z, hz⟩\n[GOAL]\ncase mp.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na x : α\nz : ℤ\nhz : -x = ↑z\n⊢ ∃ z, x = ↑z\n[PROOFSTEP]\nuse-z\n[GOAL]\ncase mpr.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na x : α\nz : ℤ\nhz : x = ↑z\n⊢ ∃ z, -x = ↑z\n[PROOFSTEP]\nuse-z\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na x : α\nz : ℤ\nhz : -x = ↑z\n⊢ x = ↑(-z)\n[PROOFSTEP]\nsimp [← hz]\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na x : α\nz : ℤ\nhz : x = ↑z\n⊢ -x = ↑(-z)\n[PROOFSTEP]\nsimp [← hz]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nb : ℕ\n⊢ ∃ z, fract a * ↑b - fract (a * ↑b) = ↑z\n[PROOFSTEP]\ninduction' b with c hc\n[GOAL]\ncase zero\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\n⊢ ∃ z, fract a * ↑Nat.zero - fract (a * ↑Nat.zero) = ↑z\n[PROOFSTEP]\nuse 0\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\n⊢ fract a * ↑Nat.zero - fract (a * ↑Nat.zero) = ↑0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nc : ℕ\nhc : ∃ z, fract a * ↑c - fract (a * ↑c) = ↑z\n⊢ ∃ z, fract a * ↑(Nat.succ c) - fract (a * ↑(Nat.succ c)) = ↑z\n[PROOFSTEP]\nrcases hc with ⟨z, hz⟩\n[GOAL]\ncase succ.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ a : α\nc : ℕ\nz : ℤ\nhz : fract a * ↑c - fract (a * ↑c) = ↑z\n⊢ ∃ z, fract a * ↑(Nat.succ c) - fract (a * ↑(Nat.succ c)) = ↑z\n[PROOFSTEP]\nrw [Nat.succ_eq_add_one, Nat.cast_add, mul_add, mul_add, Nat.cast_one, mul_one, mul_one]\n[GOAL]\ncase succ.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ a : α\nc : ℕ\nz : ℤ\nhz : fract a * ↑c - fract (a * ↑c) = ↑z\n⊢ ∃ z, fract a * ↑c + fract a - fract (a * ↑c + a) = ↑z\n[PROOFSTEP]\nrcases fract_add (a * c) a with ⟨y, hy⟩\n[GOAL]\ncase succ.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ a : α\nc : ℕ\nz : ℤ\nhz : fract a * ↑c - fract (a * ↑c) = ↑z\ny : ℤ\nhy : fract (a * ↑c + a) - fract (a * ↑c) - fract a = ↑y\n⊢ ∃ z, fract a * ↑c + fract a - fract (a * ↑c + a) = ↑z\n[PROOFSTEP]\nuse z - y\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ a : α\nc : ℕ\nz : ℤ\nhz : fract a * ↑c - fract (a * ↑c) = ↑z\ny : ℤ\nhy : fract (a * ↑c + a) - fract (a * ↑c) - fract a = ↑y\n⊢ fract a * ↑c + fract a - fract (a * ↑c + a) = ↑(z - y)\n[PROOFSTEP]\nrw [Int.cast_sub, ← hz, ← hy]\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ a : α\nc : ℕ\nz : ℤ\nhz : fract a * ↑c - fract (a * ↑c) = ↑z\ny : ℤ\nhy : fract (a * ↑c + a) - fract (a * ↑c) - fract a = ↑y\n⊢ fract a * ↑c + fract a - fract (a * ↑c + a) =\n fract a * ↑c - fract (a * ↑c) - (fract (a * ↑c + a) - fract (a * ↑c) - fract a)\n[PROOFSTEP]\nabel\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ a : α\nc : ℕ\nz : ℤ\nhz : fract a * ↑c - fract (a * ↑c) = ↑z\ny : ℤ\nhy : fract (a * ↑c + a) - fract (a * ↑c) - fract a = ↑y\n⊢ fract a * ↑c + fract a - fract (a * ↑c + a) =\n fract a * ↑c - fract (a * ↑c) - (fract (a * ↑c + a) - fract (a * ↑c) - fract a)\n[PROOFSTEP]\nabel\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\ns : Set α\n⊢ fract ⁻¹' s = ⋃ (m : ℤ), (fun x => x - ↑m) ⁻¹' (s ∩ Ico 0 1)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\ns : Set α\nx : α\n⊢ x ∈ fract ⁻¹' s ↔ x ∈ ⋃ (m : ℤ), (fun x => x - ↑m) ⁻¹' (s ∩ Ico 0 1)\n[PROOFSTEP]\nsimp only [mem_preimage, mem_iUnion, mem_inter_iff]\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\ns : Set α\nx : α\n⊢ fract x ∈ s ↔ ∃ i, x - ↑i ∈ s ∧ x - ↑i ∈ Ico 0 1\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨⌊x⌋, h, fract_nonneg x, fract_lt_one x⟩, _⟩\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\ns : Set α\nx : α\n⊢ (∃ i, x - ↑i ∈ s ∧ x - ↑i ∈ Ico 0 1) → fract x ∈ s\n[PROOFSTEP]\nrintro ⟨m, hms, hm0, hm1⟩\n[GOAL]\ncase h.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\ns : Set α\nx : α\nm : ℤ\nhms : x - ↑m ∈ s\nhm0 : 0 ≤ x - ↑m\nhm1 : x - ↑m < 1\n⊢ fract x ∈ s\n[PROOFSTEP]\nobtain rfl : ⌊x⌋ = m := floor_eq_iff.2 ⟨sub_nonneg.1 hm0, sub_lt_iff_lt_add'.1 hm1⟩\n[GOAL]\ncase h.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\ns : Set α\nx : α\nhms : x - ↑⌊x⌋ ∈ s\nhm0 : 0 ≤ x - ↑⌊x⌋\nhm1 : x - ↑⌊x⌋ < 1\n⊢ fract x ∈ s\n[PROOFSTEP]\nexact hms\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\ns : Set α\n⊢ fract '' s = ⋃ (m : ℤ), (fun x => x - ↑m) '' s ∩ Ico 0 1\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\ns : Set α\nx : α\n⊢ x ∈ fract '' s ↔ x ∈ ⋃ (m : ℤ), (fun x => x - ↑m) '' s ∩ Ico 0 1\n[PROOFSTEP]\nsimp only [mem_image, mem_inter_iff, mem_iUnion]\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\ns : Set α\nx : α\n⊢ (∃ x_1, x_1 ∈ s ∧ fract x_1 = x) ↔ ∃ i, (∃ x_1, x_1 ∈ s ∧ x_1 - ↑i = x) ∧ x ∈ Ico 0 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\ns : Set α\nx : α\n⊢ (∃ x_1, x_1 ∈ s ∧ fract x_1 = x) → ∃ i, (∃ x_1, x_1 ∈ s ∧ x_1 - ↑i = x) ∧ x ∈ Ico 0 1\n[PROOFSTEP]\nrintro ⟨y, hy, rfl⟩\n[GOAL]\ncase h.mp.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\ns : Set α\ny : α\nhy : y ∈ s\n⊢ ∃ i, (∃ x, x ∈ s ∧ x - ↑i = fract y) ∧ fract y ∈ Ico 0 1\n[PROOFSTEP]\nexact ⟨⌊y⌋, ⟨y, hy, rfl⟩, fract_nonneg y, fract_lt_one y⟩\n[GOAL]\ncase h.mpr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\ns : Set α\nx : α\n⊢ (∃ i, (∃ x_1, x_1 ∈ s ∧ x_1 - ↑i = x) ∧ x ∈ Ico 0 1) → ∃ x_1, x_1 ∈ s ∧ fract x_1 = x\n[PROOFSTEP]\nrintro ⟨m, ⟨y, hys, rfl⟩, h0, h1⟩\n[GOAL]\ncase h.mpr.intro.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\ns : Set α\nm : ℤ\ny : α\nhys : y ∈ s\nh0 : 0 ≤ y - ↑m\nh1 : y - ↑m < 1\n⊢ ∃ x, x ∈ s ∧ fract x = y - ↑m\n[PROOFSTEP]\nobtain rfl : ⌊y⌋ = m := floor_eq_iff.2 ⟨sub_nonneg.1 h0, sub_lt_iff_lt_add'.1 h1⟩\n[GOAL]\ncase h.mpr.intro.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\ns : Set α\ny : α\nhys : y ∈ s\nh0 : 0 ≤ y - ↑⌊y⌋\nh1 : y - ↑⌊y⌋ < 1\n⊢ ∃ x, x ∈ s ∧ fract x = y - ↑⌊y⌋\n[PROOFSTEP]\nexact ⟨y, hys, rfl⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na✝ : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb✝ a b : k\nha : a ≠ 0\n⊢ fract (b / a) * a + ⌊b / a⌋ • a = b\n[PROOFSTEP]\nrw [zsmul_eq_mul, ← add_mul, fract_add_floor, div_mul_cancel b ha]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na✝ : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb a : k\nhb : 0 < b\n⊢ a < b + ↑⌊a / b⌋ * b\n[PROOFSTEP]\nrw [← one_add_mul _ b, ← div_lt_iff hb, add_comm]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na✝ : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb a : k\nhb : 0 < b\n⊢ a / b < ↑⌊a / b⌋ + 1\n[PROOFSTEP]\nexact lt_floor_add_one _\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm n : ℕ\n⊢ fract (↑m / ↑n) = ↑(m % n) / ↑n\n[PROOFSTEP]\nrcases n.eq_zero_or_pos with (rfl | hn)\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm : ℕ\n⊢ fract (↑m / ↑0) = ↑(m % 0) / ↑0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm n : ℕ\nhn : n > 0\n⊢ fract (↑m / ↑n) = ↑(m % n) / ↑n\n[PROOFSTEP]\nhave hn' : 0 < (n : k) := by norm_cast\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm n : ℕ\nhn : n > 0\n⊢ 0 < ↑n\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm n : ℕ\nhn : n > 0\nhn' : 0 < ↑n\n⊢ fract (↑m / ↑n) = ↑(m % n) / ↑n\n[PROOFSTEP]\nrefine fract_eq_iff.mpr ⟨?_, ?_, m / n, ?_⟩\n[GOAL]\ncase inr.refine_1\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm n : ℕ\nhn : n > 0\nhn' : 0 < ↑n\n⊢ 0 ≤ ↑(m % n) / ↑n\n[PROOFSTEP]\npositivity\n[GOAL]\ncase inr.refine_2\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm n : ℕ\nhn : n > 0\nhn' : 0 < ↑n\n⊢ ↑(m % n) / ↑n < 1\n[PROOFSTEP]\nsimpa only [div_lt_one hn', Nat.cast_lt] using m.mod_lt hn\n[GOAL]\ncase inr.refine_3\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm n : ℕ\nhn : n > 0\nhn' : 0 < ↑n\n⊢ ↑m / ↑n - ↑(m % n) / ↑n = ↑(↑m / ↑n)\n[PROOFSTEP]\nrw [sub_eq_iff_eq_add', ← mul_right_inj' hn'.ne', mul_div_cancel' _ hn'.ne', mul_add, mul_div_cancel' _ hn'.ne']\n[GOAL]\ncase inr.refine_3\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm n : ℕ\nhn : n > 0\nhn' : 0 < ↑n\n⊢ ↑m = ↑(m % n) + ↑n * ↑(↑m / ↑n)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase inr.refine_3\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm n : ℕ\nhn : n > 0\nhn' : 0 < ↑n\n⊢ ↑m = ↑(m % n) + ↑(n * (m / n))\n[PROOFSTEP]\nrw [← Nat.cast_add, Nat.mod_add_div m n]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm : ℤ\nn : ℕ\n⊢ fract (↑m / ↑n) = ↑(m % ↑n) / ↑n\n[PROOFSTEP]\nrcases n.eq_zero_or_pos with (rfl | hn)\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm : ℤ\n⊢ fract (↑m / ↑0) = ↑(m % ↑0) / ↑0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm : ℤ\nn : ℕ\nhn : n > 0\n⊢ fract (↑m / ↑n) = ↑(m % ↑n) / ↑n\n[PROOFSTEP]\nreplace hn : 0 < (n : k)\n[GOAL]\ncase hn\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm : ℤ\nn : ℕ\nhn : n > 0\n⊢ 0 < ↑n\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm : ℤ\nn : ℕ\nhn : 0 < ↑n\n⊢ fract (↑m / ↑n) = ↑(m % ↑n) / ↑n\n[PROOFSTEP]\nhave : ∀ {l : ℤ}, 0 ≤ l → fract ((l : k) / n) = ↑(l % n) / n :=\n by\n intros l hl\n obtain ⟨l₀, rfl | rfl⟩ := l.eq_nat_or_neg\n · rw [cast_ofNat, ← coe_nat_mod, cast_ofNat, fract_div_natCast_eq_div_natCast_mod]\n · rw [Right.nonneg_neg_iff, coe_nat_nonpos_iff] at hl \n simp [hl, zero_mod]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm : ℤ\nn : ℕ\nhn : 0 < ↑n\n⊢ ∀ {l : ℤ}, 0 ≤ l → fract (↑l / ↑n) = ↑(l % ↑n) / ↑n\n[PROOFSTEP]\nintros l hl\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm : ℤ\nn : ℕ\nhn : 0 < ↑n\nl : ℤ\nhl : 0 ≤ l\n⊢ fract (↑l / ↑n) = ↑(l % ↑n) / ↑n\n[PROOFSTEP]\nobtain ⟨l₀, rfl | rfl⟩ := l.eq_nat_or_neg\n[GOAL]\ncase intro.inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm : ℤ\nn : ℕ\nhn : 0 < ↑n\nl₀ : ℕ\nhl : 0 ≤ ↑l₀\n⊢ fract (↑↑l₀ / ↑n) = ↑(↑l₀ % ↑n) / ↑n\n[PROOFSTEP]\nrw [cast_ofNat, ← coe_nat_mod, cast_ofNat, fract_div_natCast_eq_div_natCast_mod]\n[GOAL]\ncase intro.inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm : ℤ\nn : ℕ\nhn : 0 < ↑n\nl₀ : ℕ\nhl : 0 ≤ -↑l₀\n⊢ fract (↑(-↑l₀) / ↑n) = ↑(-↑l₀ % ↑n) / ↑n\n[PROOFSTEP]\nrw [Right.nonneg_neg_iff, coe_nat_nonpos_iff] at hl \n[GOAL]\ncase intro.inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm : ℤ\nn : ℕ\nhn : 0 < ↑n\nl₀ : ℕ\nhl : l₀ = 0\n⊢ fract (↑(-↑l₀) / ↑n) = ↑(-↑l₀ % ↑n) / ↑n\n[PROOFSTEP]\nsimp [hl, zero_mod]\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nm : ℤ\nn : ℕ\nhn : 0 < ↑n\nthis : ∀ {l : ℤ}, 0 ≤ l → fract (↑l / ↑n) = ↑(l % ↑n) / ↑n\n⊢ fract (↑m / ↑n) = ↑(m % ↑n) / ↑n\n[PROOFSTEP]\nobtain ⟨m₀, rfl | rfl⟩ := m.eq_nat_or_neg\n[GOAL]\ncase inr.intro.inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nn : ℕ\nhn : 0 < ↑n\nthis : ∀ {l : ℤ}, 0 ≤ l → fract (↑l / ↑n) = ↑(l % ↑n) / ↑n\nm₀ : ℕ\n⊢ fract (↑↑m₀ / ↑n) = ↑(↑m₀ % ↑n) / ↑n\n[PROOFSTEP]\nexact this (ofNat_nonneg m₀)\n[GOAL]\ncase inr.intro.inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nn : ℕ\nhn : 0 < ↑n\nthis : ∀ {l : ℤ}, 0 ≤ l → fract (↑l / ↑n) = ↑(l % ↑n) / ↑n\nm₀ : ℕ\n⊢ fract (↑(-↑m₀) / ↑n) = ↑(-↑m₀ % ↑n) / ↑n\n[PROOFSTEP]\nlet q := ⌈↑m₀ / (n : k)⌉\n[GOAL]\ncase inr.intro.inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nn : ℕ\nhn : 0 < ↑n\nthis : ∀ {l : ℤ}, 0 ≤ l → fract (↑l / ↑n) = ↑(l % ↑n) / ↑n\nm₀ : ℕ\nq : ℤ := ⌈↑m₀ / ↑n⌉\n⊢ fract (↑(-↑m₀) / ↑n) = ↑(-↑m₀ % ↑n) / ↑n\n[PROOFSTEP]\nlet m₁ := q * ↑n - (↑m₀ : ℤ)\n[GOAL]\ncase inr.intro.inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nn : ℕ\nhn : 0 < ↑n\nthis : ∀ {l : ℤ}, 0 ≤ l → fract (↑l / ↑n) = ↑(l % ↑n) / ↑n\nm₀ : ℕ\nq : ℤ := ⌈↑m₀ / ↑n⌉\nm₁ : ℤ := q * ↑n - ↑m₀\n⊢ fract (↑(-↑m₀) / ↑n) = ↑(-↑m₀ % ↑n) / ↑n\n[PROOFSTEP]\nhave hm₁ : 0 ≤ m₁ := by simpa [← @cast_le k, ← div_le_iff hn] using FloorRing.gc_ceil_coe.le_u_l _\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nn : ℕ\nhn : 0 < ↑n\nthis : ∀ {l : ℤ}, 0 ≤ l → fract (↑l / ↑n) = ↑(l % ↑n) / ↑n\nm₀ : ℕ\nq : ℤ := ⌈↑m₀ / ↑n⌉\nm₁ : ℤ := q * ↑n - ↑m₀\n⊢ 0 ≤ m₁\n[PROOFSTEP]\nsimpa [← @cast_le k, ← div_le_iff hn] using FloorRing.gc_ceil_coe.le_u_l _\n[GOAL]\ncase inr.intro.inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nn : ℕ\nhn : 0 < ↑n\nthis : ∀ {l : ℤ}, 0 ≤ l → fract (↑l / ↑n) = ↑(l % ↑n) / ↑n\nm₀ : ℕ\nq : ℤ := ⌈↑m₀ / ↑n⌉\nm₁ : ℤ := q * ↑n - ↑m₀\nhm₁ : 0 ≤ m₁\n⊢ fract (↑(-↑m₀) / ↑n) = ↑(-↑m₀ % ↑n) / ↑n\n[PROOFSTEP]\ncalc\n fract\n ((Int.cast (-(m₀ : ℤ)) : k) / (n : k))\n -- Porting note: the `rw [cast_neg, cast_ofNat]` was `push_cast` =\n fract (-(m₀ : k) / n) :=\n by rw [cast_neg, cast_ofNat]\n _ = fract ((m₁ : k) / n) := ?_\n _ = Int.cast (m₁ % (n : ℤ)) / Nat.cast n := (this hm₁)\n _ = Int.cast (-(↑m₀ : ℤ) % ↑n) / Nat.cast n := ?_\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nn : ℕ\nhn : 0 < ↑n\nthis : ∀ {l : ℤ}, 0 ≤ l → fract (↑l / ↑n) = ↑(l % ↑n) / ↑n\nm₀ : ℕ\nq : ℤ := ⌈↑m₀ / ↑n⌉\nm₁ : ℤ := q * ↑n - ↑m₀\nhm₁ : 0 ≤ m₁\n⊢ fract (↑(-↑m₀) / ↑n) = fract (-↑m₀ / ↑n)\n[PROOFSTEP]\nrw [cast_neg, cast_ofNat]\n[GOAL]\ncase inr.intro.inr.calc_1\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nn : ℕ\nhn : 0 < ↑n\nthis : ∀ {l : ℤ}, 0 ≤ l → fract (↑l / ↑n) = ↑(l % ↑n) / ↑n\nm₀ : ℕ\nq : ℤ := ⌈↑m₀ / ↑n⌉\nm₁ : ℤ := q * ↑n - ↑m₀\nhm₁ : 0 ≤ m₁\n⊢ fract (-↑m₀ / ↑n) = fract (↑m₁ / ↑n)\n[PROOFSTEP]\nrw [← fract_int_add q, ← mul_div_cancel (q : k) (ne_of_gt hn), ← add_div, ← sub_eq_add_neg]\n -- Porting note: the `simp` was `push_cast`\n[GOAL]\ncase inr.intro.inr.calc_1\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nn : ℕ\nhn : 0 < ↑n\nthis : ∀ {l : ℤ}, 0 ≤ l → fract (↑l / ↑n) = ↑(l % ↑n) / ↑n\nm₀ : ℕ\nq : ℤ := ⌈↑m₀ / ↑n⌉\nm₁ : ℤ := q * ↑n - ↑m₀\nhm₁ : 0 ≤ m₁\n⊢ fract ((↑q * ↑n - ↑m₀) / ↑n) = fract (↑m₁ / ↑n)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.intro.inr.calc_2\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nn : ℕ\nhn : 0 < ↑n\nthis : ∀ {l : ℤ}, 0 ≤ l → fract (↑l / ↑n) = ↑(l % ↑n) / ↑n\nm₀ : ℕ\nq : ℤ := ⌈↑m₀ / ↑n⌉\nm₁ : ℤ := q * ↑n - ↑m₀\nhm₁ : 0 ≤ m₁\n⊢ ↑(m₁ % ↑n) / ↑n = ↑(-↑m₀ % ↑n) / ↑n\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase inr.intro.inr.calc_2.e_a.e_a\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nn : ℕ\nhn : 0 < ↑n\nthis : ∀ {l : ℤ}, 0 ≤ l → fract (↑l / ↑n) = ↑(l % ↑n) / ↑n\nm₀ : ℕ\nq : ℤ := ⌈↑m₀ / ↑n⌉\nm₁ : ℤ := q * ↑n - ↑m₀\nhm₁ : 0 ≤ m₁\n⊢ m₁ % ↑n = -↑m₀ % ↑n\n[PROOFSTEP]\nchange (q * ↑n - (↑m₀ : ℤ)) % ↑n = _\n[GOAL]\ncase inr.intro.inr.calc_2.e_a.e_a\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\nz : ℤ\na : α\nk : Type u_4\ninst✝¹ : LinearOrderedField k\ninst✝ : FloorRing k\nb : k\nn : ℕ\nhn : 0 < ↑n\nthis : ∀ {l : ℤ}, 0 ≤ l → fract (↑l / ↑n) = ↑(l % ↑n) / ↑n\nm₀ : ℕ\nq : ℤ := ⌈↑m₀ / ↑n⌉\nm₁ : ℤ := q * ↑n - ↑m₀\nhm₁ : 0 ≤ m₁\n⊢ (q * ↑n - ↑m₀) % ↑n = -↑m₀ % ↑n\n[PROOFSTEP]\nrw [sub_eq_add_neg, add_comm (q * ↑n), add_mul_emod_self]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na : α\nz : ℤ\n⊢ z ≤ ⌊-a⌋ ↔ z ≤ -⌈a⌉\n[PROOFSTEP]\nrw [le_neg, ceil_le, le_floor, Int.cast_neg, le_neg]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na : α\nz : ℤ\n⊢ ⌈-a⌉ ≤ z ↔ -⌊a⌋ ≤ z\n[PROOFSTEP]\nrw [neg_le, ceil_le, le_floor, Int.cast_neg, neg_le]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ z + 1 ≤ ⌈a⌉ ↔ ↑z < a\n[PROOFSTEP]\nrw [← lt_ceil, add_one_le_iff]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ 1 ≤ ⌈a⌉ ↔ 0 < a\n[PROOFSTEP]\nrw [← zero_add (1 : ℤ), add_one_le_ceil_iff, cast_zero]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\n⊢ ⌈a⌉ ≤ ⌊a⌋ + 1\n[PROOFSTEP]\nrw [ceil_le, Int.cast_add, Int.cast_one]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\n⊢ a ≤ ↑⌊a⌋ + 1\n[PROOFSTEP]\nexact (lt_floor_add_one a).le\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ : α\nz a : ℤ\n⊢ ⌈↑z⌉ ≤ a ↔ z ≤ a\n[PROOFSTEP]\nrw [ceil_le, Int.cast_le]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ : α\nn : ℕ\na : ℤ\n⊢ ⌈↑n⌉ ≤ a ↔ ↑n ≤ a\n[PROOFSTEP]\nrw [ceil_le, ← cast_ofNat, cast_le]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ a : α\nz : ℤ\n⊢ ⌈a + ↑z⌉ = ⌈a⌉ + z\n[PROOFSTEP]\nrw [← neg_inj, neg_add', ← floor_neg, ← floor_neg, neg_add', floor_sub_int]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nn : ℕ\n⊢ ⌈a + ↑n⌉ = ⌈a⌉ + ↑n\n[PROOFSTEP]\nrw [← Int.cast_ofNat, ceil_add_int]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\n⊢ ⌈a + 1⌉ = ⌈a⌉ + 1\n[PROOFSTEP]\nrw [← ceil_add_int a (1 : ℤ), cast_one]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ a : α\nz : ℤ\n⊢ ⌈a - ↑z⌉ = ⌈a + ↑(-z)⌉\n[PROOFSTEP]\nrw [Int.cast_neg, sub_eq_add_neg]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nn : ℕ\n⊢ ⌈a - ↑n⌉ = ⌈a⌉ - ↑n\n[PROOFSTEP]\nconvert ceil_sub_int a n using 1\n[GOAL]\ncase h.e'_2\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nn : ℕ\n⊢ ⌈a - ↑n⌉ = ⌈a - ↑↑n⌉\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\n⊢ ⌈a - 1⌉ = ⌈a⌉ - 1\n[PROOFSTEP]\nrw [eq_sub_iff_add_eq, ← ceil_add_one, sub_add_cancel]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\n⊢ ↑⌈a⌉ < a + 1\n[PROOFSTEP]\nrw [← lt_ceil, ← Int.cast_one, ceil_add_int]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\n⊢ ⌈a⌉ < ⌈a⌉ + 1\n[PROOFSTEP]\napply lt_add_one\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ ⌈a + b⌉ ≤ ⌈a⌉ + ⌈b⌉\n[PROOFSTEP]\nrw [ceil_le, Int.cast_add]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ a + b ≤ ↑⌈a⌉ + ↑⌈b⌉\n[PROOFSTEP]\nexact add_le_add (le_ceil _) (le_ceil _)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ ⌈a⌉ + ⌈b⌉ ≤ ⌈a + b⌉ + 1\n[PROOFSTEP]\nrw [← le_sub_iff_add_le, ceil_le, Int.cast_sub, Int.cast_add, Int.cast_one, le_sub_comm]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ ↑⌈b⌉ ≤ ↑⌈a + b⌉ + 1 - a\n[PROOFSTEP]\nrefine' (ceil_lt_add_one _).le.trans _\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ b + 1 ≤ ↑⌈a + b⌉ + 1 - a\n[PROOFSTEP]\nrw [le_sub_iff_add_le', ← add_assoc, add_le_add_iff_right]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ a + b ≤ ↑⌈a + b⌉\n[PROOFSTEP]\nexact le_ceil _\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ 0 < ⌈a⌉ ↔ 0 < a\n[PROOFSTEP]\nrw [lt_ceil, cast_zero]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ ⌈0⌉ = 0\n[PROOFSTEP]\nrw [← cast_zero, ceil_intCast]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ ⌈1⌉ = 1\n[PROOFSTEP]\nrw [← cast_one, ceil_intCast]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\nha : 0 ≤ a\n⊢ 0 ≤ ⌈a⌉\n[PROOFSTEP]\nexact_mod_cast ha.trans (le_ceil a)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ ⌈a⌉ = z ↔ ↑z - 1 < a ∧ a ≤ ↑z\n[PROOFSTEP]\nrw [← ceil_le, ← Int.cast_one, ← Int.cast_sub, ← lt_ceil, Int.sub_one_lt_iff, le_antisymm_iff, and_comm]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ ⌈a⌉ = 0 ↔ a ∈ Ioc (-1) 0\n[PROOFSTEP]\nsimp [ceil_eq_iff]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz✝ : ℤ\na✝ : α\nz : ℤ\na : α\nha : a ∈ Ioc (↑z - 1) ↑z\n⊢ ↑⌈a⌉ = ↑z\n[PROOFSTEP]\nexact_mod_cast ceil_eq_on_Ioc z a ha\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\n⊢ fract a = 0 ∨ fract a = a + 1 - ↑⌈a⌉\n[PROOFSTEP]\ncases' eq_or_ne (fract a) 0 with ha ha\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nha : fract a = 0\n⊢ fract a = 0 ∨ fract a = a + 1 - ↑⌈a⌉\n[PROOFSTEP]\nexact Or.inl ha\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nha : fract a ≠ 0\n⊢ fract a = 0 ∨ fract a = a + 1 - ↑⌈a⌉\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nha : fract a ≠ 0\n⊢ fract a = a + 1 - ↑⌈a⌉\n[PROOFSTEP]\nsuffices (⌈a⌉ : α) = ⌊a⌋ + 1 by\n rw [this, ← self_sub_fract]\n abel\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nha : fract a ≠ 0\nthis : ↑⌈a⌉ = ↑⌊a⌋ + 1\n⊢ fract a = a + 1 - ↑⌈a⌉\n[PROOFSTEP]\nrw [this, ← self_sub_fract]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nha : fract a ≠ 0\nthis : ↑⌈a⌉ = ↑⌊a⌋ + 1\n⊢ fract a = a + 1 - (a - fract a + 1)\n[PROOFSTEP]\nabel\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nha : fract a ≠ 0\nthis : ↑⌈a⌉ = ↑⌊a⌋ + 1\n⊢ fract a = a + 1 - (a - fract a + 1)\n[PROOFSTEP]\nabel\n[GOAL]\ncase inr.h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nha : fract a ≠ 0\n⊢ ↑⌈a⌉ = ↑⌊a⌋ + 1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase inr.h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nha : fract a ≠ 0\n⊢ ⌈a⌉ = ⌊a⌋ + 1\n[PROOFSTEP]\nrw [ceil_eq_iff]\n[GOAL]\ncase inr.h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nha : fract a ≠ 0\n⊢ ↑(⌊a⌋ + 1) - 1 < a ∧ a ≤ ↑(⌊a⌋ + 1)\n[PROOFSTEP]\nrefine' ⟨_, _root_.le_of_lt <| by simp⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nha : fract a ≠ 0\n⊢ a < ↑(⌊a⌋ + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nha : fract a ≠ 0\n⊢ ↑(⌊a⌋ + 1) - 1 < a\n[PROOFSTEP]\nrw [cast_add, cast_one, add_tsub_cancel_right, ← self_sub_fract a, sub_lt_self_iff]\n[GOAL]\ncase inr.h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a : α\nha : fract a ≠ 0\n⊢ 0 < fract a\n[PROOFSTEP]\nexact ha.symm.lt_of_le (fract_nonneg a)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\nha : fract a ≠ 0\n⊢ ↑⌈a⌉ = a + 1 - fract a\n[PROOFSTEP]\nrw [(or_iff_right ha).mp (fract_eq_zero_or_add_one_sub_ceil a)]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\nha : fract a ≠ 0\n⊢ ↑⌈a⌉ = a + 1 - (a + 1 - ↑⌈a⌉)\n[PROOFSTEP]\nabel\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\nha : fract a ≠ 0\n⊢ ↑⌈a⌉ = a + 1 - (a + 1 - ↑⌈a⌉)\n[PROOFSTEP]\nabel\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\nha : fract a ≠ 0\n⊢ ↑⌈a⌉ - a = 1 - fract a\n[PROOFSTEP]\nrw [(or_iff_right ha).mp (fract_eq_zero_or_add_one_sub_ceil a)]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\nha : fract a ≠ 0\n⊢ ↑⌈a⌉ - a = 1 - (a + 1 - ↑⌈a⌉)\n[PROOFSTEP]\nabel\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\nha : fract a ≠ 0\n⊢ ↑⌈a⌉ - a = 1 - (a + 1 - ↑⌈a⌉)\n[PROOFSTEP]\nabel\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ Int.cast ⁻¹' Ioo a b = Ioo ⌊a⌋ ⌈b⌉\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\nx✝ : ℤ\n⊢ x✝ ∈ Int.cast ⁻¹' Ioo a b ↔ x✝ ∈ Ioo ⌊a⌋ ⌈b⌉\n[PROOFSTEP]\nsimp [floor_lt, lt_ceil]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ Int.cast ⁻¹' Ico a b = Ico ⌈a⌉ ⌈b⌉\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\nx✝ : ℤ\n⊢ x✝ ∈ Int.cast ⁻¹' Ico a b ↔ x✝ ∈ Ico ⌈a⌉ ⌈b⌉\n[PROOFSTEP]\nsimp [ceil_le, lt_ceil]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ Int.cast ⁻¹' Ioc a b = Ioc ⌊a⌋ ⌊b⌋\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\nx✝ : ℤ\n⊢ x✝ ∈ Int.cast ⁻¹' Ioc a b ↔ x✝ ∈ Ioc ⌊a⌋ ⌊b⌋\n[PROOFSTEP]\nsimp [floor_lt, le_floor]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\n⊢ Int.cast ⁻¹' Icc a b = Icc ⌈a⌉ ⌊b⌋\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na✝ a b : α\nx✝ : ℤ\n⊢ x✝ ∈ Int.cast ⁻¹' Icc a b ↔ x✝ ∈ Icc ⌈a⌉ ⌊b⌋\n[PROOFSTEP]\nsimp [ceil_le, le_floor]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ Int.cast ⁻¹' Ioi a = Ioi ⌊a⌋\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\nx✝ : ℤ\n⊢ x✝ ∈ Int.cast ⁻¹' Ioi a ↔ x✝ ∈ Ioi ⌊a⌋\n[PROOFSTEP]\nsimp [floor_lt]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ Int.cast ⁻¹' Ici a = Ici ⌈a⌉\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\nx✝ : ℤ\n⊢ x✝ ∈ Int.cast ⁻¹' Ici a ↔ x✝ ∈ Ici ⌈a⌉\n[PROOFSTEP]\nsimp [ceil_le]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ Int.cast ⁻¹' Iio a = Iio ⌈a⌉\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\nx✝ : ℤ\n⊢ x✝ ∈ Int.cast ⁻¹' Iio a ↔ x✝ ∈ Iio ⌈a⌉\n[PROOFSTEP]\nsimp [lt_ceil]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\n⊢ Int.cast ⁻¹' Iic a = Iic ⌊a⌋\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nz : ℤ\na : α\nx✝ : ℤ\n⊢ x✝ ∈ Int.cast ⁻¹' Iic a ↔ x✝ ∈ Iic ⌊a⌋\n[PROOFSTEP]\nsimp [le_floor]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\n⊢ round 0 = 0\n[PROOFSTEP]\nsimp [round]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\n⊢ round 1 = 1\n[PROOFSTEP]\nsimp [round]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nn : ℕ\n⊢ round ↑n = ↑n\n[PROOFSTEP]\nsimp [round]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nn : ℤ\n⊢ round ↑n = n\n[PROOFSTEP]\nsimp [round]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\ny : ℤ\n⊢ round (x + ↑y) = round x + y\n[PROOFSTEP]\nrw [round, round, Int.fract_add_int, Int.floor_add_int, Int.ceil_add_int, ← apply_ite₂, ite_self]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\na : α\n⊢ round (a + 1) = round a + 1\n[PROOFSTEP]\nrw [← round_add_int a 1, cast_one]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\ny : ℤ\n⊢ round (x - ↑y) = round x - y\n[PROOFSTEP]\nrw [sub_eq_add_neg]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\ny : ℤ\n⊢ round (x + -↑y) = round x - y\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\ny : ℤ\n⊢ round (x + ↑(-y)) = round x - y\n[PROOFSTEP]\nrw [round_add_int, sub_eq_add_neg]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\na : α\n⊢ round (a - 1) = round a - 1\n[PROOFSTEP]\nrw [← round_sub_int a 1, cast_one]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\ny : ℕ\n⊢ round (x + ↑y) = round x + ↑y\n[PROOFSTEP]\nexact_mod_cast round_add_int x y\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\ny : ℕ\n⊢ round (x - ↑y) = round x - ↑y\n[PROOFSTEP]\nexact_mod_cast round_sub_int x y\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\ny : ℤ\n⊢ round (↑y + x) = y + round x\n[PROOFSTEP]\nrw [add_comm, round_add_int, add_comm]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\ny : ℕ\n⊢ round (↑y + x) = ↑y + round x\n[PROOFSTEP]\nrw [add_comm, round_add_nat, add_comm]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\n⊢ |x - ↑(round x)| = min (fract x) (1 - fract x)\n[PROOFSTEP]\nsimp_rw [round, min_def_lt, two_mul, ← lt_tsub_iff_left]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\n⊢ |x - ↑(if fract x < 1 - fract x then ⌊x⌋ else ⌈x⌉)| = if fract x < 1 - fract x then fract x else 1 - fract x\n[PROOFSTEP]\ncases' lt_or_ge (fract x) (1 - fract x) with hx hx\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nhx : fract x < 1 - fract x\n⊢ |x - ↑(if fract x < 1 - fract x then ⌊x⌋ else ⌈x⌉)| = if fract x < 1 - fract x then fract x else 1 - fract x\n[PROOFSTEP]\nrw [if_pos hx, if_pos hx, self_sub_floor, abs_fract]\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nhx : fract x ≥ 1 - fract x\n⊢ |x - ↑(if fract x < 1 - fract x then ⌊x⌋ else ⌈x⌉)| = if fract x < 1 - fract x then fract x else 1 - fract x\n[PROOFSTEP]\nhave : 0 < fract x :=\n by\n replace hx : 0 < fract x + fract x := lt_of_lt_of_le zero_lt_one (tsub_le_iff_left.mp hx)\n simpa only [← two_mul, zero_lt_mul_left, zero_lt_two] using hx\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nhx : fract x ≥ 1 - fract x\n⊢ 0 < fract x\n[PROOFSTEP]\nreplace hx : 0 < fract x + fract x := lt_of_lt_of_le zero_lt_one (tsub_le_iff_left.mp hx)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nhx : 0 < fract x + fract x\n⊢ 0 < fract x\n[PROOFSTEP]\nsimpa only [← two_mul, zero_lt_mul_left, zero_lt_two] using hx\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nhx : fract x ≥ 1 - fract x\nthis : 0 < fract x\n⊢ |x - ↑(if fract x < 1 - fract x then ⌊x⌋ else ⌈x⌉)| = if fract x < 1 - fract x then fract x else 1 - fract x\n[PROOFSTEP]\nrw [if_neg (not_lt.mpr hx), if_neg (not_lt.mpr hx), abs_sub_comm, ceil_sub_self_eq this.ne.symm, abs_one_sub_fract]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nz : ℤ\n⊢ |x - ↑(round x)| ≤ |x - ↑z|\n[PROOFSTEP]\nrw [abs_sub_round_eq_min, min_le_iff]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nz : ℤ\n⊢ fract x ≤ |x - ↑z| ∨ 1 - fract x ≤ |x - ↑z|\n[PROOFSTEP]\nrcases le_or_lt (z : α) x with (hx | hx) <;> [left; right]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nz : ℤ\n⊢ fract x ≤ |x - ↑z| ∨ 1 - fract x ≤ |x - ↑z|\n[PROOFSTEP]\nrcases le_or_lt (z : α) x with (hx | hx)\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nz : ℤ\nhx : ↑z ≤ x\n⊢ fract x ≤ |x - ↑z| ∨ 1 - fract x ≤ |x - ↑z|\n[PROOFSTEP]\nleft\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nz : ℤ\nhx : x < ↑z\n⊢ fract x ≤ |x - ↑z| ∨ 1 - fract x ≤ |x - ↑z|\n[PROOFSTEP]\nright\n[GOAL]\ncase inl.h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nz : ℤ\nhx : ↑z ≤ x\n⊢ fract x ≤ |x - ↑z|\n[PROOFSTEP]\nconv_rhs => rw [abs_eq_self.mpr (sub_nonneg.mpr hx), ← fract_add_floor x, add_sub_assoc]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nz : ℤ\nhx : ↑z ≤ x\n| |x - ↑z|\n[PROOFSTEP]\nrw [abs_eq_self.mpr (sub_nonneg.mpr hx), ← fract_add_floor x, add_sub_assoc]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nz : ℤ\nhx : ↑z ≤ x\n| |x - ↑z|\n[PROOFSTEP]\nrw [abs_eq_self.mpr (sub_nonneg.mpr hx), ← fract_add_floor x, add_sub_assoc]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nz : ℤ\nhx : ↑z ≤ x\n| |x - ↑z|\n[PROOFSTEP]\nrw [abs_eq_self.mpr (sub_nonneg.mpr hx), ← fract_add_floor x, add_sub_assoc]\n[GOAL]\ncase inl.h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nz : ℤ\nhx : ↑z ≤ x\n⊢ fract x ≤ fract x + (↑⌊x⌋ - ↑z)\n[PROOFSTEP]\nsimpa only [le_add_iff_nonneg_right, sub_nonneg, cast_le] using le_floor.mpr hx\n[GOAL]\ncase inr.h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nz : ℤ\nhx : x < ↑z\n⊢ 1 - fract x ≤ |x - ↑z|\n[PROOFSTEP]\nrw [abs_eq_neg_self.mpr (sub_neg.mpr hx).le]\n[GOAL]\ncase inr.h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nz : ℤ\nhx : x < ↑z\n⊢ 1 - fract x ≤ -(x - ↑z)\n[PROOFSTEP]\nconv_rhs => rw [← fract_add_floor x]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nz : ℤ\nhx : x < ↑z\n| -(x - ↑z)\n[PROOFSTEP]\nrw [← fract_add_floor x]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nz : ℤ\nhx : x < ↑z\n| -(x - ↑z)\n[PROOFSTEP]\nrw [← fract_add_floor x]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nz : ℤ\nhx : x < ↑z\n| -(x - ↑z)\n[PROOFSTEP]\nrw [← fract_add_floor x]\n[GOAL]\ncase inr.h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nz : ℤ\nhx : x < ↑z\n⊢ 1 - fract x ≤ -(fract x + ↑⌊x⌋ - ↑z)\n[PROOFSTEP]\nrw [add_sub_assoc, add_comm, neg_add, neg_sub, le_add_neg_iff_add_le, sub_add_cancel, le_sub_comm]\n[GOAL]\ncase inr.h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nz : ℤ\nhx : x < ↑z\n⊢ ↑⌊x⌋ ≤ ↑z - 1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase inr.h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nx : α\nz : ℤ\nhx : x < ↑z\n⊢ ⌊x⌋ ≤ z - 1\n[PROOFSTEP]\nexact floor_le_sub_one_iff.mpr hx\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\n⊢ round x = ⌊x + 1 / 2⌋\n[PROOFSTEP]\nsimp_rw [round, (by simp only [lt_div_iff', two_pos] : 2 * fract x < 1 ↔ fract x < 1 / 2)]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\n⊢ 2 * fract x < 1 ↔ fract x < 1 / 2\n[PROOFSTEP]\nsimp only [lt_div_iff', two_pos]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\n⊢ (if fract x < 1 / 2 then ⌊x⌋ else ⌈x⌉) = ⌊x + 1 / 2⌋\n[PROOFSTEP]\ncases' lt_or_le (fract x) (1 / 2) with hx hx\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : fract x < 1 / 2\n⊢ (if fract x < 1 / 2 then ⌊x⌋ else ⌈x⌉) = ⌊x + 1 / 2⌋\n[PROOFSTEP]\nconv_rhs => rw [← fract_add_floor x, add_assoc, add_left_comm, floor_int_add]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : fract x < 1 / 2\n| ⌊x + 1 / 2⌋\n[PROOFSTEP]\nrw [← fract_add_floor x, add_assoc, add_left_comm, floor_int_add]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : fract x < 1 / 2\n| ⌊x + 1 / 2⌋\n[PROOFSTEP]\nrw [← fract_add_floor x, add_assoc, add_left_comm, floor_int_add]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : fract x < 1 / 2\n| ⌊x + 1 / 2⌋\n[PROOFSTEP]\nrw [← fract_add_floor x, add_assoc, add_left_comm, floor_int_add]\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : fract x < 1 / 2\n⊢ (if fract x < 1 / 2 then ⌊x⌋ else ⌈x⌉) = ⌊x⌋ + ⌊fract x + 1 / 2⌋\n[PROOFSTEP]\nrw [if_pos hx, self_eq_add_right, floor_eq_iff, cast_zero, zero_add]\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : fract x < 1 / 2\n⊢ 0 ≤ fract x + 1 / 2 ∧ fract x + 1 / 2 < 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase inl.left\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : fract x < 1 / 2\n⊢ 0 ≤ fract x + 1 / 2\n[PROOFSTEP]\nlinarith [fract_nonneg x]\n[GOAL]\ncase inl.right\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : fract x < 1 / 2\n⊢ fract x + 1 / 2 < 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : 1 / 2 ≤ fract x\n⊢ (if fract x < 1 / 2 then ⌊x⌋ else ⌈x⌉) = ⌊x + 1 / 2⌋\n[PROOFSTEP]\nhave : ⌊fract x + 1 / 2⌋ = 1 := by\n rw [floor_eq_iff]\n constructor\n · norm_num\n linarith\n · norm_num\n linarith [fract_lt_one x]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : 1 / 2 ≤ fract x\n⊢ ⌊fract x + 1 / 2⌋ = 1\n[PROOFSTEP]\nrw [floor_eq_iff]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : 1 / 2 ≤ fract x\n⊢ ↑1 ≤ fract x + 1 / 2 ∧ fract x + 1 / 2 < ↑1 + 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : 1 / 2 ≤ fract x\n⊢ ↑1 ≤ fract x + 1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase left\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : 1 / 2 ≤ fract x\n⊢ 1 ≤ fract x + 1 / 2\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase right\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : 1 / 2 ≤ fract x\n⊢ fract x + 1 / 2 < ↑1 + 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase right\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : 1 / 2 ≤ fract x\n⊢ fract x + 1 / 2 < 2\n[PROOFSTEP]\nlinarith [fract_lt_one x]\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : 1 / 2 ≤ fract x\nthis : ⌊fract x + 1 / 2⌋ = 1\n⊢ (if fract x < 1 / 2 then ⌊x⌋ else ⌈x⌉) = ⌊x + 1 / 2⌋\n[PROOFSTEP]\nrw [if_neg (not_lt.mpr hx), ← fract_add_floor x, add_assoc, add_left_comm, floor_int_add, ceil_add_int, add_comm _ ⌊x⌋,\n add_right_inj, ceil_eq_iff, this, cast_one, sub_self]\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : 1 / 2 ≤ fract x\nthis : ⌊fract x + 1 / 2⌋ = 1\n⊢ 0 < fract x ∧ fract x ≤ 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase inr.left\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : 1 / 2 ≤ fract x\nthis : ⌊fract x + 1 / 2⌋ = 1\n⊢ 0 < fract x\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase inr.right\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nhx : 1 / 2 ≤ fract x\nthis : ⌊fract x + 1 / 2⌋ = 1\n⊢ fract x ≤ 1\n[PROOFSTEP]\nlinarith [fract_lt_one x]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\n⊢ round 2⁻¹ = 1\n[PROOFSTEP]\nsimp only [round_eq, ← one_div, add_halves', floor_one]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\n⊢ round (-2⁻¹) = 0\n[PROOFSTEP]\nsimp only [round_eq, ← one_div, add_left_neg, floor_zero]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\n⊢ round x = 0 ↔ x ∈ Ico (-(1 / 2)) (1 / 2)\n[PROOFSTEP]\nrw [round_eq, floor_eq_zero_iff, add_mem_Ico_iff_left]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\n⊢ x ∈ Ico (0 - 1 / 2) (1 - 1 / 2) ↔ x ∈ Ico (-(1 / 2)) (1 / 2)\n[PROOFSTEP]\nnorm_num\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\n⊢ |x - ↑(round x)| ≤ 1 / 2\n[PROOFSTEP]\nrw [round_eq, abs_sub_le_iff]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\n⊢ x - ↑⌊x + 1 / 2⌋ ≤ 1 / 2 ∧ ↑⌊x + 1 / 2⌋ - x ≤ 1 / 2\n[PROOFSTEP]\nhave := floor_le (x + 1 / 2)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nthis : ↑⌊x + 1 / 2⌋ ≤ x + 1 / 2\n⊢ x - ↑⌊x + 1 / 2⌋ ≤ 1 / 2 ∧ ↑⌊x + 1 / 2⌋ - x ≤ 1 / 2\n[PROOFSTEP]\nhave := lt_floor_add_one (x + 1 / 2)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nthis✝ : ↑⌊x + 1 / 2⌋ ≤ x + 1 / 2\nthis : x + 1 / 2 < ↑⌊x + 1 / 2⌋ + 1\n⊢ x - ↑⌊x + 1 / 2⌋ ≤ 1 / 2 ∧ ↑⌊x + 1 / 2⌋ - x ≤ 1 / 2\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nthis✝ : ↑⌊x + 1 / 2⌋ ≤ x + 1 / 2\nthis : x + 1 / 2 < ↑⌊x + 1 / 2⌋ + 1\n⊢ x - ↑⌊x + 1 / 2⌋ ≤ 1 / 2\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase right\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nx : α\nthis✝ : ↑⌊x + 1 / 2⌋ ≤ x + 1 / 2\nthis : x + 1 / 2 < ↑⌊x + 1 / 2⌋ + 1\n⊢ ↑⌊x + 1 / 2⌋ - x ≤ 1 / 2\n[PROOFSTEP]\nlinarith\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nm n : ℕ\n⊢ |↑m / ↑n - ↑(round (↑m / ↑n))| = ↑(min (m % n) (n - m % n)) / ↑n\n[PROOFSTEP]\nrcases n.eq_zero_or_pos with (rfl | hn)\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nm : ℕ\n⊢ |↑m / ↑0 - ↑(round (↑m / ↑0))| = ↑(min (m % 0) (0 - m % 0)) / ↑0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nm n : ℕ\nhn : n > 0\n⊢ |↑m / ↑n - ↑(round (↑m / ↑n))| = ↑(min (m % n) (n - m % n)) / ↑n\n[PROOFSTEP]\nhave hn' : 0 < (n : α) := by norm_cast\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nm n : ℕ\nhn : n > 0\n⊢ 0 < ↑n\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedField α\ninst✝ : FloorRing α\nm n : ℕ\nhn : n > 0\nhn' : 0 < ↑n\n⊢ |↑m / ↑n - ↑(round (↑m / ↑n))| = ↑(min (m % n) (n - m % n)) / ↑n\n[PROOFSTEP]\nrw [abs_sub_round_eq_min, Nat.cast_min, ← min_div_div_right hn'.le, fract_div_natCast_eq_div_natCast_mod,\n Nat.cast_sub (m.mod_lt hn).le, sub_div, div_self hn'.ne']\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedSemiring α\ninst✝³ : LinearOrderedSemiring β\ninst✝² : FloorSemiring α\ninst✝¹ : FloorSemiring β\ninst✝ : RingHomClass F α β\na : α\nb : β\nh : ∀ (n : ℕ), ↑n ≤ a ↔ ↑n ≤ b\n⊢ ⌊a⌋₊ = ⌊b⌋₊\n[PROOFSTEP]\nhave h₀ : 0 ≤ a ↔ 0 ≤ b := by simpa only [cast_zero] using h 0\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedSemiring α\ninst✝³ : LinearOrderedSemiring β\ninst✝² : FloorSemiring α\ninst✝¹ : FloorSemiring β\ninst✝ : RingHomClass F α β\na : α\nb : β\nh : ∀ (n : ℕ), ↑n ≤ a ↔ ↑n ≤ b\n⊢ 0 ≤ a ↔ 0 ≤ b\n[PROOFSTEP]\nsimpa only [cast_zero] using h 0\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedSemiring α\ninst✝³ : LinearOrderedSemiring β\ninst✝² : FloorSemiring α\ninst✝¹ : FloorSemiring β\ninst✝ : RingHomClass F α β\na : α\nb : β\nh : ∀ (n : ℕ), ↑n ≤ a ↔ ↑n ≤ b\nh₀ : 0 ≤ a ↔ 0 ≤ b\n⊢ ⌊a⌋₊ = ⌊b⌋₊\n[PROOFSTEP]\nobtain ha | ha := lt_or_le a 0\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedSemiring α\ninst✝³ : LinearOrderedSemiring β\ninst✝² : FloorSemiring α\ninst✝¹ : FloorSemiring β\ninst✝ : RingHomClass F α β\na : α\nb : β\nh : ∀ (n : ℕ), ↑n ≤ a ↔ ↑n ≤ b\nh₀ : 0 ≤ a ↔ 0 ≤ b\nha : a < 0\n⊢ ⌊a⌋₊ = ⌊b⌋₊\n[PROOFSTEP]\nrw [floor_of_nonpos ha.le, floor_of_nonpos (le_of_not_le <| h₀.not.mp ha.not_le)]\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedSemiring α\ninst✝³ : LinearOrderedSemiring β\ninst✝² : FloorSemiring α\ninst✝¹ : FloorSemiring β\ninst✝ : RingHomClass F α β\na : α\nb : β\nh : ∀ (n : ℕ), ↑n ≤ a ↔ ↑n ≤ b\nh₀ : 0 ≤ a ↔ 0 ≤ b\nha : 0 ≤ a\n⊢ ⌊a⌋₊ = ⌊b⌋₊\n[PROOFSTEP]\nexact (le_floor <| (h _).1 <| floor_le ha).antisymm (le_floor <| (h _).2 <| floor_le <| h₀.1 ha)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedSemiring α\ninst✝³ : LinearOrderedSemiring β\ninst✝² : FloorSemiring α\ninst✝¹ : FloorSemiring β\ninst✝ : RingHomClass F α β\na✝ : α\nb : β\nf : F\nhf : StrictMono ↑f\na : α\nn : ℕ\n⊢ ↑n ≤ ↑f a ↔ ↑n ≤ a\n[PROOFSTEP]\nrw [← map_natCast f, hf.le_iff_le]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedSemiring α\ninst✝³ : LinearOrderedSemiring β\ninst✝² : FloorSemiring α\ninst✝¹ : FloorSemiring β\ninst✝ : RingHomClass F α β\na✝ : α\nb : β\nf : F\nhf : StrictMono ↑f\na : α\nn : ℕ\n⊢ ↑f a ≤ ↑n ↔ a ≤ ↑n\n[PROOFSTEP]\nrw [← map_natCast f, hf.le_iff_le]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedRing α\ninst✝³ : LinearOrderedRing β\ninst✝² : FloorRing α\ninst✝¹ : FloorRing β\ninst✝ : RingHomClass F α β\na✝ : α\nb : β\nf : F\nhf : StrictMono ↑f\na : α\nn : ℤ\n⊢ ↑n ≤ ↑f a ↔ ↑n ≤ a\n[PROOFSTEP]\nrw [← map_intCast f, hf.le_iff_le]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedRing α\ninst✝³ : LinearOrderedRing β\ninst✝² : FloorRing α\ninst✝¹ : FloorRing β\ninst✝ : RingHomClass F α β\na✝ : α\nb : β\nf : F\nhf : StrictMono ↑f\na : α\nn : ℤ\n⊢ ↑f a ≤ ↑n ↔ a ≤ ↑n\n[PROOFSTEP]\nrw [← map_intCast f, hf.le_iff_le]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedRing α\ninst✝³ : LinearOrderedRing β\ninst✝² : FloorRing α\ninst✝¹ : FloorRing β\ninst✝ : RingHomClass F α β\na✝ : α\nb : β\nf : F\nhf : StrictMono ↑f\na : α\n⊢ fract (↑f a) = ↑f (fract a)\n[PROOFSTEP]\nsimp_rw [fract, map_sub, map_intCast, map_floor _ hf]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedField α\ninst✝³ : LinearOrderedField β\ninst✝² : FloorRing α\ninst✝¹ : FloorRing β\ninst✝ : RingHomClass F α β\na✝ : α\nb : β\nf : F\nhf : StrictMono ↑f\na : α\n⊢ round (↑f a) = round a\n[PROOFSTEP]\nhave H : f 2 = 2 := map_natCast f 2\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedField α\ninst✝³ : LinearOrderedField β\ninst✝² : FloorRing α\ninst✝¹ : FloorRing β\ninst✝ : RingHomClass F α β\na✝ : α\nb : β\nf : F\nhf : StrictMono ↑f\na : α\nH : ↑f 2 = 2\n⊢ round (↑f a) = round a\n[PROOFSTEP]\nsimp_rw [round_eq, ← map_floor _ hf, map_add, one_div, map_inv₀, H]\n -- Porting note: was\n -- simp_rw [round_eq, ← map_floor _ hf, map_add, one_div, map_inv₀, map_bit0, map_one]\n -- Would have thought that `map_natCast` would replace `map_bit0, map_one` but seems not\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\na : α\nn : ℕ\nha : 0 ≤ a\n⊢ n ≤ (fun a => toNat ⌊a⌋) a ↔ ↑n ≤ a\n[PROOFSTEP]\nrw [Int.le_toNat (Int.floor_nonneg.2 ha), Int.le_floor, Int.cast_ofNat]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\na : α\nn : ℕ\n⊢ (fun a => toNat ⌈a⌉) a ≤ n ↔ a ≤ ↑n\n[PROOFSTEP]\nrw [Int.toNat_le, Int.ceil_le, Int.cast_ofNat]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\na : α\nha : 0 ≤ a\n⊢ ↑⌊a⌋₊ = ⌊a⌋\n[PROOFSTEP]\nrw [← Int.floor_toNat, Int.toNat_of_nonneg (Int.floor_nonneg.2 ha)]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\na : α\nha : 0 ≤ a\n⊢ ↑⌊a⌋₊ = ↑⌊a⌋\n[PROOFSTEP]\nrw [← Nat.cast_floor_eq_int_floor ha, Int.cast_ofNat]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\na : α\nha : 0 ≤ a\n⊢ ↑⌈a⌉₊ = ⌈a⌉\n[PROOFSTEP]\nrw [← Int.ceil_toNat, Int.toNat_of_nonneg (Int.ceil_nonneg ha)]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\na : α\nha : 0 ≤ a\n⊢ ↑⌈a⌉₊ = ↑⌈a⌉\n[PROOFSTEP]\nrw [← Nat.cast_ceil_eq_int_ceil ha, Int.cast_ofNat]\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedRing α\n⊢ Subsingleton (FloorRing α)\n[PROOFSTEP]\nrefine' ⟨fun H₁ H₂ => _⟩\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedRing α\nH₁ H₂ : FloorRing α\n⊢ H₁ = H₂\n[PROOFSTEP]\nhave : H₁.floor = H₂.floor := funext fun a => (H₁.gc_coe_floor.u_unique H₂.gc_coe_floor) fun _ => rfl\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedRing α\nH₁ H₂ : FloorRing α\nthis : FloorRing.floor = FloorRing.floor\n⊢ H₁ = H₂\n[PROOFSTEP]\nhave : H₁.ceil = H₂.ceil := funext fun a => (H₁.gc_ceil_coe.l_unique H₂.gc_ceil_coe) fun _ => rfl\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedRing α\nH₁ H₂ : FloorRing α\nthis✝ : FloorRing.floor = FloorRing.floor\nthis : FloorRing.ceil = FloorRing.ceil\n⊢ H₁ = H₂\n[PROOFSTEP]\ncases H₁\n[GOAL]\ncase mk\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedRing α\nH₂ : FloorRing α\nfloor✝ ceil✝ : α → ℤ\ngc_coe_floor✝ : GaloisConnection Int.cast floor✝\ngc_ceil_coe✝ : GaloisConnection ceil✝ Int.cast\nthis✝ : FloorRing.floor = FloorRing.floor\nthis : FloorRing.ceil = FloorRing.ceil\n⊢ { floor := floor✝, ceil := ceil✝, gc_coe_floor := gc_coe_floor✝, gc_ceil_coe := gc_ceil_coe✝ } = H₂\n[PROOFSTEP]\ncases H₂\n[GOAL]\ncase mk.mk\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\ninst✝ : LinearOrderedRing α\nfloor✝¹ ceil✝¹ : α → ℤ\ngc_coe_floor✝¹ : GaloisConnection Int.cast floor✝¹\ngc_ceil_coe✝¹ : GaloisConnection ceil✝¹ Int.cast\nfloor✝ ceil✝ : α → ℤ\ngc_coe_floor✝ : GaloisConnection Int.cast floor✝\ngc_ceil_coe✝ : GaloisConnection ceil✝ Int.cast\nthis✝ : FloorRing.floor = FloorRing.floor\nthis : FloorRing.ceil = FloorRing.ceil\n⊢ { floor := floor✝¹, ceil := ceil✝¹, gc_coe_floor := gc_coe_floor✝¹, gc_ceil_coe := gc_ceil_coe✝¹ } =\n { floor := floor✝, ceil := ceil✝, gc_coe_floor := gc_coe_floor✝, gc_ceil_coe := gc_ceil_coe✝ }\n[PROOFSTEP]\ncongr\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Floor", "llama_tokens": 60693, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8080672135527632, "lm_q2_score": 0.6893056231680121, "lm_q1q2_score": 0.5570052741996266}} {"text": "[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\ninst✝¹ : PartialOrder α\ninst✝ : PriestleySpace α\nx y : α\nh : x ≠ y\n⊢ ∃ U, IsClopen U ∧ (IsUpperSet U ∨ IsLowerSet U) ∧ x ∈ U ∧ ¬y ∈ U\n[PROOFSTEP]\nobtain h | h := h.not_le_or_not_le\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : TopologicalSpace α\ninst✝¹ : PartialOrder α\ninst✝ : PriestleySpace α\nx y : α\nh✝ : x ≠ y\nh : ¬x ≤ y\n⊢ ∃ U, IsClopen U ∧ (IsUpperSet U ∨ IsLowerSet U) ∧ x ∈ U ∧ ¬y ∈ U\n[PROOFSTEP]\nexact (exists_clopen_upper_of_not_le h).imp fun _ ↦ And.imp_right <| And.imp_left Or.inl\n[GOAL]\ncase inr\nα : Type u_1\ninst✝² : TopologicalSpace α\ninst✝¹ : PartialOrder α\ninst✝ : PriestleySpace α\nx y : α\nh✝ : x ≠ y\nh : ¬y ≤ x\n⊢ ∃ U, IsClopen U ∧ (IsUpperSet U ∨ IsLowerSet U) ∧ x ∈ U ∧ ¬y ∈ U\n[PROOFSTEP]\nobtain ⟨U, hU, hU', hy, hx⟩ := exists_clopen_lower_of_not_le h\n[GOAL]\ncase inr.intro.intro.intro.intro\nα : Type u_1\ninst✝² : TopologicalSpace α\ninst✝¹ : PartialOrder α\ninst✝ : PriestleySpace α\nx y : α\nh✝ : x ≠ y\nh : ¬y ≤ x\nU : Set α\nhU : IsClopen U\nhU' : IsLowerSet U\nhy : ¬y ∈ U\nhx : x ∈ U\n⊢ ∃ U, IsClopen U ∧ (IsUpperSet U ∨ IsLowerSet U) ∧ x ∈ U ∧ ¬y ∈ U\n[PROOFSTEP]\nexact ⟨U, hU, Or.inr hU', hx, hy⟩\n", "meta": {"mathlib_filename": "Mathlib.Topology.Order.Priestley", "llama_tokens": 621, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7549149868676283, "lm_q2_score": 0.7371581626286834, "lm_q1q2_score": 0.5564917446601975}} {"text": "[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedRing E\ninst✝³ : StarRing E\ninst✝² : CstarRing E\ninst✝¹ : NormedAlgebra 𝕜 E\ninst✝ : CompleteSpace E\nu : { x // x ∈ unitary E }\n⊢ spectrum 𝕜 ↑u ⊆ Metric.sphere 0 1\n[PROOFSTEP]\nnontriviality E\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedRing E\ninst✝³ : StarRing E\ninst✝² : CstarRing E\ninst✝¹ : NormedAlgebra 𝕜 E\ninst✝ : CompleteSpace E\nu : { x // x ∈ unitary E }\n✝ : Nontrivial E\n⊢ spectrum 𝕜 ↑u ⊆ Metric.sphere 0 1\n[PROOFSTEP]\nrefine' fun k hk => mem_sphere_zero_iff_norm.mpr (le_antisymm _ _)\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\ninst✝⁵ : NormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedRing E\ninst✝³ : StarRing E\ninst✝² : CstarRing E\ninst✝¹ : NormedAlgebra 𝕜 E\ninst✝ : CompleteSpace E\nu : { x // x ∈ unitary E }\n✝ : Nontrivial E\nk : 𝕜\nhk : k ∈ spectrum 𝕜 ↑u\n⊢ ‖k‖ ≤ 1\n[PROOFSTEP]\nsimpa only [CstarRing.norm_coe_unitary u] using norm_le_norm_of_mem hk\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\ninst✝⁵ : NormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedRing E\ninst✝³ : StarRing E\ninst✝² : CstarRing E\ninst✝¹ : NormedAlgebra 𝕜 E\ninst✝ : CompleteSpace E\nu : { x // x ∈ unitary E }\n✝ : Nontrivial E\nk : 𝕜\nhk : k ∈ spectrum 𝕜 ↑u\n⊢ 1 ≤ ‖k‖\n[PROOFSTEP]\nrw [← unitary.toUnits_apply_val u] at hk \n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\ninst✝⁵ : NormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedRing E\ninst✝³ : StarRing E\ninst✝² : CstarRing E\ninst✝¹ : NormedAlgebra 𝕜 E\ninst✝ : CompleteSpace E\nu : { x // x ∈ unitary E }\n✝ : Nontrivial E\nk : 𝕜\nhk : k ∈ spectrum 𝕜 ↑(↑toUnits u)\n⊢ 1 ≤ ‖k‖\n[PROOFSTEP]\nhave hnk := ne_zero_of_mem_of_unit hk\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\ninst✝⁵ : NormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedRing E\ninst✝³ : StarRing E\ninst✝² : CstarRing E\ninst✝¹ : NormedAlgebra 𝕜 E\ninst✝ : CompleteSpace E\nu : { x // x ∈ unitary E }\n✝ : Nontrivial E\nk : 𝕜\nhk : k ∈ spectrum 𝕜 ↑(↑toUnits u)\nhnk : k ≠ 0\n⊢ 1 ≤ ‖k‖\n[PROOFSTEP]\nrw [← inv_inv (unitary.toUnits u), ← spectrum.map_inv, Set.mem_inv] at hk \n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\ninst✝⁵ : NormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedRing E\ninst✝³ : StarRing E\ninst✝² : CstarRing E\ninst✝¹ : NormedAlgebra 𝕜 E\ninst✝ : CompleteSpace E\nu : { x // x ∈ unitary E }\n✝ : Nontrivial E\nk : 𝕜\nhk : k⁻¹ ∈ spectrum 𝕜 ↑(↑toUnits u)⁻¹\nhnk : k ≠ 0\n⊢ 1 ≤ ‖k‖\n[PROOFSTEP]\nhave : ‖k‖⁻¹ ≤ ‖(↑(unitary.toUnits u)⁻¹ : E)‖ := by simpa only [norm_inv] using norm_le_norm_of_mem hk\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedRing E\ninst✝³ : StarRing E\ninst✝² : CstarRing E\ninst✝¹ : NormedAlgebra 𝕜 E\ninst✝ : CompleteSpace E\nu : { x // x ∈ unitary E }\n✝ : Nontrivial E\nk : 𝕜\nhk : k⁻¹ ∈ spectrum 𝕜 ↑(↑toUnits u)⁻¹\nhnk : k ≠ 0\n⊢ ‖k‖⁻¹ ≤ ‖↑(↑toUnits u)⁻¹‖\n[PROOFSTEP]\nsimpa only [norm_inv] using norm_le_norm_of_mem hk\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\ninst✝⁵ : NormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedRing E\ninst✝³ : StarRing E\ninst✝² : CstarRing E\ninst✝¹ : NormedAlgebra 𝕜 E\ninst✝ : CompleteSpace E\nu : { x // x ∈ unitary E }\n✝ : Nontrivial E\nk : 𝕜\nhk : k⁻¹ ∈ spectrum 𝕜 ↑(↑toUnits u)⁻¹\nhnk : k ≠ 0\nthis : ‖k‖⁻¹ ≤ ‖↑(↑toUnits u)⁻¹‖\n⊢ 1 ≤ ‖k‖\n[PROOFSTEP]\nsimpa [← Units.inv_eq_val_inv] using inv_le_of_inv_le (norm_pos_iff.mpr hnk) this\n[GOAL]\nA : Type u_1\ninst✝⁴ : NormedRing A\ninst✝³ : NormedAlgebra ℂ A\ninst✝² : CompleteSpace A\ninst✝¹ : StarRing A\ninst✝ : CstarRing A\na : A\nha : IsSelfAdjoint a\n⊢ spectralRadius ℂ a = ↑‖a‖₊\n[PROOFSTEP]\nhave hconst : Tendsto (fun _n : ℕ => (‖a‖₊ : ℝ≥0∞)) atTop _ := tendsto_const_nhds\n[GOAL]\nA : Type u_1\ninst✝⁴ : NormedRing A\ninst✝³ : NormedAlgebra ℂ A\ninst✝² : CompleteSpace A\ninst✝¹ : StarRing A\ninst✝ : CstarRing A\na : A\nha : IsSelfAdjoint a\nhconst : Tendsto (fun _n => ↑‖a‖₊) atTop (𝓝 ↑‖a‖₊)\n⊢ spectralRadius ℂ a = ↑‖a‖₊\n[PROOFSTEP]\nrefine' tendsto_nhds_unique _ hconst\n[GOAL]\nA : Type u_1\ninst✝⁴ : NormedRing A\ninst✝³ : NormedAlgebra ℂ A\ninst✝² : CompleteSpace A\ninst✝¹ : StarRing A\ninst✝ : CstarRing A\na : A\nha : IsSelfAdjoint a\nhconst : Tendsto (fun _n => ↑‖a‖₊) atTop (𝓝 ↑‖a‖₊)\n⊢ Tendsto (fun _n => ↑‖a‖₊) atTop (𝓝 (spectralRadius ℂ a))\n[PROOFSTEP]\nconvert\n (spectrum.pow_nnnorm_pow_one_div_tendsto_nhds_spectralRadius (a : A)).comp\n (Nat.tendsto_pow_atTop_atTop_of_one_lt one_lt_two) using\n 1\n[GOAL]\ncase h.e'_3\nA : Type u_1\ninst✝⁴ : NormedRing A\ninst✝³ : NormedAlgebra ℂ A\ninst✝² : CompleteSpace A\ninst✝¹ : StarRing A\ninst✝ : CstarRing A\na : A\nha : IsSelfAdjoint a\nhconst : Tendsto (fun _n => ↑‖a‖₊) atTop (𝓝 ↑‖a‖₊)\n⊢ (fun _n => ↑‖a‖₊) = (fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) ∘ fun n => 2 ^ n\n[PROOFSTEP]\nrefine' funext fun n => _\n[GOAL]\ncase h.e'_3\nA : Type u_1\ninst✝⁴ : NormedRing A\ninst✝³ : NormedAlgebra ℂ A\ninst✝² : CompleteSpace A\ninst✝¹ : StarRing A\ninst✝ : CstarRing A\na : A\nha : IsSelfAdjoint a\nhconst : Tendsto (fun _n => ↑‖a‖₊) atTop (𝓝 ↑‖a‖₊)\nn : ℕ\n⊢ ↑‖a‖₊ = ((fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) ∘ fun n => 2 ^ n) n\n[PROOFSTEP]\nrw [Function.comp_apply, ha.nnnorm_pow_two_pow, ENNReal.coe_pow, ← rpow_nat_cast, ← rpow_mul]\n[GOAL]\ncase h.e'_3\nA : Type u_1\ninst✝⁴ : NormedRing A\ninst✝³ : NormedAlgebra ℂ A\ninst✝² : CompleteSpace A\ninst✝¹ : StarRing A\ninst✝ : CstarRing A\na : A\nha : IsSelfAdjoint a\nhconst : Tendsto (fun _n => ↑‖a‖₊) atTop (𝓝 ↑‖a‖₊)\nn : ℕ\n⊢ ↑‖a‖₊ = ↑‖a‖₊ ^ (↑(2 ^ n) * (1 / ↑(2 ^ n)))\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\na : A\ninst✝ : IsStarNormal a\n⊢ spectralRadius ℂ a = ↑‖a‖₊\n[PROOFSTEP]\nrefine' (ENNReal.pow_strictMono two_ne_zero).injective _\n[GOAL]\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\na : A\ninst✝ : IsStarNormal a\n⊢ spectralRadius ℂ a ^ 2 = ↑‖a‖₊ ^ 2\n[PROOFSTEP]\nhave heq :\n (fun n : ℕ => (‖(a⋆ * a) ^ n‖₊ : ℝ≥0∞) ^ (1 / n : ℝ)) =\n (fun x => x ^ 2) ∘ fun n : ℕ => (‖a ^ n‖₊ : ℝ≥0∞) ^ (1 / n : ℝ) :=\n by\n funext n\n rw [Function.comp_apply, ← rpow_nat_cast, ← rpow_mul, mul_comm, rpow_mul, rpow_nat_cast, ← coe_pow, sq, ←\n nnnorm_star_mul_self, Commute.mul_pow (star_comm_self' a), star_pow]\n[GOAL]\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\na : A\ninst✝ : IsStarNormal a\n⊢ (fun n => ↑‖(a⋆ * a) ^ n‖₊ ^ (1 / ↑n)) = (fun x => x ^ 2) ∘ fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)\n[PROOFSTEP]\nfunext n\n[GOAL]\ncase h\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\na : A\ninst✝ : IsStarNormal a\nn : ℕ\n⊢ ↑‖(a⋆ * a) ^ n‖₊ ^ (1 / ↑n) = ((fun x => x ^ 2) ∘ fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) n\n[PROOFSTEP]\nrw [Function.comp_apply, ← rpow_nat_cast, ← rpow_mul, mul_comm, rpow_mul, rpow_nat_cast, ← coe_pow, sq, ←\n nnnorm_star_mul_self, Commute.mul_pow (star_comm_self' a), star_pow]\n[GOAL]\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\na : A\ninst✝ : IsStarNormal a\nheq : (fun n => ↑‖(a⋆ * a) ^ n‖₊ ^ (1 / ↑n)) = (fun x => x ^ 2) ∘ fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)\n⊢ spectralRadius ℂ a ^ 2 = ↑‖a‖₊ ^ 2\n[PROOFSTEP]\nhave h₂ :=\n ((ENNReal.continuous_pow 2).tendsto (spectralRadius ℂ a)).comp\n (spectrum.pow_nnnorm_pow_one_div_tendsto_nhds_spectralRadius a)\n[GOAL]\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\na : A\ninst✝ : IsStarNormal a\nheq : (fun n => ↑‖(a⋆ * a) ^ n‖₊ ^ (1 / ↑n)) = (fun x => x ^ 2) ∘ fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)\nh₂ : Tendsto ((fun a => a ^ 2) ∘ fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) atTop (𝓝 (spectralRadius ℂ a ^ 2))\n⊢ spectralRadius ℂ a ^ 2 = ↑‖a‖₊ ^ 2\n[PROOFSTEP]\nrw [← heq] at h₂ \n[GOAL]\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\na : A\ninst✝ : IsStarNormal a\nheq : (fun n => ↑‖(a⋆ * a) ^ n‖₊ ^ (1 / ↑n)) = (fun x => x ^ 2) ∘ fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)\nh₂ : Tendsto (fun n => ↑‖(a⋆ * a) ^ n‖₊ ^ (1 / ↑n)) atTop (𝓝 (spectralRadius ℂ a ^ 2))\n⊢ spectralRadius ℂ a ^ 2 = ↑‖a‖₊ ^ 2\n[PROOFSTEP]\nconvert tendsto_nhds_unique h₂ (pow_nnnorm_pow_one_div_tendsto_nhds_spectralRadius (a⋆ * a))\n[GOAL]\ncase h.e'_3\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\na : A\ninst✝ : IsStarNormal a\nheq : (fun n => ↑‖(a⋆ * a) ^ n‖₊ ^ (1 / ↑n)) = (fun x => x ^ 2) ∘ fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)\nh₂ : Tendsto (fun n => ↑‖(a⋆ * a) ^ n‖₊ ^ (1 / ↑n)) atTop (𝓝 (spectralRadius ℂ a ^ 2))\n⊢ ↑‖a‖₊ ^ 2 = spectralRadius ℂ (a⋆ * a)\n[PROOFSTEP]\nrw [(IsSelfAdjoint.star_mul_self a).spectralRadius_eq_nnnorm, sq, nnnorm_star_mul_self, coe_mul]\n[GOAL]\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\ninst✝ : StarModule ℂ A\na : A\nha : IsSelfAdjoint a\nz : ℂ\nhz : z ∈ spectrum ℂ a\n⊢ z = ↑z.re\n[PROOFSTEP]\nhave hu := exp_mem_unitary_of_mem_skewAdjoint ℂ (ha.smul_mem_skewAdjoint conj_I)\n[GOAL]\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\ninst✝ : StarModule ℂ A\na : A\nha : IsSelfAdjoint a\nz : ℂ\nhz : z ∈ spectrum ℂ a\nhu : _root_.exp ℂ (I • a) ∈ unitary A\n⊢ z = ↑z.re\n[PROOFSTEP]\nlet Iu := Units.mk0 I I_ne_zero\n[GOAL]\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\ninst✝ : StarModule ℂ A\na : A\nha : IsSelfAdjoint a\nz : ℂ\nhz : z ∈ spectrum ℂ a\nhu : _root_.exp ℂ (I • a) ∈ unitary A\nIu : ℂˣ := Units.mk0 I I_ne_zero\n⊢ z = ↑z.re\n[PROOFSTEP]\nhave : _root_.exp ℂ (I • z) ∈ spectrum ℂ (_root_.exp ℂ (I • a)) := by\n simpa only [Units.smul_def, Units.val_mk0] using spectrum.exp_mem_exp (Iu • a) (smul_mem_smul_iff.mpr hz)\n[GOAL]\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\ninst✝ : StarModule ℂ A\na : A\nha : IsSelfAdjoint a\nz : ℂ\nhz : z ∈ spectrum ℂ a\nhu : _root_.exp ℂ (I • a) ∈ unitary A\nIu : ℂˣ := Units.mk0 I I_ne_zero\n⊢ _root_.exp ℂ (I • z) ∈ spectrum ℂ (_root_.exp ℂ (I • a))\n[PROOFSTEP]\nsimpa only [Units.smul_def, Units.val_mk0] using spectrum.exp_mem_exp (Iu • a) (smul_mem_smul_iff.mpr hz)\n[GOAL]\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\ninst✝ : StarModule ℂ A\na : A\nha : IsSelfAdjoint a\nz : ℂ\nhz : z ∈ spectrum ℂ a\nhu : _root_.exp ℂ (I • a) ∈ unitary A\nIu : ℂˣ := Units.mk0 I I_ne_zero\nthis : _root_.exp ℂ (I • z) ∈ spectrum ℂ (_root_.exp ℂ (I • a))\n⊢ z = ↑z.re\n[PROOFSTEP]\nexact\n Complex.ext (ofReal_re _) <| by\n simpa only [← Complex.exp_eq_exp_ℂ, mem_sphere_zero_iff_norm, norm_eq_abs, abs_exp, Real.exp_eq_one_iff,\n smul_eq_mul, I_mul, neg_eq_zero] using spectrum.subset_circle_of_unitary hu this\n[GOAL]\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\ninst✝ : StarModule ℂ A\na : A\nha : IsSelfAdjoint a\nz : ℂ\nhz : z ∈ spectrum ℂ a\nhu : _root_.exp ℂ (I • a) ∈ unitary A\nIu : ℂˣ := Units.mk0 I I_ne_zero\nthis : _root_.exp ℂ (I • z) ∈ spectrum ℂ (_root_.exp ℂ (I • a))\n⊢ z.im = (↑z.re).im\n[PROOFSTEP]\nsimpa only [← Complex.exp_eq_exp_ℂ, mem_sphere_zero_iff_norm, norm_eq_abs, abs_exp, Real.exp_eq_one_iff, smul_eq_mul,\n I_mul, neg_eq_zero] using spectrum.subset_circle_of_unitary hu this\n[GOAL]\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\ninst✝ : StarModule ℂ A\na : A\nha : IsSelfAdjoint a\nz : ℂ\n⊢ z ∈ ofReal' ∘ re '' spectrum ℂ a → z ∈ spectrum ℂ a\n[PROOFSTEP]\nrintro ⟨z, hz, rfl⟩\n[GOAL]\ncase intro.intro\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\ninst✝ : StarModule ℂ A\na : A\nha : IsSelfAdjoint a\nz : ℂ\nhz : z ∈ spectrum ℂ a\n⊢ (ofReal' ∘ re) z ∈ spectrum ℂ a\n[PROOFSTEP]\nsimpa only [(ha.mem_spectrum_eq_re hz).symm, Function.comp_apply] using hz\n[GOAL]\nF : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁹ : NormedRing A\ninst✝⁸ : NormedAlgebra ℂ A\ninst✝⁷ : CompleteSpace A\ninst✝⁶ : StarRing A\ninst✝⁵ : CstarRing A\ninst✝⁴ : NormedRing B\ninst✝³ : NormedAlgebra ℂ B\ninst✝² : CompleteSpace B\ninst✝¹ : StarRing B\ninst✝ : CstarRing B\nhF : StarAlgHomClass F ℂ A B\nφ : F\na : A\n⊢ ‖↑φ a‖₊ ≤ ‖a‖₊\n[PROOFSTEP]\nsuffices ∀ s : A, IsSelfAdjoint s → ‖φ s‖₊ ≤ ‖s‖₊ by\n exact\n nonneg_le_nonneg_of_sq_le_sq zero_le' <| by\n simpa only [nnnorm_star_mul_self, map_star, map_mul] using this _ (IsSelfAdjoint.star_mul_self a)\n[GOAL]\nF : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁹ : NormedRing A\ninst✝⁸ : NormedAlgebra ℂ A\ninst✝⁷ : CompleteSpace A\ninst✝⁶ : StarRing A\ninst✝⁵ : CstarRing A\ninst✝⁴ : NormedRing B\ninst✝³ : NormedAlgebra ℂ B\ninst✝² : CompleteSpace B\ninst✝¹ : StarRing B\ninst✝ : CstarRing B\nhF : StarAlgHomClass F ℂ A B\nφ : F\na : A\nthis : ∀ (s : A), IsSelfAdjoint s → ‖↑φ s‖₊ ≤ ‖s‖₊\n⊢ ‖↑φ a‖₊ ≤ ‖a‖₊\n[PROOFSTEP]\nexact\n nonneg_le_nonneg_of_sq_le_sq zero_le' <| by\n simpa only [nnnorm_star_mul_self, map_star, map_mul] using this _ (IsSelfAdjoint.star_mul_self a)\n[GOAL]\nF : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁹ : NormedRing A\ninst✝⁸ : NormedAlgebra ℂ A\ninst✝⁷ : CompleteSpace A\ninst✝⁶ : StarRing A\ninst✝⁵ : CstarRing A\ninst✝⁴ : NormedRing B\ninst✝³ : NormedAlgebra ℂ B\ninst✝² : CompleteSpace B\ninst✝¹ : StarRing B\ninst✝ : CstarRing B\nhF : StarAlgHomClass F ℂ A B\nφ : F\na : A\nthis : ∀ (s : A), IsSelfAdjoint s → ‖↑φ s‖₊ ≤ ‖s‖₊\n⊢ ‖↑φ a‖₊ * ‖↑φ a‖₊ ≤ ‖a‖₊ * ‖a‖₊\n[PROOFSTEP]\nsimpa only [nnnorm_star_mul_self, map_star, map_mul] using this _ (IsSelfAdjoint.star_mul_self a)\n[GOAL]\nF : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁹ : NormedRing A\ninst✝⁸ : NormedAlgebra ℂ A\ninst✝⁷ : CompleteSpace A\ninst✝⁶ : StarRing A\ninst✝⁵ : CstarRing A\ninst✝⁴ : NormedRing B\ninst✝³ : NormedAlgebra ℂ B\ninst✝² : CompleteSpace B\ninst✝¹ : StarRing B\ninst✝ : CstarRing B\nhF : StarAlgHomClass F ℂ A B\nφ : F\na : A\n⊢ ∀ (s : A), IsSelfAdjoint s → ‖↑φ s‖₊ ≤ ‖s‖₊\n[PROOFSTEP]\nintro s hs\n[GOAL]\nF : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁹ : NormedRing A\ninst✝⁸ : NormedAlgebra ℂ A\ninst✝⁷ : CompleteSpace A\ninst✝⁶ : StarRing A\ninst✝⁵ : CstarRing A\ninst✝⁴ : NormedRing B\ninst✝³ : NormedAlgebra ℂ B\ninst✝² : CompleteSpace B\ninst✝¹ : StarRing B\ninst✝ : CstarRing B\nhF : StarAlgHomClass F ℂ A B\nφ : F\na s : A\nhs : IsSelfAdjoint s\n⊢ ‖↑φ s‖₊ ≤ ‖s‖₊\n[PROOFSTEP]\nsimpa only [hs.spectralRadius_eq_nnnorm, (hs.starHom_apply φ).spectralRadius_eq_nnnorm, coe_le_coe] using\n show spectralRadius ℂ (φ s) ≤ spectralRadius ℂ s from iSup_le_iSup_of_subset (AlgHom.spectrum_apply_subset φ s)\n[GOAL]\nF : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁹ : NormedRing A\ninst✝⁸ : NormedAlgebra ℂ A\ninst✝⁷ : CompleteSpace A\ninst✝⁶ : StarRing A\ninst✝⁵ : CstarRing A\ninst✝⁴ : NormedRing B\ninst✝³ : NormedAlgebra ℂ B\ninst✝² : CompleteSpace B\ninst✝¹ : StarRing B\ninst✝ : CstarRing B\nhF : StarAlgHomClass F ℂ A B\nφ✝ : F\nsrc✝ : LinearMapClass F ℂ A B := AlgHomClass.linearMapClass\nφ : F\n⊢ ∀ (x : A), ‖↑φ x‖ ≤ 1 * ‖x‖\n[PROOFSTEP]\nsimpa only [one_mul] using nnnorm_apply_le φ\n[GOAL]\nF : Type u_1\nA : Type u_2\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\ninst✝ : StarModule ℂ A\nhF : AlgHomClass F ℂ A ℂ\nφ : F\na : A\n⊢ ↑φ a⋆ = (↑φ a)⋆\n[PROOFSTEP]\nsuffices hsa : ∀ s : selfAdjoint A, (φ s)⋆ = φ s\n[GOAL]\nF : Type u_1\nA : Type u_2\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\ninst✝ : StarModule ℂ A\nhF : AlgHomClass F ℂ A ℂ\nφ : F\na : A\nhsa : ∀ (s : { x // x ∈ selfAdjoint A }), (↑φ ↑s)⋆ = ↑φ ↑s\n⊢ ↑φ a⋆ = (↑φ a)⋆\n[PROOFSTEP]\nrw [← realPart_add_I_smul_imaginaryPart a]\n[GOAL]\nF : Type u_1\nA : Type u_2\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\ninst✝ : StarModule ℂ A\nhF : AlgHomClass F ℂ A ℂ\nφ : F\na : A\nhsa : ∀ (s : { x // x ∈ selfAdjoint A }), (↑φ ↑s)⋆ = ↑φ ↑s\n⊢ ↑φ (↑(↑ℜ a) + I • ↑(↑ℑ a))⋆ = (↑φ (↑(↑ℜ a) + I • ↑(↑ℑ a)))⋆\n[PROOFSTEP]\nsimp only [map_add, map_smul, star_add, star_smul, hsa, selfAdjoint.star_val_eq]\n[GOAL]\ncase hsa\nF : Type u_1\nA : Type u_2\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\ninst✝ : StarModule ℂ A\nhF : AlgHomClass F ℂ A ℂ\nφ : F\na : A\n⊢ ∀ (s : { x // x ∈ selfAdjoint A }), (↑φ ↑s)⋆ = ↑φ ↑s\n[PROOFSTEP]\nintro s\n[GOAL]\ncase hsa\nF : Type u_1\nA : Type u_2\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\ninst✝ : StarModule ℂ A\nhF : AlgHomClass F ℂ A ℂ\nφ : F\na : A\ns : { x // x ∈ selfAdjoint A }\n⊢ (↑φ ↑s)⋆ = ↑φ ↑s\n[PROOFSTEP]\nhave := AlgHom.apply_mem_spectrum φ (s : A)\n[GOAL]\ncase hsa\nF : Type u_1\nA : Type u_2\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\ninst✝ : StarModule ℂ A\nhF : AlgHomClass F ℂ A ℂ\nφ : F\na : A\ns : { x // x ∈ selfAdjoint A }\nthis : ↑φ ↑s ∈ spectrum ℂ ↑s\n⊢ (↑φ ↑s)⋆ = ↑φ ↑s\n[PROOFSTEP]\nrw [selfAdjoint.val_re_map_spectrum s] at this \n[GOAL]\ncase hsa\nF : Type u_1\nA : Type u_2\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\ninst✝ : StarModule ℂ A\nhF : AlgHomClass F ℂ A ℂ\nφ : F\na : A\ns : { x // x ∈ selfAdjoint A }\nthis : ↑φ ↑s ∈ ofReal' ∘ re '' spectrum ℂ ↑s\n⊢ (↑φ ↑s)⋆ = ↑φ ↑s\n[PROOFSTEP]\nrcases this with ⟨⟨_, _⟩, _, heq⟩\n[GOAL]\ncase hsa.intro.mk.intro\nF : Type u_1\nA : Type u_2\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\ninst✝ : StarModule ℂ A\nhF : AlgHomClass F ℂ A ℂ\nφ : F\na : A\ns : { x // x ∈ selfAdjoint A }\nre✝ im✝ : ℝ\nleft✝ : { re := re✝, im := im✝ } ∈ spectrum ℂ ↑s\nheq : (ofReal' ∘ re) { re := re✝, im := im✝ } = ↑φ ↑s\n⊢ (↑φ ↑s)⋆ = ↑φ ↑s\n[PROOFSTEP]\nsimp only [Function.comp_apply] at heq \n[GOAL]\ncase hsa.intro.mk.intro\nF : Type u_1\nA : Type u_2\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\ninst✝ : StarModule ℂ A\nhF : AlgHomClass F ℂ A ℂ\nφ : F\na : A\ns : { x // x ∈ selfAdjoint A }\nre✝ im✝ : ℝ\nleft✝ : { re := re✝, im := im✝ } ∈ spectrum ℂ ↑s\nheq : ↑re✝ = ↑φ ↑s\n⊢ (↑φ ↑s)⋆ = ↑φ ↑s\n[PROOFSTEP]\nrw [← heq, IsROrC.star_def]\n[GOAL]\ncase hsa.intro.mk.intro\nF : Type u_1\nA : Type u_2\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : CompleteSpace A\ninst✝² : StarRing A\ninst✝¹ : CstarRing A\ninst✝ : StarModule ℂ A\nhF : AlgHomClass F ℂ A ℂ\nφ : F\na : A\ns : { x // x ∈ selfAdjoint A }\nre✝ im✝ : ℝ\nleft✝ : { re := re✝, im := im✝ } ∈ spectrum ℂ ↑s\nheq : ↑re✝ = ↑φ ↑s\n⊢ ↑(starRingEnd ((fun x => ℂ) ↑s)) ↑re✝ = ↑re✝\n[PROOFSTEP]\nexact IsROrC.conj_ofReal _\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.Star.Spectrum", "llama_tokens": 10016, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8152324983301568, "lm_q2_score": 0.6825737473266735, "lm_q1q2_score": 0.5564563013277012}} {"text": "[GOAL]\nα✝ : Sort u_1\nβ✝ : Sort u_2\nγ : Sort u_3\np✝ q✝ : α✝ → Prop\nα β : Sort u_4\np : α → Prop\nq : β → Prop\na : { x // p x }\nb : { y // q y }\nh : α = β\nh' : HEq p q\n⊢ HEq a b ↔ HEq ↑a ↑b\n[PROOFSTEP]\nsubst h\n[GOAL]\nα✝ : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\np✝ q✝ : α✝ → Prop\nα : Sort u_4\np : α → Prop\na : { x // p x }\nq : α → Prop\nb : { y // q y }\nh' : HEq p q\n⊢ HEq a b ↔ HEq ↑a ↑b\n[PROOFSTEP]\nsubst h'\n[GOAL]\nα✝ : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\np✝ q : α✝ → Prop\nα : Sort u_4\np : α → Prop\na b : { y // p y }\n⊢ HEq a b ↔ HEq ↑a ↑b\n[PROOFSTEP]\nrw [heq_iff_eq, heq_iff_eq, ext_iff]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\np q : α → Prop\na : Subtype p\nb : α\n⊢ (∃ h, { val := b, property := h } = a) ↔ b = ↑a\n[PROOFSTEP]\nsimp only [@eq_comm _ b, exists_eq_subtype_mk_iff, @eq_comm _ _ a]\n[GOAL]\nα✝ : Sort u_1\nβ✝ : Sort u_2\nγ : Sort u_3\np✝ q : α✝ → Prop\nα : Sort u_5\nβ : α → Type u_4\nf : (x : α) → β x\np : α → Prop\nx : Subtype p\n⊢ restrict p f x = f ↑x\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Sort u_1\nβ✝ : Sort u_2\nγ : Sort u_3\np✝ q : α✝ → Prop\nα : Sort u_5\nβ : α → Type u_4\nne : ∀ (a : α), Nonempty (β a)\np : α → Prop\n⊢ Surjective fun f => restrict p f\n[PROOFSTEP]\nletI := Classical.decPred p\n[GOAL]\nα✝ : Sort u_1\nβ✝ : Sort u_2\nγ : Sort u_3\np✝ q : α✝ → Prop\nα : Sort u_5\nβ : α → Type u_4\nne : ∀ (a : α), Nonempty (β a)\np : α → Prop\nthis : DecidablePred p := Classical.decPred p\n⊢ Surjective fun f => restrict p f\n[PROOFSTEP]\nrefine' fun f ↦ ⟨fun x ↦ if h : p x then f ⟨x, h⟩ else Nonempty.some (ne x), funext <| _⟩\n[GOAL]\nα✝ : Sort u_1\nβ✝ : Sort u_2\nγ : Sort u_3\np✝ q : α✝ → Prop\nα : Sort u_5\nβ : α → Type u_4\nne : ∀ (a : α), Nonempty (β a)\np : α → Prop\nthis : DecidablePred p := Classical.decPred p\nf : (x : Subtype p) → β ↑x\n⊢ ∀ (x : Subtype p),\n (fun f => restrict p f)\n (fun x => if h : p x then f { val := x, property := h } else Nonempty.some (_ : Nonempty (β x))) x =\n f x\n[PROOFSTEP]\nrintro ⟨x, hx⟩\n[GOAL]\ncase mk\nα✝ : Sort u_1\nβ✝ : Sort u_2\nγ : Sort u_3\np✝ q : α✝ → Prop\nα : Sort u_5\nβ : α → Type u_4\nne : ∀ (a : α), Nonempty (β a)\np : α → Prop\nthis : DecidablePred p := Classical.decPred p\nf : (x : Subtype p) → β ↑x\nx : α\nhx : p x\n⊢ (fun f => restrict p f)\n (fun x => if h : p x then f { val := x, property := h } else Nonempty.some (_ : Nonempty (β x)))\n { val := x, property := hx } =\n f { val := x, property := hx }\n[PROOFSTEP]\nexact dif_pos hx\n[GOAL]\nα✝ : Sort u_1\nβ✝ : Sort u_2\nγ : Sort u_3\np✝ q : α✝ → Prop\nα : Sort u_4\nβ : Sort u_5\nf : α → β\np : β → Prop\nh : ∀ (a : α), p (f a)\nhf : Injective f\nx y : α\nhxy : coind f h x = coind f h y\n⊢ f x = f y\n[PROOFSTEP]\napply congr_arg Subtype.val hxy\n", "meta": {"mathlib_filename": "Mathlib.Data.Subtype", "llama_tokens": 1384, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.815232489352, "lm_q2_score": 0.6825737279551495, "lm_q1q2_score": 0.5564562794071514}} {"text": "[GOAL]\nR : Type u_1\ninst✝¹ : Semigroup R\ninst✝ : StarSemigroup R\na : R\ns : Set R\nha : a ∈ center R\n⊢ star a ∈ center R\n[PROOFSTEP]\nsimpa only [star_mul, star_star] using fun g => congr_arg star ((Set.mem_center_iff R).mp ha <| star g).symm\n[GOAL]\nR : Type u_1\ninst✝¹ : Semigroup R\ninst✝ : StarSemigroup R\na : R\ns : Set R\nh : ∀ (a : R), a ∈ s → star a ∈ s\nha : a ∈ centralizer s\ny : R\nhy : y ∈ s\n⊢ y * star a = star a * y\n[PROOFSTEP]\nsimpa using congr_arg star (ha _ (h _ hy)).symm\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Star.Center", "llama_tokens": 227, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8031738057795402, "lm_q2_score": 0.6926419767901475, "lm_q1q2_score": 0.5563118925412067}} {"text": "[GOAL]\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\nc : V\nx y : P\n⊢ dist (c +ᵥ x) (c +ᵥ y) = dist x y\n[PROOFSTEP]\nrw [NormedAddTorsor.dist_eq_norm', NormedAddTorsor.dist_eq_norm', vadd_vsub_vadd_cancel_left]\n[GOAL]\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\nv₁ v₂ : V\nx : P\n⊢ dist (v₁ +ᵥ x) (v₂ +ᵥ x) = dist v₁ v₂\n[PROOFSTEP]\nrw [dist_eq_norm_vsub V, dist_eq_norm, vadd_vsub_vadd_cancel_right]\n[GOAL]\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\nv : V\nx : P\n⊢ dist (v +ᵥ x) x = ‖v‖\n[PROOFSTEP]\nrw [dist_eq_norm_vsub V _ x, vadd_vsub]\n[GOAL]\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\nv : V\nx : P\n⊢ dist x (v +ᵥ x) = ‖v‖\n[PROOFSTEP]\nrw [dist_comm, dist_vadd_left]\n[GOAL]\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\nx y z : P\n⊢ dist (x -ᵥ y) (x -ᵥ z) = dist y z\n[PROOFSTEP]\nrw [dist_eq_norm, vsub_sub_vsub_cancel_left, dist_comm, dist_eq_norm_vsub V]\n[GOAL]\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\nv v' : V\np p' : P\n⊢ dist (v +ᵥ p) (v' +ᵥ p') ≤ dist v v' + dist p p'\n[PROOFSTEP]\nsimpa [(dist_vadd_cancel_right)] using dist_triangle (v +ᵥ p) (v' +ᵥ p) (v' +ᵥ p')\n[GOAL]\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\np₁ p₂ p₃ p₄ : P\n⊢ dist (p₁ -ᵥ p₂) (p₃ -ᵥ p₄) ≤ dist p₁ p₃ + dist p₂ p₄\n[PROOFSTEP]\nrw [dist_eq_norm, vsub_sub_vsub_comm, dist_eq_norm_vsub V, dist_eq_norm_vsub V]\n[GOAL]\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\np₁ p₂ p₃ p₄ : P\n⊢ ‖p₁ -ᵥ p₃ - (p₂ -ᵥ p₄)‖ ≤ ‖p₁ -ᵥ p₃‖ + ‖p₂ -ᵥ p₄‖\n[PROOFSTEP]\nexact norm_sub_le _ _\n[GOAL]\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\np₁ p₂ p₃ p₄ : P\n⊢ nndist (p₁ -ᵥ p₂) (p₃ -ᵥ p₄) ≤ nndist p₁ p₃ + nndist p₂ p₄\n[PROOFSTEP]\nsimp only [← NNReal.coe_le_coe, NNReal.coe_add, ← dist_nndist, (dist_vsub_vsub_le)]\n[GOAL]\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\nv v' : V\np p' : P\n⊢ edist (v +ᵥ p) (v' +ᵥ p') ≤ edist v v' + edist p p'\n[PROOFSTEP]\nsimp only [edist_nndist]\n[GOAL]\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\nv v' : V\np p' : P\n⊢ ↑(nndist (v +ᵥ p) (v' +ᵥ p')) ≤ ↑(nndist v v') + ↑(nndist p p')\n[PROOFSTEP]\nnorm_cast\n -- porting note: was apply_mod_cast\n[GOAL]\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\nv v' : V\np p' : P\n⊢ nndist (v +ᵥ p) (v' +ᵥ p') ≤ nndist v v' + nndist p p'\n[PROOFSTEP]\napply dist_vadd_vadd_le\n[GOAL]\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\np₁ p₂ p₃ p₄ : P\n⊢ edist (p₁ -ᵥ p₂) (p₃ -ᵥ p₄) ≤ edist p₁ p₃ + edist p₂ p₄\n[PROOFSTEP]\nsimp only [edist_nndist]\n[GOAL]\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\np₁ p₂ p₃ p₄ : P\n⊢ ↑(nndist (p₁ -ᵥ p₂) (p₃ -ᵥ p₄)) ≤ ↑(nndist p₁ p₃) + ↑(nndist p₂ p₄)\n[PROOFSTEP]\nnorm_cast\n -- porting note: was apply_mod_cast\n[GOAL]\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\np₁ p₂ p₃ p₄ : P\n⊢ nndist (p₁ -ᵥ p₂) (p₃ -ᵥ p₄) ≤ nndist p₁ p₃ + nndist p₂ p₄\n[PROOFSTEP]\napply dist_vsub_vsub_le\n[GOAL]\nα : Type u_1\nV✝ : Type u_2\nP✝ : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V✝\ninst✝⁶ : PseudoMetricSpace P✝\ninst✝⁵ : NormedAddTorsor V✝ P✝\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\nV : Type u_6\nP : Type u_7\ninst✝¹ : SeminormedAddCommGroup V\ninst✝ : AddTorsor V P\nx : P\n⊢ dist x x = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nV✝ : Type u_2\nP✝ : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V✝\ninst✝⁶ : PseudoMetricSpace P✝\ninst✝⁵ : NormedAddTorsor V✝ P✝\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\nV : Type u_6\nP : Type u_7\ninst✝¹ : SeminormedAddCommGroup V\ninst✝ : AddTorsor V P\nx y : P\n⊢ dist x y = dist y x\n[PROOFSTEP]\nsimp only [← neg_vsub_eq_vsub_rev y x, norm_neg]\n[GOAL]\nα : Type u_1\nV✝ : Type u_2\nP✝ : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V✝\ninst✝⁶ : PseudoMetricSpace P✝\ninst✝⁵ : NormedAddTorsor V✝ P✝\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\nV : Type u_6\nP : Type u_7\ninst✝¹ : SeminormedAddCommGroup V\ninst✝ : AddTorsor V P\nx y z : P\n⊢ dist x z ≤ dist x y + dist y z\n[PROOFSTEP]\nchange ‖x -ᵥ z‖ ≤ ‖x -ᵥ y‖ + ‖y -ᵥ z‖\n[GOAL]\nα : Type u_1\nV✝ : Type u_2\nP✝ : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V✝\ninst✝⁶ : PseudoMetricSpace P✝\ninst✝⁵ : NormedAddTorsor V✝ P✝\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\nV : Type u_6\nP : Type u_7\ninst✝¹ : SeminormedAddCommGroup V\ninst✝ : AddTorsor V P\nx y z : P\n⊢ ‖x -ᵥ z‖ ≤ ‖x -ᵥ y‖ + ‖y -ᵥ z‖\n[PROOFSTEP]\nrw [← vsub_add_vsub_cancel]\n[GOAL]\nα : Type u_1\nV✝ : Type u_2\nP✝ : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V✝\ninst✝⁶ : PseudoMetricSpace P✝\ninst✝⁵ : NormedAddTorsor V✝ P✝\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\nV : Type u_6\nP : Type u_7\ninst✝¹ : SeminormedAddCommGroup V\ninst✝ : AddTorsor V P\nx y z : P\n⊢ ‖x -ᵥ ?p2 + (?p2 -ᵥ z)‖ ≤ ‖x -ᵥ y‖ + ‖y -ᵥ z‖\ncase p2\nα : Type u_1\nV✝ : Type u_2\nP✝ : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V✝\ninst✝⁶ : PseudoMetricSpace P✝\ninst✝⁵ : NormedAddTorsor V✝ P✝\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\nV : Type u_6\nP : Type u_7\ninst✝¹ : SeminormedAddCommGroup V\ninst✝ : AddTorsor V P\nx y z : P\n⊢ P\n[PROOFSTEP]\napply norm_add_le\n[GOAL]\nα : Type u_1\nV✝ : Type u_2\nP✝ : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V✝\ninst✝⁶ : PseudoMetricSpace P✝\ninst✝⁵ : NormedAddTorsor V✝ P✝\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\nV : Type u_6\nP : Type u_7\ninst✝¹ : SeminormedAddCommGroup V\ninst✝ : AddTorsor V P\nx✝¹ x✝ : P\n⊢ (fun x y => ↑{ val := ‖x -ᵥ y‖, property := (_ : 0 ≤ ‖x -ᵥ y‖) }) x✝¹ x✝ = ENNReal.ofReal (dist x✝¹ x✝)\n[PROOFSTEP]\nsimp only [← ENNReal.ofReal_eq_coe_nnreal]\n[GOAL]\nα : Type u_1\nV✝ : Type u_2\nP✝ : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V✝\ninst✝⁶ : PseudoMetricSpace P✝\ninst✝⁵ : NormedAddTorsor V✝ P✝\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\nV : Type u_6\nP : Type u_7\ninst✝¹ : NormedAddCommGroup V\ninst✝ : AddTorsor V P\nx : P\n⊢ dist x x = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nV✝ : Type u_2\nP✝ : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V✝\ninst✝⁶ : PseudoMetricSpace P✝\ninst✝⁵ : NormedAddTorsor V✝ P✝\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\nV : Type u_6\nP : Type u_7\ninst✝¹ : NormedAddCommGroup V\ninst✝ : AddTorsor V P\nx y : P\n⊢ dist x y = dist y x\n[PROOFSTEP]\nsimp only [← neg_vsub_eq_vsub_rev y x, norm_neg]\n[GOAL]\nα : Type u_1\nV✝ : Type u_2\nP✝ : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V✝\ninst✝⁶ : PseudoMetricSpace P✝\ninst✝⁵ : NormedAddTorsor V✝ P✝\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\nV : Type u_6\nP : Type u_7\ninst✝¹ : NormedAddCommGroup V\ninst✝ : AddTorsor V P\nx y z : P\n⊢ dist x z ≤ dist x y + dist y z\n[PROOFSTEP]\nchange ‖x -ᵥ z‖ ≤ ‖x -ᵥ y‖ + ‖y -ᵥ z‖\n[GOAL]\nα : Type u_1\nV✝ : Type u_2\nP✝ : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V✝\ninst✝⁶ : PseudoMetricSpace P✝\ninst✝⁵ : NormedAddTorsor V✝ P✝\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\nV : Type u_6\nP : Type u_7\ninst✝¹ : NormedAddCommGroup V\ninst✝ : AddTorsor V P\nx y z : P\n⊢ ‖x -ᵥ z‖ ≤ ‖x -ᵥ y‖ + ‖y -ᵥ z‖\n[PROOFSTEP]\nrw [← vsub_add_vsub_cancel]\n[GOAL]\nα : Type u_1\nV✝ : Type u_2\nP✝ : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V✝\ninst✝⁶ : PseudoMetricSpace P✝\ninst✝⁵ : NormedAddTorsor V✝ P✝\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\nV : Type u_6\nP : Type u_7\ninst✝¹ : NormedAddCommGroup V\ninst✝ : AddTorsor V P\nx y z : P\n⊢ ‖x -ᵥ ?p2 + (?p2 -ᵥ z)‖ ≤ ‖x -ᵥ y‖ + ‖y -ᵥ z‖\ncase p2\nα : Type u_1\nV✝ : Type u_2\nP✝ : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V✝\ninst✝⁶ : PseudoMetricSpace P✝\ninst✝⁵ : NormedAddTorsor V✝ P✝\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\nV : Type u_6\nP : Type u_7\ninst✝¹ : NormedAddCommGroup V\ninst✝ : AddTorsor V P\nx y z : P\n⊢ P\n[PROOFSTEP]\napply norm_add_le\n[GOAL]\nα : Type u_1\nV✝ : Type u_2\nP✝ : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V✝\ninst✝⁶ : PseudoMetricSpace P✝\ninst✝⁵ : NormedAddTorsor V✝ P✝\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\nV : Type u_6\nP : Type u_7\ninst✝¹ : NormedAddCommGroup V\ninst✝ : AddTorsor V P\nx✝¹ x✝ : P\n⊢ (fun x y => ↑{ val := ‖x -ᵥ y‖, property := (_ : 0 ≤ ‖x -ᵥ y‖) }) x✝¹ x✝ = ENNReal.ofReal (dist x✝¹ x✝)\n[PROOFSTEP]\nsimp only\n[GOAL]\nα : Type u_1\nV✝ : Type u_2\nP✝ : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V✝\ninst✝⁶ : PseudoMetricSpace P✝\ninst✝⁵ : NormedAddTorsor V✝ P✝\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\nV : Type u_6\nP : Type u_7\ninst✝¹ : NormedAddCommGroup V\ninst✝ : AddTorsor V P\nx✝¹ x✝ : P\n⊢ ↑{ val := ‖x✝¹ -ᵥ x✝‖, property := (_ : 0 ≤ ‖x✝¹ -ᵥ x✝‖) } = ENNReal.ofReal ‖x✝¹ -ᵥ x✝‖\n[PROOFSTEP]\nrw [ENNReal.ofReal_eq_coe_nnreal]\n[GOAL]\nα : Type u_1\nV✝ : Type u_2\nP✝ : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V✝\ninst✝⁶ : PseudoMetricSpace P✝\ninst✝⁵ : NormedAddTorsor V✝ P✝\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\nV : Type u_6\nP : Type u_7\ninst✝¹ : NormedAddCommGroup V\ninst✝ : AddTorsor V P\nx✝ y✝ : P\nh : dist x✝ y✝ = 0\n⊢ x✝ = y✝\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\ns : Set V\nt : Set P\nhs : IsClosed s\nht : IsCompact t\n⊢ IsClosed (s +ᵥ t)\n[PROOFSTEP]\nrefine IsSeqClosed.isClosed (fun u p husv hup ↦ ?_)\n[GOAL]\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\ns : Set V\nt : Set P\nhs : IsClosed s\nht : IsCompact t\nu : ℕ → P\np : P\nhusv : ∀ (n : ℕ), u n ∈ s +ᵥ t\nhup : Tendsto u atTop (𝓝 p)\n⊢ p ∈ s +ᵥ t\n[PROOFSTEP]\nchoose! a v hav using husv\n[GOAL]\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\ns : Set V\nt : Set P\nhs : IsClosed s\nht : IsCompact t\nu : ℕ → P\np : P\nhup : Tendsto u atTop (𝓝 p)\na : ℕ → V\nv : ℕ → P\nhav : ∀ (n : ℕ), a n ∈ s ∧ v n ∈ t ∧ (fun x x_1 => x +ᵥ x_1) (a n) (v n) = u n\n⊢ p ∈ s +ᵥ t\n[PROOFSTEP]\nrcases ht.isSeqCompact fun n ↦ (hav n).2.1 with ⟨q, hqt, φ, φ_mono, hφq⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\ns : Set V\nt : Set P\nhs : IsClosed s\nht : IsCompact t\nu : ℕ → P\np : P\nhup : Tendsto u atTop (𝓝 p)\na : ℕ → V\nv : ℕ → P\nhav : ∀ (n : ℕ), a n ∈ s ∧ v n ∈ t ∧ (fun x x_1 => x +ᵥ x_1) (a n) (v n) = u n\nq : P\nhqt : q ∈ t\nφ : ℕ → ℕ\nφ_mono : StrictMono φ\nhφq : Tendsto ((fun n => v n) ∘ φ) atTop (𝓝 q)\n⊢ p ∈ s +ᵥ t\n[PROOFSTEP]\nrefine\n ⟨p -ᵥ q, q, hs.mem_of_tendsto ((hup.comp φ_mono.tendsto_atTop).vsub hφq) (eventually_of_forall fun n ↦ ?_), hqt,\n vsub_vadd _ _⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\ns : Set V\nt : Set P\nhs : IsClosed s\nht : IsCompact t\nu : ℕ → P\np : P\nhup : Tendsto u atTop (𝓝 p)\na : ℕ → V\nv : ℕ → P\nhav : ∀ (n : ℕ), a n ∈ s ∧ v n ∈ t ∧ (fun x x_1 => x +ᵥ x_1) (a n) (v n) = u n\nq : P\nhqt : q ∈ t\nφ : ℕ → ℕ\nφ_mono : StrictMono φ\nhφq : Tendsto ((fun n => v n) ∘ φ) atTop (𝓝 q)\nn : ℕ\n⊢ (u ∘ φ -ᵥ (fun n => v n) ∘ φ) n ∈ s\n[PROOFSTEP]\nconvert (hav (φ n)).1 using 1\n[GOAL]\ncase h.e'_4\nα : Type u_1\nV : Type u_2\nP : Type u_3\nW : Type u_4\nQ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : PseudoMetricSpace P\ninst✝³ : NormedAddTorsor V P\ninst✝² : NormedAddCommGroup W\ninst✝¹ : MetricSpace Q\ninst✝ : NormedAddTorsor W Q\ns : Set V\nt : Set P\nhs : IsClosed s\nht : IsCompact t\nu : ℕ → P\np : P\nhup : Tendsto u atTop (𝓝 p)\na : ℕ → V\nv : ℕ → P\nhav : ∀ (n : ℕ), a n ∈ s ∧ v n ∈ t ∧ (fun x x_1 => x +ᵥ x_1) (a n) (v n) = u n\nq : P\nhqt : q ∈ t\nφ : ℕ → ℕ\nφ_mono : StrictMono φ\nhφq : Tendsto ((fun n => v n) ∘ φ) atTop (𝓝 q)\nn : ℕ\n⊢ (u ∘ φ -ᵥ (fun n => v n) ∘ φ) n = a (φ n)\n[PROOFSTEP]\nexact (eq_vadd_iff_vsub_eq _ _ _).mp (hav (φ n)).2.2.symm\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Normed.Group.AddTorsor", "llama_tokens": 8535, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8031737963569014, "lm_q2_score": 0.6926419767901475, "lm_q1q2_score": 0.5563118860146916}} {"text": "[GOAL]\nM : Type u_1\ninst✝ : MulOneClass M\n⊢ 1 ∈ center M\n[PROOFSTEP]\nsimp [mem_center_iff]\n[GOAL]\nM : Type u_1\ninst✝ : MulZeroClass M\n⊢ 0 ∈ center M\n[PROOFSTEP]\nsimp [mem_center_iff]\n[GOAL]\nM : Type u_1\ninst✝ : Semigroup M\na b : M\nha : a ∈ center M\nhb : b ∈ center M\ng : M\n⊢ g * (a * b) = a * b * g\n[PROOFSTEP]\nrw [mul_assoc, ← hb g, ← mul_assoc, ha g, mul_assoc]\n[GOAL]\nM : Type u_1\ninst✝ : Group M\na : M\nha : a ∈ center M\ng : M\n⊢ g * a⁻¹ = a⁻¹ * g\n[PROOFSTEP]\nrw [← inv_inj, mul_inv_rev, inv_inv, ← ha, mul_inv_rev, inv_inv]\n[GOAL]\nM : Type u_1\ninst✝ : Distrib M\na b : M\nha : a ∈ center M\nhb : b ∈ center M\nc : M\n⊢ c * (a + b) = (a + b) * c\n[PROOFSTEP]\nrw [add_mul, mul_add, ha c, hb c]\n[GOAL]\nM : Type u_1\ninst✝ : NonUnitalNonAssocRing M\na : M\nha : a ∈ center M\nc : M\n⊢ c * -a = -a * c\n[PROOFSTEP]\nrw [← neg_mul_comm, ha (-c), neg_mul_comm]\n[GOAL]\nM : Type u_1\ninst✝ : GroupWithZero M\na : Mˣ\nha : a ∈ center Mˣ\nb : M\n⊢ b * ↑a = ↑a * b\n[PROOFSTEP]\nobtain rfl | hb := eq_or_ne b 0\n[GOAL]\ncase inl\nM : Type u_1\ninst✝ : GroupWithZero M\na : Mˣ\nha : a ∈ center Mˣ\n⊢ 0 * ↑a = ↑a * 0\n[PROOFSTEP]\nrw [zero_mul, mul_zero]\n[GOAL]\ncase inr\nM : Type u_1\ninst✝ : GroupWithZero M\na : Mˣ\nha : a ∈ center Mˣ\nb : M\nhb : b ≠ 0\n⊢ b * ↑a = ↑a * b\n[PROOFSTEP]\nexact Units.ext_iff.mp (ha (Units.mk0 _ hb))\n[GOAL]\nM : Type u_1\ninst✝ : GroupWithZero M\na : M\nha : a ∈ center M\n⊢ a⁻¹ ∈ center M\n[PROOFSTEP]\nobtain rfl | ha0 := eq_or_ne a 0\n[GOAL]\ncase inl\nM : Type u_1\ninst✝ : GroupWithZero M\nha : 0 ∈ center M\n⊢ 0⁻¹ ∈ center M\n[PROOFSTEP]\nrw [inv_zero]\n[GOAL]\ncase inl\nM : Type u_1\ninst✝ : GroupWithZero M\nha : 0 ∈ center M\n⊢ 0 ∈ center M\n[PROOFSTEP]\nexact zero_mem_center M\n[GOAL]\ncase inr\nM : Type u_1\ninst✝ : GroupWithZero M\na : M\nha : a ∈ center M\nha0 : a ≠ 0\n⊢ a⁻¹ ∈ center M\n[PROOFSTEP]\nrcases IsUnit.mk0 _ ha0 with ⟨a, rfl⟩\n[GOAL]\ncase inr.intro\nM : Type u_1\ninst✝ : GroupWithZero M\na : Mˣ\nha : ↑a ∈ center M\nha0 : ↑a ≠ 0\n⊢ (↑a)⁻¹ ∈ center M\n[PROOFSTEP]\nrw [← Units.val_inv_eq_inv_val]\n[GOAL]\ncase inr.intro\nM : Type u_1\ninst✝ : GroupWithZero M\na : Mˣ\nha : ↑a ∈ center M\nha0 : ↑a ≠ 0\n⊢ ↑a⁻¹ ∈ center M\n[PROOFSTEP]\nexact center_units_subset (inv_mem_center (subset_center_units ha))\n[GOAL]\nM : Type u_1\ninst✝ : Group M\na b : M\nha : a ∈ center M\nhb : b ∈ center M\n⊢ a / b ∈ center M\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nM : Type u_1\ninst✝ : Group M\na b : M\nha : a ∈ center M\nhb : b ∈ center M\n⊢ a * b⁻¹ ∈ center M\n[PROOFSTEP]\nexact mul_mem_center ha (inv_mem_center hb)\n[GOAL]\nM : Type u_1\ninst✝ : GroupWithZero M\na b : M\nha : a ∈ center M\nhb : b ∈ center M\n⊢ a / b ∈ center M\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nM : Type u_1\ninst✝ : GroupWithZero M\na b : M\nha : a ∈ center M\nhb : b ∈ center M\n⊢ a * b⁻¹ ∈ center M\n[PROOFSTEP]\nexact mul_mem_center ha (inv_mem_center₀ hb)\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.Subsemigroup.Center", "llama_tokens": 1451, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7577943712746406, "lm_q2_score": 0.7341195269001831, "lm_q1q2_score": 0.5563116453277608}} {"text": "[GOAL]\nR : Type u_1\nS : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S\nf : R →+* S\ninst✝ : Algebra R A\nx : R\n⊢ eval₂ f (↑f x) (X - ↑C x) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nS : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S\nf : R →+* S\ninst✝ : Algebra R A\nH : IsNoetherian R A\nx : A\n⊢ IsIntegral R x\n[PROOFSTEP]\nlet leval : R[X] →ₗ[R] A := (aeval x).toLinearMap\n[GOAL]\nR : Type u_1\nS : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S\nf : R →+* S\ninst✝ : Algebra R A\nH : IsNoetherian R A\nx : A\nleval : R[X] →ₗ[R] A := AlgHom.toLinearMap (aeval x)\n⊢ IsIntegral R x\n[PROOFSTEP]\nlet D : ℕ → Submodule R A := fun n => (degreeLE R n).map leval\n[GOAL]\nR : Type u_1\nS : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S\nf : R →+* S\ninst✝ : Algebra R A\nH : IsNoetherian R A\nx : A\nleval : R[X] →ₗ[R] A := AlgHom.toLinearMap (aeval x)\nD : ℕ → Submodule R A := fun n => Submodule.map leval (degreeLE R ↑n)\n⊢ IsIntegral R x\n[PROOFSTEP]\nlet M := WellFounded.min (isNoetherian_iff_wellFounded.1 H) (Set.range D) ⟨_, ⟨0, rfl⟩⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S\nf : R →+* S\ninst✝ : Algebra R A\nH : IsNoetherian R A\nx : A\nleval : R[X] →ₗ[R] A := AlgHom.toLinearMap (aeval x)\nD : ℕ → Submodule R A := fun n => Submodule.map leval (degreeLE R ↑n)\nM : Submodule R A := WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range D) (_ : ∃ x, x ∈ Set.range D)\n⊢ IsIntegral R x\n[PROOFSTEP]\nhave HM : M ∈ Set.range D := WellFounded.min_mem _ _ _\n[GOAL]\nR : Type u_1\nS : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S\nf : R →+* S\ninst✝ : Algebra R A\nH : IsNoetherian R A\nx : A\nleval : R[X] →ₗ[R] A := AlgHom.toLinearMap (aeval x)\nD : ℕ → Submodule R A := fun n => Submodule.map leval (degreeLE R ↑n)\nM : Submodule R A := WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range D) (_ : ∃ x, x ∈ Set.range D)\nHM : M ∈ Set.range D\n⊢ IsIntegral R x\n[PROOFSTEP]\ncases' HM with N HN\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S\nf : R →+* S\ninst✝ : Algebra R A\nH : IsNoetherian R A\nx : A\nleval : R[X] →ₗ[R] A := AlgHom.toLinearMap (aeval x)\nD : ℕ → Submodule R A := fun n => Submodule.map leval (degreeLE R ↑n)\nM : Submodule R A := WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range D) (_ : ∃ x, x ∈ Set.range D)\nN : ℕ\nHN : D N = M\n⊢ IsIntegral R x\n[PROOFSTEP]\nhave HM : ¬M < D (N + 1) := WellFounded.not_lt_min (isNoetherian_iff_wellFounded.1 H) (Set.range D) _ ⟨N + 1, rfl⟩\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S\nf : R →+* S\ninst✝ : Algebra R A\nH : IsNoetherian R A\nx : A\nleval : R[X] →ₗ[R] A := AlgHom.toLinearMap (aeval x)\nD : ℕ → Submodule R A := fun n => Submodule.map leval (degreeLE R ↑n)\nM : Submodule R A := WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range D) (_ : ∃ x, x ∈ Set.range D)\nN : ℕ\nHN : D N = M\nHM : ¬M < D (N + 1)\n⊢ IsIntegral R x\n[PROOFSTEP]\nrw [← HN] at HM \n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S\nf : R →+* S\ninst✝ : Algebra R A\nH : IsNoetherian R A\nx : A\nleval : R[X] →ₗ[R] A := AlgHom.toLinearMap (aeval x)\nD : ℕ → Submodule R A := fun n => Submodule.map leval (degreeLE R ↑n)\nM : Submodule R A := WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range D) (_ : ∃ x, x ∈ Set.range D)\nN : ℕ\nHN : D N = M\nHM : ¬D N < D (N + 1)\n⊢ IsIntegral R x\n[PROOFSTEP]\nhave HN2 : D (N + 1) ≤ D N :=\n _root_.by_contradiction fun H =>\n HM (lt_of_le_not_le (map_mono (degreeLE_mono (WithBot.coe_le_coe.2 (Nat.le_succ N)))) H)\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S\nf : R →+* S\ninst✝ : Algebra R A\nH : IsNoetherian R A\nx : A\nleval : R[X] →ₗ[R] A := AlgHom.toLinearMap (aeval x)\nD : ℕ → Submodule R A := fun n => Submodule.map leval (degreeLE R ↑n)\nM : Submodule R A := WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range D) (_ : ∃ x, x ∈ Set.range D)\nN : ℕ\nHN : D N = M\nHM : ¬D N < D (N + 1)\nHN2 : D (N + 1) ≤ D N\n⊢ IsIntegral R x\n[PROOFSTEP]\nhave HN3 : leval (X ^ (N + 1)) ∈ D N := HN2 (mem_map_of_mem (mem_degreeLE.2 (degree_X_pow_le _)))\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S\nf : R →+* S\ninst✝ : Algebra R A\nH : IsNoetherian R A\nx : A\nleval : R[X] →ₗ[R] A := AlgHom.toLinearMap (aeval x)\nD : ℕ → Submodule R A := fun n => Submodule.map leval (degreeLE R ↑n)\nM : Submodule R A := WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range D) (_ : ∃ x, x ∈ Set.range D)\nN : ℕ\nHN : D N = M\nHM : ¬D N < D (N + 1)\nHN2 : D (N + 1) ≤ D N\nHN3 : ↑leval (X ^ (N + 1)) ∈ D N\n⊢ IsIntegral R x\n[PROOFSTEP]\nrcases HN3 with ⟨p, hdp, hpe⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S\nf : R →+* S\ninst✝ : Algebra R A\nH : IsNoetherian R A\nx : A\nleval : R[X] →ₗ[R] A := AlgHom.toLinearMap (aeval x)\nD : ℕ → Submodule R A := fun n => Submodule.map leval (degreeLE R ↑n)\nM : Submodule R A := WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range D) (_ : ∃ x, x ∈ Set.range D)\nN : ℕ\nHN : D N = M\nHM : ¬D N < D (N + 1)\nHN2 : D (N + 1) ≤ D N\np : R[X]\nhdp : p ∈ ↑(degreeLE R ↑N)\nhpe : ↑leval p = ↑leval (X ^ (N + 1))\n⊢ IsIntegral R x\n[PROOFSTEP]\nrefine' ⟨X ^ (N + 1) - p, monic_X_pow_sub (mem_degreeLE.1 hdp), _⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S\nf : R →+* S\ninst✝ : Algebra R A\nH : IsNoetherian R A\nx : A\nleval : R[X] →ₗ[R] A := AlgHom.toLinearMap (aeval x)\nD : ℕ → Submodule R A := fun n => Submodule.map leval (degreeLE R ↑n)\nM : Submodule R A := WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range D) (_ : ∃ x, x ∈ Set.range D)\nN : ℕ\nHN : D N = M\nHM : ¬D N < D (N + 1)\nHN2 : D (N + 1) ≤ D N\np : R[X]\nhdp : p ∈ ↑(degreeLE R ↑N)\nhpe : ↑leval p = ↑leval (X ^ (N + 1))\n⊢ eval₂ (algebraMap R A) x (X ^ (N + 1) - p) = 0\n[PROOFSTEP]\nshow leval (X ^ (N + 1) - p) = 0\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S\nf : R →+* S\ninst✝ : Algebra R A\nH : IsNoetherian R A\nx : A\nleval : R[X] →ₗ[R] A := AlgHom.toLinearMap (aeval x)\nD : ℕ → Submodule R A := fun n => Submodule.map leval (degreeLE R ↑n)\nM : Submodule R A := WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range D) (_ : ∃ x, x ∈ Set.range D)\nN : ℕ\nHN : D N = M\nHM : ¬D N < D (N + 1)\nHN2 : D (N + 1) ≤ D N\np : R[X]\nhdp : p ∈ ↑(degreeLE R ↑N)\nhpe : ↑leval p = ↑leval (X ^ (N + 1))\n⊢ ↑leval (X ^ (N + 1) - p) = 0\n[PROOFSTEP]\nrw [LinearMap.map_sub, hpe, sub_self]\n[GOAL]\nR : Type u_1\nS✝ : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S✝\nf : R →+* S✝\ninst✝ : Algebra R A\nS : Subalgebra R A\nH : IsNoetherian R { x // x ∈ ↑Subalgebra.toSubmodule S }\nx : A\nhx : x ∈ S\n⊢ IsIntegral R x\n[PROOFSTEP]\nsuffices IsIntegral R (show S from ⟨x, hx⟩) by\n rcases this with ⟨p, hpm, hpx⟩\n replace hpx := congr_arg S.val hpx\n refine' ⟨p, hpm, Eq.trans _ hpx⟩\n simp only [aeval_def, eval₂, sum_def]\n rw [S.val.map_sum]\n refine' Finset.sum_congr rfl fun n _hn => _\n rw [S.val.map_mul, S.val.map_pow, S.val.commutes, S.val_apply, Subtype.coe_mk]\n[GOAL]\nR : Type u_1\nS✝ : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S✝\nf : R →+* S✝\ninst✝ : Algebra R A\nS : Subalgebra R A\nH : IsNoetherian R { x // x ∈ ↑Subalgebra.toSubmodule S }\nx : A\nhx : x ∈ S\nthis :\n IsIntegral R\n (let_fun this := { val := x, property := hx };\n this)\n⊢ IsIntegral R x\n[PROOFSTEP]\nrcases this with ⟨p, hpm, hpx⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nS✝ : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S✝\nf : R →+* S✝\ninst✝ : Algebra R A\nS : Subalgebra R A\nH : IsNoetherian R { x // x ∈ ↑Subalgebra.toSubmodule S }\nx : A\nhx : x ∈ S\np : R[X]\nhpm : Monic p\nhpx :\n eval₂ (algebraMap R { x // x ∈ S })\n (let_fun this := { val := x, property := hx };\n this)\n p =\n 0\n⊢ IsIntegral R x\n[PROOFSTEP]\nreplace hpx := congr_arg S.val hpx\n[GOAL]\ncase intro.intro\nR : Type u_1\nS✝ : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S✝\nf : R →+* S✝\ninst✝ : Algebra R A\nS : Subalgebra R A\nH : IsNoetherian R { x // x ∈ ↑Subalgebra.toSubmodule S }\nx : A\nhx : x ∈ S\np : R[X]\nhpm : Monic p\nhpx :\n ↑(Subalgebra.val S)\n (eval₂ (algebraMap R { x // x ∈ S })\n (let_fun this := { val := x, property := hx };\n this)\n p) =\n ↑(Subalgebra.val S) 0\n⊢ IsIntegral R x\n[PROOFSTEP]\nrefine' ⟨p, hpm, Eq.trans _ hpx⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nS✝ : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S✝\nf : R →+* S✝\ninst✝ : Algebra R A\nS : Subalgebra R A\nH : IsNoetherian R { x // x ∈ ↑Subalgebra.toSubmodule S }\nx : A\nhx : x ∈ S\np : R[X]\nhpm : Monic p\nhpx :\n ↑(Subalgebra.val S)\n (eval₂ (algebraMap R { x // x ∈ S })\n (let_fun this := { val := x, property := hx };\n this)\n p) =\n ↑(Subalgebra.val S) 0\n⊢ eval₂ (algebraMap R A) x p =\n ↑(Subalgebra.val S)\n (eval₂ (algebraMap R { x // x ∈ S })\n (let_fun this := { val := x, property := hx };\n this)\n p)\n[PROOFSTEP]\nsimp only [aeval_def, eval₂, sum_def]\n[GOAL]\ncase intro.intro\nR : Type u_1\nS✝ : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S✝\nf : R →+* S✝\ninst✝ : Algebra R A\nS : Subalgebra R A\nH : IsNoetherian R { x // x ∈ ↑Subalgebra.toSubmodule S }\nx : A\nhx : x ∈ S\np : R[X]\nhpm : Monic p\nhpx :\n ↑(Subalgebra.val S)\n (eval₂ (algebraMap R { x // x ∈ S })\n (let_fun this := { val := x, property := hx };\n this)\n p) =\n ↑(Subalgebra.val S) 0\n⊢ ∑ n in support p, ↑(algebraMap R A) (coeff p n) * x ^ n =\n ↑(Subalgebra.val S)\n (∑ n in support p, ↑(algebraMap R { x // x ∈ S }) (coeff p n) * { val := x, property := hx } ^ n)\n[PROOFSTEP]\nrw [S.val.map_sum]\n[GOAL]\ncase intro.intro\nR : Type u_1\nS✝ : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S✝\nf : R →+* S✝\ninst✝ : Algebra R A\nS : Subalgebra R A\nH : IsNoetherian R { x // x ∈ ↑Subalgebra.toSubmodule S }\nx : A\nhx : x ∈ S\np : R[X]\nhpm : Monic p\nhpx :\n ↑(Subalgebra.val S)\n (eval₂ (algebraMap R { x // x ∈ S })\n (let_fun this := { val := x, property := hx };\n this)\n p) =\n ↑(Subalgebra.val S) 0\n⊢ ∑ n in support p, ↑(algebraMap R A) (coeff p n) * x ^ n =\n ∑ x_1 in support p,\n ↑(Subalgebra.val S) (↑(algebraMap R { x // x ∈ S }) (coeff p x_1) * { val := x, property := hx } ^ x_1)\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun n _hn => _\n[GOAL]\ncase intro.intro\nR : Type u_1\nS✝ : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S✝\nf : R →+* S✝\ninst✝ : Algebra R A\nS : Subalgebra R A\nH : IsNoetherian R { x // x ∈ ↑Subalgebra.toSubmodule S }\nx : A\nhx : x ∈ S\np : R[X]\nhpm : Monic p\nhpx :\n ↑(Subalgebra.val S)\n (eval₂ (algebraMap R { x // x ∈ S })\n (let_fun this := { val := x, property := hx };\n this)\n p) =\n ↑(Subalgebra.val S) 0\nn : ℕ\n_hn : n ∈ support p\n⊢ ↑(algebraMap R A) (coeff p n) * x ^ n =\n ↑(Subalgebra.val S) (↑(algebraMap R { x // x ∈ S }) (coeff p n) * { val := x, property := hx } ^ n)\n[PROOFSTEP]\nrw [S.val.map_mul, S.val.map_pow, S.val.commutes, S.val_apply, Subtype.coe_mk]\n[GOAL]\nR : Type u_1\nS✝ : Type u_2\nA : Type u_3\ninst✝³ : CommRing R\ninst✝² : Ring A\ninst✝¹ : Ring S✝\nf : R →+* S✝\ninst✝ : Algebra R A\nS : Subalgebra R A\nH : IsNoetherian R { x // x ∈ ↑Subalgebra.toSubmodule S }\nx : A\nhx : x ∈ S\n⊢ IsIntegral R\n (let_fun this := { val := x, property := hx };\n this)\n[PROOFSTEP]\nrefine' isIntegral_of_noetherian H ⟨x, hx⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\nB✝ : Type u_3\nS : Type u_4\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing A\ninst✝¹² : CommRing B✝\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : Algebra R A\ninst✝⁹ : Algebra R B✝\nf✝ : R →+* S\nB : Type u_5\nC : Type u_6\nF : Type u_7\ninst✝⁸ : Ring B\ninst✝⁷ : Ring C\ninst✝⁶ : Algebra R B\ninst✝⁵ : Algebra A B\ninst✝⁴ : Algebra R C\ninst✝³ : IsScalarTower R A B\ninst✝² : Algebra A C\ninst✝¹ : IsScalarTower R A C\nb : B\ninst✝ : AlgHomClass F A B C\nf : F\nhb : IsIntegral R b\n⊢ IsIntegral R (↑f b)\n[PROOFSTEP]\nobtain ⟨P, hP⟩ := hb\n[GOAL]\ncase intro\nR : Type u_1\nA : Type u_2\nB✝ : Type u_3\nS : Type u_4\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing A\ninst✝¹² : CommRing B✝\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : Algebra R A\ninst✝⁹ : Algebra R B✝\nf✝ : R →+* S\nB : Type u_5\nC : Type u_6\nF : Type u_7\ninst✝⁸ : Ring B\ninst✝⁷ : Ring C\ninst✝⁶ : Algebra R B\ninst✝⁵ : Algebra A B\ninst✝⁴ : Algebra R C\ninst✝³ : IsScalarTower R A B\ninst✝² : Algebra A C\ninst✝¹ : IsScalarTower R A C\nb : B\ninst✝ : AlgHomClass F A B C\nf : F\nP : R[X]\nhP : Monic P ∧ eval₂ (algebraMap R B) b P = 0\n⊢ IsIntegral R (↑f b)\n[PROOFSTEP]\nrefine' ⟨P, hP.1, _⟩\n[GOAL]\ncase intro\nR : Type u_1\nA : Type u_2\nB✝ : Type u_3\nS : Type u_4\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing A\ninst✝¹² : CommRing B✝\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : Algebra R A\ninst✝⁹ : Algebra R B✝\nf✝ : R →+* S\nB : Type u_5\nC : Type u_6\nF : Type u_7\ninst✝⁸ : Ring B\ninst✝⁷ : Ring C\ninst✝⁶ : Algebra R B\ninst✝⁵ : Algebra A B\ninst✝⁴ : Algebra R C\ninst✝³ : IsScalarTower R A B\ninst✝² : Algebra A C\ninst✝¹ : IsScalarTower R A C\nb : B\ninst✝ : AlgHomClass F A B C\nf : F\nP : R[X]\nhP : Monic P ∧ eval₂ (algebraMap R B) b P = 0\n⊢ eval₂ (algebraMap R ((fun x => C) b)) (↑f b) P = 0\n[PROOFSTEP]\nrw [← aeval_def, show (aeval (f b)) P = (aeval (f b)) (P.map (algebraMap R A)) by simp, aeval_algHom_apply,\n aeval_map_algebraMap, aeval_def, hP.2, _root_.map_zero]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB✝ : Type u_3\nS : Type u_4\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing A\ninst✝¹² : CommRing B✝\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : Algebra R A\ninst✝⁹ : Algebra R B✝\nf✝ : R →+* S\nB : Type u_5\nC : Type u_6\nF : Type u_7\ninst✝⁸ : Ring B\ninst✝⁷ : Ring C\ninst✝⁶ : Algebra R B\ninst✝⁵ : Algebra A B\ninst✝⁴ : Algebra R C\ninst✝³ : IsScalarTower R A B\ninst✝² : Algebra A C\ninst✝¹ : IsScalarTower R A C\nb : B\ninst✝ : AlgHomClass F A B C\nf : F\nP : R[X]\nhP : Monic P ∧ eval₂ (algebraMap R B) b P = 0\n⊢ ↑(aeval (↑f b)) P = ↑(aeval (↑f b)) (Polynomial.map (algebraMap R A) P)\n[PROOFSTEP]\nsimp\n[GOAL]\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝¹¹ : CommRing R✝\ninst✝¹⁰ : CommRing A\ninst✝⁹ : CommRing B\ninst✝⁸ : CommRing S✝\ninst✝⁷ : Algebra R✝ A\ninst✝⁶ : Algebra R✝ B\nf : R✝ →+* S✝\nR : Type u_5\nS : Type u_6\nT : Type u_7\nU : Type u_8\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\ninst✝³ : CommRing T\ninst✝² : CommRing U\ninst✝¹ : Algebra R S\ninst✝ : Algebra T U\nφ : R →+* T\nψ : S →+* U\nh : RingHom.comp (algebraMap T U) φ = RingHom.comp ψ (algebraMap R S)\na : S\nha : IsIntegral R a\n⊢ IsIntegral T (↑ψ a)\n[PROOFSTEP]\nrw [IsIntegral, RingHom.IsIntegralElem] at ha ⊢\n[GOAL]\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝¹¹ : CommRing R✝\ninst✝¹⁰ : CommRing A\ninst✝⁹ : CommRing B\ninst✝⁸ : CommRing S✝\ninst✝⁷ : Algebra R✝ A\ninst✝⁶ : Algebra R✝ B\nf : R✝ →+* S✝\nR : Type u_5\nS : Type u_6\nT : Type u_7\nU : Type u_8\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\ninst✝³ : CommRing T\ninst✝² : CommRing U\ninst✝¹ : Algebra R S\ninst✝ : Algebra T U\nφ : R →+* T\nψ : S →+* U\nh : RingHom.comp (algebraMap T U) φ = RingHom.comp ψ (algebraMap R S)\na : S\nha : ∃ p, Monic p ∧ eval₂ (algebraMap R S) a p = 0\n⊢ ∃ p, Monic p ∧ eval₂ (algebraMap T ((fun x => U) a)) (↑ψ a) p = 0\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := ha\n[GOAL]\ncase intro\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝¹¹ : CommRing R✝\ninst✝¹⁰ : CommRing A\ninst✝⁹ : CommRing B\ninst✝⁸ : CommRing S✝\ninst✝⁷ : Algebra R✝ A\ninst✝⁶ : Algebra R✝ B\nf : R✝ →+* S✝\nR : Type u_5\nS : Type u_6\nT : Type u_7\nU : Type u_8\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\ninst✝³ : CommRing T\ninst✝² : CommRing U\ninst✝¹ : Algebra R S\ninst✝ : Algebra T U\nφ : R →+* T\nψ : S →+* U\nh : RingHom.comp (algebraMap T U) φ = RingHom.comp ψ (algebraMap R S)\na : S\np : R[X]\nhp : Monic p ∧ eval₂ (algebraMap R S) a p = 0\n⊢ ∃ p, Monic p ∧ eval₂ (algebraMap T ((fun x => U) a)) (↑ψ a) p = 0\n[PROOFSTEP]\nrefine' ⟨p.map φ, hp.left.map _, _⟩\n[GOAL]\ncase intro\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝¹¹ : CommRing R✝\ninst✝¹⁰ : CommRing A\ninst✝⁹ : CommRing B\ninst✝⁸ : CommRing S✝\ninst✝⁷ : Algebra R✝ A\ninst✝⁶ : Algebra R✝ B\nf : R✝ →+* S✝\nR : Type u_5\nS : Type u_6\nT : Type u_7\nU : Type u_8\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\ninst✝³ : CommRing T\ninst✝² : CommRing U\ninst✝¹ : Algebra R S\ninst✝ : Algebra T U\nφ : R →+* T\nψ : S →+* U\nh : RingHom.comp (algebraMap T U) φ = RingHom.comp ψ (algebraMap R S)\na : S\np : R[X]\nhp : Monic p ∧ eval₂ (algebraMap R S) a p = 0\n⊢ eval₂ (algebraMap T ((fun x => U) a)) (↑ψ a) (Polynomial.map φ p) = 0\n[PROOFSTEP]\nrw [← eval_map, map_map, h, ← map_map, eval_map, eval₂_at_apply, eval_map, hp.right, RingHom.map_zero]\n[GOAL]\nR : Type u_1\nA✝ : Type u_2\nB✝ : Type u_3\nS : Type u_4\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A✝\ninst✝⁷ : CommRing B✝\ninst✝⁶ : CommRing S\ninst✝⁵ : Algebra R A✝\ninst✝⁴ : Algebra R B✝\nf✝ : R →+* S\nA : Type u_5\nB : Type u_6\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₐ[R] B\nhf : Function.Injective ↑f\nx : A\n⊢ IsIntegral R (↑f x) ↔ IsIntegral R x\n[PROOFSTEP]\nrefine' ⟨_, map_isIntegral f⟩\n[GOAL]\nR : Type u_1\nA✝ : Type u_2\nB✝ : Type u_3\nS : Type u_4\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A✝\ninst✝⁷ : CommRing B✝\ninst✝⁶ : CommRing S\ninst✝⁵ : Algebra R A✝\ninst✝⁴ : Algebra R B✝\nf✝ : R →+* S\nA : Type u_5\nB : Type u_6\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₐ[R] B\nhf : Function.Injective ↑f\nx : A\n⊢ IsIntegral R (↑f x) → IsIntegral R x\n[PROOFSTEP]\nrintro ⟨p, hp, hx⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nA✝ : Type u_2\nB✝ : Type u_3\nS : Type u_4\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A✝\ninst✝⁷ : CommRing B✝\ninst✝⁶ : CommRing S\ninst✝⁵ : Algebra R A✝\ninst✝⁴ : Algebra R B✝\nf✝ : R →+* S\nA : Type u_5\nB : Type u_6\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₐ[R] B\nhf : Function.Injective ↑f\nx : A\np : R[X]\nhp : Monic p\nhx : eval₂ (algebraMap R ((fun x => B) x)) (↑f x) p = 0\n⊢ IsIntegral R x\n[PROOFSTEP]\nuse p, hp\n[GOAL]\ncase right\nR : Type u_1\nA✝ : Type u_2\nB✝ : Type u_3\nS : Type u_4\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A✝\ninst✝⁷ : CommRing B✝\ninst✝⁶ : CommRing S\ninst✝⁵ : Algebra R A✝\ninst✝⁴ : Algebra R B✝\nf✝ : R →+* S\nA : Type u_5\nB : Type u_6\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₐ[R] B\nhf : Function.Injective ↑f\nx : A\np : R[X]\nhp : Monic p\nhx : eval₂ (algebraMap R ((fun x => B) x)) (↑f x) p = 0\n⊢ eval₂ (algebraMap R A) x p = 0\n[PROOFSTEP]\nrwa [← f.comp_algebraMap, ← AlgHom.coe_toRingHom, ← Polynomial.hom_eval₂, AlgHom.coe_toRingHom, map_eq_zero_iff f hf] at\n hx \n[GOAL]\nR : Type u_1\nA✝ : Type u_2\nB✝ : Type u_3\nS : Type u_4\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A✝\ninst✝⁷ : CommRing B✝\ninst✝⁶ : CommRing S\ninst✝⁵ : Algebra R A✝\ninst✝⁴ : Algebra R B✝\nf✝ : R →+* S\nA : Type u_5\nB : Type u_6\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A ≃ₐ[R] B\nx : A\nh : IsIntegral R (↑f x)\n⊢ IsIntegral R x\n[PROOFSTEP]\nsimpa using map_isIntegral f.symm.toAlgHom h\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\nf : R →+* S\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : B\nhx : IsIntegral R x\np : R[X]\nhp : Monic p\nhpx : eval₂ (algebraMap R B) x p = 0\n⊢ eval₂ (algebraMap A B) x (Polynomial.map (algebraMap R A) p) = 0\n[PROOFSTEP]\nrw [← aeval_def, aeval_map_algebraMap, aeval_def, hpx]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\nf : R →+* S\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : A\nh : IsIntegral R x\n⊢ IsIntegral R (↑(_root_.algebraMap A B) x)\n[PROOFSTEP]\nrcases h with ⟨f, hf, hx⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\nf✝ : R →+* S\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : A\nf : R[X]\nhf : Monic f\nhx : eval₂ (_root_.algebraMap R A) x f = 0\n⊢ IsIntegral R (↑(_root_.algebraMap A B) x)\n[PROOFSTEP]\nuse f, hf\n[GOAL]\ncase right\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\nf✝ : R →+* S\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nx : A\nf : R[X]\nhf : Monic f\nhx : eval₂ (_root_.algebraMap R A) x f = 0\n⊢ eval₂ (_root_.algebraMap R ((fun x => B) x)) (↑(_root_.algebraMap A B) x) f = 0\n[PROOFSTEP]\nrw [IsScalarTower.algebraMap_eq R A B, ← hom_eval₂, hx, RingHom.map_zero]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nr : A\n⊢ IsIntegral R r ↔ ∃ s, Set.Finite s ∧ IsIntegral { x // x ∈ Subring.closure s } r\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nr : A\n⊢ IsIntegral R r → ∃ s, Set.Finite s ∧ IsIntegral { x // x ∈ Subring.closure s } r\n[PROOFSTEP]\nintro hr\n[GOAL]\ncase mpr\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nr : A\n⊢ (∃ s, Set.Finite s ∧ IsIntegral { x // x ∈ Subring.closure s } r) → IsIntegral R r\n[PROOFSTEP]\nintro hr\n[GOAL]\ncase mp\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nr : A\nhr : IsIntegral R r\n⊢ ∃ s, Set.Finite s ∧ IsIntegral { x // x ∈ Subring.closure s } r\n[PROOFSTEP]\nrcases hr with ⟨p, hmp, hpr⟩\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nr : A\np : R[X]\nhmp : Monic p\nhpr : eval₂ (algebraMap R A) r p = 0\n⊢ ∃ s, Set.Finite s ∧ IsIntegral { x // x ∈ Subring.closure s } r\n[PROOFSTEP]\nrefine' ⟨_, Finset.finite_toSet _, p.restriction, monic_restriction.2 hmp, _⟩\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nr : A\np : R[X]\nhmp : Monic p\nhpr : eval₂ (algebraMap R A) r p = 0\n⊢ eval₂ (algebraMap { x // x ∈ Subring.closure ↑(frange p) } A) r (restriction p) = 0\n[PROOFSTEP]\nrw [← aeval_def, ← aeval_map_algebraMap R r p.restriction, map_restriction, aeval_def, hpr]\n[GOAL]\ncase mpr\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nr : A\nhr : ∃ s, Set.Finite s ∧ IsIntegral { x // x ∈ Subring.closure s } r\n⊢ IsIntegral R r\n[PROOFSTEP]\nrcases hr with ⟨s, _, hsr⟩\n[GOAL]\ncase mpr.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nr : A\ns : Set R\nleft✝ : Set.Finite s\nhsr : IsIntegral { x // x ∈ Subring.closure s } r\n⊢ IsIntegral R r\n[PROOFSTEP]\nexact isIntegral_ofSubring _ hsr\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\nhx : IsIntegral R x\n⊢ FG (↑Subalgebra.toSubmodule (Algebra.adjoin R {x}))\n[PROOFSTEP]\nrcases hx with ⟨f, hfm, hfx⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : eval₂ (algebraMap R A) x f = 0\n⊢ FG (↑Subalgebra.toSubmodule (Algebra.adjoin R {x}))\n[PROOFSTEP]\nexists Finset.image ((· ^ ·) x) (Finset.range (natDegree f + 1))\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : eval₂ (algebraMap R A) x f = 0\n⊢ span R ↑(Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1))) =\n ↑Subalgebra.toSubmodule (Algebra.adjoin R {x})\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase intro.intro.a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : eval₂ (algebraMap R A) x f = 0\n⊢ span R ↑(Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1))) ≤\n ↑Subalgebra.toSubmodule (Algebra.adjoin R {x})\n[PROOFSTEP]\nrw [span_le]\n[GOAL]\ncase intro.intro.a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : eval₂ (algebraMap R A) x f = 0\n⊢ ↑(Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1))) ⊆\n ↑(↑Subalgebra.toSubmodule (Algebra.adjoin R {x}))\n[PROOFSTEP]\nintro s hs\n[GOAL]\ncase intro.intro.a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : eval₂ (algebraMap R A) x f = 0\ns : A\nhs : s ∈ ↑(Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1)))\n⊢ s ∈ ↑(↑Subalgebra.toSubmodule (Algebra.adjoin R {x}))\n[PROOFSTEP]\nrw [Finset.mem_coe] at hs \n[GOAL]\ncase intro.intro.a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : eval₂ (algebraMap R A) x f = 0\ns : A\nhs : s ∈ Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1))\n⊢ s ∈ ↑(↑Subalgebra.toSubmodule (Algebra.adjoin R {x}))\n[PROOFSTEP]\nrcases Finset.mem_image.1 hs with ⟨k, hk, rfl⟩\n[GOAL]\ncase intro.intro.a.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : eval₂ (algebraMap R A) x f = 0\nk : ℕ\nhk : k ∈ Finset.range (natDegree f + 1)\nhs : (fun x x_1 => x ^ x_1) x k ∈ Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1))\n⊢ (fun x x_1 => x ^ x_1) x k ∈ ↑(↑Subalgebra.toSubmodule (Algebra.adjoin R {x}))\n[PROOFSTEP]\nclear hk\n[GOAL]\ncase intro.intro.a.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : eval₂ (algebraMap R A) x f = 0\nk : ℕ\nhs : (fun x x_1 => x ^ x_1) x k ∈ Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1))\n⊢ (fun x x_1 => x ^ x_1) x k ∈ ↑(↑Subalgebra.toSubmodule (Algebra.adjoin R {x}))\n[PROOFSTEP]\nexact (Algebra.adjoin R { x }).pow_mem (Algebra.subset_adjoin (Set.mem_singleton _)) k\n[GOAL]\ncase intro.intro.a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : eval₂ (algebraMap R A) x f = 0\n⊢ ↑Subalgebra.toSubmodule (Algebra.adjoin R {x}) ≤\n span R ↑(Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1)))\n[PROOFSTEP]\nintro r hr\n[GOAL]\ncase intro.intro.a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : eval₂ (algebraMap R A) x f = 0\nr : A\nhr : r ∈ ↑Subalgebra.toSubmodule (Algebra.adjoin R {x})\n⊢ r ∈ span R ↑(Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1)))\n[PROOFSTEP]\nchange r ∈ Algebra.adjoin R ({ x } : Set A) at hr \n[GOAL]\ncase intro.intro.a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : eval₂ (algebraMap R A) x f = 0\nr : A\nhr : r ∈ Algebra.adjoin R {x}\n⊢ r ∈ span R ↑(Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1)))\n[PROOFSTEP]\nrw [Algebra.adjoin_singleton_eq_range_aeval] at hr \n[GOAL]\ncase intro.intro.a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : eval₂ (algebraMap R A) x f = 0\nr : A\nhr : r ∈ AlgHom.range (aeval x)\n⊢ r ∈ span R ↑(Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1)))\n[PROOFSTEP]\nrcases(aeval x).mem_range.mp hr with ⟨p, rfl⟩\n[GOAL]\ncase intro.intro.a.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : eval₂ (algebraMap R A) x f = 0\np : R[X]\nhr : ↑(aeval x) p ∈ AlgHom.range (aeval x)\n⊢ ↑(aeval x) p ∈ span R ↑(Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1)))\n[PROOFSTEP]\nrw [← modByMonic_add_div p hfm]\n[GOAL]\ncase intro.intro.a.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : eval₂ (algebraMap R A) x f = 0\np : R[X]\nhr : ↑(aeval x) p ∈ AlgHom.range (aeval x)\n⊢ ↑(aeval x) (p %ₘ f + f * (p /ₘ f)) ∈\n span R ↑(Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1)))\n[PROOFSTEP]\nrw [← aeval_def] at hfx \n[GOAL]\ncase intro.intro.a.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : ↑(aeval x) f = 0\np : R[X]\nhr : ↑(aeval x) p ∈ AlgHom.range (aeval x)\n⊢ ↑(aeval x) (p %ₘ f + f * (p /ₘ f)) ∈\n span R ↑(Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1)))\n[PROOFSTEP]\nrw [AlgHom.map_add, AlgHom.map_mul, hfx, zero_mul, add_zero]\n[GOAL]\ncase intro.intro.a.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : ↑(aeval x) f = 0\np : R[X]\nhr : ↑(aeval x) p ∈ AlgHom.range (aeval x)\n⊢ ↑(aeval x) (p %ₘ f) ∈ span R ↑(Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1)))\n[PROOFSTEP]\nhave : degree (p %ₘ f) ≤ degree f := degree_modByMonic_le p hfm\n[GOAL]\ncase intro.intro.a.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : ↑(aeval x) f = 0\np : R[X]\nhr : ↑(aeval x) p ∈ AlgHom.range (aeval x)\nthis : degree (p %ₘ f) ≤ degree f\n⊢ ↑(aeval x) (p %ₘ f) ∈ span R ↑(Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1)))\n[PROOFSTEP]\ngeneralize p %ₘ f = q at this ⊢\n[GOAL]\ncase intro.intro.a.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : ↑(aeval x) f = 0\np : R[X]\nhr : ↑(aeval x) p ∈ AlgHom.range (aeval x)\nq : R[X]\nthis : degree q ≤ degree f\n⊢ ↑(aeval x) q ∈ span R ↑(Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1)))\n[PROOFSTEP]\nrw [← sum_C_mul_X_pow_eq q, aeval_def, eval₂_sum, sum_def]\n[GOAL]\ncase intro.intro.a.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : ↑(aeval x) f = 0\np : R[X]\nhr : ↑(aeval x) p ∈ AlgHom.range (aeval x)\nq : R[X]\nthis : degree q ≤ degree f\n⊢ ∑ n in support q, eval₂ (algebraMap R A) x (↑C (coeff q n) * X ^ n) ∈\n span R ↑(Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1)))\n[PROOFSTEP]\nrefine' sum_mem fun k hkq => _\n[GOAL]\ncase intro.intro.a.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : ↑(aeval x) f = 0\np : R[X]\nhr : ↑(aeval x) p ∈ AlgHom.range (aeval x)\nq : R[X]\nthis : degree q ≤ degree f\nk : ℕ\nhkq : k ∈ support q\n⊢ eval₂ (algebraMap R A) x (↑C (coeff q k) * X ^ k) ∈\n span R ↑(Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1)))\n[PROOFSTEP]\nrw [eval₂_mul, eval₂_C, eval₂_pow, eval₂_X, ← Algebra.smul_def]\n[GOAL]\ncase intro.intro.a.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : ↑(aeval x) f = 0\np : R[X]\nhr : ↑(aeval x) p ∈ AlgHom.range (aeval x)\nq : R[X]\nthis : degree q ≤ degree f\nk : ℕ\nhkq : k ∈ support q\n⊢ coeff q k • x ^ k ∈ span R ↑(Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1)))\n[PROOFSTEP]\nrefine' smul_mem _ _ (subset_span _)\n[GOAL]\ncase intro.intro.a.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : ↑(aeval x) f = 0\np : R[X]\nhr : ↑(aeval x) p ∈ AlgHom.range (aeval x)\nq : R[X]\nthis : degree q ≤ degree f\nk : ℕ\nhkq : k ∈ support q\n⊢ x ^ k ∈ ↑(Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1)))\n[PROOFSTEP]\nrw [Finset.mem_coe]\n[GOAL]\ncase intro.intro.a.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : ↑(aeval x) f = 0\np : R[X]\nhr : ↑(aeval x) p ∈ AlgHom.range (aeval x)\nq : R[X]\nthis : degree q ≤ degree f\nk : ℕ\nhkq : k ∈ support q\n⊢ x ^ k ∈ Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (natDegree f + 1))\n[PROOFSTEP]\nrefine' Finset.mem_image.2 ⟨_, _, rfl⟩\n[GOAL]\ncase intro.intro.a.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : ↑(aeval x) f = 0\np : R[X]\nhr : ↑(aeval x) p ∈ AlgHom.range (aeval x)\nq : R[X]\nthis : degree q ≤ degree f\nk : ℕ\nhkq : k ∈ support q\n⊢ k ∈ Finset.range (natDegree f + 1)\n[PROOFSTEP]\nrw [Finset.mem_range, Nat.lt_succ_iff]\n[GOAL]\ncase intro.intro.a.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : ↑(aeval x) f = 0\np : R[X]\nhr : ↑(aeval x) p ∈ AlgHom.range (aeval x)\nq : R[X]\nthis : degree q ≤ degree f\nk : ℕ\nhkq : k ∈ support q\n⊢ k ≤ natDegree f\n[PROOFSTEP]\nrefine' le_of_not_lt fun hk => _\n[GOAL]\ncase intro.intro.a.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : ↑(aeval x) f = 0\np : R[X]\nhr : ↑(aeval x) p ∈ AlgHom.range (aeval x)\nq : R[X]\nthis : degree q ≤ degree f\nk : ℕ\nhkq : k ∈ support q\nhk : natDegree f < k\n⊢ False\n[PROOFSTEP]\nrw [degree_le_iff_coeff_zero] at this \n[GOAL]\ncase intro.intro.a.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : ↑(aeval x) f = 0\np : R[X]\nhr : ↑(aeval x) p ∈ AlgHom.range (aeval x)\nq : R[X]\nthis : ∀ (m : ℕ), degree f < ↑m → coeff q m = 0\nk : ℕ\nhkq : k ∈ support q\nhk : natDegree f < k\n⊢ False\n[PROOFSTEP]\nrw [mem_support_iff] at hkq \n[GOAL]\ncase intro.intro.a.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : ↑(aeval x) f = 0\np : R[X]\nhr : ↑(aeval x) p ∈ AlgHom.range (aeval x)\nq : R[X]\nthis : ∀ (m : ℕ), degree f < ↑m → coeff q m = 0\nk : ℕ\nhkq : coeff q k ≠ 0\nhk : natDegree f < k\n⊢ False\n[PROOFSTEP]\napply hkq\n[GOAL]\ncase intro.intro.a.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : ↑(aeval x) f = 0\np : R[X]\nhr : ↑(aeval x) p ∈ AlgHom.range (aeval x)\nq : R[X]\nthis : ∀ (m : ℕ), degree f < ↑m → coeff q m = 0\nk : ℕ\nhkq : coeff q k ≠ 0\nhk : natDegree f < k\n⊢ coeff q k = 0\n[PROOFSTEP]\napply this\n[GOAL]\ncase intro.intro.a.intro.a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nx : A\nf : R[X]\nhfm : Monic f\nhfx : ↑(aeval x) f = 0\np : R[X]\nhr : ↑(aeval x) p ∈ AlgHom.range (aeval x)\nq : R[X]\nthis : ∀ (m : ℕ), degree f < ↑m → coeff q m = 0\nk : ℕ\nhkq : coeff q k ≠ 0\nhk : natDegree f < k\n⊢ degree f < ↑k\n[PROOFSTEP]\nexact lt_of_le_of_lt degree_le_natDegree (WithBot.coe_lt_coe.2 hk)\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\ns : Set A\nhfs : Set.Finite s\nhis : ∀ (x : A), x ∈ s → IsIntegral R x\nx✝ : ∀ (x : A), x ∈ ∅ → IsIntegral R x\nx : A\n⊢ x ∈ span R ↑{1} ↔ x ∈ ↑Subalgebra.toSubmodule (Algebra.adjoin R ∅)\n[PROOFSTEP]\nerw [Algebra.adjoin_empty, Finset.coe_singleton, ← one_eq_span, one_eq_range, LinearMap.mem_range, Algebra.mem_bot]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\ns : Set A\nhfs : Set.Finite s\nhis : ∀ (x : A), x ∈ s → IsIntegral R x\nx✝ : ∀ (x : A), x ∈ ∅ → IsIntegral R x\nx : A\n⊢ (∃ y, ↑(Algebra.linearMap R A) y = x) ↔ x ∈ Set.range ↑(algebraMap R A)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\ns✝ : Set A\nhfs : Set.Finite s✝\nhis✝ : ∀ (x : A), x ∈ s✝ → IsIntegral R x\na : A\ns : Set A\nx✝¹ : ¬a ∈ s\nx✝ : Set.Finite s\nih : (∀ (x : A), x ∈ s → IsIntegral R x) → FG (↑Subalgebra.toSubmodule (Algebra.adjoin R s))\nhis : ∀ (x : A), x ∈ insert a s → IsIntegral R x\n⊢ FG (↑Subalgebra.toSubmodule (Algebra.adjoin R (insert a s)))\n[PROOFSTEP]\nrw [← Set.union_singleton, Algebra.adjoin_union_coe_submodule]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\ns✝ : Set A\nhfs : Set.Finite s✝\nhis✝ : ∀ (x : A), x ∈ s✝ → IsIntegral R x\na : A\ns : Set A\nx✝¹ : ¬a ∈ s\nx✝ : Set.Finite s\nih : (∀ (x : A), x ∈ s → IsIntegral R x) → FG (↑Subalgebra.toSubmodule (Algebra.adjoin R s))\nhis : ∀ (x : A), x ∈ insert a s → IsIntegral R x\n⊢ FG (↑Subalgebra.toSubmodule (Algebra.adjoin R s) * ↑Subalgebra.toSubmodule (Algebra.adjoin R {a}))\n[PROOFSTEP]\nexact\n FG.mul (ih fun i hi => his i <| Set.mem_insert_of_mem a hi)\n (FG_adjoin_singleton_of_integral _ <| his a <| Set.mem_insert a s)\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nHS : FG (↑Subalgebra.toSubmodule S)\nx : A\nhx : x ∈ S\n⊢ IsIntegral R x\n[PROOFSTEP]\ncases' HS with y hy\n[GOAL]\ncase intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\n⊢ IsIntegral R x\n[PROOFSTEP]\nobtain ⟨lx, hlx1, hlx2⟩ : ∃ (l : A →₀ R), l ∈ Finsupp.supported R R ↑y ∧ (Finsupp.total A A R id) l = x := by\n rwa [← @Finsupp.mem_span_image_iff_total A A R _ _ _ id (↑y) x, Set.image_id (y : Set A), hy]\n -- Note that `y ⊆ S`.\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\n⊢ ∃ l, l ∈ Finsupp.supported R R ↑y ∧ ↑(Finsupp.total A A R id) l = x\n[PROOFSTEP]\nrwa [← @Finsupp.mem_span_image_iff_total A A R _ _ _ id (↑y) x, Set.image_id (y : Set A), hy]\n -- Note that `y ⊆ S`.\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\n⊢ IsIntegral R x\n[PROOFSTEP]\nhave hyS : ∀ {p}, p ∈ y → p ∈ S := fun {p} hp =>\n show p ∈ Subalgebra.toSubmodule S by\n rw [← hy]\n exact subset_span hp\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\np : A\nhp : p ∈ y\n⊢ p ∈ ↑Subalgebra.toSubmodule S\n[PROOFSTEP]\nrw [← hy]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\np : A\nhp : p ∈ y\n⊢ p ∈ span R ↑y\n[PROOFSTEP]\nexact subset_span hp\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\n⊢ IsIntegral R x\n[PROOFSTEP]\nhave : ∀ jk : (y ×ˢ y : Finset (A × A)), jk.1.1 * jk.1.2 ∈ (Subalgebra.toSubmodule S) := fun jk =>\n S.mul_mem (hyS (Finset.mem_product.1 jk.2).1) (hyS (Finset.mem_product.1 jk.2).2)\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nthis : ∀ (jk : { x // x ∈ y ×ˢ y }), (↑jk).fst * (↑jk).snd ∈ ↑Subalgebra.toSubmodule S\n⊢ IsIntegral R x\n[PROOFSTEP]\nrw [← hy, ← Set.image_id (y : Set A)] at this \n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nthis : ∀ (jk : { x // x ∈ y ×ˢ y }), (↑jk).fst * (↑jk).snd ∈ span R (id '' ↑y)\n⊢ IsIntegral R x\n[PROOFSTEP]\nsimp only [Finsupp.mem_span_image_iff_total] at this \n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nthis :\n ∀ (jk : { x // x ∈ y ×ˢ y }), ∃ l, l ∈ Finsupp.supported R R ↑y ∧ ↑(Finsupp.total A A R id) l = (↑jk).fst * (↑jk).snd\n⊢ IsIntegral R x\n[PROOFSTEP]\nchoose ly hly1 hly2 using this\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\n⊢ IsIntegral R x\n[PROOFSTEP]\nlet S₀ : Subring R :=\n Subring.closure\n ↑(lx.frange ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\n -- It suffices to prove that `x` is integral over `S₀`.\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\n⊢ IsIntegral R x\n[PROOFSTEP]\nrefine' isIntegral_ofSubring S₀ _\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\n⊢ IsIntegral { x // x ∈ S₀ } x\n[PROOFSTEP]\nletI : CommRing S₀ := SubringClass.toCommRing S₀\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\n⊢ IsIntegral { x // x ∈ S₀ } x\n[PROOFSTEP]\nletI : Algebra S₀ A := Algebra.ofSubring S₀\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\n⊢ IsIntegral { x // x ∈ S₀ } x\n[PROOFSTEP]\nhave : span S₀ (insert 1 ↑y : Set A) * span S₀ (insert 1 ↑y : Set A) ≤ span S₀ (insert 1 ↑y : Set A) :=\n by\n rw [span_mul_span]\n refine' span_le.2 fun z hz => _\n rcases Set.mem_mul.1 hz with ⟨p, q, rfl | hp, hq, rfl⟩\n · rw [one_mul]\n exact subset_span hq\n rcases hq with (rfl | hq)\n · rw [mul_one]\n exact subset_span (Or.inr hp)\n erw [← hly2 ⟨(p, q), Finset.mem_product.2 ⟨hp, hq⟩⟩]\n rw [Finsupp.total_apply, Finsupp.sum]\n refine' (span S₀ (insert 1 ↑y : Set A)).sum_mem fun t ht => _\n have : ly ⟨(p, q), Finset.mem_product.2 ⟨hp, hq⟩⟩ t ∈ S₀ :=\n Subring.subset_closure\n (Finset.mem_union_right _ <|\n Finset.mem_biUnion.2\n ⟨⟨(p, q), Finset.mem_product.2 ⟨hp, hq⟩⟩, Finset.mem_univ _,\n Finsupp.mem_frange.2 ⟨Finsupp.mem_support_iff.1 ht, _, rfl⟩⟩)\n change (⟨_, this⟩ : S₀) • t ∈ _\n exact\n smul_mem _ _\n (subset_span <| Or.inr <| hly1 _ ht)\n -- Hence this span is a subring. Call this subring `S₁`.\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\n⊢ span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\n[PROOFSTEP]\nrw [span_mul_span]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\n⊢ span { x // x ∈ S₀ } (insert 1 ↑y * insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\n[PROOFSTEP]\nrefine' span_le.2 fun z hz => _\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nz : A\nhz : z ∈ insert 1 ↑y * insert 1 ↑y\n⊢ z ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))\n[PROOFSTEP]\nrcases Set.mem_mul.1 hz with ⟨p, q, rfl | hp, hq, rfl⟩\n[GOAL]\ncase intro.intro.intro.inl.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nq : A\nhq : q ∈ insert 1 ↑y\nhz : 1 * q ∈ insert 1 ↑y * insert 1 ↑y\n⊢ 1 * q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\ncase intro.intro.intro.inl.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nq : A\nhq : q ∈ insert 1 ↑y\nhz : 1 * q ∈ insert 1 ↑y * insert 1 ↑y\n⊢ q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))\n[PROOFSTEP]\nexact subset_span hq\n[GOAL]\ncase intro.intro.intro.inr.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\np q : A\nhp : p ∈ ↑y\nhq : q ∈ insert 1 ↑y\nhz : p * q ∈ insert 1 ↑y * insert 1 ↑y\n⊢ p * q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))\n[PROOFSTEP]\nrcases hq with (rfl | hq)\n[GOAL]\ncase intro.intro.intro.inr.intro.inl\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\np : A\nhp : p ∈ ↑y\nhz : p * 1 ∈ insert 1 ↑y * insert 1 ↑y\n⊢ p * 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\ncase intro.intro.intro.inr.intro.inl\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\np : A\nhp : p ∈ ↑y\nhz : p * 1 ∈ insert 1 ↑y * insert 1 ↑y\n⊢ p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))\n[PROOFSTEP]\nexact subset_span (Or.inr hp)\n[GOAL]\ncase intro.intro.intro.inr.intro.inr\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\np q : A\nhp : p ∈ ↑y\nhz : p * q ∈ insert 1 ↑y * insert 1 ↑y\nhq : q ∈ ↑y\n⊢ p * q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))\n[PROOFSTEP]\nerw [← hly2 ⟨(p, q), Finset.mem_product.2 ⟨hp, hq⟩⟩]\n[GOAL]\ncase intro.intro.intro.inr.intro.inr\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\np q : A\nhp : p ∈ ↑y\nhz : p * q ∈ insert 1 ↑y * insert 1 ↑y\nhq : q ∈ ↑y\n⊢ ↑(Finsupp.total A A R id) (ly { val := (p, q), property := (_ : (p, q) ∈ y ×ˢ y) }) ∈\n ↑(span { x // x ∈ S₀ } (insert 1 ↑y))\n[PROOFSTEP]\nrw [Finsupp.total_apply, Finsupp.sum]\n[GOAL]\ncase intro.intro.intro.inr.intro.inr\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\np q : A\nhp : p ∈ ↑y\nhz : p * q ∈ insert 1 ↑y * insert 1 ↑y\nhq : q ∈ ↑y\n⊢ ∑ a in (ly { val := (p, q), property := (_ : (p, q) ∈ y ×ˢ y) }).support,\n ↑(ly { val := (p, q), property := (_ : (p, q) ∈ y ×ˢ y) }) a • id a ∈\n ↑(span { x // x ∈ S₀ } (insert 1 ↑y))\n[PROOFSTEP]\nrefine' (span S₀ (insert 1 ↑y : Set A)).sum_mem fun t ht => _\n[GOAL]\ncase intro.intro.intro.inr.intro.inr\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\np q : A\nhp : p ∈ ↑y\nhz : p * q ∈ insert 1 ↑y * insert 1 ↑y\nhq : q ∈ ↑y\nt : A\nht : t ∈ (ly { val := (p, q), property := (_ : (p, q) ∈ y ×ˢ y) }).support\n⊢ ↑(ly { val := (p, q), property := (_ : (p, q) ∈ y ×ˢ y) }) t • id t ∈ span { x // x ∈ S₀ } (insert 1 ↑y)\n[PROOFSTEP]\nhave : ly ⟨(p, q), Finset.mem_product.2 ⟨hp, hq⟩⟩ t ∈ S₀ :=\n Subring.subset_closure\n (Finset.mem_union_right _ <|\n Finset.mem_biUnion.2\n ⟨⟨(p, q), Finset.mem_product.2 ⟨hp, hq⟩⟩, Finset.mem_univ _,\n Finsupp.mem_frange.2 ⟨Finsupp.mem_support_iff.1 ht, _, rfl⟩⟩)\n[GOAL]\ncase intro.intro.intro.inr.intro.inr\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝¹ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\np q : A\nhp : p ∈ ↑y\nhz : p * q ∈ insert 1 ↑y * insert 1 ↑y\nhq : q ∈ ↑y\nt : A\nht : t ∈ (ly { val := (p, q), property := (_ : (p, q) ∈ y ×ˢ y) }).support\nthis : ↑(ly { val := (p, q), property := (_ : (p, q) ∈ y ×ˢ y) }) t ∈ S₀\n⊢ ↑(ly { val := (p, q), property := (_ : (p, q) ∈ y ×ˢ y) }) t • id t ∈ span { x // x ∈ S₀ } (insert 1 ↑y)\n[PROOFSTEP]\nchange (⟨_, this⟩ : S₀) • t ∈ _\n[GOAL]\ncase intro.intro.intro.inr.intro.inr\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝¹ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\np q : A\nhp : p ∈ ↑y\nhz : p * q ∈ insert 1 ↑y * insert 1 ↑y\nhq : q ∈ ↑y\nt : A\nht : t ∈ (ly { val := (p, q), property := (_ : (p, q) ∈ y ×ˢ y) }).support\nthis : ↑(ly { val := (p, q), property := (_ : (p, q) ∈ y ×ˢ y) }) t ∈ S₀\n⊢ { val := ↑(ly { val := (p, q), property := (_ : (p, q) ∈ y ×ˢ y) }) t, property := this } • t ∈\n span { x // x ∈ S₀ } (insert 1 ↑y)\n[PROOFSTEP]\nexact\n smul_mem _ _\n (subset_span <| Or.inr <| hly1 _ ht)\n -- Hence this span is a subring. Call this subring `S₁`.\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝¹ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\n⊢ IsIntegral { x // x ∈ S₀ } x\n[PROOFSTEP]\nlet S₁ : Subring A :=\n { carrier := span S₀ (insert 1 ↑y : Set A)\n one_mem' := subset_span <| Or.inl rfl\n mul_mem' := fun {p q} hp hq => this <| mul_mem_mul hp hq\n zero_mem' := (span S₀ (insert 1 ↑y : Set A)).zero_mem\n add_mem' := fun {_ _} => (span S₀ (insert 1 ↑y : Set A)).add_mem\n neg_mem' := fun {_} => (span S₀ (insert 1 ↑y : Set A)).neg_mem }\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝¹ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\n⊢ IsIntegral { x // x ∈ S₀ } x\n[PROOFSTEP]\nhave : S₁ = Subalgebra.toSubring (Algebra.adjoin S₀ (↑y : Set A)) :=\n by\n ext z\n suffices z ∈ span (↥S₀) (insert 1 ↑y : Set A) ↔ z ∈ Subalgebra.toSubmodule (Algebra.adjoin (↥S₀) (y : Set A)) by simpa\n constructor <;> intro hz\n · exact (span_le.2 (Set.insert_subset_iff.2 ⟨(Algebra.adjoin S₀ (y : Set A)).one_mem, Algebra.subset_adjoin⟩)) hz\n · rw [Subalgebra.mem_toSubmodule, Algebra.mem_adjoin_iff] at hz \n suffices Subring.closure (Set.range (algebraMap (↥S₀) A) ∪ ↑y) ≤ S₁ by exact this hz\n refine' Subring.closure_le.2 (Set.union_subset _ fun t ht => subset_span <| Or.inr ht)\n rw [Set.range_subset_iff]\n intro y'\n rw [Algebra.algebraMap_eq_smul_one]\n exact smul_mem (span S₀ (insert (1 : A) (y : Set A))) y' (subset_span (Or.inl rfl))\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝¹ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\n⊢ S₁ = Subalgebra.toSubring (Algebra.adjoin { x // x ∈ S₀ } ↑y)\n[PROOFSTEP]\next z\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝¹ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nz : A\n⊢ z ∈ S₁ ↔ z ∈ Subalgebra.toSubring (Algebra.adjoin { x // x ∈ S₀ } ↑y)\n[PROOFSTEP]\nsuffices z ∈ span (↥S₀) (insert 1 ↑y : Set A) ↔ z ∈ Subalgebra.toSubmodule (Algebra.adjoin (↥S₀) (y : Set A)) by simpa\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝² : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝¹ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis✝ : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nz : A\nthis : z ∈ span { x // x ∈ S₀ } (insert 1 ↑y) ↔ z ∈ ↑Subalgebra.toSubmodule (Algebra.adjoin { x // x ∈ S₀ } ↑y)\n⊢ z ∈ S₁ ↔ z ∈ Subalgebra.toSubring (Algebra.adjoin { x // x ∈ S₀ } ↑y)\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝¹ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nz : A\n⊢ z ∈ span { x // x ∈ S₀ } (insert 1 ↑y) ↔ z ∈ ↑Subalgebra.toSubmodule (Algebra.adjoin { x // x ∈ S₀ } ↑y)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝¹ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nz : A\n⊢ z ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → z ∈ ↑Subalgebra.toSubmodule (Algebra.adjoin { x // x ∈ S₀ } ↑y)\n[PROOFSTEP]\nintro hz\n[GOAL]\ncase h.mpr\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝¹ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nz : A\n⊢ z ∈ ↑Subalgebra.toSubmodule (Algebra.adjoin { x // x ∈ S₀ } ↑y) → z ∈ span { x // x ∈ S₀ } (insert 1 ↑y)\n[PROOFSTEP]\nintro hz\n[GOAL]\ncase h.mp\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝¹ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nz : A\nhz : z ∈ span { x // x ∈ S₀ } (insert 1 ↑y)\n⊢ z ∈ ↑Subalgebra.toSubmodule (Algebra.adjoin { x // x ∈ S₀ } ↑y)\n[PROOFSTEP]\nexact (span_le.2 (Set.insert_subset_iff.2 ⟨(Algebra.adjoin S₀ (y : Set A)).one_mem, Algebra.subset_adjoin⟩)) hz\n[GOAL]\ncase h.mpr\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝¹ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nz : A\nhz : z ∈ ↑Subalgebra.toSubmodule (Algebra.adjoin { x // x ∈ S₀ } ↑y)\n⊢ z ∈ span { x // x ∈ S₀ } (insert 1 ↑y)\n[PROOFSTEP]\nrw [Subalgebra.mem_toSubmodule, Algebra.mem_adjoin_iff] at hz \n[GOAL]\ncase h.mpr\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝¹ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nz : A\nhz : z ∈ Subring.closure (Set.range ↑(algebraMap { x // x ∈ S₀ } A) ∪ ↑y)\n⊢ z ∈ span { x // x ∈ S₀ } (insert 1 ↑y)\n[PROOFSTEP]\nsuffices Subring.closure (Set.range (algebraMap (↥S₀) A) ∪ ↑y) ≤ S₁ by exact this hz\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝² : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝¹ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis✝ : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nz : A\nhz : z ∈ Subring.closure (Set.range ↑(algebraMap { x // x ∈ S₀ } A) ∪ ↑y)\nthis : Subring.closure (Set.range ↑(algebraMap { x // x ∈ S₀ } A) ∪ ↑y) ≤ S₁\n⊢ z ∈ span { x // x ∈ S₀ } (insert 1 ↑y)\n[PROOFSTEP]\nexact this hz\n[GOAL]\ncase h.mpr\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝¹ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nz : A\nhz : z ∈ Subring.closure (Set.range ↑(algebraMap { x // x ∈ S₀ } A) ∪ ↑y)\n⊢ Subring.closure (Set.range ↑(algebraMap { x // x ∈ S₀ } A) ∪ ↑y) ≤ S₁\n[PROOFSTEP]\nrefine' Subring.closure_le.2 (Set.union_subset _ fun t ht => subset_span <| Or.inr ht)\n[GOAL]\ncase h.mpr\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝¹ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nz : A\nhz : z ∈ Subring.closure (Set.range ↑(algebraMap { x // x ∈ S₀ } A) ∪ ↑y)\n⊢ Set.range ↑(algebraMap { x // x ∈ S₀ } A) ⊆ ↑S₁\n[PROOFSTEP]\nrw [Set.range_subset_iff]\n[GOAL]\ncase h.mpr\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝¹ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nz : A\nhz : z ∈ Subring.closure (Set.range ↑(algebraMap { x // x ∈ S₀ } A) ∪ ↑y)\n⊢ ∀ (y : { x // x ∈ S₀ }), ↑(algebraMap { x // x ∈ S₀ } A) y ∈ ↑S₁\n[PROOFSTEP]\nintro y'\n[GOAL]\ncase h.mpr\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝¹ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nz : A\nhz : z ∈ Subring.closure (Set.range ↑(algebraMap { x // x ∈ S₀ } A) ∪ ↑y)\ny' : { x // x ∈ S₀ }\n⊢ ↑(algebraMap { x // x ∈ S₀ } A) y' ∈ ↑S₁\n[PROOFSTEP]\nrw [Algebra.algebraMap_eq_smul_one]\n[GOAL]\ncase h.mpr\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝¹ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nz : A\nhz : z ∈ Subring.closure (Set.range ↑(algebraMap { x // x ∈ S₀ } A) ∪ ↑y)\ny' : { x // x ∈ S₀ }\n⊢ y' • 1 ∈ ↑S₁\n[PROOFSTEP]\nexact smul_mem (span S₀ (insert (1 : A) (y : Set A))) y' (subset_span (Or.inl rfl))\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝² : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝¹ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis✝ : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nthis : S₁ = Subalgebra.toSubring (Algebra.adjoin { x // x ∈ S₀ } ↑y)\n⊢ IsIntegral { x // x ∈ S₀ } x\n[PROOFSTEP]\nhave foo : ∀ z, z ∈ S₁ ↔ z ∈ Algebra.adjoin (↥S₀) (y : Set A)\n[GOAL]\ncase foo\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝² : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝¹ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis✝ : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nthis : S₁ = Subalgebra.toSubring (Algebra.adjoin { x // x ∈ S₀ } ↑y)\n⊢ ∀ (z : A), z ∈ S₁ ↔ z ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝² : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝¹ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis✝ : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nthis : S₁ = Subalgebra.toSubring (Algebra.adjoin { x // x ∈ S₀ } ↑y)\nfoo : ∀ (z : A), z ∈ S₁ ↔ z ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\n⊢ IsIntegral { x // x ∈ S₀ } x\n[PROOFSTEP]\nsimp [this]\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝² : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝¹ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis✝ : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nthis : S₁ = Subalgebra.toSubring (Algebra.adjoin { x // x ∈ S₀ } ↑y)\nfoo : ∀ (z : A), z ∈ S₁ ↔ z ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\n⊢ IsIntegral { x // x ∈ S₀ } x\n[PROOFSTEP]\nhaveI : IsNoetherianRing S₀ := is_noetherian_subring_closure _ (Finset.finite_toSet _)\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝³ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝² : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis✝¹ : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nthis✝ : S₁ = Subalgebra.toSubring (Algebra.adjoin { x // x ∈ S₀ } ↑y)\nfoo : ∀ (z : A), z ∈ S₁ ↔ z ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\nthis : IsNoetherianRing { x // x ∈ S₀ }\n⊢ IsIntegral { x // x ∈ S₀ } x\n[PROOFSTEP]\nrefine'\n isIntegral_of_submodule_noetherian (Algebra.adjoin S₀ ↑y)\n (isNoetherian_of_fg_of_noetherian _\n ⟨insert 1 y, by\n rw [Finset.coe_insert]\n ext z\n simp only [Finset.coe_sort_coe, Finset.univ_eq_attach, Finset.mem_coe, Subalgebra.mem_toSubmodule]\n convert foo z⟩)\n _ _\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝³ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝² : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis✝¹ : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nthis✝ : S₁ = Subalgebra.toSubring (Algebra.adjoin { x // x ∈ S₀ } ↑y)\nfoo : ∀ (z : A), z ∈ S₁ ↔ z ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\nthis : IsNoetherianRing { x // x ∈ S₀ }\n⊢ span { x // x ∈ S₀ } ↑(insert 1 y) = ↑Subalgebra.toSubmodule (Algebra.adjoin { x // x ∈ S₀ } ↑y)\n[PROOFSTEP]\nrw [Finset.coe_insert]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝³ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝² : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis✝¹ : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nthis✝ : S₁ = Subalgebra.toSubring (Algebra.adjoin { x // x ∈ S₀ } ↑y)\nfoo : ∀ (z : A), z ∈ S₁ ↔ z ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\nthis : IsNoetherianRing { x // x ∈ S₀ }\n⊢ span { x // x ∈ S₀ } (insert 1 ↑y) = ↑Subalgebra.toSubmodule (Algebra.adjoin { x // x ∈ S₀ } ↑y)\n[PROOFSTEP]\next z\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝³ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝² : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis✝¹ : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nthis✝ : S₁ = Subalgebra.toSubring (Algebra.adjoin { x // x ∈ S₀ } ↑y)\nfoo : ∀ (z : A), z ∈ S₁ ↔ z ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\nthis : IsNoetherianRing { x // x ∈ S₀ }\nz : A\n⊢ z ∈ span { x // x ∈ S₀ } (insert 1 ↑y) ↔ z ∈ ↑Subalgebra.toSubmodule (Algebra.adjoin { x // x ∈ S₀ } ↑y)\n[PROOFSTEP]\nsimp only [Finset.coe_sort_coe, Finset.univ_eq_attach, Finset.mem_coe, Subalgebra.mem_toSubmodule]\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝³ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝² : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis✝¹ : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nthis✝ : S₁ = Subalgebra.toSubring (Algebra.adjoin { x // x ∈ S₀ } ↑y)\nfoo : ∀ (z : A), z ∈ S₁ ↔ z ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\nthis : IsNoetherianRing { x // x ∈ S₀ }\nz : A\n⊢ z ∈\n span\n { x //\n x ∈ Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion (Finset.attach (y ×ˢ y)) (Finsupp.frange ∘ ly)) }\n (insert 1 ↑y) ↔\n z ∈\n Algebra.adjoin\n { x //\n x ∈ Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion (Finset.attach (y ×ˢ y)) (Finsupp.frange ∘ ly)) }\n ↑y\n[PROOFSTEP]\nconvert foo z\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝³ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝² : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis✝¹ : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nthis✝ : S₁ = Subalgebra.toSubring (Algebra.adjoin { x // x ∈ S₀ } ↑y)\nfoo : ∀ (z : A), z ∈ S₁ ↔ z ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\nthis : IsNoetherianRing { x // x ∈ S₀ }\n⊢ x ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\n[PROOFSTEP]\nrw [← hlx2, Finsupp.total_apply, Finsupp.sum]\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝³ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝² : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis✝¹ : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nthis✝ : S₁ = Subalgebra.toSubring (Algebra.adjoin { x // x ∈ S₀ } ↑y)\nfoo : ∀ (z : A), z ∈ S₁ ↔ z ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\nthis : IsNoetherianRing { x // x ∈ S₀ }\n⊢ ∑ a in lx.support, ↑lx a • id a ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\n[PROOFSTEP]\nrefine' Subalgebra.sum_mem _ fun r hr => _\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝³ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝² : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis✝¹ : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nthis✝ : S₁ = Subalgebra.toSubring (Algebra.adjoin { x // x ∈ S₀ } ↑y)\nfoo : ∀ (z : A), z ∈ S₁ ↔ z ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\nthis : IsNoetherianRing { x // x ∈ S₀ }\nr : A\nhr : r ∈ lx.support\n⊢ ↑lx r • id r ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\n[PROOFSTEP]\nhave : lx r ∈ S₀ := Subring.subset_closure (Finset.mem_union_left _ (Finset.mem_image_of_mem _ hr))\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝⁴ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝³ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis✝² : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nthis✝¹ : S₁ = Subalgebra.toSubring (Algebra.adjoin { x // x ∈ S₀ } ↑y)\nfoo : ∀ (z : A), z ∈ S₁ ↔ z ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\nthis✝ : IsNoetherianRing { x // x ∈ S₀ }\nr : A\nhr : r ∈ lx.support\nthis : ↑lx r ∈ S₀\n⊢ ↑lx r • id r ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\n[PROOFSTEP]\nchange (⟨_, this⟩ : S₀) • r ∈ _\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : lx ∈ Finsupp.supported R R ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝⁴ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝³ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis✝² : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nthis✝¹ : S₁ = Subalgebra.toSubring (Algebra.adjoin { x // x ∈ S₀ } ↑y)\nfoo : ∀ (z : A), z ∈ S₁ ↔ z ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\nthis✝ : IsNoetherianRing { x // x ∈ S₀ }\nr : A\nhr : r ∈ lx.support\nthis : ↑lx r ∈ S₀\n⊢ { val := ↑lx r, property := this } • r ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\n[PROOFSTEP]\nrw [Finsupp.mem_supported] at hlx1 \n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS : Subalgebra R A\nx : A\nhx : x ∈ S\ny : Finset A\nhy : span R ↑y = ↑Subalgebra.toSubmodule S\nlx : A →₀ R\nhlx1 : ↑lx.support ⊆ ↑y\nhlx2 : ↑(Finsupp.total A A R id) lx = x\nhyS : ∀ {p : A}, p ∈ y → p ∈ S\nly : { x // x ∈ y ×ˢ y } → A →₀ R\nhly1 : ∀ (jk : { x // x ∈ y ×ˢ y }), ly jk ∈ Finsupp.supported R R ↑y\nhly2 : ∀ (jk : { x // x ∈ y ×ˢ y }), ↑(Finsupp.total A A R id) (ly jk) = (↑jk).fst * (↑jk).snd\nS₀ : Subring R := Subring.closure ↑(Finsupp.frange lx ∪ Finset.biUnion Finset.univ (Finsupp.frange ∘ ly))\nthis✝⁴ : CommRing { x // x ∈ S₀ } := SubringClass.toCommRing S₀\nthis✝³ : Algebra { x // x ∈ S₀ } A := Algebra.ofSubring S₀\nthis✝² : span { x // x ∈ S₀ } (insert 1 ↑y) * span { x // x ∈ S₀ } (insert 1 ↑y) ≤ span { x // x ∈ S₀ } (insert 1 ↑y)\nS₁ : Subring A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := ↑(span { x // x ∈ S₀ } (insert 1 ↑y)),\n mul_mem' :=\n (_ :\n ∀ {p q : A},\n p ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) →\n q ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y)) → p * q ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n one_mem' := (_ : 1 ∈ ↑(span { x // x ∈ S₀ } (insert 1 ↑y))) },\n add_mem' :=\n (_ :\n ∀ {x x_1 : A},\n x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) →\n x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → x + x_1 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)),\n zero_mem' := (_ : 0 ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) },\n neg_mem' := (_ : ∀ {x : A}, x ∈ span { x // x ∈ S₀ } (insert 1 ↑y) → -x ∈ span { x // x ∈ S₀ } (insert 1 ↑y)) }\nthis✝¹ : S₁ = Subalgebra.toSubring (Algebra.adjoin { x // x ∈ S₀ } ↑y)\nfoo : ∀ (z : A), z ∈ S₁ ↔ z ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\nthis✝ : IsNoetherianRing { x // x ∈ S₀ }\nr : A\nhr : r ∈ lx.support\nthis : ↑lx r ∈ S₀\n⊢ { val := ↑lx r, property := this } • r ∈ Algebra.adjoin { x // x ∈ S₀ } ↑y\n[PROOFSTEP]\nexact Subalgebra.smul_mem _ (Algebra.subset_adjoin <| hlx1 hr) _\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\n⊢ IsIntegral R x\n[PROOFSTEP]\nlet A' : Subalgebra R A :=\n { carrier := {x | ∀ n ∈ N, x • n ∈ N}\n mul_mem' := fun {a b} ha hb n hn => smul_smul a b n ▸ ha _ (hb _ hn)\n one_mem' := fun n hn => (one_smul A n).symm ▸ hn\n add_mem' := fun {a b} ha hb n hn => (add_smul a b n).symm ▸ N.add_mem (ha _ hn) (hb _ hn)\n zero_mem' := fun n _hn => (zero_smul A n).symm ▸ N.zero_mem\n algebraMap_mem' := fun r n hn => (algebraMap_smul A r n).symm ▸ N.smul_mem r hn }\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\n⊢ IsIntegral R x\n[PROOFSTEP]\nlet f : A' →ₐ[R] Module.End R N :=\n AlgHom.ofLinearMap\n { toFun := fun x => (DistribMulAction.toLinearMap R M x).restrict x.prop\n map_add' := by intros x y; ext;\n exact\n add_smul _ _\n _\n -- porting note: was\n -- `fun r s => LinearMap.ext fun n => Subtype.ext <| smul_assoc r s n`\n map_smul' := by intros r s; ext; apply smul_assoc }\n -- porting note: the next two lines were\n --`(LinearMap.ext fun n => Subtype.ext <| one_smul _ _) fun x y =>`\n --`LinearMap.ext fun n => Subtype.ext <| mul_smul x y n` (by ext; apply one_smul)\n (by intros x y; ext; apply mul_smul)\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\n⊢ ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y\n[PROOFSTEP]\nintros x y\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx✝ : A\nhx : ∀ (n : M), n ∈ N → x✝ • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nx y : { x // x ∈ A' }\n⊢ (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y\n[PROOFSTEP]\next\n[GOAL]\ncase h.a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx✝¹ : A\nhx : ∀ (n : M), n ∈ N → x✝¹ • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nx y : { x // x ∈ A' }\nx✝ : { x // x ∈ N }\n⊢ ↑(↑((fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y)) x✝) =\n ↑(↑((fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y)\n x✝)\n[PROOFSTEP]\nexact\n add_smul _ _\n _\n -- porting note: was\n -- `fun r s => LinearMap.ext fun n => Subtype.ext <| smul_assoc r s n`\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\n⊢ ∀ (r : R) (x : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • x) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n x\n[PROOFSTEP]\nintros r s\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nr : R\ns : { x // x ∈ A' }\n⊢ AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s\n[PROOFSTEP]\next\n[GOAL]\ncase h.a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nr : R\ns : { x // x ∈ A' }\nx✝ : { x // x ∈ N }\n⊢ ↑(↑(AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s))\n x✝) =\n ↑(↑(↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s)\n x✝)\n[PROOFSTEP]\napply smul_assoc\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\n⊢ ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s) }\n 1 =\n 1\n[PROOFSTEP]\next\n[GOAL]\ncase h.a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nx✝ : { x // x ∈ N }\n⊢ ↑(↑(↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n 1)\n x✝) =\n ↑(↑1 x✝)\n[PROOFSTEP]\napply one_smul\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\n⊢ ∀ (x y : { x // x ∈ A' }),\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n (x * y) =\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y\n[PROOFSTEP]\nintros x y\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx✝ : A\nhx : ∀ (n : M), n ∈ N → x✝ • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nx y : { x // x ∈ A' }\n⊢ ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s) }\n (x * y) =\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y\n[PROOFSTEP]\next\n[GOAL]\ncase h.a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx✝¹ : A\nhx : ∀ (n : M), n ∈ N → x✝¹ • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nx y : { x // x ∈ A' }\nx✝ : { x // x ∈ N }\n⊢ ↑(↑(↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n (x * y))\n x✝) =\n ↑(↑(↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y)\n x✝)\n[PROOFSTEP]\napply mul_smul\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf✝ : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nf : { x // x ∈ A' } →ₐ[R] Module.End R { x // x ∈ N } :=\n AlgHom.ofLinearMap\n {\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s) }\n (_ :\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n 1 =\n 1)\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n (x * y) =\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y)\n⊢ IsIntegral R x\n[PROOFSTEP]\nobtain ⟨a, ha₁, ha₂⟩ : ∃ a ∈ N, a ≠ (0 : M) := by\n by_contra h'\n push_neg at h' \n apply hN\n rwa [eq_bot_iff]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf✝ : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nf : { x // x ∈ A' } →ₐ[R] Module.End R { x // x ∈ N } :=\n AlgHom.ofLinearMap\n {\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s) }\n (_ :\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n 1 =\n 1)\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n (x * y) =\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y)\n⊢ ∃ a, a ∈ N ∧ a ≠ 0\n[PROOFSTEP]\nby_contra h'\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf✝ : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nf : { x // x ∈ A' } →ₐ[R] Module.End R { x // x ∈ N } :=\n AlgHom.ofLinearMap\n {\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s) }\n (_ :\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n 1 =\n 1)\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n (x * y) =\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y)\nh' : ¬∃ a, a ∈ N ∧ a ≠ 0\n⊢ False\n[PROOFSTEP]\npush_neg at h' \n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf✝ : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nf : { x // x ∈ A' } →ₐ[R] Module.End R { x // x ∈ N } :=\n AlgHom.ofLinearMap\n {\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s) }\n (_ :\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n 1 =\n 1)\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n (x * y) =\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y)\nh' : ∀ (a : M), a ∈ N → a = 0\n⊢ False\n[PROOFSTEP]\napply hN\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf✝ : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nf : { x // x ∈ A' } →ₐ[R] Module.End R { x // x ∈ N } :=\n AlgHom.ofLinearMap\n {\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s) }\n (_ :\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n 1 =\n 1)\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n (x * y) =\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y)\nh' : ∀ (a : M), a ∈ N → a = 0\n⊢ N = ⊥\n[PROOFSTEP]\nrwa [eq_bot_iff]\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf✝ : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nf : { x // x ∈ A' } →ₐ[R] Module.End R { x // x ∈ N } :=\n AlgHom.ofLinearMap\n {\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s) }\n (_ :\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n 1 =\n 1)\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n (x * y) =\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y)\na : M\nha₁ : a ∈ N\nha₂ : a ≠ 0\n⊢ IsIntegral R x\n[PROOFSTEP]\nhave : Function.Injective f := by\n show Function.Injective f.toLinearMap\n rw [← LinearMap.ker_eq_bot, eq_bot_iff]\n intro s hs\n have : s.1 • a = 0 := congr_arg Subtype.val (LinearMap.congr_fun hs ⟨a, ha₁⟩)\n exact Subtype.ext ((eq_zero_or_eq_zero_of_smul_eq_zero this).resolve_right ha₂)\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf✝ : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nf : { x // x ∈ A' } →ₐ[R] Module.End R { x // x ∈ N } :=\n AlgHom.ofLinearMap\n {\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s) }\n (_ :\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n 1 =\n 1)\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n (x * y) =\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y)\na : M\nha₁ : a ∈ N\nha₂ : a ≠ 0\n⊢ Function.Injective ↑f\n[PROOFSTEP]\nshow Function.Injective f.toLinearMap\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf✝ : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nf : { x // x ∈ A' } →ₐ[R] Module.End R { x // x ∈ N } :=\n AlgHom.ofLinearMap\n {\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s) }\n (_ :\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n 1 =\n 1)\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n (x * y) =\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y)\na : M\nha₁ : a ∈ N\nha₂ : a ≠ 0\n⊢ Function.Injective ↑(AlgHom.toLinearMap f)\n[PROOFSTEP]\nrw [← LinearMap.ker_eq_bot, eq_bot_iff]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf✝ : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nf : { x // x ∈ A' } →ₐ[R] Module.End R { x // x ∈ N } :=\n AlgHom.ofLinearMap\n {\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s) }\n (_ :\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n 1 =\n 1)\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n (x * y) =\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y)\na : M\nha₁ : a ∈ N\nha₂ : a ≠ 0\n⊢ LinearMap.ker (AlgHom.toLinearMap f) ≤ ⊥\n[PROOFSTEP]\nintro s hs\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf✝ : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nf : { x // x ∈ A' } →ₐ[R] Module.End R { x // x ∈ N } :=\n AlgHom.ofLinearMap\n {\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s) }\n (_ :\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n 1 =\n 1)\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n (x * y) =\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y)\na : M\nha₁ : a ∈ N\nha₂ : a ≠ 0\ns : { x // x ∈ A' }\nhs : s ∈ LinearMap.ker (AlgHom.toLinearMap f)\n⊢ s ∈ ⊥\n[PROOFSTEP]\nhave : s.1 • a = 0 := congr_arg Subtype.val (LinearMap.congr_fun hs ⟨a, ha₁⟩)\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf✝ : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nf : { x // x ∈ A' } →ₐ[R] Module.End R { x // x ∈ N } :=\n AlgHom.ofLinearMap\n {\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s) }\n (_ :\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n 1 =\n 1)\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n (x * y) =\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y)\na : M\nha₁ : a ∈ N\nha₂ : a ≠ 0\ns : { x // x ∈ A' }\nhs : s ∈ LinearMap.ker (AlgHom.toLinearMap f)\nthis : ↑s • a = 0\n⊢ s ∈ ⊥\n[PROOFSTEP]\nexact Subtype.ext ((eq_zero_or_eq_zero_of_smul_eq_zero this).resolve_right ha₂)\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf✝ : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nf : { x // x ∈ A' } →ₐ[R] Module.End R { x // x ∈ N } :=\n AlgHom.ofLinearMap\n {\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s) }\n (_ :\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n 1 =\n 1)\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n (x * y) =\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y)\na : M\nha₁ : a ∈ N\nha₂ : a ≠ 0\nthis : Function.Injective ↑f\n⊢ IsIntegral R x\n[PROOFSTEP]\nshow IsIntegral R (A'.val ⟨x, hx⟩)\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf✝ : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nf : { x // x ∈ A' } →ₐ[R] Module.End R { x // x ∈ N } :=\n AlgHom.ofLinearMap\n {\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s) }\n (_ :\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n 1 =\n 1)\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n (x * y) =\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y)\na : M\nha₁ : a ∈ N\nha₂ : a ≠ 0\nthis : Function.Injective ↑f\n⊢ IsIntegral R (↑(Subalgebra.val A') { val := x, property := hx })\n[PROOFSTEP]\nrw [isIntegral_algHom_iff A'.val Subtype.val_injective, ← isIntegral_algHom_iff f this]\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf✝ : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nf : { x // x ∈ A' } →ₐ[R] Module.End R { x // x ∈ N } :=\n AlgHom.ofLinearMap\n {\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s) }\n (_ :\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n 1 =\n 1)\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n (x * y) =\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y)\na : M\nha₁ : a ∈ N\nha₂ : a ≠ 0\nthis : Function.Injective ↑f\n⊢ IsIntegral R (↑f { val := x, property := hx })\n[PROOFSTEP]\nhaveI : Module.Finite R N := by rwa [Module.finite_def, Submodule.fg_top]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf✝ : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nf : { x // x ∈ A' } →ₐ[R] Module.End R { x // x ∈ N } :=\n AlgHom.ofLinearMap\n {\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s) }\n (_ :\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n 1 =\n 1)\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n (x * y) =\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y)\na : M\nha₁ : a ∈ N\nha₂ : a ≠ 0\nthis : Function.Injective ↑f\n⊢ Module.Finite R { x // x ∈ N }\n[PROOFSTEP]\nrwa [Module.finite_def, Submodule.fg_top]\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\nf✝ : R →+* S\nM : Type u_5\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Module A M\ninst✝¹ : IsScalarTower R A M\ninst✝ : NoZeroSMulDivisors A M\nN : Submodule R M\nhN : N ≠ ⊥\nhN' : FG N\nx : A\nhx : ∀ (n : M), n ∈ N → x • n ∈ N\nA' : Subalgebra R A :=\n {\n toSubsemiring :=\n {\n toSubmonoid :=\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) },\n add_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n b ∈\n {\n toSubsemigroup :=\n { carrier := {x | ∀ (n : M), n ∈ N → x • n ∈ N},\n mul_mem' :=\n (_ :\n ∀ {a b : A},\n a ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} →\n b ∈ {x | ∀ (n : M), n ∈ N → x • n ∈ N} → ∀ (n : M), n ∈ N → (a * b) • n ∈ N) },\n one_mem' := (_ : ∀ (n : M), n ∈ N → 1 • n ∈ N) }.toSubsemigroup.carrier →\n ∀ (n : M), n ∈ N → (a + b) • n ∈ N),\n zero_mem' := (_ : ∀ (n : M), n ∈ N → 0 • n ∈ N) },\n algebraMap_mem' := (_ : ∀ (r : R) (n : M), n ∈ N → ↑(algebraMap R A) r • n ∈ N) }\nf : { x // x ∈ A' } →ₐ[R] Module.End R { x // x ∈ N } :=\n AlgHom.ofLinearMap\n {\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) }\n s) }\n (_ :\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n 1 =\n 1)\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n (x * y) =\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n x *\n ↑{\n toAddHom :=\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A')) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (s : { x // x ∈ A' }),\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n (r • s) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'),\n map_add' :=\n (_ :\n ∀ (x y : { x // x ∈ A' }),\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n (x + y) =\n (fun x => LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n x +\n (fun x =>\n LinearMap.restrict (DistribMulAction.toLinearMap R M x) (_ : ↑x ∈ A'))\n y) }\n s) }\n y)\na : M\nha₁ : a ∈ N\nha₂ : a ≠ 0\nthis✝ : Function.Injective ↑f\nthis : Module.Finite R { x // x ∈ N }\n⊢ IsIntegral R (↑f { val := x, property := hx })\n[PROOFSTEP]\napply Module.End.isIntegral\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : IsIntegral f\nh' : FiniteType f\n⊢ Finite f\n[PROOFSTEP]\nletI := f.toAlgebra\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : IsIntegral f\nh' : FiniteType f\nthis : Algebra R S := toAlgebra f\n⊢ Finite f\n[PROOFSTEP]\nobtain ⟨s, hs⟩ := h'\n[GOAL]\ncase mk.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : IsIntegral f\nthis : Algebra R S := toAlgebra f\ns : Finset S\nhs : Algebra.adjoin R ↑s = ⊤\n⊢ Finite f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mk.intro.out\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : IsIntegral f\nthis : Algebra R S := toAlgebra f\ns : Finset S\nhs : Algebra.adjoin R ↑s = ⊤\n⊢ FG ⊤\n[PROOFSTEP]\nchange (⊤ : Subalgebra R S).toSubmodule.FG\n[GOAL]\ncase mk.intro.out\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : IsIntegral f\nthis : Algebra R S := toAlgebra f\ns : Finset S\nhs : Algebra.adjoin R ↑s = ⊤\n⊢ FG (↑Subalgebra.toSubmodule ⊤)\n[PROOFSTEP]\nrw [← hs]\n[GOAL]\ncase mk.intro.out\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : IsIntegral f\nthis : Algebra R S := toAlgebra f\ns : Finset S\nhs : Algebra.adjoin R ↑s = ⊤\n⊢ FG (↑Subalgebra.toSubmodule (Algebra.adjoin R ↑s))\n[PROOFSTEP]\nexact FG_adjoin_of_finite (Set.toFinite _) fun x _ => h x\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : Algebra.IsIntegral R A\nh' : FiniteType R A\n⊢ Module.Finite R A\n[PROOFSTEP]\nhave :=\n h.to_finite\n (by\n rw [RingHom.FiniteType]\n convert h'\n refine IsScalarTower.Algebra.ext (algebraMap R A).toAlgebra _ fun r x => ?_\n exact (Algebra.smul_def _ _).symm)\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : Algebra.IsIntegral R A\nh' : FiniteType R A\n⊢ RingHom.FiniteType (algebraMap R A)\n[PROOFSTEP]\nrw [RingHom.FiniteType]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : Algebra.IsIntegral R A\nh' : FiniteType R A\n⊢ FiniteType R A\n[PROOFSTEP]\nconvert h'\n[GOAL]\ncase h.e'_5\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : Algebra.IsIntegral R A\nh' : FiniteType R A\n⊢ RingHom.toAlgebra (algebraMap R A) = inst✝¹\n[PROOFSTEP]\nrefine IsScalarTower.Algebra.ext (algebraMap R A).toAlgebra _ fun r x => ?_\n[GOAL]\ncase h.e'_5\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : Algebra.IsIntegral R A\nh' : FiniteType R A\nr : R\nx : A\n⊢ (let_fun I := RingHom.toAlgebra (algebraMap R A);\n r • x) =\n r • x\n[PROOFSTEP]\nexact (Algebra.smul_def _ _).symm\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : Algebra.IsIntegral R A\nh' : FiniteType R A\nthis : RingHom.Finite (algebraMap R A)\n⊢ Module.Finite R A\n[PROOFSTEP]\nrw [RingHom.Finite] at this \n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : Algebra.IsIntegral R A\nh' : FiniteType R A\nthis : Module.Finite R A\n⊢ Module.Finite R A\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_5.h.e'_5\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : Algebra.IsIntegral R A\nh' : FiniteType R A\nthis : Module.Finite R A\n⊢ inst✝¹ = RingHom.toAlgebra (algebraMap R A)\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_5.h.e'_5.h\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : Algebra.IsIntegral R A\nh' : FiniteType R A\nthis : Module.Finite R A\nr✝ : R\nx✝ : A\n⊢ (let_fun I := inst✝¹;\n r✝ • x✝) =\n r✝ • x✝\n[PROOFSTEP]\nexact Algebra.smul_def _ _\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : Module.Finite R A\n⊢ Algebra.IsIntegral R A\n[PROOFSTEP]\napply RingHom.Finite.to_isIntegral\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : Module.Finite R A\n⊢ RingHom.Finite (algebraMap R A)\n[PROOFSTEP]\nrw [RingHom.Finite]\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : Module.Finite R A\n⊢ Module.Finite R A\n[PROOFSTEP]\nconvert h\n[GOAL]\ncase h.e'_5.h.e'_5\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : Module.Finite R A\n⊢ RingHom.toAlgebra (algebraMap R A) = inst✝¹\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_5.h.e'_5.h\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nh : Module.Finite R A\nr✝ : R\nx✝ : A\n⊢ (let_fun I := RingHom.toAlgebra (algebraMap R A);\n r✝ • x✝) =\n r✝ • x✝\n[PROOFSTEP]\nexact (Algebra.smul_def _ _).symm\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx y z : S\nhx : IsIntegralElem f x\nhy : IsIntegralElem f y\nhz : z ∈ Subring.closure {x, y}\n⊢ IsIntegralElem f z\n[PROOFSTEP]\nletI : Algebra R S := f.toAlgebra\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx y z : S\nhx : IsIntegralElem f x\nhy : IsIntegralElem f y\nhz : z ∈ Subring.closure {x, y}\nthis : Algebra R S := toAlgebra f\n⊢ IsIntegralElem f z\n[PROOFSTEP]\nhave := (FG_adjoin_singleton_of_integral x hx).mul (FG_adjoin_singleton_of_integral y hy)\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx y z : S\nhx : IsIntegralElem f x\nhy : IsIntegralElem f y\nhz : z ∈ Subring.closure {x, y}\nthis✝ : Algebra R S := toAlgebra f\nthis : FG (↑Subalgebra.toSubmodule (Algebra.adjoin R {x}) * ↑Subalgebra.toSubmodule (Algebra.adjoin R {y}))\n⊢ IsIntegralElem f z\n[PROOFSTEP]\nrw [← Algebra.adjoin_union_coe_submodule, Set.singleton_union] at this \n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx y z : S\nhx : IsIntegralElem f x\nhy : IsIntegralElem f y\nhz : z ∈ Subring.closure {x, y}\nthis✝ : Algebra R S := toAlgebra f\nthis : FG (↑Subalgebra.toSubmodule (Algebra.adjoin R {x, y}))\n⊢ IsIntegralElem f z\n[PROOFSTEP]\nexact\n isIntegral_of_mem_of_FG (Algebra.adjoin R { x, y }) this z\n (Algebra.mem_adjoin_iff.2 <| Subring.closure_mono (Set.subset_union_right _ _) hz)\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx y : S\nhx : IsIntegralElem f x\nhy : IsIntegralElem f y\n⊢ IsIntegralElem f (x - y)\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using f.is_integral_add hx (f.is_integral_neg hy)\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R B\nf : R →+* S\ninst✝² : Algebra S A\ninst✝¹ : Algebra R S\ninst✝ : IsScalarTower R S A\nx : A\nr : R\nhx : IsIntegral S x\n⊢ IsIntegral S (r • x)\n[PROOFSTEP]\nrw [Algebra.smul_def, IsScalarTower.algebraMap_apply R S A]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R B\nf : R →+* S\ninst✝² : Algebra S A\ninst✝¹ : Algebra R S\ninst✝ : IsScalarTower R S A\nx : A\nr : R\nhx : IsIntegral S x\n⊢ IsIntegral S (↑(algebraMap S A) (↑(algebraMap R S) r) * x)\n[PROOFSTEP]\nexact isIntegral_mul isIntegral_algebraMap hx\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\nn : ℕ\nhn : 0 < n\nhx : IsIntegral R (x ^ n)\n⊢ IsIntegral R x\n[PROOFSTEP]\nrcases hx with ⟨p, ⟨hmonic, heval⟩⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\nn : ℕ\nhn : 0 < n\np : R[X]\nhmonic : Monic p\nheval : eval₂ (algebraMap R A) (x ^ n) p = 0\n⊢ IsIntegral R x\n[PROOFSTEP]\nexact ⟨expand R n p, Monic.expand hn hmonic, by rwa [eval₂_eq_eval_map, map_expand, expand_eval, ← eval₂_eq_eval_map]⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\nn : ℕ\nhn : 0 < n\np : R[X]\nhmonic : Monic p\nheval : eval₂ (algebraMap R A) (x ^ n) p = 0\n⊢ eval₂ (algebraMap R A) x (↑(expand R n) p) = 0\n[PROOFSTEP]\nrwa [eval₂_eq_eval_map, map_expand, expand_eval, ← eval₂_eq_eval_map]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\nhx : IsIntegral R x\n⊢ Algebra.adjoin R {x} ≤ integralClosure R A\n[PROOFSTEP]\nrw [Algebra.adjoin_le_iff]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\nhx : IsIntegral R x\n⊢ {x} ⊆ ↑(integralClosure R A)\n[PROOFSTEP]\nsimp only [SetLike.mem_coe, Set.singleton_subset_iff]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\nhx : IsIntegral R x\n⊢ x ∈ integralClosure R A\n[PROOFSTEP]\nexact hx\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S✝\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S✝\nS T : Subalgebra R A\n⊢ Algebra.IsIntegral R { x // x ∈ S ⊔ T } ↔ Algebra.IsIntegral R { x // x ∈ S } ∧ Algebra.IsIntegral R { x // x ∈ T }\n[PROOFSTEP]\nsimp only [← le_integralClosure_iff_isIntegral, sup_le_iff]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nf : A ≃ₐ[R] B\n⊢ Subalgebra.map (↑f) (integralClosure R A) = integralClosure R B\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nf : A ≃ₐ[R] B\ny : B\n⊢ y ∈ Subalgebra.map (↑f) (integralClosure R A) ↔ y ∈ integralClosure R B\n[PROOFSTEP]\nrw [Subalgebra.mem_map]\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nf : A ≃ₐ[R] B\ny : B\n⊢ (∃ x, x ∈ integralClosure R A ∧ ↑↑f x = y) ↔ y ∈ integralClosure R B\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nf : A ≃ₐ[R] B\ny : B\n⊢ (∃ x, x ∈ integralClosure R A ∧ ↑↑f x = y) → y ∈ integralClosure R B\n[PROOFSTEP]\nrintro ⟨x, hx, rfl⟩\n[GOAL]\ncase h.mp.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nf : A ≃ₐ[R] B\nx : A\nhx : x ∈ integralClosure R A\n⊢ ↑↑f x ∈ integralClosure R B\n[PROOFSTEP]\nexact map_isIntegral f hx\n[GOAL]\ncase h.mpr\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nf : A ≃ₐ[R] B\ny : B\n⊢ y ∈ integralClosure R B → ∃ x, x ∈ integralClosure R A ∧ ↑↑f x = y\n[PROOFSTEP]\nintro hy\n[GOAL]\ncase h.mpr\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nf : A ≃ₐ[R] B\ny : B\nhy : y ∈ integralClosure R B\n⊢ ∃ x, x ∈ integralClosure R A ∧ ↑↑f x = y\n[PROOFSTEP]\nuse f.symm y, map_isIntegral (f.symm : B →ₐ[R] A) hy\n[GOAL]\ncase right\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\nf : A ≃ₐ[R] B\ny : B\nhy : y ∈ integralClosure R B\n⊢ ↑↑f (↑(AlgEquiv.symm f) y) = y\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : { x // x ∈ integralClosure R A }\np : R[X]\nhpm : Monic p\nhpx : eval₂ (algebraMap R A) (↑x) p = 0\n⊢ ↑(eval₂ (algebraMap R { x // x ∈ integralClosure R A }) x p) = ↑0\n[PROOFSTEP]\nrwa [← aeval_def, ← Subalgebra.val_apply, aeval_algHom_apply] at hpx \n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx y : S\nr : R\nhr : ↑f r * y = 1\nhx : IsIntegralElem f (x * y)\n⊢ IsIntegralElem f x\n[PROOFSTEP]\nobtain ⟨p, ⟨p_monic, hp⟩⟩ := hx\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx y : S\nr : R\nhr : ↑f r * y = 1\np : R[X]\np_monic : Monic p\nhp : eval₂ f (x * y) p = 0\n⊢ IsIntegralElem f x\n[PROOFSTEP]\nrefine' ⟨scaleRoots p r, ⟨(monic_scaleRoots_iff r).2 p_monic, _⟩⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx y : S\nr : R\nhr : ↑f r * y = 1\np : R[X]\np_monic : Monic p\nhp : eval₂ f (x * y) p = 0\n⊢ eval₂ f x (scaleRoots p r) = 0\n[PROOFSTEP]\nconvert scaleRoots_eval₂_eq_zero f hp\n[GOAL]\ncase h.e'_2.h.e'_6\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx y : S\nr : R\nhr : ↑f r * y = 1\np : R[X]\np_monic : Monic p\nhp : eval₂ f (x * y) p = 0\n⊢ x = ↑f r * (x * y)\n[PROOFSTEP]\nrw [mul_comm x y, ← mul_assoc, hr, one_mul]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\nf : R →+* S\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n A\nh : ∀ (i j : n), IsIntegral R (M i j)\n⊢ IsIntegral R (Matrix.det M)\n[PROOFSTEP]\nrw [Matrix.det_apply]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\nf : R →+* S\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n A\nh : ∀ (i j : n), IsIntegral R (M i j)\n⊢ IsIntegral R (∑ σ : Equiv.Perm n, ↑Equiv.Perm.sign σ • ∏ i : n, M (↑σ i) i)\n[PROOFSTEP]\nexact IsIntegral.sum _ fun σ _hσ => IsIntegral.zsmul (IsIntegral.prod _ fun i _hi => h _ _) _\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\ny : B\nh : IsIntegral R y\n⊢ IsIntegral A (x ⊗ₜ[R] y)\n[PROOFSTEP]\nobtain ⟨p, hp, hp'⟩ := h\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\ny : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (_root_.algebraMap R B) y p = 0\n⊢ IsIntegral A (x ⊗ₜ[R] y)\n[PROOFSTEP]\nrefine' ⟨(p.map (_root_.algebraMap R A)).scaleRoots x, _, _⟩\n[GOAL]\ncase intro.intro.refine'_1\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\ny : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (_root_.algebraMap R B) y p = 0\n⊢ Monic (scaleRoots (Polynomial.map (_root_.algebraMap R A) p) x)\n[PROOFSTEP]\nrw [Polynomial.monic_scaleRoots_iff]\n[GOAL]\ncase intro.intro.refine'_1\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\ny : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (_root_.algebraMap R B) y p = 0\n⊢ Monic (Polynomial.map (_root_.algebraMap R A) p)\n[PROOFSTEP]\nexact hp.map _\n[GOAL]\ncase intro.intro.refine'_2\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\ny : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (_root_.algebraMap R B) y p = 0\n⊢ eval₂ (_root_.algebraMap A (A ⊗[R] B)) (x ⊗ₜ[R] y) (scaleRoots (Polynomial.map (_root_.algebraMap R A) p) x) = 0\n[PROOFSTEP]\nconvert Polynomial.scaleRoots_eval₂_mul (R := A ⊗[R] B) (S := A) Algebra.TensorProduct.includeLeftRingHom (?_) x\n[GOAL]\ncase h.e'_2.h.e'_6\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\ny : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (_root_.algebraMap R B) y p = 0\n⊢ x ⊗ₜ[R] y = ↑Algebra.TensorProduct.includeLeftRingHom x * ?intro.intro.refine'_2.convert_2\ncase h.e'_3\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\ny : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (_root_.algebraMap R B) y p = 0\n⊢ 0 =\n ↑Algebra.TensorProduct.includeLeftRingHom x ^ natDegree (Polynomial.map (_root_.algebraMap R A) p) *\n eval₂ Algebra.TensorProduct.includeLeftRingHom ?intro.intro.refine'_2.convert_2\n (Polynomial.map (_root_.algebraMap R A) p)\ncase intro.intro.refine'_2.convert_2\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\ny : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (_root_.algebraMap R B) y p = 0\n⊢ A ⊗[R] B\n[PROOFSTEP]\nany_goals exact 1 ⊗ₜ y\n[GOAL]\ncase h.e'_2.h.e'_6\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\ny : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (_root_.algebraMap R B) y p = 0\n⊢ x ⊗ₜ[R] y = ↑Algebra.TensorProduct.includeLeftRingHom x * ?intro.intro.refine'_2.convert_2\n[PROOFSTEP]\nexact 1 ⊗ₜ y\n[GOAL]\ncase h.e'_3\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\ny : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (_root_.algebraMap R B) y p = 0\n⊢ 0 =\n ↑Algebra.TensorProduct.includeLeftRingHom x ^ natDegree (Polynomial.map (_root_.algebraMap R A) p) *\n eval₂ Algebra.TensorProduct.includeLeftRingHom ?intro.intro.refine'_2.convert_2\n (Polynomial.map (_root_.algebraMap R A) p)\n[PROOFSTEP]\nexact 1 ⊗ₜ y\n[GOAL]\ncase intro.intro.refine'_2.convert_2\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\ny : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (_root_.algebraMap R B) y p = 0\n⊢ A ⊗[R] B\n[PROOFSTEP]\nexact 1 ⊗ₜ y\n[GOAL]\ncase h.e'_2.h.e'_6\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\ny : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (_root_.algebraMap R B) y p = 0\n⊢ x ⊗ₜ[R] y = ↑Algebra.TensorProduct.includeLeftRingHom x * 1 ⊗ₜ[R] y\n[PROOFSTEP]\nsimp only [Algebra.TensorProduct.includeLeftRingHom_apply, Algebra.TensorProduct.tmul_mul_tmul, mul_one, one_mul]\n[GOAL]\ncase h.e'_3\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\ny : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (_root_.algebraMap R B) y p = 0\n⊢ 0 =\n ↑Algebra.TensorProduct.includeLeftRingHom x ^ natDegree (Polynomial.map (_root_.algebraMap R A) p) *\n eval₂ Algebra.TensorProduct.includeLeftRingHom (1 ⊗ₜ[R] y) (Polynomial.map (_root_.algebraMap R A) p)\n[PROOFSTEP]\nsimp only [Algebra.TensorProduct.includeLeftRingHom_apply, Algebra.TensorProduct.tmul_pow, one_pow]\n[GOAL]\ncase h.e'_3\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\ny : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (_root_.algebraMap R B) y p = 0\n⊢ 0 =\n (x ^ natDegree (Polynomial.map (_root_.algebraMap R A) p)) ⊗ₜ[R] 1 *\n eval₂ Algebra.TensorProduct.includeLeftRingHom (1 ⊗ₜ[R] y) (Polynomial.map (_root_.algebraMap R A) p)\n[PROOFSTEP]\nconvert (mul_zero (M₀ := A ⊗[R] B) _).symm\n[GOAL]\ncase h.e'_3.h.e'_6\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\ny : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (_root_.algebraMap R B) y p = 0\n⊢ eval₂ Algebra.TensorProduct.includeLeftRingHom (1 ⊗ₜ[R] y) (Polynomial.map (_root_.algebraMap R A) p) = 0\n[PROOFSTEP]\nerw [Polynomial.eval₂_map, Algebra.TensorProduct.includeLeftRingHom_comp_algebraMap, ← Polynomial.eval₂_map]\n[GOAL]\ncase h.e'_3.h.e'_6\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\ny : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (_root_.algebraMap R B) y p = 0\n⊢ eval₂ (↑Algebra.TensorProduct.includeRight) (1 ⊗ₜ[R] y) (Polynomial.map (_root_.algebraMap R B) p) = 0\n[PROOFSTEP]\nconvert Polynomial.eval₂_at_apply (Algebra.TensorProduct.includeRight : B →ₐ[R] A ⊗[R] B).toRingHom y\n[GOAL]\ncase h.e'_3\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\nx : A\ny : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (_root_.algebraMap R B) y p = 0\n⊢ 0 = ↑↑Algebra.TensorProduct.includeRight (eval y (Polynomial.map (_root_.algebraMap R B) p))\n[PROOFSTEP]\nrw [Polynomial.eval_map, hp', _root_.map_zero]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\ni : ℕ\nhp : 1 ≤ natDegree p\n⊢ coeff (normalizeScaleRoots p) i * leadingCoeff p ^ i = coeff p i * leadingCoeff p ^ (natDegree p - 1)\n[PROOFSTEP]\nsimp only [normalizeScaleRoots, finset_sum_coeff, coeff_monomial, Finset.sum_ite_eq', one_mul, zero_mul,\n mem_support_iff, ite_mul, Ne.def, ite_not]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\ni : ℕ\nhp : 1 ≤ natDegree p\n⊢ (if coeff p i = 0 then 0\n else\n if i = natDegree p then leadingCoeff p ^ i\n else coeff p i * leadingCoeff p ^ (natDegree p - 1 - i) * leadingCoeff p ^ i) =\n coeff p i * leadingCoeff p ^ (natDegree p - 1)\n[PROOFSTEP]\nsplit_ifs with h₁ h₂\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\ni : ℕ\nhp : 1 ≤ natDegree p\nh₁ : coeff p i = 0\n⊢ 0 = coeff p i * leadingCoeff p ^ (natDegree p - 1)\n[PROOFSTEP]\nsimp [h₁]\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\ni : ℕ\nhp : 1 ≤ natDegree p\nh₁ : ¬coeff p i = 0\nh₂ : i = natDegree p\n⊢ leadingCoeff p ^ i = coeff p i * leadingCoeff p ^ (natDegree p - 1)\n[PROOFSTEP]\nrw [h₂, leadingCoeff, ← pow_succ, tsub_add_cancel_of_le hp]\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\ni : ℕ\nhp : 1 ≤ natDegree p\nh₁ : ¬coeff p i = 0\nh₂ : ¬i = natDegree p\n⊢ coeff p i * leadingCoeff p ^ (natDegree p - 1 - i) * leadingCoeff p ^ i =\n coeff p i * leadingCoeff p ^ (natDegree p - 1)\n[PROOFSTEP]\nrw [mul_assoc, ← pow_add, tsub_add_cancel_of_le]\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\ni : ℕ\nhp : 1 ≤ natDegree p\nh₁ : ¬coeff p i = 0\nh₂ : ¬i = natDegree p\n⊢ i ≤ natDegree p - 1\n[PROOFSTEP]\napply Nat.le_pred_of_lt\n[GOAL]\ncase neg.h\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\ni : ℕ\nhp : 1 ≤ natDegree p\nh₁ : ¬coeff p i = 0\nh₂ : ¬i = natDegree p\n⊢ i < natDegree p\n[PROOFSTEP]\nrw [lt_iff_le_and_ne]\n[GOAL]\ncase neg.h\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\ni : ℕ\nhp : 1 ≤ natDegree p\nh₁ : ¬coeff p i = 0\nh₂ : ¬i = natDegree p\n⊢ i ≤ natDegree p ∧ i ≠ natDegree p\n[PROOFSTEP]\nexact ⟨le_natDegree_of_ne_zero h₁, h₂⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np✝ : R[X]\nx : S\np : R[X]\n⊢ leadingCoeff p • normalizeScaleRoots p = scaleRoots p (leadingCoeff p)\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np✝ : R[X]\nx : S\np : R[X]\nn✝ : ℕ\n⊢ coeff (leadingCoeff p • normalizeScaleRoots p) n✝ = coeff (scaleRoots p (leadingCoeff p)) n✝\n[PROOFSTEP]\nsimp only [coeff_scaleRoots, normalizeScaleRoots, coeff_monomial, coeff_smul, Finset.smul_sum, Ne.def,\n Finset.sum_ite_eq', finset_sum_coeff, smul_ite, smul_zero, mem_support_iff]\n -- porting note: added the following `simp only`\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np✝ : R[X]\nx : S\np : R[X]\nn✝ : ℕ\n⊢ (∑ x in support p,\n leadingCoeff p •\n if x = n✝ then if x = natDegree p then 1 else coeff p x * leadingCoeff p ^ (natDegree p - 1 - x) else 0) =\n coeff p n✝ * leadingCoeff p ^ (natDegree p - n✝)\n[PROOFSTEP]\nsimp only [ge_iff_le, tsub_le_iff_right, smul_eq_mul, mul_ite, mul_one, mul_zero, Finset.sum_ite_eq', mem_support_iff,\n ne_eq, ite_not]\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np✝ : R[X]\nx : S\np : R[X]\nn✝ : ℕ\n⊢ (if coeff p n✝ = 0 then 0\n else\n if n✝ = natDegree p then leadingCoeff p\n else leadingCoeff p * (coeff p n✝ * leadingCoeff p ^ (natDegree p - 1 - n✝))) =\n coeff p n✝ * leadingCoeff p ^ (natDegree p - n✝)\n[PROOFSTEP]\nsplit_ifs with h₁ h₂\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np✝ : R[X]\nx : S\np : R[X]\nn✝ : ℕ\nh₁ : coeff p n✝ = 0\n⊢ 0 = coeff p n✝ * leadingCoeff p ^ (natDegree p - n✝)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np✝ : R[X]\nx : S\np : R[X]\nn✝ : ℕ\nh₁ : ¬coeff p n✝ = 0\nh₂ : n✝ = natDegree p\n⊢ leadingCoeff p = coeff p n✝ * leadingCoeff p ^ (natDegree p - n✝)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np✝ : R[X]\nx : S\np : R[X]\nn✝ : ℕ\nh₁ : ¬coeff p n✝ = 0\nh₂ : ¬n✝ = natDegree p\n⊢ leadingCoeff p * (coeff p n✝ * leadingCoeff p ^ (natDegree p - 1 - n✝)) =\n coeff p n✝ * leadingCoeff p ^ (natDegree p - n✝)\n[PROOFSTEP]\nrw [mul_comm, mul_assoc, ← pow_succ', tsub_right_comm, tsub_add_cancel_of_le]\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np✝ : R[X]\nx : S\np : R[X]\nn✝ : ℕ\nh₁ : ¬coeff p n✝ = 0\nh₂ : ¬n✝ = natDegree p\n⊢ 1 ≤ natDegree p - n✝\n[PROOFSTEP]\nrw [Nat.succ_le_iff]\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np✝ : R[X]\nx : S\np : R[X]\nn✝ : ℕ\nh₁ : ¬coeff p n✝ = 0\nh₂ : ¬n✝ = natDegree p\n⊢ 0 < natDegree p - n✝\n[PROOFSTEP]\nexact tsub_pos_of_lt (lt_of_le_of_ne (le_natDegree_of_ne_zero h₁) h₂)\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\n⊢ support (normalizeScaleRoots p) ≤ support p\n[PROOFSTEP]\nintro x\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx✝ : S\nx : ℕ\n⊢ x ∈ support (normalizeScaleRoots p) → x ∈ support p\n[PROOFSTEP]\ncontrapose\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx✝ : S\nx : ℕ\n⊢ ¬x ∈ support p → ¬x ∈ support (normalizeScaleRoots p)\n[PROOFSTEP]\nsimp only [not_mem_support_iff, normalizeScaleRoots, finset_sum_coeff, coeff_monomial, Finset.sum_ite_eq',\n mem_support_iff, Ne.def, Classical.not_not, ite_eq_right_iff]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx✝ : S\nx : ℕ\n⊢ coeff p x = 0 →\n ¬coeff p x = 0 → (if x = natDegree p then 1 else coeff p x * leadingCoeff p ^ (natDegree p - 1 - x)) = 0\n[PROOFSTEP]\nintro h₁ h₂\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx✝ : S\nx : ℕ\nh₁ : coeff p x = 0\nh₂ : ¬coeff p x = 0\n⊢ (if x = natDegree p then 1 else coeff p x * leadingCoeff p ^ (natDegree p - 1 - x)) = 0\n[PROOFSTEP]\nexact (h₂ h₁).elim\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\n⊢ degree (normalizeScaleRoots p) = degree p\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\n⊢ degree (normalizeScaleRoots p) ≤ degree p\n[PROOFSTEP]\nexact Finset.sup_mono (normalizeScaleRoots_support p)\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\n⊢ degree p ≤ degree (normalizeScaleRoots p)\n[PROOFSTEP]\nrw [← degree_scaleRoots, ← leadingCoeff_smul_normalizeScaleRoots]\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\n⊢ degree (leadingCoeff p • normalizeScaleRoots p) ≤ degree (normalizeScaleRoots p)\n[PROOFSTEP]\nexact degree_smul_le _ _\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\np : R[X]\nx✝ : S\nh : 1 ≤ natDegree p\nf : R →+* S\nx : S\n⊢ eval₂ f (↑f (leadingCoeff p) * x) (normalizeScaleRoots p) = ↑f (leadingCoeff p) ^ (natDegree p - 1) * eval₂ f x p\n[PROOFSTEP]\nrw [eval₂_eq_sum_range, eval₂_eq_sum_range, Finset.mul_sum]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\np : R[X]\nx✝ : S\nh : 1 ≤ natDegree p\nf : R →+* S\nx : S\n⊢ ∑ i in Finset.range (natDegree (normalizeScaleRoots p) + 1),\n ↑f (coeff (normalizeScaleRoots p) i) * (↑f (leadingCoeff p) * x) ^ i =\n ∑ x_1 in Finset.range (natDegree p + 1), ↑f (leadingCoeff p) ^ (natDegree p - 1) * (↑f (coeff p x_1) * x ^ x_1)\n[PROOFSTEP]\napply Finset.sum_congr\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\np : R[X]\nx✝ : S\nh : 1 ≤ natDegree p\nf : R →+* S\nx : S\n⊢ Finset.range (natDegree (normalizeScaleRoots p) + 1) = Finset.range (natDegree p + 1)\n[PROOFSTEP]\nrw [natDegree_eq_of_degree_eq (normalizeScaleRoots_degree p)]\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\np : R[X]\nx✝ : S\nh : 1 ≤ natDegree p\nf : R →+* S\nx : S\n⊢ ∀ (x_1 : ℕ),\n x_1 ∈ Finset.range (natDegree p + 1) →\n ↑f (coeff (normalizeScaleRoots p) x_1) * (↑f (leadingCoeff p) * x) ^ x_1 =\n ↑f (leadingCoeff p) ^ (natDegree p - 1) * (↑f (coeff p x_1) * x ^ x_1)\n[PROOFSTEP]\nintro n _hn\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\np : R[X]\nx✝ : S\nh : 1 ≤ natDegree p\nf : R →+* S\nx : S\nn : ℕ\n_hn : n ∈ Finset.range (natDegree p + 1)\n⊢ ↑f (coeff (normalizeScaleRoots p) n) * (↑f (leadingCoeff p) * x) ^ n =\n ↑f (leadingCoeff p) ^ (natDegree p - 1) * (↑f (coeff p n) * x ^ n)\n[PROOFSTEP]\nrw [mul_pow, ← mul_assoc, ← f.map_pow, ← f.map_mul, normalizeScaleRoots_coeff_mul_leadingCoeff_pow _ _ h, f.map_mul,\n f.map_pow]\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf✝ : R →+* S\np : R[X]\nx✝ : S\nh : 1 ≤ natDegree p\nf : R →+* S\nx : S\nn : ℕ\n_hn : n ∈ Finset.range (natDegree p + 1)\n⊢ ↑f (coeff p n) * ↑f (leadingCoeff p) ^ (natDegree p - 1) * x ^ n =\n ↑f (leadingCoeff p) ^ (natDegree p - 1) * (↑f (coeff p n) * x ^ n)\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : p ≠ 0\n⊢ Monic (normalizeScaleRoots p)\n[PROOFSTEP]\ndelta Monic leadingCoeff\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : p ≠ 0\n⊢ coeff (normalizeScaleRoots p) (natDegree (normalizeScaleRoots p)) = 1\n[PROOFSTEP]\nrw [natDegree_eq_of_degree_eq (normalizeScaleRoots_degree p)]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : p ≠ 0\n⊢ coeff (normalizeScaleRoots p) (natDegree p) = 1\n[PROOFSTEP]\nsuffices p = 0 → (0 : R) = 1 by simpa [normalizeScaleRoots, coeff_monomial]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : p ≠ 0\nthis : p = 0 → 0 = 1\n⊢ coeff (normalizeScaleRoots p) (natDegree p) = 1\n[PROOFSTEP]\nsimpa [normalizeScaleRoots, coeff_monomial]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : p ≠ 0\n⊢ p = 0 → 0 = 1\n[PROOFSTEP]\nexact fun h' => (h h').elim\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : eval₂ f x p = 0\n⊢ IsIntegralElem f (↑f (leadingCoeff p) * x)\n[PROOFSTEP]\nby_cases h' : 1 ≤ p.natDegree\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : eval₂ f x p = 0\nh' : 1 ≤ natDegree p\n⊢ IsIntegralElem f (↑f (leadingCoeff p) * x)\n[PROOFSTEP]\nuse normalizeScaleRoots p\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : eval₂ f x p = 0\nh' : 1 ≤ natDegree p\n⊢ Monic (normalizeScaleRoots p) ∧ eval₂ f (↑f (leadingCoeff p) * x) (normalizeScaleRoots p) = 0\n[PROOFSTEP]\nhave : p ≠ 0 := fun h'' => by\n rw [h'', natDegree_zero] at h' \n exact Nat.not_succ_le_zero 0 h'\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : eval₂ f x p = 0\nh' : 1 ≤ natDegree p\nh'' : p = 0\n⊢ False\n[PROOFSTEP]\nrw [h'', natDegree_zero] at h' \n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : eval₂ f x p = 0\nh' : 1 ≤ 0\nh'' : p = 0\n⊢ False\n[PROOFSTEP]\nexact Nat.not_succ_le_zero 0 h'\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : eval₂ f x p = 0\nh' : 1 ≤ natDegree p\nthis : p ≠ 0\n⊢ Monic (normalizeScaleRoots p) ∧ eval₂ f (↑f (leadingCoeff p) * x) (normalizeScaleRoots p) = 0\n[PROOFSTEP]\nuse normalizeScaleRoots_monic p this\n[GOAL]\ncase right\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : eval₂ f x p = 0\nh' : 1 ≤ natDegree p\nthis : p ≠ 0\n⊢ eval₂ f (↑f (leadingCoeff p) * x) (normalizeScaleRoots p) = 0\n[PROOFSTEP]\nrw [normalizeScaleRoots_eval₂_leadingCoeff_mul p h' f x, h, mul_zero]\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : eval₂ f x p = 0\nh' : ¬1 ≤ natDegree p\n⊢ IsIntegralElem f (↑f (leadingCoeff p) * x)\n[PROOFSTEP]\nby_cases hp : p.map f = 0\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : eval₂ f x p = 0\nh' : ¬1 ≤ natDegree p\nhp : Polynomial.map f p = 0\n⊢ IsIntegralElem f (↑f (leadingCoeff p) * x)\n[PROOFSTEP]\napply_fun fun q => coeff q p.natDegree at hp \n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : eval₂ f x p = 0\nh' : ¬1 ≤ natDegree p\nhp : coeff (Polynomial.map f p) (natDegree p) = coeff 0 (natDegree p)\n⊢ IsIntegralElem f (↑f (leadingCoeff p) * x)\n[PROOFSTEP]\nrw [coeff_map, coeff_zero, coeff_natDegree] at hp \n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : eval₂ f x p = 0\nh' : ¬1 ≤ natDegree p\nhp : ↑f (leadingCoeff p) = 0\n⊢ IsIntegralElem f (↑f (leadingCoeff p) * x)\n[PROOFSTEP]\nrw [hp, zero_mul]\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : eval₂ f x p = 0\nh' : ¬1 ≤ natDegree p\nhp : ↑f (leadingCoeff p) = 0\n⊢ IsIntegralElem f 0\n[PROOFSTEP]\nexact f.is_integral_zero\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : eval₂ f x p = 0\nh' : ¬1 ≤ natDegree p\nhp : ¬Polynomial.map f p = 0\n⊢ IsIntegralElem f (↑f (leadingCoeff p) * x)\n[PROOFSTEP]\nrw [Nat.one_le_iff_ne_zero, Classical.not_not] at h' \n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : eval₂ f x p = 0\nh' : natDegree p = 0\nhp : ¬Polynomial.map f p = 0\n⊢ IsIntegralElem f (↑f (leadingCoeff p) * x)\n[PROOFSTEP]\nrw [eq_C_of_natDegree_eq_zero h', eval₂_C] at h \n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : ↑f (coeff p 0) = 0\nh' : natDegree p = 0\nhp : ¬Polynomial.map f p = 0\n⊢ IsIntegralElem f (↑f (leadingCoeff p) * x)\n[PROOFSTEP]\nsuffices p.map f = 0 by exact (hp this).elim\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : ↑f (coeff p 0) = 0\nh' : natDegree p = 0\nhp : ¬Polynomial.map f p = 0\nthis : Polynomial.map f p = 0\n⊢ IsIntegralElem f (↑f (leadingCoeff p) * x)\n[PROOFSTEP]\nexact (hp this).elim\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : CommRing S\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\nh : ↑f (coeff p 0) = 0\nh' : natDegree p = 0\nhp : ¬Polynomial.map f p = 0\n⊢ Polynomial.map f p = 0\n[PROOFSTEP]\nrw [eq_C_of_natDegree_eq_zero h', map_C, h, C_eq_zero]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S\ninst✝² : Algebra R A\ninst✝¹ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\ninst✝ : Algebra R S\nh : ↑(aeval x) p = 0\n⊢ IsIntegral R (leadingCoeff p • x)\n[PROOFSTEP]\nrw [aeval_def] at h \n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S\ninst✝² : Algebra R A\ninst✝¹ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\ninst✝ : Algebra R S\nh : eval₂ (algebraMap R S) x p = 0\n⊢ IsIntegral R (leadingCoeff p • x)\n[PROOFSTEP]\nrw [Algebra.smul_def]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S\ninst✝² : Algebra R A\ninst✝¹ : Algebra R B\nf : R →+* S\np : R[X]\nx : S\ninst✝ : Algebra R S\nh : eval₂ (algebraMap R S) x p = 0\n⊢ IsIntegral R (↑(algebraMap R S) (leadingCoeff p) * x)\n[PROOFSTEP]\nexact (algebraMap R S).isIntegralElem_leadingCoeff_mul p x h\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nx : A\n⊢ (∃ y, ↑(algebraMap { x // x ∈ integralClosure R A } A) y = x) → IsIntegral R x\n[PROOFSTEP]\nrintro ⟨⟨_, h⟩, rfl⟩\n[GOAL]\ncase intro.mk\nR : Type u_1\nA : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nval✝ : A\nh : val✝ ∈ integralClosure R A\n⊢ IsIntegral R (↑(algebraMap { x // x ∈ integralClosure R A } A) { val := val✝, property := h })\n[PROOFSTEP]\nexact h\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : Algebra A B\ninst✝³ : IsIntegralClosure A R B\ninst✝² : Algebra R A\ninst✝¹ : IsScalarTower R A B\ninst✝ : NoZeroSMulDivisors R B\n⊢ NoZeroSMulDivisors R A\n[PROOFSTEP]\nrefine' Function.Injective.noZeroSMulDivisors _ (IsIntegralClosure.algebraMap_injective A R B) (map_zero _) fun _ _ => _\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : Algebra A B\ninst✝³ : IsIntegralClosure A R B\ninst✝² : Algebra R A\ninst✝¹ : IsScalarTower R A B\ninst✝ : NoZeroSMulDivisors R B\nx✝¹ : R\nx✝ : A\n⊢ ↑(algebraMap A B) (x✝¹ • x✝) = x✝¹ • ↑(algebraMap A B) x✝\n[PROOFSTEP]\nsimp only [Algebra.algebraMap_eq_smul_one, IsScalarTower.smul_assoc]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsIntegralClosure A R B\nh : optParam (IsIntegral R 1) (_ : IsIntegral R 1)\n⊢ ↑(algebraMap A B) (mk' A 1 h) = ↑(algebraMap A B) 1\n[PROOFSTEP]\nrw [algebraMap_mk', RingHom.map_one]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsIntegralClosure A R B\nh : optParam (IsIntegral R 0) (_ : IsIntegral R 0)\n⊢ ↑(algebraMap A B) (mk' A 0 h) = ↑(algebraMap A B) 0\n[PROOFSTEP]\nrw [algebraMap_mk', RingHom.map_zero]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsIntegralClosure A R B\nx y : B\nhx : IsIntegral R x\nhy : IsIntegral R y\n⊢ ↑(algebraMap A B) (mk' A (x + y) (_ : IsIntegral R (x + y))) = ↑(algebraMap A B) (mk' A x hx + mk' A y hy)\n[PROOFSTEP]\nsimp only [algebraMap_mk', RingHom.map_add]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsIntegralClosure A R B\nx y : B\nhx : IsIntegral R x\nhy : IsIntegral R y\n⊢ ↑(algebraMap A B) (mk' A (x * y) (_ : IsIntegral R (x * y))) = ↑(algebraMap A B) (mk' A x hx * mk' A y hy)\n[PROOFSTEP]\nsimp only [algebraMap_mk', RingHom.map_mul]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra R B\ninst✝³ : Algebra A B\ninst✝² : IsIntegralClosure A R B\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nx : R\nh : optParam (IsIntegral R (↑(algebraMap R B) x)) (_ : IsIntegral R (↑(algebraMap R ((fun x => B) x)) x))\n⊢ ↑(algebraMap A B) (mk' A (↑(algebraMap R B) x) h) = ↑(algebraMap A B) (↑(algebraMap R A) x)\n[PROOFSTEP]\nrw [algebraMap_mk', ← IsScalarTower.algebraMap_apply]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : CommRing B\ninst✝⁸ : Algebra R B\ninst✝⁷ : Algebra A B\ninst✝⁶ : IsIntegralClosure A R B\nS : Type u_4\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S B\ninst✝² : IsScalarTower R S B\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nh : Algebra.IsIntegral R S\n⊢ (fun x => mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x))) 1 = 1\n[PROOFSTEP]\nsimp only [RingHom.map_one, mk'_one]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : CommRing B\ninst✝⁸ : Algebra R B\ninst✝⁷ : Algebra A B\ninst✝⁶ : IsIntegralClosure A R B\nS : Type u_4\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S B\ninst✝² : IsScalarTower R S B\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nh : Algebra.IsIntegral R S\nx y : S\n⊢ OneHom.toFun\n { toFun := fun x => mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' := (_ : mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) }\n (x * y) =\n OneHom.toFun\n { toFun := fun x => mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' := (_ : mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) }\n x *\n OneHom.toFun\n { toFun := fun x => mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' := (_ : mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) }\n y\n[PROOFSTEP]\nsimp_rw [← mk'_mul, RingHom.map_mul]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : CommRing B\ninst✝⁸ : Algebra R B\ninst✝⁷ : Algebra A B\ninst✝⁶ : IsIntegralClosure A R B\nS : Type u_4\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S B\ninst✝² : IsScalarTower R S B\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nh : Algebra.IsIntegral R S\n⊢ OneHom.toFun\n (↑{\n toOneHom :=\n { toFun := fun x => mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ : mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) },\n map_mul' :=\n (_ :\n ∀ (x y : S),\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ : mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) }\n (x * y) =\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) }\n x *\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) }\n y) })\n 0 =\n 0\n[PROOFSTEP]\nsimp only [RingHom.map_zero, mk'_zero]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : CommRing B\ninst✝⁸ : Algebra R B\ninst✝⁷ : Algebra A B\ninst✝⁶ : IsIntegralClosure A R B\nS : Type u_4\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S B\ninst✝² : IsScalarTower R S B\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nh : Algebra.IsIntegral R S\nx y : S\n⊢ OneHom.toFun\n (↑{\n toOneHom :=\n { toFun := fun x => mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ : mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) },\n map_mul' :=\n (_ :\n ∀ (x y : S),\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ : mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) }\n (x * y) =\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) }\n x *\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) }\n y) })\n (x + y) =\n OneHom.toFun\n (↑{\n toOneHom :=\n { toFun := fun x => mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ : mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) },\n map_mul' :=\n (_ :\n ∀ (x y : S),\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) }\n (x * y) =\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) }\n x *\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) }\n y) })\n x +\n OneHom.toFun\n (↑{\n toOneHom :=\n { toFun := fun x => mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ : mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) },\n map_mul' :=\n (_ :\n ∀ (x y : S),\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) }\n (x * y) =\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) }\n x *\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) }\n y) })\n y\n[PROOFSTEP]\nsimp_rw [← mk'_add, RingHom.map_add]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : CommRing B\ninst✝⁸ : Algebra R B\ninst✝⁷ : Algebra A B\ninst✝⁶ : IsIntegralClosure A R B\nS : Type u_4\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S B\ninst✝² : IsScalarTower R S B\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nh : Algebra.IsIntegral R S\nx : R\n⊢ OneHom.toFun\n (↑↑{\n toMonoidHom :=\n {\n toOneHom :=\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ : mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) = 1) },\n map_mul' :=\n (_ :\n ∀ (x y : S),\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) =\n 1) }\n (x * y) =\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) =\n 1) }\n x *\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) =\n 1) }\n y) },\n map_zero' := (_ : mk' A (↑(algebraMap S B) 0) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 0)) 0)) = 0),\n map_add' :=\n (_ :\n ∀ (x y : S),\n OneHom.toFun\n (↑{\n toOneHom :=\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) =\n 1) },\n map_mul' :=\n (_ :\n ∀ (x y : S),\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) =\n 1) }\n (x * y) =\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) =\n 1) }\n x *\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) =\n 1) }\n y) })\n (x + y) =\n OneHom.toFun\n (↑{\n toOneHom :=\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) =\n 1) },\n map_mul' :=\n (_ :\n ∀ (x y : S),\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) =\n 1) }\n (x * y) =\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) =\n 1) }\n x *\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) =\n 1) }\n y) })\n x +\n OneHom.toFun\n (↑{\n toOneHom :=\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x) (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) =\n 1) },\n map_mul' :=\n (_ :\n ∀ (x y : S),\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) =\n 1) }\n (x * y) =\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) =\n 1) }\n x *\n OneHom.toFun\n {\n toFun := fun x =>\n mk' A (↑(algebraMap S B) x)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) x)) x)),\n map_one' :=\n (_ :\n mk' A (↑(algebraMap S B) 1)\n (_ : IsIntegral R (↑(algebraMap S ((fun x => B) 1)) 1)) =\n 1) }\n y) })\n y) })\n (↑(algebraMap R S) x) =\n ↑(algebraMap R A) x\n[PROOFSTEP]\nsimp_rw [← IsScalarTower.algebraMap_apply, mk'_algebraMap]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : Algebra R B\ninst✝⁸ : Algebra A B\ninst✝⁷ : IsIntegralClosure A R B\nA' : Type u_4\ninst✝⁶ : CommRing A'\ninst✝⁵ : Algebra A' B\ninst✝⁴ : IsIntegralClosure A' R B\ninst✝³ : Algebra R A\ninst✝² : Algebra R A'\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsScalarTower R A' B\n⊢ AlgHom.comp (lift A' B (_ : Algebra.IsIntegral R A)) (lift A B (_ : Algebra.IsIntegral R A')) = AlgHom.id R A'\n[PROOFSTEP]\next x\n[GOAL]\ncase H\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : Algebra R B\ninst✝⁸ : Algebra A B\ninst✝⁷ : IsIntegralClosure A R B\nA' : Type u_4\ninst✝⁶ : CommRing A'\ninst✝⁵ : Algebra A' B\ninst✝⁴ : IsIntegralClosure A' R B\ninst✝³ : Algebra R A\ninst✝² : Algebra R A'\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsScalarTower R A' B\nx : A'\n⊢ ↑(AlgHom.comp (lift A' B (_ : Algebra.IsIntegral R A)) (lift A B (_ : Algebra.IsIntegral R A'))) x =\n ↑(AlgHom.id R A') x\n[PROOFSTEP]\napply algebraMap_injective A' R B\n[GOAL]\ncase H.a\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : Algebra R B\ninst✝⁸ : Algebra A B\ninst✝⁷ : IsIntegralClosure A R B\nA' : Type u_4\ninst✝⁶ : CommRing A'\ninst✝⁵ : Algebra A' B\ninst✝⁴ : IsIntegralClosure A' R B\ninst✝³ : Algebra R A\ninst✝² : Algebra R A'\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsScalarTower R A' B\nx : A'\n⊢ ↑(algebraMap A' B)\n (↑(AlgHom.comp (lift A' B (_ : Algebra.IsIntegral R A)) (lift A B (_ : Algebra.IsIntegral R A'))) x) =\n ↑(algebraMap A' B) (↑(AlgHom.id R A') x)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : Algebra R B\ninst✝⁸ : Algebra A B\ninst✝⁷ : IsIntegralClosure A R B\nA' : Type u_4\ninst✝⁶ : CommRing A'\ninst✝⁵ : Algebra A' B\ninst✝⁴ : IsIntegralClosure A' R B\ninst✝³ : Algebra R A\ninst✝² : Algebra R A'\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsScalarTower R A' B\n⊢ AlgHom.comp (lift A B (_ : Algebra.IsIntegral R A')) (lift A' B (_ : Algebra.IsIntegral R A)) = AlgHom.id R A\n[PROOFSTEP]\next x\n[GOAL]\ncase H\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : Algebra R B\ninst✝⁸ : Algebra A B\ninst✝⁷ : IsIntegralClosure A R B\nA' : Type u_4\ninst✝⁶ : CommRing A'\ninst✝⁵ : Algebra A' B\ninst✝⁴ : IsIntegralClosure A' R B\ninst✝³ : Algebra R A\ninst✝² : Algebra R A'\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsScalarTower R A' B\nx : A\n⊢ ↑(AlgHom.comp (lift A B (_ : Algebra.IsIntegral R A')) (lift A' B (_ : Algebra.IsIntegral R A))) x =\n ↑(AlgHom.id R A) x\n[PROOFSTEP]\napply algebraMap_injective A R B\n[GOAL]\ncase H.a\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : Algebra R B\ninst✝⁸ : Algebra A B\ninst✝⁷ : IsIntegralClosure A R B\nA' : Type u_4\ninst✝⁶ : CommRing A'\ninst✝⁵ : Algebra A' B\ninst✝⁴ : IsIntegralClosure A' R B\ninst✝³ : Algebra R A\ninst✝² : Algebra R A'\ninst✝¹ : IsScalarTower R A B\ninst✝ : IsScalarTower R A' B\nx : A\n⊢ ↑(algebraMap A B)\n (↑(AlgHom.comp (lift A B (_ : Algebra.IsIntegral R A')) (lift A' B (_ : Algebra.IsIntegral R A))) x) =\n ↑(algebraMap A B) (↑(AlgHom.id R A) x)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S\ng : S →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\n⊢ IsIntegral { x // x ∈ adjoin R ↑(frange (Polynomial.map (algebraMap A B) p)) } x\n[PROOFSTEP]\ngeneralize hS : (↑(p.map <| algebraMap A B).frange : Set B) = S\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\n⊢ IsIntegral { x // x ∈ adjoin R S } x\n[PROOFSTEP]\nhave coeffs_mem : ∀ i, (p.map <| algebraMap A B).coeff i ∈ adjoin R S :=\n by\n intro i\n by_cases hi : (p.map <| algebraMap A B).coeff i = 0\n · rw [hi]\n exact Subalgebra.zero_mem _\n rw [← hS]\n exact subset_adjoin (coeff_mem_frange _ _ hi)\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\n⊢ ∀ (i : ℕ), coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\n[PROOFSTEP]\nintro i\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ni : ℕ\n⊢ coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\n[PROOFSTEP]\nby_cases hi : (p.map <| algebraMap A B).coeff i = 0\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ni : ℕ\nhi : coeff (Polynomial.map (algebraMap A B) p) i = 0\n⊢ coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\n[PROOFSTEP]\nrw [hi]\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ni : ℕ\nhi : coeff (Polynomial.map (algebraMap A B) p) i = 0\n⊢ 0 ∈ adjoin R S\n[PROOFSTEP]\nexact Subalgebra.zero_mem _\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ni : ℕ\nhi : ¬coeff (Polynomial.map (algebraMap A B) p) i = 0\n⊢ coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\n[PROOFSTEP]\nrw [← hS]\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ni : ℕ\nhi : ¬coeff (Polynomial.map (algebraMap A B) p) i = 0\n⊢ coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R ↑(frange (Polynomial.map (algebraMap A B) p))\n[PROOFSTEP]\nexact subset_adjoin (coeff_mem_frange _ _ hi)\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ncoeffs_mem : ∀ (i : ℕ), coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\n⊢ IsIntegral { x // x ∈ adjoin R S } x\n[PROOFSTEP]\nobtain ⟨q, hq⟩ : ∃ q : (adjoin R S)[X], q.map (algebraMap (adjoin R S) B) = (p.map <| algebraMap A B) :=\n by\n rw [← Set.mem_range]\n exact (Polynomial.mem_map_range _).2 fun i => ⟨⟨_, coeffs_mem i⟩, rfl⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ncoeffs_mem : ∀ (i : ℕ), coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\n⊢ ∃ q, Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q = Polynomial.map (algebraMap A B) p\n[PROOFSTEP]\nrw [← Set.mem_range]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ncoeffs_mem : ∀ (i : ℕ), coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\n⊢ Polynomial.map (algebraMap A B) p ∈ Set.range fun q => Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q\n[PROOFSTEP]\nexact (Polynomial.mem_map_range _).2 fun i => ⟨⟨_, coeffs_mem i⟩, rfl⟩\n[GOAL]\ncase intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ncoeffs_mem : ∀ (i : ℕ), coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\nq : { x // x ∈ adjoin R S }[X]\nhq : Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q = Polynomial.map (algebraMap A B) p\n⊢ IsIntegral { x // x ∈ adjoin R S } x\n[PROOFSTEP]\nuse q\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ncoeffs_mem : ∀ (i : ℕ), coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\nq : { x // x ∈ adjoin R S }[X]\nhq : Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q = Polynomial.map (algebraMap A B) p\n⊢ Monic q ∧ eval₂ (algebraMap { x // x ∈ adjoin R S } B) x q = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ncoeffs_mem : ∀ (i : ℕ), coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\nq : { x // x ∈ adjoin R S }[X]\nhq : Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q = Polynomial.map (algebraMap A B) p\n⊢ Monic q\n[PROOFSTEP]\nsuffices h : (q.map (algebraMap (adjoin R S) B)).Monic\n[GOAL]\ncase h.left\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ncoeffs_mem : ∀ (i : ℕ), coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\nq : { x // x ∈ adjoin R S }[X]\nhq : Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q = Polynomial.map (algebraMap A B) p\nh : Monic (Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q)\n⊢ Monic q\n[PROOFSTEP]\nrefine' monic_of_injective _ h\n[GOAL]\ncase h.left\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ncoeffs_mem : ∀ (i : ℕ), coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\nq : { x // x ∈ adjoin R S }[X]\nhq : Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q = Polynomial.map (algebraMap A B) p\nh : Monic (Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q)\n⊢ Function.Injective ↑(algebraMap { x // x ∈ adjoin R S } B)\n[PROOFSTEP]\nexact Subtype.val_injective\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ncoeffs_mem : ∀ (i : ℕ), coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\nq : { x // x ∈ adjoin R S }[X]\nhq : Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q = Polynomial.map (algebraMap A B) p\n⊢ Monic (Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q)\n[PROOFSTEP]\nrw [hq]\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ncoeffs_mem : ∀ (i : ℕ), coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\nq : { x // x ∈ adjoin R S }[X]\nhq : Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q = Polynomial.map (algebraMap A B) p\n⊢ Monic (Polynomial.map (algebraMap A B) p)\n[PROOFSTEP]\nexact pmonic.map _\n[GOAL]\ncase h.right\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ncoeffs_mem : ∀ (i : ℕ), coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\nq : { x // x ∈ adjoin R S }[X]\nhq : Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q = Polynomial.map (algebraMap A B) p\n⊢ eval₂ (algebraMap { x // x ∈ adjoin R S } B) x q = 0\n[PROOFSTEP]\nconvert hp using 1\n[GOAL]\ncase h.e'_2\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ncoeffs_mem : ∀ (i : ℕ), coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\nq : { x // x ∈ adjoin R S }[X]\nhq : Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q = Polynomial.map (algebraMap A B) p\n⊢ eval₂ (algebraMap { x // x ∈ adjoin R S } B) x q = ↑(aeval x) p\n[PROOFSTEP]\nreplace hq := congr_arg (eval x) hq\n[GOAL]\ncase h.e'_2\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ncoeffs_mem : ∀ (i : ℕ), coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\nq : { x // x ∈ adjoin R S }[X]\nhq : eval x (Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q) = eval x (Polynomial.map (algebraMap A B) p)\n⊢ eval₂ (algebraMap { x // x ∈ adjoin R S } B) x q = ↑(aeval x) p\n[PROOFSTEP]\nconvert hq using 1\n[GOAL]\ncase h.e'_2\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ncoeffs_mem : ∀ (i : ℕ), coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\nq : { x // x ∈ adjoin R S }[X]\nhq : eval x (Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q) = eval x (Polynomial.map (algebraMap A B) p)\n⊢ eval₂ (algebraMap { x // x ∈ adjoin R S } B) x q = eval x (Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q)\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h.e'_3\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ncoeffs_mem : ∀ (i : ℕ), coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\nq : { x // x ∈ adjoin R S }[X]\nhq : eval x (Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q) = eval x (Polynomial.map (algebraMap A B) p)\n⊢ ↑(aeval x) p = eval x (Polynomial.map (algebraMap A B) p)\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h.e'_2\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ncoeffs_mem : ∀ (i : ℕ), coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\nq : { x // x ∈ adjoin R S }[X]\nhq : eval x (Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q) = eval x (Polynomial.map (algebraMap A B) p)\n⊢ eval x (Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q) = eval₂ (algebraMap { x // x ∈ adjoin R S } B) x q\n[PROOFSTEP]\napply eval_map\n[GOAL]\ncase h.e'_3\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing S✝\ninst✝² : CommRing T\ninst✝¹ : Algebra A B\ninst✝ : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\nx : B\np : A[X]\npmonic : Monic p\nhp : ↑(aeval x) p = 0\nS : Set B\nhS : ↑(frange (Polynomial.map (algebraMap A B) p)) = S\ncoeffs_mem : ∀ (i : ℕ), coeff (Polynomial.map (algebraMap A B) p) i ∈ adjoin R S\nq : { x // x ∈ adjoin R S }[X]\nhq : eval x (Polynomial.map (algebraMap { x // x ∈ adjoin R S } B) q) = eval x (Polynomial.map (algebraMap A B) p)\n⊢ eval x (Polynomial.map (algebraMap A B) p) = ↑(aeval x) p\n[PROOFSTEP]\napply eval_map\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nA_int : Algebra.IsIntegral R A\nx : B\nhx : IsIntegral A x\n⊢ IsIntegral R x\n[PROOFSTEP]\nrcases hx with ⟨p, pmonic, hp⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nA_int : Algebra.IsIntegral R A\nx : B\np : A[X]\npmonic : Monic p\nhp : eval₂ (algebraMap A B) x p = 0\n⊢ IsIntegral R x\n[PROOFSTEP]\nlet S : Set B := ↑(p.map <| algebraMap A B).frange\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S✝\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nA_int : Algebra.IsIntegral R A\nx : B\np : A[X]\npmonic : Monic p\nhp : eval₂ (algebraMap A B) x p = 0\nS : Set B := ↑(frange (Polynomial.map (algebraMap A B) p))\n⊢ IsIntegral R x\n[PROOFSTEP]\nrefine' isIntegral_of_mem_of_FG (adjoin R (S ∪ { x })) _ _ (subset_adjoin <| Or.inr rfl)\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S✝\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nA_int : Algebra.IsIntegral R A\nx : B\np : A[X]\npmonic : Monic p\nhp : eval₂ (algebraMap A B) x p = 0\nS : Set B := ↑(frange (Polynomial.map (algebraMap A B) p))\n⊢ FG (↑Subalgebra.toSubmodule (adjoin R (S ∪ {x})))\n[PROOFSTEP]\nrefine' fg_trans (FG_adjoin_of_finite (Finset.finite_toSet _) fun x hx => _) _\n[GOAL]\ncase intro.intro.refine'_1\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S✝\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nA_int : Algebra.IsIntegral R A\nx✝ : B\np : A[X]\npmonic : Monic p\nhp : eval₂ (algebraMap A B) x✝ p = 0\nS : Set B := ↑(frange (Polynomial.map (algebraMap A B) p))\nx : B\nhx : x ∈ S\n⊢ IsIntegral R x\n[PROOFSTEP]\nrw [Finset.mem_coe, frange, Finset.mem_image] at hx \n[GOAL]\ncase intro.intro.refine'_1\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S✝\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nA_int : Algebra.IsIntegral R A\nx✝ : B\np : A[X]\npmonic : Monic p\nhp : eval₂ (algebraMap A B) x✝ p = 0\nS : Set B := ↑(frange (Polynomial.map (algebraMap A B) p))\nx : B\nhx : ∃ a, a ∈ support (Polynomial.map (algebraMap A B) p) ∧ coeff (Polynomial.map (algebraMap A B) p) a = x\n⊢ IsIntegral R x\n[PROOFSTEP]\nrcases hx with ⟨i, _, rfl⟩\n[GOAL]\ncase intro.intro.refine'_1.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S✝\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nA_int : Algebra.IsIntegral R A\nx : B\np : A[X]\npmonic : Monic p\nhp : eval₂ (algebraMap A B) x p = 0\nS : Set B := ↑(frange (Polynomial.map (algebraMap A B) p))\ni : ℕ\nleft✝ : i ∈ support (Polynomial.map (algebraMap A B) p)\n⊢ IsIntegral R (coeff (Polynomial.map (algebraMap A B) p) i)\n[PROOFSTEP]\nrw [coeff_map]\n[GOAL]\ncase intro.intro.refine'_1.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S✝\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nA_int : Algebra.IsIntegral R A\nx : B\np : A[X]\npmonic : Monic p\nhp : eval₂ (algebraMap A B) x p = 0\nS : Set B := ↑(frange (Polynomial.map (algebraMap A B) p))\ni : ℕ\nleft✝ : i ∈ support (Polynomial.map (algebraMap A B) p)\n⊢ IsIntegral R (↑(algebraMap A B) (coeff p i))\n[PROOFSTEP]\nexact map_isIntegral (IsScalarTower.toAlgHom R A B) (A_int _)\n[GOAL]\ncase intro.intro.refine'_2\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S✝\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nA_int : Algebra.IsIntegral R A\nx : B\np : A[X]\npmonic : Monic p\nhp : eval₂ (algebraMap A B) x p = 0\nS : Set B := ↑(frange (Polynomial.map (algebraMap A B) p))\n⊢ FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R S } {x}))\n[PROOFSTEP]\napply FG_adjoin_singleton_of_integral\n[GOAL]\ncase intro.intro.refine'_2.hx\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S✝\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S✝\ng : S✝ →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nA_int : Algebra.IsIntegral R A\nx : B\np : A[X]\npmonic : Monic p\nhp : eval₂ (algebraMap A B) x p = 0\nS : Set B := ↑(frange (Polynomial.map (algebraMap A B) p))\n⊢ IsIntegral { x // x ∈ adjoin R S } x\n[PROOFSTEP]\nexact isIntegral_trans_aux _ pmonic hp\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nH : Function.Injective ↑(algebraMap A B)\nx : A\nh : IsIntegral R (↑(algebraMap A B) x)\n⊢ IsIntegral R x\n[PROOFSTEP]\nrcases h with ⟨p, ⟨hp, hp'⟩⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nH : Function.Injective ↑(algebraMap A B)\nx : A\np : R[X]\nhp : Monic p\nhp' : eval₂ (algebraMap R ((fun x => B) x)) (↑(algebraMap A B) x) p = 0\n⊢ IsIntegral R x\n[PROOFSTEP]\nrefine' ⟨p, ⟨hp, _⟩⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nH : Function.Injective ↑(algebraMap A B)\nx : A\np : R[X]\nhp : Monic p\nhp' : eval₂ (algebraMap R ((fun x => B) x)) (↑(algebraMap A B) x) p = 0\n⊢ eval₂ (algebraMap R A) x p = 0\n[PROOFSTEP]\nrw [IsScalarTower.algebraMap_eq R A B, ← eval₂_map, eval₂_hom, ← RingHom.map_zero (algebraMap A B)] at hp' \n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nH : Function.Injective ↑(algebraMap A B)\nx : A\np : R[X]\nhp : Monic p\nhp' : ↑(algebraMap A B) (eval x (Polynomial.map (algebraMap R A) p)) = ↑(algebraMap A B) 0\n⊢ eval₂ (algebraMap R A) x p = 0\n[PROOFSTEP]\nrw [eval₂_eq_eval_map]\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nH : Function.Injective ↑(algebraMap A B)\nx : A\np : R[X]\nhp : Monic p\nhp' : ↑(algebraMap A B) (eval x (Polynomial.map (algebraMap R A) p)) = ↑(algebraMap A B) 0\n⊢ eval x (Polynomial.map (algebraMap R A) p) = 0\n[PROOFSTEP]\nexact H hp'\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nx : T\nh : IsIntegralElem (comp g f) x\np : R[X]\nhp : Monic p\nhp' : eval₂ (comp g f) x p = 0\n⊢ eval₂ g x (Polynomial.map f p) = 0\n[PROOFSTEP]\nrwa [← eval₂_map] at hp' \n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nx : B\nh : IsIntegral R x\n⊢ IsIntegral A x\n[PROOFSTEP]\nrcases h with ⟨p, ⟨hp, hp'⟩⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nx : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (algebraMap R B) x p = 0\n⊢ IsIntegral A x\n[PROOFSTEP]\nrefine' ⟨p.map (algebraMap R A), ⟨hp.map (algebraMap R A), _⟩⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nx : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (algebraMap R B) x p = 0\n⊢ eval₂ (algebraMap A B) x (Polynomial.map (algebraMap R A) p) = 0\n[PROOFSTEP]\nrw [IsScalarTower.algebraMap_eq R A B, ← eval₂_map] at hp' \n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nx : B\np : R[X]\nhp : Monic p\nhp' : eval₂ (algebraMap A B) x (Polynomial.map (algebraMap R A) p) = 0\n⊢ eval₂ (algebraMap A B) x (Polynomial.map (algebraMap R A) p) = 0\n[PROOFSTEP]\nexact hp'\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nI : Ideal S\nhf : IsIntegral f\n⊢ IsIntegral (Ideal.quotientMap I f (_ : Ideal.comap f I ≤ Ideal.comap f I))\n[PROOFSTEP]\nrintro ⟨x⟩\n[GOAL]\ncase mk\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nI : Ideal S\nhf : IsIntegral f\nx✝ : S ⧸ I\nx : S\n⊢ IsIntegralElem (Ideal.quotientMap I f (_ : Ideal.comap f I ≤ Ideal.comap f I)) (Quot.mk Setoid.r x)\n[PROOFSTEP]\nobtain ⟨p, ⟨p_monic, hpx⟩⟩ := hf x\n[GOAL]\ncase mk.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nI : Ideal S\nhf : IsIntegral f\nx✝ : S ⧸ I\nx : S\np : R[X]\np_monic : Monic p\nhpx : eval₂ f x p = 0\n⊢ IsIntegralElem (Ideal.quotientMap I f (_ : Ideal.comap f I ≤ Ideal.comap f I)) (Quot.mk Setoid.r x)\n[PROOFSTEP]\nrefine' ⟨p.map (Ideal.Quotient.mk _), ⟨p_monic.map _, _⟩⟩\n[GOAL]\ncase mk.intro.intro\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nI : Ideal S\nhf : IsIntegral f\nx✝ : S ⧸ I\nx : S\np : R[X]\np_monic : Monic p\nhpx : eval₂ f x p = 0\n⊢ eval₂ (Ideal.quotientMap I f (_ : Ideal.comap f I ≤ Ideal.comap f I)) (Quot.mk Setoid.r x)\n (Polynomial.map (Ideal.Quotient.mk (Ideal.comap f I)) p) =\n 0\n[PROOFSTEP]\nsimpa only [hom_eval₂, eval₂_map] using congr_arg (Ideal.Quotient.mk I) hpx\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nI : Ideal S\n⊢ RingHom.IsIntegral (Ideal.quotientMap I f (_ : Ideal.comap f I ≤ Ideal.comap f I)) ↔\n RingHom.IsIntegral (RingHom.comp (Ideal.Quotient.mk I) f)\n[PROOFSTEP]\nlet g :=\n Ideal.Quotient.mk\n (I.comap f)\n -- Porting note: added type ascription\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng✝ : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nI : Ideal S\ng : R →+* R ⧸ Ideal.comap f I := Ideal.Quotient.mk (Ideal.comap f I)\n⊢ RingHom.IsIntegral (Ideal.quotientMap I f (_ : Ideal.comap f I ≤ Ideal.comap f I)) ↔\n RingHom.IsIntegral (RingHom.comp (Ideal.Quotient.mk I) f)\n[PROOFSTEP]\nhave : (Ideal.quotientMap I f le_rfl).comp g = (Ideal.Quotient.mk I).comp f := Ideal.quotientMap_comp_mk le_rfl\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng✝ : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nI : Ideal S\ng : R →+* R ⧸ Ideal.comap f I := Ideal.Quotient.mk (Ideal.comap f I)\nthis :\n RingHom.comp (Ideal.quotientMap I f (_ : Ideal.comap f I ≤ Ideal.comap f I)) g = RingHom.comp (Ideal.Quotient.mk I) f\n⊢ RingHom.IsIntegral (Ideal.quotientMap I f (_ : Ideal.comap f I ≤ Ideal.comap f I)) ↔\n RingHom.IsIntegral (RingHom.comp (Ideal.Quotient.mk I) f)\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => RingHom.isIntegral_tower_top_of_isIntegral g _ (this ▸ h)⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng✝ : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nI : Ideal S\ng : R →+* R ⧸ Ideal.comap f I := Ideal.Quotient.mk (Ideal.comap f I)\nthis :\n RingHom.comp (Ideal.quotientMap I f (_ : Ideal.comap f I ≤ Ideal.comap f I)) g = RingHom.comp (Ideal.Quotient.mk I) f\nh : RingHom.IsIntegral (Ideal.quotientMap I f (_ : Ideal.comap f I ≤ Ideal.comap f I))\n⊢ RingHom.IsIntegral (RingHom.comp (Ideal.Quotient.mk I) f)\n[PROOFSTEP]\nrefine' this ▸ RingHom.isIntegral_trans g (Ideal.quotientMap I f le_rfl) _ h\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : CommRing S\ninst✝⁴ : CommRing T\ninst✝³ : Algebra A B\ninst✝² : Algebra R B\nf : R →+* S\ng✝ : S →+* T\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R A B\nI : Ideal S\ng : R →+* R ⧸ Ideal.comap f I := Ideal.Quotient.mk (Ideal.comap f I)\nthis :\n RingHom.comp (Ideal.quotientMap I f (_ : Ideal.comap f I ≤ Ideal.comap f I)) g = RingHom.comp (Ideal.Quotient.mk I) f\nh : RingHom.IsIntegral (Ideal.quotientMap I f (_ : Ideal.comap f I ≤ Ideal.comap f I))\n⊢ RingHom.IsIntegral g\n[PROOFSTEP]\nexact RingHom.isIntegral_of_surjective g Ideal.Quotient.mk_surjective\n[GOAL]\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\n⊢ IsField R\n[PROOFSTEP]\nrefine'\n ⟨⟨0, 1, zero_ne_one⟩, mul_comm, fun {a} ha => _⟩\n -- Let `a_inv` be the inverse of `algebraMap R S a`,\n -- then we need to show that `a_inv` is of the form `algebraMap R S b`.\n[GOAL]\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\n⊢ ∃ b, a * b = 1\n[PROOFSTEP]\nobtain ⟨a_inv, ha_inv⟩ :=\n hS.mul_inv_cancel fun h =>\n ha\n (hRS (_root_.trans h (RingHom.map_zero _).symm))\n -- Let `p : R[X]` be monic with root `a_inv`,\n -- and `q` be `p` with coefficients reversed (so `q(a) = q'(a) * a + 1`).\n -- We claim that `q(a) = 0`, so `-q'(a)` is the inverse of `a`.\n[GOAL]\ncase intro\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\n⊢ ∃ b, a * b = 1\n[PROOFSTEP]\nobtain ⟨p, p_monic, hp⟩ := H a_inv\n[GOAL]\ncase intro.intro.intro\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : eval₂ (algebraMap R S) a_inv p = 0\n⊢ ∃ b, a * b = 1\n[PROOFSTEP]\nuse-∑ i : ℕ in Finset.range p.natDegree,\n p.coeff i *\n a ^\n (p.natDegree - i - 1)\n -- `q(a) = 0`, because multiplying everything with `a_inv^n` gives `p(a_inv) = 0`.\n -- TODO: this could be a lemma for `Polynomial.reverse`.\n[GOAL]\ncase h\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : eval₂ (algebraMap R S) a_inv p = 0\n⊢ a * -∑ i in Finset.range (natDegree p), coeff p i * a ^ (natDegree p - i - 1) = 1\n[PROOFSTEP]\nhave hq : (∑ i : ℕ in Finset.range (p.natDegree + 1), p.coeff i * a ^ (p.natDegree - i)) = 0 :=\n by\n apply (injective_iff_map_eq_zero (algebraMap R S)).mp hRS\n have a_inv_ne_zero : a_inv ≠ 0 := right_ne_zero_of_mul (mt ha_inv.symm.trans one_ne_zero)\n refine' (mul_eq_zero.mp _).resolve_right (pow_ne_zero p.natDegree a_inv_ne_zero)\n rw [eval₂_eq_sum_range] at hp \n rw [map_sum, Finset.sum_mul]\n refine' (Finset.sum_congr rfl fun i hi => _).trans hp\n rw [RingHom.map_mul, mul_assoc]\n congr\n have : a_inv ^ p.natDegree = a_inv ^ (p.natDegree - i) * a_inv ^ i := by\n rw [← pow_add a_inv, tsub_add_cancel_of_le (Nat.le_of_lt_succ (Finset.mem_range.mp hi))]\n rw [RingHom.map_pow, this, ← mul_assoc, ← mul_pow, ha_inv, one_pow, one_mul]\n -- Since `q(a) = 0` and `q(a) = q'(a) * a + 1`, we have `a * -q'(a) = 1`.\n -- TODO: we could use a lemma for `Polynomial.divX` here.\n[GOAL]\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : eval₂ (algebraMap R S) a_inv p = 0\n⊢ ∑ i in Finset.range (natDegree p + 1), coeff p i * a ^ (natDegree p - i) = 0\n[PROOFSTEP]\napply (injective_iff_map_eq_zero (algebraMap R S)).mp hRS\n[GOAL]\ncase a\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : eval₂ (algebraMap R S) a_inv p = 0\n⊢ ↑(algebraMap R S) (∑ i in Finset.range (natDegree p + 1), coeff p i * a ^ (natDegree p - i)) = 0\n[PROOFSTEP]\nhave a_inv_ne_zero : a_inv ≠ 0 := right_ne_zero_of_mul (mt ha_inv.symm.trans one_ne_zero)\n[GOAL]\ncase a\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : eval₂ (algebraMap R S) a_inv p = 0\na_inv_ne_zero : a_inv ≠ 0\n⊢ ↑(algebraMap R S) (∑ i in Finset.range (natDegree p + 1), coeff p i * a ^ (natDegree p - i)) = 0\n[PROOFSTEP]\nrefine' (mul_eq_zero.mp _).resolve_right (pow_ne_zero p.natDegree a_inv_ne_zero)\n[GOAL]\ncase a\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : eval₂ (algebraMap R S) a_inv p = 0\na_inv_ne_zero : a_inv ≠ 0\n⊢ ↑(algebraMap R S) (∑ i in Finset.range (natDegree p + 1), coeff p i * a ^ (natDegree p - i)) * a_inv ^ natDegree p = 0\n[PROOFSTEP]\nrw [eval₂_eq_sum_range] at hp \n[GOAL]\ncase a\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : ∑ i in Finset.range (natDegree p + 1), ↑(algebraMap R S) (coeff p i) * a_inv ^ i = 0\na_inv_ne_zero : a_inv ≠ 0\n⊢ ↑(algebraMap R S) (∑ i in Finset.range (natDegree p + 1), coeff p i * a ^ (natDegree p - i)) * a_inv ^ natDegree p = 0\n[PROOFSTEP]\nrw [map_sum, Finset.sum_mul]\n[GOAL]\ncase a\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : ∑ i in Finset.range (natDegree p + 1), ↑(algebraMap R S) (coeff p i) * a_inv ^ i = 0\na_inv_ne_zero : a_inv ≠ 0\n⊢ ∑ x in Finset.range (natDegree p + 1), ↑(algebraMap R S) (coeff p x * a ^ (natDegree p - x)) * a_inv ^ natDegree p = 0\n[PROOFSTEP]\nrefine' (Finset.sum_congr rfl fun i hi => _).trans hp\n[GOAL]\ncase a\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : ∑ i in Finset.range (natDegree p + 1), ↑(algebraMap R S) (coeff p i) * a_inv ^ i = 0\na_inv_ne_zero : a_inv ≠ 0\ni : ℕ\nhi : i ∈ Finset.range (natDegree p + 1)\n⊢ ↑(algebraMap R S) (coeff p i * a ^ (natDegree p - i)) * a_inv ^ natDegree p =\n ↑(algebraMap R S) (coeff p i) * a_inv ^ i\n[PROOFSTEP]\nrw [RingHom.map_mul, mul_assoc]\n[GOAL]\ncase a\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : ∑ i in Finset.range (natDegree p + 1), ↑(algebraMap R S) (coeff p i) * a_inv ^ i = 0\na_inv_ne_zero : a_inv ≠ 0\ni : ℕ\nhi : i ∈ Finset.range (natDegree p + 1)\n⊢ ↑(algebraMap R S) (coeff p i) * (↑(algebraMap R S) (a ^ (natDegree p - i)) * a_inv ^ natDegree p) =\n ↑(algebraMap R S) (coeff p i) * a_inv ^ i\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a.e_a\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : ∑ i in Finset.range (natDegree p + 1), ↑(algebraMap R S) (coeff p i) * a_inv ^ i = 0\na_inv_ne_zero : a_inv ≠ 0\ni : ℕ\nhi : i ∈ Finset.range (natDegree p + 1)\n⊢ ↑(algebraMap R S) (a ^ (natDegree p - i)) * a_inv ^ natDegree p = a_inv ^ i\n[PROOFSTEP]\nhave : a_inv ^ p.natDegree = a_inv ^ (p.natDegree - i) * a_inv ^ i := by\n rw [← pow_add a_inv, tsub_add_cancel_of_le (Nat.le_of_lt_succ (Finset.mem_range.mp hi))]\n[GOAL]\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : ∑ i in Finset.range (natDegree p + 1), ↑(algebraMap R S) (coeff p i) * a_inv ^ i = 0\na_inv_ne_zero : a_inv ≠ 0\ni : ℕ\nhi : i ∈ Finset.range (natDegree p + 1)\n⊢ a_inv ^ natDegree p = a_inv ^ (natDegree p - i) * a_inv ^ i\n[PROOFSTEP]\nrw [← pow_add a_inv, tsub_add_cancel_of_le (Nat.le_of_lt_succ (Finset.mem_range.mp hi))]\n[GOAL]\ncase a.e_a\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : ∑ i in Finset.range (natDegree p + 1), ↑(algebraMap R S) (coeff p i) * a_inv ^ i = 0\na_inv_ne_zero : a_inv ≠ 0\ni : ℕ\nhi : i ∈ Finset.range (natDegree p + 1)\nthis : a_inv ^ natDegree p = a_inv ^ (natDegree p - i) * a_inv ^ i\n⊢ ↑(algebraMap R S) (a ^ (natDegree p - i)) * a_inv ^ natDegree p = a_inv ^ i\n[PROOFSTEP]\nrw [RingHom.map_pow, this, ← mul_assoc, ← mul_pow, ha_inv, one_pow, one_mul]\n -- Since `q(a) = 0` and `q(a) = q'(a) * a + 1`, we have `a * -q'(a) = 1`.\n -- TODO: we could use a lemma for `Polynomial.divX` here.\n[GOAL]\ncase h\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : eval₂ (algebraMap R S) a_inv p = 0\nhq : ∑ i in Finset.range (natDegree p + 1), coeff p i * a ^ (natDegree p - i) = 0\n⊢ a * -∑ i in Finset.range (natDegree p), coeff p i * a ^ (natDegree p - i - 1) = 1\n[PROOFSTEP]\nrw [Finset.sum_range_succ_comm, p_monic.coeff_natDegree, one_mul, tsub_self, pow_zero, add_eq_zero_iff_eq_neg,\n eq_comm] at hq \n[GOAL]\ncase h\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : eval₂ (algebraMap R S) a_inv p = 0\nhq✝ : a ^ (natDegree p - natDegree p) + ∑ x in Finset.range (natDegree p), coeff p x * a ^ (natDegree p - x) = 0\nhq : -∑ x in Finset.range (natDegree p), coeff p x * a ^ (natDegree p - x) = 1\n⊢ a * -∑ i in Finset.range (natDegree p), coeff p i * a ^ (natDegree p - i - 1) = 1\n[PROOFSTEP]\nrw [mul_comm, neg_mul, Finset.sum_mul]\n[GOAL]\ncase h\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : eval₂ (algebraMap R S) a_inv p = 0\nhq✝ : a ^ (natDegree p - natDegree p) + ∑ x in Finset.range (natDegree p), coeff p x * a ^ (natDegree p - x) = 0\nhq : -∑ x in Finset.range (natDegree p), coeff p x * a ^ (natDegree p - x) = 1\n⊢ -∑ x in Finset.range (natDegree p), coeff p x * a ^ (natDegree p - x - 1) * a = 1\n[PROOFSTEP]\nconvert hq using 2\n[GOAL]\ncase h.e'_2.h.e'_3\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : eval₂ (algebraMap R S) a_inv p = 0\nhq✝ : a ^ (natDegree p - natDegree p) + ∑ x in Finset.range (natDegree p), coeff p x * a ^ (natDegree p - x) = 0\nhq : -∑ x in Finset.range (natDegree p), coeff p x * a ^ (natDegree p - x) = 1\n⊢ ∑ x in Finset.range (natDegree p), coeff p x * a ^ (natDegree p - x - 1) * a =\n ∑ x in Finset.range (natDegree p), coeff p x * a ^ (natDegree p - x)\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun i hi => _\n[GOAL]\ncase h.e'_2.h.e'_3\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : eval₂ (algebraMap R S) a_inv p = 0\nhq✝ : a ^ (natDegree p - natDegree p) + ∑ x in Finset.range (natDegree p), coeff p x * a ^ (natDegree p - x) = 0\nhq : -∑ x in Finset.range (natDegree p), coeff p x * a ^ (natDegree p - x) = 1\ni : ℕ\nhi : i ∈ Finset.range (natDegree p)\n⊢ coeff p i * a ^ (natDegree p - i - 1) * a = coeff p i * a ^ (natDegree p - i)\n[PROOFSTEP]\nhave : 1 ≤ p.natDegree - i := le_tsub_of_add_le_left (Finset.mem_range.mp hi)\n[GOAL]\ncase h.e'_2.h.e'_3\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing A\ninst✝¹¹ : CommRing B\ninst✝¹⁰ : CommRing S✝\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra A B\ninst✝⁷ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁶ : Algebra R✝ A\ninst✝⁵ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhRS : Function.Injective ↑(algebraMap R S)\nhS : IsField S\na : R\nha : a ≠ 0\na_inv : S\nha_inv : ↑(algebraMap R S) a * a_inv = 1\np : R[X]\np_monic : Monic p\nhp : eval₂ (algebraMap R S) a_inv p = 0\nhq✝ : a ^ (natDegree p - natDegree p) + ∑ x in Finset.range (natDegree p), coeff p x * a ^ (natDegree p - x) = 0\nhq : -∑ x in Finset.range (natDegree p), coeff p x * a ^ (natDegree p - x) = 1\ni : ℕ\nhi : i ∈ Finset.range (natDegree p)\nthis : 1 ≤ natDegree p - i\n⊢ coeff p i * a ^ (natDegree p - i - 1) * a = coeff p i * a ^ (natDegree p - i)\n[PROOFSTEP]\nrw [mul_assoc, ← pow_succ', tsub_add_cancel_of_le this]\n[GOAL]\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹² : CommRing R✝\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : CommRing S✝\ninst✝⁸ : CommRing T\ninst✝⁷ : Algebra A B\ninst✝⁶ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁵ : Algebra R✝ A\ninst✝⁴ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhR : IsField R\n⊢ IsField S\n[PROOFSTEP]\nletI := hR.toField\n[GOAL]\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹² : CommRing R✝\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : CommRing S✝\ninst✝⁸ : CommRing T\ninst✝⁷ : Algebra A B\ninst✝⁶ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁵ : Algebra R✝ A\ninst✝⁴ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhR : IsField R\nthis : Field R := IsField.toField hR\n⊢ IsField S\n[PROOFSTEP]\nrefine' ⟨⟨0, 1, zero_ne_one⟩, mul_comm, fun {x} hx => _⟩\n[GOAL]\nR✝ : Type u_1\nA : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹² : CommRing R✝\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : CommRing S✝\ninst✝⁸ : CommRing T\ninst✝⁷ : Algebra A B\ninst✝⁶ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁵ : Algebra R✝ A\ninst✝⁴ : IsScalarTower R✝ A B\nR : Type u_6\nS : Type u_7\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhR : IsField R\nthis : Field R := IsField.toField hR\nx : S\nhx : x ≠ 0\n⊢ ∃ b, x * b = 1\n[PROOFSTEP]\nlet A := Algebra.adjoin R ({ x } : Set S)\n[GOAL]\nR✝ : Type u_1\nA✝ : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹² : CommRing R✝\ninst✝¹¹ : CommRing A✝\ninst✝¹⁰ : CommRing B\ninst✝⁹ : CommRing S✝\ninst✝⁸ : CommRing T\ninst✝⁷ : Algebra A✝ B\ninst✝⁶ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁵ : Algebra R✝ A✝\ninst✝⁴ : IsScalarTower R✝ A✝ B\nR : Type u_6\nS : Type u_7\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhR : IsField R\nthis : Field R := IsField.toField hR\nx : S\nhx : x ≠ 0\nA : Subalgebra R S := adjoin R {x}\n⊢ ∃ b, x * b = 1\n[PROOFSTEP]\nhaveI : IsNoetherian R A :=\n isNoetherian_of_fg_of_noetherian (Subalgebra.toSubmodule A) (FG_adjoin_singleton_of_integral x (H x))\n[GOAL]\nR✝ : Type u_1\nA✝ : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹² : CommRing R✝\ninst✝¹¹ : CommRing A✝\ninst✝¹⁰ : CommRing B\ninst✝⁹ : CommRing S✝\ninst✝⁸ : CommRing T\ninst✝⁷ : Algebra A✝ B\ninst✝⁶ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁵ : Algebra R✝ A✝\ninst✝⁴ : IsScalarTower R✝ A✝ B\nR : Type u_6\nS : Type u_7\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhR : IsField R\nthis✝ : Field R := IsField.toField hR\nx : S\nhx : x ≠ 0\nA : Subalgebra R S := adjoin R {x}\nthis : IsNoetherian R { x // x ∈ A }\n⊢ ∃ b, x * b = 1\n[PROOFSTEP]\nhaveI : Module.Finite R A := Module.IsNoetherian.finite R A\n[GOAL]\nR✝ : Type u_1\nA✝ : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹² : CommRing R✝\ninst✝¹¹ : CommRing A✝\ninst✝¹⁰ : CommRing B\ninst✝⁹ : CommRing S✝\ninst✝⁸ : CommRing T\ninst✝⁷ : Algebra A✝ B\ninst✝⁶ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁵ : Algebra R✝ A✝\ninst✝⁴ : IsScalarTower R✝ A✝ B\nR : Type u_6\nS : Type u_7\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhR : IsField R\nthis✝¹ : Field R := IsField.toField hR\nx : S\nhx : x ≠ 0\nA : Subalgebra R S := adjoin R {x}\nthis✝ : IsNoetherian R { x // x ∈ A }\nthis : Module.Finite R { x // x ∈ A }\n⊢ ∃ b, x * b = 1\n[PROOFSTEP]\nobtain ⟨y, hy⟩ :=\n LinearMap.surjective_of_injective\n (@LinearMap.mulLeft_injective R A _ _ _ _ ⟨x, subset_adjoin (Set.mem_singleton x)⟩ fun h =>\n hx (Subtype.ext_iff.mp h))\n 1\n[GOAL]\ncase intro\nR✝ : Type u_1\nA✝ : Type u_2\nB : Type u_3\nS✝ : Type u_4\nT : Type u_5\ninst✝¹² : CommRing R✝\ninst✝¹¹ : CommRing A✝\ninst✝¹⁰ : CommRing B\ninst✝⁹ : CommRing S✝\ninst✝⁸ : CommRing T\ninst✝⁷ : Algebra A✝ B\ninst✝⁶ : Algebra R✝ B\nf : R✝ →+* S✝\ng : S✝ →+* T\ninst✝⁵ : Algebra R✝ A✝\ninst✝⁴ : IsScalarTower R✝ A✝ B\nR : Type u_6\nS : Type u_7\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nH : Algebra.IsIntegral R S\nhR : IsField R\nthis✝¹ : Field R := IsField.toField hR\nx : S\nhx : x ≠ 0\nA : Subalgebra R S := adjoin R {x}\nthis✝ : IsNoetherian R { x // x ∈ A }\nthis : Module.Finite R { x // x ∈ A }\ny : { x // x ∈ A }\nhy : ↑(LinearMap.mulLeft R { val := x, property := (_ : x ∈ ↑(adjoin R {x})) }) y = 1\n⊢ ∃ b, x * b = 1\n[PROOFSTEP]\nexact ⟨y, Subtype.ext_iff.mp hy⟩\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.IntegralClosure", "llama_tokens": 224906, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8267117855317474, "lm_q2_score": 0.672331699179286, "lm_q1q2_score": 0.5558245394981012}} {"text": "[GOAL]\na b : Cardinal.{u}\nn m : ℕ\n⊢ IsUnit a ↔ a = 1\n[PROOFSTEP]\nrefine'\n ⟨fun h => _, by\n rintro rfl\n exact isUnit_one⟩\n[GOAL]\na b : Cardinal.{u}\nn m : ℕ\n⊢ a = 1 → IsUnit a\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nb : Cardinal.{u}\nn m : ℕ\n⊢ IsUnit 1\n[PROOFSTEP]\nexact isUnit_one\n[GOAL]\na b : Cardinal.{u}\nn m : ℕ\nh : IsUnit a\n⊢ a = 1\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha)\n[GOAL]\ncase inl\nb : Cardinal.{u}\nn m : ℕ\nh : IsUnit 0\n⊢ 0 = 1\n[PROOFSTEP]\nexact (not_isUnit_zero h).elim\n[GOAL]\ncase inr\na b : Cardinal.{u}\nn m : ℕ\nh : IsUnit a\nha : a ≠ 0\n⊢ a = 1\n[PROOFSTEP]\nrw [isUnit_iff_forall_dvd] at h \n[GOAL]\ncase inr\na b : Cardinal.{u}\nn m : ℕ\nh : ∀ (y : Cardinal.{u}), a ∣ y\nha : a ≠ 0\n⊢ a = 1\n[PROOFSTEP]\ncases' h 1 with t ht\n[GOAL]\ncase inr.intro\na b : Cardinal.{u}\nn m : ℕ\nh : ∀ (y : Cardinal.{u}), a ∣ y\nha : a ≠ 0\nt : Cardinal.{u}\nht : 1 = a * t\n⊢ a = 1\n[PROOFSTEP]\nrw [eq_comm, mul_eq_one_iff'] at ht \n[GOAL]\ncase inr.intro\na b : Cardinal.{u}\nn m : ℕ\nh : ∀ (y : Cardinal.{u}), a ∣ y\nha : a ≠ 0\nt : Cardinal.{u}\nht : a = 1 ∧ t = 1\n⊢ a = 1\n[PROOFSTEP]\nexact ht.1\n[GOAL]\ncase inr.intro.ha\na b : Cardinal.{u}\nn m : ℕ\nh : ∀ (y : Cardinal.{u}), a ∣ y\nha : a ≠ 0\nt : Cardinal.{u}\nht : a * t = 1\n⊢ 1 ≤ a\n[PROOFSTEP]\nexact one_le_iff_ne_zero.mpr ha\n[GOAL]\ncase inr.intro.hb\na b : Cardinal.{u}\nn m : ℕ\nh : ∀ (y : Cardinal.{u}), a ∣ y\nha : a ≠ 0\nt : Cardinal.{u}\nht : a * t = 1\n⊢ 1 ≤ t\n[PROOFSTEP]\napply one_le_iff_ne_zero.mpr\n[GOAL]\ncase inr.intro.hb\na b : Cardinal.{u}\nn m : ℕ\nh : ∀ (y : Cardinal.{u}), a ∣ y\nha : a ≠ 0\nt : Cardinal.{u}\nht : a * t = 1\n⊢ t ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase inr.intro.hb\na b : Cardinal.{u}\nn m : ℕ\nh✝ : ∀ (y : Cardinal.{u}), a ∣ y\nha : a ≠ 0\nt : Cardinal.{u}\nht : a * t = 1\nh : t = 0\n⊢ False\n[PROOFSTEP]\nrw [h, mul_zero] at ht \n[GOAL]\ncase inr.intro.hb\na b : Cardinal.{u}\nn m : ℕ\nh✝ : ∀ (y : Cardinal.{u}), a ∣ y\nha : a ≠ 0\nt : Cardinal.{u}\nht : 0 = 1\nh : t = 0\n⊢ False\n[PROOFSTEP]\nexact zero_ne_one ht\n[GOAL]\na✝ b✝ : Cardinal.{u}\nn m : ℕ\na x : Cardinal.{u_1}\nb0 : x ≠ 0\nb : Cardinal.{u_1}\nhab : x = a * b\n⊢ a ≤ x\n[PROOFSTEP]\nsimpa only [hab, mul_one] using\n mul_le_mul_left' (one_le_iff_ne_zero.2 fun h : b = 0 => b0 (by rwa [h, mul_zero] at hab )) a\n[GOAL]\na✝ b✝ : Cardinal.{u}\nn m : ℕ\na x : Cardinal.{u_1}\nb0 : x ≠ 0\nb : Cardinal.{u_1}\nhab : x = a * b\nh : b = 0\n⊢ x = 0\n[PROOFSTEP]\nrwa [h, mul_zero] at hab \n[GOAL]\na b : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\n⊢ Prime a\n[PROOFSTEP]\nrefine' ⟨(aleph0_pos.trans_le ha).ne', _, fun b c hbc => _⟩\n[GOAL]\ncase refine'_1\na b : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\n⊢ ¬IsUnit a\n[PROOFSTEP]\nrw [isUnit_iff]\n[GOAL]\ncase refine'_1\na b : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\n⊢ ¬a = 1\n[PROOFSTEP]\nexact (one_lt_aleph0.trans_le ha).ne'\n[GOAL]\ncase refine'_2\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\n⊢ a ∣ b ∨ a ∣ c\n[PROOFSTEP]\ncases' eq_or_ne (b * c) 0 with hz hz\n[GOAL]\ncase refine'_2.inl\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c = 0\n⊢ a ∣ b ∨ a ∣ c\n[PROOFSTEP]\nrcases mul_eq_zero.mp hz with (rfl | rfl)\n[GOAL]\ncase refine'_2.inl.inl\na b : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nc : Cardinal.{u}\nhbc : a ∣ 0 * c\nhz : 0 * c = 0\n⊢ a ∣ 0 ∨ a ∣ c\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2.inl.inr\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb : Cardinal.{u}\nhbc : a ∣ b * 0\nhz : b * 0 = 0\n⊢ a ∣ b ∨ a ∣ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2.inr\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\n⊢ a ∣ b ∨ a ∣ c\n[PROOFSTEP]\nwlog h : c ≤ b\n[GOAL]\ncase refine'_2.inr.inr\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\n⊢ a ∣ b ∨ a ∣ c\n[PROOFSTEP]\ncases le_total c b <;> [skip; rw [or_comm]]\n[GOAL]\ncase refine'_2.inr.inr\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\n⊢ a ∣ b ∨ a ∣ c\n[PROOFSTEP]\ncases le_total c b\n[GOAL]\ncase refine'_2.inr.inr.inl\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : c ≤ b\n⊢ a ∣ b ∨ a ∣ c\n[PROOFSTEP]\nskip\n[GOAL]\ncase refine'_2.inr.inr.inr\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : b ≤ c\n⊢ a ∣ b ∨ a ∣ c\n[PROOFSTEP]\nrw [or_comm]\n[GOAL]\ncase refine'_2.inr.inr.inl\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : c ≤ b\n⊢ a ∣ b ∨ a ∣ c\n[PROOFSTEP]\napply_assumption\n[GOAL]\ncase refine'_2.inr.inr.inr\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : b ≤ c\n⊢ a ∣ c ∨ a ∣ b\n[PROOFSTEP]\napply_assumption\n[GOAL]\ncase refine'_2.inr.inr.inl.b\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : c ≤ b\nhz_symm : 0 ≠ b * c\n⊢ Cardinal.{u}\ncase refine'_2.inr.inr.inl.n\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : c ≤ b\nhz_symm : 0 ≠ b * c\n⊢ ℕ\ncase refine'_2.inr.inr.inl.m\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : c ≤ b\nhz_symm : 0 ≠ b * c\n⊢ ℕ\ncase refine'_2.inr.inr.inl.ha\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : c ≤ b\nhz_symm : 0 ≠ b * c\n⊢ ℵ₀ ≤ a\ncase refine'_2.inr.inr.inl.hbc\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : c ≤ b\nhz_symm : 0 ≠ b * c\n⊢ a ∣ b * c\ncase refine'_2.inr.inr.inl.hz\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : c ≤ b\nhz_symm : 0 ≠ b * c\n⊢ b * c ≠ 0\ncase refine'_2.inr.inr.inl.h\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : c ≤ b\nhz_symm : 0 ≠ b * c\n⊢ c ≤ b\ncase refine'_2.inr.inr.inr.b\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : b ≤ c\nhz_symm : 0 ≠ b * c\n⊢ Cardinal.{u}\ncase refine'_2.inr.inr.inr.n\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : b ≤ c\nhz_symm : 0 ≠ b * c\n⊢ ℕ\ncase refine'_2.inr.inr.inr.m\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : b ≤ c\nhz_symm : 0 ≠ b * c\n⊢ ℕ\ncase refine'_2.inr.inr.inr.ha\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : b ≤ c\nhz_symm : 0 ≠ b * c\n⊢ ℵ₀ ≤ a\ncase refine'_2.inr.inr.inr.hbc\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : b ≤ c\nhz_symm : 0 ≠ b * c\n⊢ a ∣ c * b\ncase refine'_2.inr.inr.inr.hz\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : b ≤ c\nhz_symm : 0 ≠ b * c\n⊢ c * b ≠ 0\ncase refine'_2.inr.inr.inr.h\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : b ≤ c\nhz_symm : 0 ≠ b * c\n⊢ b ≤ c\n[PROOFSTEP]\nassumption'\n[GOAL]\ncase refine'_2.inr.inr.inr.hbc\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : b ≤ c\nhz_symm : 0 ≠ b * c\n⊢ a ∣ c * b\ncase refine'_2.inr.inr.inr.hz\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : b ≤ c\nhz_symm : 0 ≠ b * c\n⊢ c * b ≠ 0\n[PROOFSTEP]\nall_goals rwa [mul_comm]\n[GOAL]\ncase refine'_2.inr.inr.inr.hbc\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : b ≤ c\nhz_symm : 0 ≠ b * c\n⊢ a ∣ c * b\n[PROOFSTEP]\nrwa [mul_comm]\n[GOAL]\ncase refine'_2.inr.inr.inr.hz\na b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nthis :\n ∀ {a : Cardinal.{u}} {b : Cardinal.{u}} {n m : ℕ},\n ℵ₀ ≤ a → ∀ (b c : Cardinal.{u}), a ∣ b * c → b * c ≠ 0 → c ≤ b → a ∣ b ∨ a ∣ c\nh : ¬c ≤ b\nh✝ : b ≤ c\nhz_symm : 0 ≠ b * c\n⊢ c * b ≠ 0\n[PROOFSTEP]\nrwa [mul_comm]\n[GOAL]\na✝ a b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nh : c ≤ b\n⊢ a ∣ b ∨ a ∣ c\n[PROOFSTEP]\nleft\n[GOAL]\ncase h\na✝ a b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nh : c ≤ b\n⊢ a ∣ b\n[PROOFSTEP]\nhave habc := le_of_dvd hz hbc\n[GOAL]\ncase h\na✝ a b✝ : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nb c : Cardinal.{u}\nhbc : a ∣ b * c\nhz : b * c ≠ 0\nh : c ≤ b\nhabc : a ≤ b * c\n⊢ a ∣ b\n[PROOFSTEP]\nrwa [mul_eq_max' <| ha.trans <| habc, max_def', if_pos h] at hbc \n[GOAL]\na b : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\n⊢ ¬Irreducible a\n[PROOFSTEP]\nrw [irreducible_iff, not_and_or]\n[GOAL]\na b : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\n⊢ ¬¬IsUnit a ∨ ¬∀ (a_1 b : Cardinal.{u}), a = a_1 * b → IsUnit a_1 ∨ IsUnit b\n[PROOFSTEP]\nrefine' Or.inr fun h => _\n[GOAL]\na b : Cardinal.{u}\nn m : ℕ\nha : ℵ₀ ≤ a\nh : ∀ (a_1 b : Cardinal.{u}), a = a_1 * b → IsUnit a_1 ∨ IsUnit b\n⊢ False\n[PROOFSTEP]\nsimpa [mul_aleph0_eq ha, isUnit_iff, (one_lt_aleph0.trans_le ha).ne', one_lt_aleph0.ne'] using h a ℵ₀\n[GOAL]\na b : Cardinal.{u}\nn m : ℕ\n⊢ ↑n ∣ ↑m ↔ n ∣ m\n[PROOFSTEP]\nrefine' ⟨_, fun ⟨h, ht⟩ => ⟨h, by exact_mod_cast ht⟩⟩\n[GOAL]\na b : Cardinal.{u}\nn m : ℕ\nx✝ : n ∣ m\nh : ℕ\nht : m = n * h\n⊢ ↑m = ↑n * ↑h\n[PROOFSTEP]\nexact_mod_cast ht\n[GOAL]\na b : Cardinal.{u}\nn m : ℕ\n⊢ ↑n ∣ ↑m → n ∣ m\n[PROOFSTEP]\nrintro ⟨k, hk⟩\n[GOAL]\ncase intro\na b : Cardinal.{u}\nn m : ℕ\nk : Cardinal.{u_1}\nhk : ↑m = ↑n * k\n⊢ n ∣ m\n[PROOFSTEP]\nhave : ↑m < ℵ₀ := nat_lt_aleph0 m\n[GOAL]\ncase intro\na b : Cardinal.{u}\nn m : ℕ\nk : Cardinal.{u_1}\nhk : ↑m = ↑n * k\nthis : ↑m < ℵ₀\n⊢ n ∣ m\n[PROOFSTEP]\nrw [hk, mul_lt_aleph0_iff] at this \n[GOAL]\ncase intro\na b : Cardinal.{u}\nn m : ℕ\nk : Cardinal.{u_1}\nhk : ↑m = ↑n * k\nthis : ↑n = 0 ∨ k = 0 ∨ ↑n < ℵ₀ ∧ k < ℵ₀\n⊢ n ∣ m\n[PROOFSTEP]\nrcases this with (h | h | ⟨-, hk'⟩)\n[GOAL]\ncase intro.inl\na b : Cardinal.{u}\nn m : ℕ\nk : Cardinal.{u_1}\nhk : ↑m = ↑n * k\nh : ↑n = 0\n⊢ n ∣ m\ncase intro.inr.inl\na b : Cardinal.{u}\nn m : ℕ\nk : Cardinal.{u_1}\nhk : ↑m = ↑n * k\nh : k = 0\n⊢ n ∣ m\ncase intro.inr.inr.intro a b : Cardinal.{u} n m : ℕ k : Cardinal.{u_1} hk : ↑m = ↑n * k hk' : k < ℵ₀ ⊢ n ∣ m\n[PROOFSTEP]\niterate 2 simp only [h, mul_zero, zero_mul, Nat.cast_eq_zero] at hk ; simp [hk]\n[GOAL]\ncase intro.inl\na b : Cardinal.{u}\nn m : ℕ\nk : Cardinal.{u_1}\nhk : ↑m = ↑n * k\nh : ↑n = 0\n⊢ n ∣ m\ncase intro.inr.inl\na b : Cardinal.{u}\nn m : ℕ\nk : Cardinal.{u_1}\nhk : ↑m = ↑n * k\nh : k = 0\n⊢ n ∣ m\ncase intro.inr.inr.intro a b : Cardinal.{u} n m : ℕ k : Cardinal.{u_1} hk : ↑m = ↑n * k hk' : k < ℵ₀ ⊢ n ∣ m\n[PROOFSTEP]\nsimp only [h, mul_zero, zero_mul, Nat.cast_eq_zero] at hk \n[GOAL]\ncase intro.inl\na b : Cardinal.{u}\nn m : ℕ\nk : Cardinal.{u_1}\nh : ↑n = 0\nhk : m = 0\n⊢ n ∣ m\ncase intro.inr.inl\na b : Cardinal.{u}\nn m : ℕ\nk : Cardinal.{u_1}\nhk : ↑m = ↑n * k\nh : k = 0\n⊢ n ∣ m\ncase intro.inr.inr.intro a b : Cardinal.{u} n m : ℕ k : Cardinal.{u_1} hk : ↑m = ↑n * k hk' : k < ℵ₀ ⊢ n ∣ m\n[PROOFSTEP]\nsimp [hk]\n[GOAL]\ncase intro.inr.inl\na b : Cardinal.{u}\nn m : ℕ\nk : Cardinal.{u_1}\nhk : ↑m = ↑n * k\nh : k = 0\n⊢ n ∣ m\ncase intro.inr.inr.intro a b : Cardinal.{u} n m : ℕ k : Cardinal.{u_1} hk : ↑m = ↑n * k hk' : k < ℵ₀ ⊢ n ∣ m\n[PROOFSTEP]\nsimp only [h, mul_zero, zero_mul, Nat.cast_eq_zero] at hk \n[GOAL]\ncase intro.inr.inl\na b : Cardinal.{u}\nn m : ℕ\nk : Cardinal.{u_1}\nh : k = 0\nhk : m = 0\n⊢ n ∣ m\ncase intro.inr.inr.intro a b : Cardinal.{u} n m : ℕ k : Cardinal.{u_1} hk : ↑m = ↑n * k hk' : k < ℵ₀ ⊢ n ∣ m\n[PROOFSTEP]\nsimp [hk]\n[GOAL]\ncase intro.inr.inr.intro\na b : Cardinal.{u}\nn m : ℕ\nk : Cardinal.{u_1}\nhk : ↑m = ↑n * k\nhk' : k < ℵ₀\n⊢ n ∣ m\n[PROOFSTEP]\nlift k to ℕ using hk'\n[GOAL]\ncase intro.inr.inr.intro.intro\na b : Cardinal.{u}\nn m k : ℕ\nhk : ↑m = ↑n * ↑k\n⊢ n ∣ m\n[PROOFSTEP]\nexact ⟨k, by exact_mod_cast hk⟩\n[GOAL]\na b : Cardinal.{u}\nn m k : ℕ\nhk : ↑m = ↑n * ↑k\n⊢ m = n * k\n[PROOFSTEP]\nexact_mod_cast hk\n[GOAL]\na b : Cardinal.{u}\nn m : ℕ\n⊢ Prime ↑n ↔ Nat.Prime n\n[PROOFSTEP]\nsimp only [Prime, Nat.prime_iff]\n[GOAL]\na b : Cardinal.{u}\nn m : ℕ\n⊢ (↑n ≠ 0 ∧ ¬IsUnit ↑n ∧ ∀ (a b : Cardinal.{u_1}), ↑n ∣ a * b → ↑n ∣ a ∨ ↑n ∣ b) ↔\n n ≠ 0 ∧ ¬IsUnit n ∧ ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\n[PROOFSTEP]\nrefine' and_congr (by simp) (and_congr _ ⟨fun h b c hbc => _, fun h b c hbc => _⟩)\n[GOAL]\na b : Cardinal.{u}\nn m : ℕ\n⊢ ↑n ≠ 0 ↔ n ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_1\na b : Cardinal.{u}\nn m : ℕ\n⊢ ¬IsUnit ↑n ↔ ¬IsUnit n\n[PROOFSTEP]\nsimp only [isUnit_iff, Nat.isUnit_iff]\n[GOAL]\ncase refine'_1\na b : Cardinal.{u}\nn m : ℕ\n⊢ ¬↑n = 1 ↔ ¬n = 1\n[PROOFSTEP]\nexact_mod_cast Iff.rfl\n[GOAL]\ncase refine'_2\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : Cardinal.{u_1}), ↑n ∣ a * b → ↑n ∣ a ∨ ↑n ∣ b\nb c : ℕ\nhbc : n ∣ b * c\n⊢ n ∣ b ∨ n ∣ c\n[PROOFSTEP]\nexact_mod_cast h b c (by exact_mod_cast hbc)\n[GOAL]\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : Cardinal.{u_1}), ↑n ∣ a * b → ↑n ∣ a ∨ ↑n ∣ b\nb c : ℕ\nhbc : n ∣ b * c\n⊢ ↑n ∣ ↑b * ↑c\n[PROOFSTEP]\nexact_mod_cast hbc\n[GOAL]\ncase refine'_3\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\n⊢ ↑n ∣ b ∨ ↑n ∣ c\n[PROOFSTEP]\ncases' lt_or_le (b * c) ℵ₀ with h' h'\n[GOAL]\ncase refine'_3.inl\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : b * c < ℵ₀\n⊢ ↑n ∣ b ∨ ↑n ∣ c\n[PROOFSTEP]\nrcases mul_lt_aleph0_iff.mp h' with (rfl | rfl | ⟨hb, hc⟩)\n[GOAL]\ncase refine'_3.inl.inl\na b : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nc : Cardinal.{u_1}\nhbc : ↑n ∣ 0 * c\nh' : 0 * c < ℵ₀\n⊢ ↑n ∣ 0 ∨ ↑n ∣ c\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_3.inl.inr.inl\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb : Cardinal.{u_1}\nhbc : ↑n ∣ b * 0\nh' : b * 0 < ℵ₀\n⊢ ↑n ∣ b ∨ ↑n ∣ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_3.inl.inr.inr.intro\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : b * c < ℵ₀\nhb : b < ℵ₀\nhc : c < ℵ₀\n⊢ ↑n ∣ b ∨ ↑n ∣ c\n[PROOFSTEP]\nlift b to ℕ using hb\n[GOAL]\ncase refine'_3.inl.inr.inr.intro.intro\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nc : Cardinal.{u_1}\nhc : c < ℵ₀\nb : ℕ\nhbc : ↑n ∣ ↑b * c\nh' : ↑b * c < ℵ₀\n⊢ ↑n ∣ ↑b ∨ ↑n ∣ c\n[PROOFSTEP]\nlift c to ℕ using hc\n[GOAL]\ncase refine'_3.inl.inr.inr.intro.intro.intro\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : ℕ\nhbc : ↑n ∣ ↑b * ↑c\nh' : ↑b * ↑c < ℵ₀\n⊢ ↑n ∣ ↑b ∨ ↑n ∣ ↑c\n[PROOFSTEP]\nexact_mod_cast h b c (by exact_mod_cast hbc)\n[GOAL]\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : ℕ\nhbc : ↑n ∣ ↑b * ↑c\nh' : ↑b * ↑c < ℵ₀\n⊢ n ∣ b * c\n[PROOFSTEP]\nexact_mod_cast hbc\n[GOAL]\ncase refine'_3.inr\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\n⊢ ↑n ∣ b ∨ ↑n ∣ c\n[PROOFSTEP]\nrcases aleph0_le_mul_iff.mp h' with ⟨hb, hc, hℵ₀⟩\n[GOAL]\ncase refine'_3.inr.intro.intro\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\n⊢ ↑n ∣ b ∨ ↑n ∣ c\n[PROOFSTEP]\nhave hn : (n : Cardinal) ≠ 0 := by\n intro h\n rw [h, zero_dvd_iff, mul_eq_zero] at hbc \n cases hbc <;> contradiction\n[GOAL]\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\na b✝ : Cardinal.{u}\nn m : ℕ\nh✝ : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nh : ↑n = 0\n⊢ False\n[PROOFSTEP]\nrw [h, zero_dvd_iff, mul_eq_zero] at hbc \n[GOAL]\na b✝ : Cardinal.{u}\nn m : ℕ\nh✝ : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : b = 0 ∨ c = 0\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nh : ↑n = 0\n⊢ False\n[PROOFSTEP]\ncases hbc\n[GOAL]\ncase inl\na b✝ : Cardinal.{u}\nn m : ℕ\nh✝¹ : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nh : ↑n = 0\nh✝ : b = 0\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase inr\na b✝ : Cardinal.{u}\nn m : ℕ\nh✝¹ : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nh : ↑n = 0\nh✝ : c = 0\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase refine'_3.inr.intro.intro\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nhn : ↑n ≠ 0\n⊢ ↑n ∣ b ∨ ↑n ∣ c\n[PROOFSTEP]\nwlog hℵ₀b : ℵ₀ ≤ b\n[GOAL]\ncase refine'_3.inr.intro.intro.inr\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nhn : ↑n ≠ 0\nthis :\n ∀ {a b : Cardinal.{u}} {n : ℕ} {m : ℕ},\n (∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b) →\n ∀ (b c : Cardinal.{u_1}),\n ↑n ∣ b * c → ℵ₀ ≤ b * c → b ≠ 0 → c ≠ 0 → ℵ₀ ≤ b ∨ ℵ₀ ≤ c → ↑n ≠ 0 → ℵ₀ ≤ b → ↑n ∣ b ∨ ↑n ∣ c\nhℵ₀b : ¬ℵ₀ ≤ b\n⊢ ↑n ∣ b ∨ ↑n ∣ c\n[PROOFSTEP]\nrefine' (this h c b _ _ hc hb hℵ₀.symm hn (hℵ₀.resolve_left hℵ₀b)).symm\n[GOAL]\ncase refine'_3.inr.intro.intro.inr.refine'_1\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nhn : ↑n ≠ 0\nthis :\n ∀ {a b : Cardinal.{u}} {n : ℕ} {m : ℕ},\n (∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b) →\n ∀ (b c : Cardinal.{u_1}),\n ↑n ∣ b * c → ℵ₀ ≤ b * c → b ≠ 0 → c ≠ 0 → ℵ₀ ≤ b ∨ ℵ₀ ≤ c → ↑n ≠ 0 → ℵ₀ ≤ b → ↑n ∣ b ∨ ↑n ∣ c\nhℵ₀b : ¬ℵ₀ ≤ b\n⊢ Cardinal.{u}\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase refine'_3.inr.intro.intro.inr.refine'_1\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nhn : ↑n ≠ 0\nthis :\n ∀ {a b : Cardinal.{u}} {n : ℕ} {m : ℕ},\n (∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b) →\n ∀ (b c : Cardinal.{u_1}),\n ↑n ∣ b * c → ℵ₀ ≤ b * c → b ≠ 0 → c ≠ 0 → ℵ₀ ≤ b ∨ ℵ₀ ≤ c → ↑n ≠ 0 → ℵ₀ ≤ b → ↑n ∣ b ∨ ↑n ∣ c\nhℵ₀b : ¬ℵ₀ ≤ b\n⊢ Cardinal.{u}\n[PROOFSTEP]\nassumption\n[GOAL]\ncase refine'_3.inr.intro.intro.inr.refine'_2\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nhn : ↑n ≠ 0\nthis :\n ∀ {a b : Cardinal.{u}} {n : ℕ} {m : ℕ},\n (∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b) →\n ∀ (b c : Cardinal.{u_1}),\n ↑n ∣ b * c → ℵ₀ ≤ b * c → b ≠ 0 → c ≠ 0 → ℵ₀ ≤ b ∨ ℵ₀ ≤ c → ↑n ≠ 0 → ℵ₀ ≤ b → ↑n ∣ b ∨ ↑n ∣ c\nhℵ₀b : ¬ℵ₀ ≤ b\n⊢ Cardinal.{u}\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase refine'_3.inr.intro.intro.inr.refine'_2\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nhn : ↑n ≠ 0\nthis :\n ∀ {a b : Cardinal.{u}} {n : ℕ} {m : ℕ},\n (∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b) →\n ∀ (b c : Cardinal.{u_1}),\n ↑n ∣ b * c → ℵ₀ ≤ b * c → b ≠ 0 → c ≠ 0 → ℵ₀ ≤ b ∨ ℵ₀ ≤ c → ↑n ≠ 0 → ℵ₀ ≤ b → ↑n ∣ b ∨ ↑n ∣ c\nhℵ₀b : ¬ℵ₀ ≤ b\n⊢ Cardinal.{u}\n[PROOFSTEP]\nassumption\n[GOAL]\ncase refine'_3.inr.intro.intro.inr.refine'_3\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nhn : ↑n ≠ 0\nthis :\n ∀ {a b : Cardinal.{u}} {n : ℕ} {m : ℕ},\n (∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b) →\n ∀ (b c : Cardinal.{u_1}),\n ↑n ∣ b * c → ℵ₀ ≤ b * c → b ≠ 0 → c ≠ 0 → ℵ₀ ≤ b ∨ ℵ₀ ≤ c → ↑n ≠ 0 → ℵ₀ ≤ b → ↑n ∣ b ∨ ↑n ∣ c\nhℵ₀b : ¬ℵ₀ ≤ b\n⊢ ℕ\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase refine'_3.inr.intro.intro.inr.refine'_3\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nhn : ↑n ≠ 0\nthis :\n ∀ {a b : Cardinal.{u}} {n : ℕ} {m : ℕ},\n (∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b) →\n ∀ (b c : Cardinal.{u_1}),\n ↑n ∣ b * c → ℵ₀ ≤ b * c → b ≠ 0 → c ≠ 0 → ℵ₀ ≤ b ∨ ℵ₀ ≤ c → ↑n ≠ 0 → ℵ₀ ≤ b → ↑n ∣ b ∨ ↑n ∣ c\nhℵ₀b : ¬ℵ₀ ≤ b\n⊢ ℕ\n[PROOFSTEP]\nassumption\n[GOAL]\ncase refine'_3.inr.intro.intro.inr.refine'_4\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nhn : ↑n ≠ 0\nthis :\n ∀ {a b : Cardinal.{u}} {n : ℕ} {m : ℕ},\n (∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b) →\n ∀ (b c : Cardinal.{u_1}),\n ↑n ∣ b * c → ℵ₀ ≤ b * c → b ≠ 0 → c ≠ 0 → ℵ₀ ≤ b ∨ ℵ₀ ≤ c → ↑n ≠ 0 → ℵ₀ ≤ b → ↑n ∣ b ∨ ↑n ∣ c\nhℵ₀b : ¬ℵ₀ ≤ b\n⊢ ↑n ∣ c * b\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase refine'_3.inr.intro.intro.inr.refine'_4\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nhn : ↑n ≠ 0\nthis :\n ∀ {a b : Cardinal.{u}} {n : ℕ} {m : ℕ},\n (∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b) →\n ∀ (b c : Cardinal.{u_1}),\n ↑n ∣ b * c → ℵ₀ ≤ b * c → b ≠ 0 → c ≠ 0 → ℵ₀ ≤ b ∨ ℵ₀ ≤ c → ↑n ≠ 0 → ℵ₀ ≤ b → ↑n ∣ b ∨ ↑n ∣ c\nhℵ₀b : ¬ℵ₀ ≤ b\n⊢ ↑n ∣ c * b\n[PROOFSTEP]\nassumption\n[GOAL]\ncase refine'_3.inr.intro.intro.inr.refine'_5\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nhn : ↑n ≠ 0\nthis :\n ∀ {a b : Cardinal.{u}} {n : ℕ} {m : ℕ},\n (∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b) →\n ∀ (b c : Cardinal.{u_1}),\n ↑n ∣ b * c → ℵ₀ ≤ b * c → b ≠ 0 → c ≠ 0 → ℵ₀ ≤ b ∨ ℵ₀ ≤ c → ↑n ≠ 0 → ℵ₀ ≤ b → ↑n ∣ b ∨ ↑n ∣ c\nhℵ₀b : ¬ℵ₀ ≤ b\n⊢ ℵ₀ ≤ c * b\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase refine'_3.inr.intro.intro.inr.refine'_5\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nhn : ↑n ≠ 0\nthis :\n ∀ {a b : Cardinal.{u}} {n : ℕ} {m : ℕ},\n (∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b) →\n ∀ (b c : Cardinal.{u_1}),\n ↑n ∣ b * c → ℵ₀ ≤ b * c → b ≠ 0 → c ≠ 0 → ℵ₀ ≤ b ∨ ℵ₀ ≤ c → ↑n ≠ 0 → ℵ₀ ≤ b → ↑n ∣ b ∨ ↑n ∣ c\nhℵ₀b : ¬ℵ₀ ≤ b\n⊢ ℵ₀ ≤ c * b\n[PROOFSTEP]\nassumption\n[GOAL]\ncase refine'_3.inr.intro.intro.inr.refine'_4\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nhn : ↑n ≠ 0\nthis :\n ∀ {a b : Cardinal.{u}} {n : ℕ} {m : ℕ},\n (∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b) →\n ∀ (b c : Cardinal.{u_1}),\n ↑n ∣ b * c → ℵ₀ ≤ b * c → b ≠ 0 → c ≠ 0 → ℵ₀ ≤ b ∨ ℵ₀ ≤ c → ↑n ≠ 0 → ℵ₀ ≤ b → ↑n ∣ b ∨ ↑n ∣ c\nhℵ₀b : ¬ℵ₀ ≤ b\n⊢ ↑n ∣ c * b\ncase refine'_3.inr.intro.intro.inr.refine'_5\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nhn : ↑n ≠ 0\nthis :\n ∀ {a b : Cardinal.{u}} {n : ℕ} {m : ℕ},\n (∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b) →\n ∀ (b c : Cardinal.{u_1}),\n ↑n ∣ b * c → ℵ₀ ≤ b * c → b ≠ 0 → c ≠ 0 → ℵ₀ ≤ b ∨ ℵ₀ ≤ c → ↑n ≠ 0 → ℵ₀ ≤ b → ↑n ∣ b ∨ ↑n ∣ c\nhℵ₀b : ¬ℵ₀ ≤ b\n⊢ ℵ₀ ≤ c * b\nn✝ : ℕ\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nhn : ↑n ≠ 0\nhℵ₀b : ℵ₀ ≤ b\n⊢ ↑n ∣ b ∨ ↑n ∣ c\n[PROOFSTEP]\nrwa [mul_comm] at hbc \n[GOAL]\ncase refine'_3.inr.intro.intro.inr.refine'_5\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nhn : ↑n ≠ 0\nthis :\n ∀ {a b : Cardinal.{u}} {n : ℕ} {m : ℕ},\n (∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b) →\n ∀ (b c : Cardinal.{u_1}),\n ↑n ∣ b * c → ℵ₀ ≤ b * c → b ≠ 0 → c ≠ 0 → ℵ₀ ≤ b ∨ ℵ₀ ≤ c → ↑n ≠ 0 → ℵ₀ ≤ b → ↑n ∣ b ∨ ↑n ∣ c\nhℵ₀b : ¬ℵ₀ ≤ b\n⊢ ℵ₀ ≤ c * b\nn✝ : ℕ\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nhn : ↑n ≠ 0\nhℵ₀b : ℵ₀ ≤ b\n⊢ ↑n ∣ b ∨ ↑n ∣ c\n[PROOFSTEP]\nrwa [mul_comm] at h' \n[GOAL]\nn✝ : ℕ\na b✝ : Cardinal.{u}\nn m : ℕ\nh : ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b\nb c : Cardinal.{u_1}\nhbc : ↑n ∣ b * c\nh' : ℵ₀ ≤ b * c\nhb : b ≠ 0\nhc : c ≠ 0\nhℵ₀ : ℵ₀ ≤ b ∨ ℵ₀ ≤ c\nhn : ↑n ≠ 0\nhℵ₀b : ℵ₀ ≤ b\n⊢ ↑n ∣ b ∨ ↑n ∣ c\n[PROOFSTEP]\nexact Or.inl (dvd_of_le_of_aleph0_le hn ((nat_lt_aleph0 n).le.trans hℵ₀b) hℵ₀b)\n[GOAL]\na✝ b : Cardinal.{u}\nn m : ℕ\na : Cardinal.{u_1}\n⊢ Prime a ↔ ℵ₀ ≤ a ∨ ∃ p, a = ↑p ∧ Nat.Prime p\n[PROOFSTEP]\ncases' le_or_lt ℵ₀ a with h h\n[GOAL]\ncase inl\na✝ b : Cardinal.{u}\nn m : ℕ\na : Cardinal.{u_1}\nh : ℵ₀ ≤ a\n⊢ Prime a ↔ ℵ₀ ≤ a ∨ ∃ p, a = ↑p ∧ Nat.Prime p\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase inr\na✝ b : Cardinal.{u}\nn m : ℕ\na : Cardinal.{u_1}\nh : a < ℵ₀\n⊢ Prime a ↔ ℵ₀ ≤ a ∨ ∃ p, a = ↑p ∧ Nat.Prime p\n[PROOFSTEP]\nlift a to ℕ using id h\n[GOAL]\ncase inr.intro\na✝ b : Cardinal.{u}\nn m a : ℕ\nh : ↑a < ℵ₀\n⊢ Prime ↑a ↔ ℵ₀ ≤ ↑a ∨ ∃ p, ↑a = ↑p ∧ Nat.Prime p\n[PROOFSTEP]\nsimp [not_le.mpr h]\n[GOAL]\na✝ b : Cardinal.{u}\nn m : ℕ\na : Cardinal.{u_1}\n⊢ IsPrimePow a ↔ ℵ₀ ≤ a ∨ ∃ n, a = ↑n ∧ IsPrimePow n\n[PROOFSTEP]\nby_cases h : ℵ₀ ≤ a\n[GOAL]\ncase pos\na✝ b : Cardinal.{u}\nn m : ℕ\na : Cardinal.{u_1}\nh : ℵ₀ ≤ a\n⊢ IsPrimePow a ↔ ℵ₀ ≤ a ∨ ∃ n, a = ↑n ∧ IsPrimePow n\n[PROOFSTEP]\nsimp [h, (prime_of_aleph0_le h).isPrimePow]\n[GOAL]\ncase neg\na✝ b : Cardinal.{u}\nn m : ℕ\na : Cardinal.{u_1}\nh : ¬ℵ₀ ≤ a\n⊢ IsPrimePow a ↔ ℵ₀ ≤ a ∨ ∃ n, a = ↑n ∧ IsPrimePow n\n[PROOFSTEP]\nsimp only [h, Nat.cast_inj, exists_eq_left', false_or_iff, isPrimePow_nat_iff]\n[GOAL]\ncase neg\na✝ b : Cardinal.{u}\nn m : ℕ\na : Cardinal.{u_1}\nh : ¬ℵ₀ ≤ a\n⊢ IsPrimePow a ↔ ∃ n, a = ↑n ∧ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nlift a to ℕ using not_le.mp h\n[GOAL]\ncase neg.intro\na✝ b : Cardinal.{u}\nn m a : ℕ\nh : ¬ℵ₀ ≤ ↑a\n⊢ IsPrimePow ↑a ↔ ∃ n, ↑a = ↑n ∧ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nrw [isPrimePow_def]\n[GOAL]\ncase neg.intro\na✝ b : Cardinal.{u}\nn m a : ℕ\nh : ¬ℵ₀ ≤ ↑a\n⊢ (∃ p k, Prime p ∧ 0 < k ∧ p ^ k = ↑a) ↔ ∃ n, ↑a = ↑n ∧ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nrefine' ⟨_, fun ⟨n, han, p, k, hp, hk, h⟩ => ⟨p, k, nat_is_prime_iff.2 hp, hk, by rw [han]; exact_mod_cast h⟩⟩\n[GOAL]\na✝ b : Cardinal.{u}\nn✝ m a : ℕ\nh✝ : ¬ℵ₀ ≤ ↑a\nx✝ : ∃ n, ↑a = ↑n ∧ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n\nn : ℕ\nhan : ↑a = ↑n\np k : ℕ\nhp : Nat.Prime p\nhk : 0 < k\nh : p ^ k = n\n⊢ ↑p ^ k = ↑a\n[PROOFSTEP]\nrw [han]\n[GOAL]\na✝ b : Cardinal.{u}\nn✝ m a : ℕ\nh✝ : ¬ℵ₀ ≤ ↑a\nx✝ : ∃ n, ↑a = ↑n ∧ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n\nn : ℕ\nhan : ↑a = ↑n\np k : ℕ\nhp : Nat.Prime p\nhk : 0 < k\nh : p ^ k = n\n⊢ ↑p ^ k = ↑n\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\ncase neg.intro\na✝ b : Cardinal.{u}\nn m a : ℕ\nh : ¬ℵ₀ ≤ ↑a\n⊢ (∃ p k, Prime p ∧ 0 < k ∧ p ^ k = ↑a) → ∃ n, ↑a = ↑n ∧ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nrintro ⟨p, k, hp, hk, hpk⟩\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\na✝ b : Cardinal.{u}\nn m a : ℕ\nh : ¬ℵ₀ ≤ ↑a\np : Cardinal.{u_1}\nk : ℕ\nhp : Prime p\nhk : 0 < k\nhpk : p ^ k = ↑a\n⊢ ∃ n, ↑a = ↑n ∧ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nhave key : p ^ 1 ≤ ↑a := by rw [← hpk]; apply power_le_power_left hp.ne_zero; exact_mod_cast hk\n[GOAL]\na✝ b : Cardinal.{u}\nn m a : ℕ\nh : ¬ℵ₀ ≤ ↑a\np : Cardinal.{u_1}\nk : ℕ\nhp : Prime p\nhk : 0 < k\nhpk : p ^ k = ↑a\n⊢ p ^ 1 ≤ ↑a\n[PROOFSTEP]\nrw [← hpk]\n[GOAL]\na✝ b : Cardinal.{u}\nn m a : ℕ\nh : ¬ℵ₀ ≤ ↑a\np : Cardinal.{u_1}\nk : ℕ\nhp : Prime p\nhk : 0 < k\nhpk : p ^ k = ↑a\n⊢ p ^ 1 ≤ p ^ k\n[PROOFSTEP]\napply power_le_power_left hp.ne_zero\n[GOAL]\na✝ b : Cardinal.{u}\nn m a : ℕ\nh : ¬ℵ₀ ≤ ↑a\np : Cardinal.{u_1}\nk : ℕ\nhp : Prime p\nhk : 0 < k\nhpk : p ^ k = ↑a\n⊢ 1 ≤ ↑k\n[PROOFSTEP]\nexact_mod_cast hk\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\na✝ b : Cardinal.{u}\nn m a : ℕ\nh : ¬ℵ₀ ≤ ↑a\np : Cardinal.{u_1}\nk : ℕ\nhp : Prime p\nhk : 0 < k\nhpk : p ^ k = ↑a\nkey : p ^ 1 ≤ ↑a\n⊢ ∃ n, ↑a = ↑n ∧ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nrw [power_one] at key \n[GOAL]\ncase neg.intro.intro.intro.intro.intro\na✝ b : Cardinal.{u}\nn m a : ℕ\nh : ¬ℵ₀ ≤ ↑a\np : Cardinal.{u_1}\nk : ℕ\nhp : Prime p\nhk : 0 < k\nhpk : p ^ k = ↑a\nkey : p ≤ ↑a\n⊢ ∃ n, ↑a = ↑n ∧ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nlift p to ℕ using key.trans_lt (nat_lt_aleph0 a)\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro\na✝ b : Cardinal.{u}\nn m a : ℕ\nh : ¬ℵ₀ ≤ ↑a\nk : ℕ\nhk : 0 < k\np : ℕ\nhp : Prime ↑p\nhpk : ↑p ^ k = ↑a\nkey : ↑p ≤ ↑a\n⊢ ∃ n, ↑a = ↑n ∧ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nexact ⟨a, rfl, p, k, nat_is_prime_iff.mp hp, hk, by exact_mod_cast hpk⟩\n[GOAL]\na✝ b : Cardinal.{u}\nn m a : ℕ\nh : ¬ℵ₀ ≤ ↑a\nk : ℕ\nhk : 0 < k\np : ℕ\nhp : Prime ↑p\nhpk : ↑p ^ k = ↑a\nkey : ↑p ≤ ↑a\n⊢ p ^ k = a\n[PROOFSTEP]\nexact_mod_cast hpk\n", "meta": {"mathlib_filename": "Mathlib.SetTheory.Cardinal.Divisibility", "llama_tokens": 20826, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8438950947024555, "lm_q2_score": 0.6584174938590245, "lm_q1q2_score": 0.5556352933339149}} {"text": "[GOAL]\nC : Type u\ninst✝¹² : Category.{v, u} C\nD : Type u_1\ninst✝¹¹ : Category.{u_2, u_1} D\ninst✝¹⁰ : Preadditive C\ninst✝⁹ : HasZeroObject C\ninst✝⁸ : HasEqualizers C\ninst✝⁷ : HasImages C\ninst✝⁶ : HasProjectiveResolutions C\ninst✝⁵ : Preadditive D\ninst✝⁴ : HasEqualizers D\ninst✝³ : HasCokernels D\ninst✝² : HasImages D\ninst✝¹ : HasImageMaps D\nF : C ⥤ D\ninst✝ : Additive F\nn : ℕ\nX Y : C\nf : X ⟶ Y\nP : ProjectiveResolution X\nQ : ProjectiveResolution Y\ng : P.complex ⟶ Q.complex\nw : g ≫ Q.π = P.π ≫ (ChainComplex.single₀ C).map f\n⊢ (leftDerived F n).map f =\n (leftDerivedObjIso F n P).hom ≫\n (homologyFunctor D (ComplexShape.down ℕ) n).map ((mapHomologicalComplex F (ComplexShape.down ℕ)).map g) ≫\n (leftDerivedObjIso F n Q).inv\n[PROOFSTEP]\ndsimp only [Functor.leftDerived, Functor.leftDerivedObjIso]\n[GOAL]\nC : Type u\ninst✝¹² : Category.{v, u} C\nD : Type u_1\ninst✝¹¹ : Category.{u_2, u_1} D\ninst✝¹⁰ : Preadditive C\ninst✝⁹ : HasZeroObject C\ninst✝⁸ : HasEqualizers C\ninst✝⁷ : HasImages C\ninst✝⁶ : HasProjectiveResolutions C\ninst✝⁵ : Preadditive D\ninst✝⁴ : HasEqualizers D\ninst✝³ : HasCokernels D\ninst✝² : HasImages D\ninst✝¹ : HasImageMaps D\nF : C ⥤ D\ninst✝ : Additive F\nn : ℕ\nX Y : C\nf : X ⟶ Y\nP : ProjectiveResolution X\nQ : ProjectiveResolution Y\ng : P.complex ⟶ Q.complex\nw : g ≫ Q.π = P.π ≫ (ChainComplex.single₀ C).map f\n⊢ (projectiveResolutions C ⋙\n mapHomotopyCategory F (ComplexShape.down ℕ) ⋙ HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n f =\n ((HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).mapIso\n (HomotopyCategory.isoOfHomotopyEquiv\n (mapHomotopyEquiv F (ProjectiveResolution.homotopyEquiv (projectiveResolution X) P))) ≪≫\n (HomotopyCategory.homologyFactors D (ComplexShape.down ℕ) n).app\n ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)).hom ≫\n (homologyFunctor D (ComplexShape.down ℕ) n).map ((mapHomologicalComplex F (ComplexShape.down ℕ)).map g) ≫\n ((HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).mapIso\n (HomotopyCategory.isoOfHomotopyEquiv\n (mapHomotopyEquiv F (ProjectiveResolution.homotopyEquiv (projectiveResolution Y) Q))) ≪≫\n (HomotopyCategory.homologyFactors D (ComplexShape.down ℕ) n).app\n ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex)).inv\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝¹² : Category.{v, u} C\nD : Type u_1\ninst✝¹¹ : Category.{u_2, u_1} D\ninst✝¹⁰ : Preadditive C\ninst✝⁹ : HasZeroObject C\ninst✝⁸ : HasEqualizers C\ninst✝⁷ : HasImages C\ninst✝⁶ : HasProjectiveResolutions C\ninst✝⁵ : Preadditive D\ninst✝⁴ : HasEqualizers D\ninst✝³ : HasCokernels D\ninst✝² : HasImages D\ninst✝¹ : HasImageMaps D\nF : C ⥤ D\ninst✝ : Additive F\nn : ℕ\nX Y : C\nf : X ⟶ Y\nP : ProjectiveResolution X\nQ : ProjectiveResolution Y\ng : P.complex ⟶ Q.complex\nw : g ≫ Q.π = P.π ≫ (ChainComplex.single₀ C).map f\n⊢ (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((mapHomotopyCategory F (ComplexShape.down ℕ)).map ((projectiveResolutions C).map f)) =\n ((HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n ((mapHomologicalComplex F (ComplexShape.down ℕ)).map\n (ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).hom)) ≫\n 𝟙\n ((HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).obj\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).obj\n ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)))) ≫\n homology.map\n (_ :\n HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) n ≫\n HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) n =\n 0)\n (_ :\n HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) n ≫\n HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) n =\n 0)\n (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).map g) n)\n (HomologicalComplex.Hom.sqFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).map g) n)\n (_ :\n (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).map g) n).right =\n (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).map g) n).right) ≫\n 𝟙 (HomologicalComplex.homology ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) n) ≫\n (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n ((mapHomologicalComplex F (ComplexShape.down ℕ)).map\n (ProjectiveResolution.homotopyEquiv (projectiveResolution Y) Q).inv))\n[PROOFSTEP]\nsimp only [Category.comp_id, Category.id_comp]\n[GOAL]\nC : Type u\ninst✝¹² : Category.{v, u} C\nD : Type u_1\ninst✝¹¹ : Category.{u_2, u_1} D\ninst✝¹⁰ : Preadditive C\ninst✝⁹ : HasZeroObject C\ninst✝⁸ : HasEqualizers C\ninst✝⁷ : HasImages C\ninst✝⁶ : HasProjectiveResolutions C\ninst✝⁵ : Preadditive D\ninst✝⁴ : HasEqualizers D\ninst✝³ : HasCokernels D\ninst✝² : HasImages D\ninst✝¹ : HasImageMaps D\nF : C ⥤ D\ninst✝ : Additive F\nn : ℕ\nX Y : C\nf : X ⟶ Y\nP : ProjectiveResolution X\nQ : ProjectiveResolution Y\ng : P.complex ⟶ Q.complex\nw : g ≫ Q.π = P.π ≫ (ChainComplex.single₀ C).map f\n⊢ (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((mapHomotopyCategory F (ComplexShape.down ℕ)).map ((projectiveResolutions C).map f)) =\n (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n ((mapHomologicalComplex F (ComplexShape.down ℕ)).map\n (ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).hom)) ≫\n homology.map\n (_ :\n HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) n ≫\n HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) n =\n 0)\n (_ :\n HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) n ≫\n HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) n =\n 0)\n (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).map g) n)\n (HomologicalComplex.Hom.sqFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).map g) n)\n (_ :\n (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).map g) n).right =\n (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).map g) n).right) ≫\n (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n ((mapHomologicalComplex F (ComplexShape.down ℕ)).map\n (ProjectiveResolution.homotopyEquiv (projectiveResolution Y) Q).inv))\n[PROOFSTEP]\nrw [← homologyFunctor_map, HomotopyCategory.homologyFunctor_map_factors]\n[GOAL]\nC : Type u\ninst✝¹² : Category.{v, u} C\nD : Type u_1\ninst✝¹¹ : Category.{u_2, u_1} D\ninst✝¹⁰ : Preadditive C\ninst✝⁹ : HasZeroObject C\ninst✝⁸ : HasEqualizers C\ninst✝⁷ : HasImages C\ninst✝⁶ : HasProjectiveResolutions C\ninst✝⁵ : Preadditive D\ninst✝⁴ : HasEqualizers D\ninst✝³ : HasCokernels D\ninst✝² : HasImages D\ninst✝¹ : HasImageMaps D\nF : C ⥤ D\ninst✝ : Additive F\nn : ℕ\nX Y : C\nf : X ⟶ Y\nP : ProjectiveResolution X\nQ : ProjectiveResolution Y\ng : P.complex ⟶ Q.complex\nw : g ≫ Q.π = P.π ≫ (ChainComplex.single₀ C).map f\n⊢ (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((mapHomotopyCategory F (ComplexShape.down ℕ)).map ((projectiveResolutions C).map f)) =\n (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n ((mapHomologicalComplex F (ComplexShape.down ℕ)).map\n (ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).hom)) ≫\n (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n ((mapHomologicalComplex F (ComplexShape.down ℕ)).map g)) ≫\n (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n ((mapHomologicalComplex F (ComplexShape.down ℕ)).map\n (ProjectiveResolution.homotopyEquiv (projectiveResolution Y) Q).inv))\n[PROOFSTEP]\nsimp only [← Functor.map_comp]\n[GOAL]\nC : Type u\ninst✝¹² : Category.{v, u} C\nD : Type u_1\ninst✝¹¹ : Category.{u_2, u_1} D\ninst✝¹⁰ : Preadditive C\ninst✝⁹ : HasZeroObject C\ninst✝⁸ : HasEqualizers C\ninst✝⁷ : HasImages C\ninst✝⁶ : HasProjectiveResolutions C\ninst✝⁵ : Preadditive D\ninst✝⁴ : HasEqualizers D\ninst✝³ : HasCokernels D\ninst✝² : HasImages D\ninst✝¹ : HasImageMaps D\nF : C ⥤ D\ninst✝ : Additive F\nn : ℕ\nX Y : C\nf : X ⟶ Y\nP : ProjectiveResolution X\nQ : ProjectiveResolution Y\ng : P.complex ⟶ Q.complex\nw : g ≫ Q.π = P.π ≫ (ChainComplex.single₀ C).map f\n⊢ (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((mapHomotopyCategory F (ComplexShape.down ℕ)).map ((projectiveResolutions C).map f)) =\n (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n ((mapHomologicalComplex F (ComplexShape.down ℕ)).map\n ((ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).hom ≫\n g ≫ (ProjectiveResolution.homotopyEquiv (projectiveResolution Y) Q).inv)))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nC : Type u\ninst✝¹² : Category.{v, u} C\nD : Type u_1\ninst✝¹¹ : Category.{u_2, u_1} D\ninst✝¹⁰ : Preadditive C\ninst✝⁹ : HasZeroObject C\ninst✝⁸ : HasEqualizers C\ninst✝⁷ : HasImages C\ninst✝⁶ : HasProjectiveResolutions C\ninst✝⁵ : Preadditive D\ninst✝⁴ : HasEqualizers D\ninst✝³ : HasCokernels D\ninst✝² : HasImages D\ninst✝¹ : HasImageMaps D\nF : C ⥤ D\ninst✝ : Additive F\nn : ℕ\nX Y : C\nf : X ⟶ Y\nP : ProjectiveResolution X\nQ : ProjectiveResolution Y\ng : P.complex ⟶ Q.complex\nw : g ≫ Q.π = P.π ≫ (ChainComplex.single₀ C).map f\n⊢ (mapHomotopyCategory F (ComplexShape.down ℕ)).map ((projectiveResolutions C).map f) =\n (HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n ((mapHomologicalComplex F (ComplexShape.down ℕ)).map\n ((ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).hom ≫\n g ≫ (ProjectiveResolution.homotopyEquiv (projectiveResolution Y) Q).inv))\n[PROOFSTEP]\napply HomotopyCategory.eq_of_homotopy\n[GOAL]\ncase e_a.h\nC : Type u\ninst✝¹² : Category.{v, u} C\nD : Type u_1\ninst✝¹¹ : Category.{u_2, u_1} D\ninst✝¹⁰ : Preadditive C\ninst✝⁹ : HasZeroObject C\ninst✝⁸ : HasEqualizers C\ninst✝⁷ : HasImages C\ninst✝⁶ : HasProjectiveResolutions C\ninst✝⁵ : Preadditive D\ninst✝⁴ : HasEqualizers D\ninst✝³ : HasCokernels D\ninst✝² : HasImages D\ninst✝¹ : HasImageMaps D\nF : C ⥤ D\ninst✝ : Additive F\nn : ℕ\nX Y : C\nf : X ⟶ Y\nP : ProjectiveResolution X\nQ : ProjectiveResolution Y\ng : P.complex ⟶ Q.complex\nw : g ≫ Q.π = P.π ≫ (ChainComplex.single₀ C).map f\n⊢ Homotopy ((mapHomologicalComplex F (ComplexShape.down ℕ)).map (projectiveResolution.lift f))\n ((mapHomologicalComplex F (ComplexShape.down ℕ)).map\n ((ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).hom ≫\n g ≫ (ProjectiveResolution.homotopyEquiv (projectiveResolution Y) Q).inv))\n[PROOFSTEP]\napply Functor.mapHomotopy\n[GOAL]\ncase e_a.h.h\nC : Type u\ninst✝¹² : Category.{v, u} C\nD : Type u_1\ninst✝¹¹ : Category.{u_2, u_1} D\ninst✝¹⁰ : Preadditive C\ninst✝⁹ : HasZeroObject C\ninst✝⁸ : HasEqualizers C\ninst✝⁷ : HasImages C\ninst✝⁶ : HasProjectiveResolutions C\ninst✝⁵ : Preadditive D\ninst✝⁴ : HasEqualizers D\ninst✝³ : HasCokernels D\ninst✝² : HasImages D\ninst✝¹ : HasImageMaps D\nF : C ⥤ D\ninst✝ : Additive F\nn : ℕ\nX Y : C\nf : X ⟶ Y\nP : ProjectiveResolution X\nQ : ProjectiveResolution Y\ng : P.complex ⟶ Q.complex\nw : g ≫ Q.π = P.π ≫ (ChainComplex.single₀ C).map f\n⊢ Homotopy (projectiveResolution.lift f)\n ((ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).hom ≫\n g ≫ (ProjectiveResolution.homotopyEquiv (projectiveResolution Y) Q).inv)\n[PROOFSTEP]\napply ProjectiveResolution.liftHomotopy f\n[GOAL]\ncase e_a.h.h.g_comm\nC : Type u\ninst✝¹² : Category.{v, u} C\nD : Type u_1\ninst✝¹¹ : Category.{u_2, u_1} D\ninst✝¹⁰ : Preadditive C\ninst✝⁹ : HasZeroObject C\ninst✝⁸ : HasEqualizers C\ninst✝⁷ : HasImages C\ninst✝⁶ : HasProjectiveResolutions C\ninst✝⁵ : Preadditive D\ninst✝⁴ : HasEqualizers D\ninst✝³ : HasCokernels D\ninst✝² : HasImages D\ninst✝¹ : HasImageMaps D\nF : C ⥤ D\ninst✝ : Additive F\nn : ℕ\nX Y : C\nf : X ⟶ Y\nP : ProjectiveResolution X\nQ : ProjectiveResolution Y\ng : P.complex ⟶ Q.complex\nw : g ≫ Q.π = P.π ≫ (ChainComplex.single₀ C).map f\n⊢ projectiveResolution.lift f ≫ (projectiveResolution Y).π = (projectiveResolution X).π ≫ (ChainComplex.single₀ C).map f\n[PROOFSTEP]\nsimp\n[GOAL]\ncase e_a.h.h.h_comm\nC : Type u\ninst✝¹² : Category.{v, u} C\nD : Type u_1\ninst✝¹¹ : Category.{u_2, u_1} D\ninst✝¹⁰ : Preadditive C\ninst✝⁹ : HasZeroObject C\ninst✝⁸ : HasEqualizers C\ninst✝⁷ : HasImages C\ninst✝⁶ : HasProjectiveResolutions C\ninst✝⁵ : Preadditive D\ninst✝⁴ : HasEqualizers D\ninst✝³ : HasCokernels D\ninst✝² : HasImages D\ninst✝¹ : HasImageMaps D\nF : C ⥤ D\ninst✝ : Additive F\nn : ℕ\nX Y : C\nf : X ⟶ Y\nP : ProjectiveResolution X\nQ : ProjectiveResolution Y\ng : P.complex ⟶ Q.complex\nw : g ≫ Q.π = P.π ≫ (ChainComplex.single₀ C).map f\n⊢ ((ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).hom ≫\n g ≫ (ProjectiveResolution.homotopyEquiv (projectiveResolution Y) Q).inv) ≫\n (projectiveResolution Y).π =\n (projectiveResolution X).π ≫ (ChainComplex.single₀ C).map f\n[PROOFSTEP]\nsimp [w]\n[GOAL]\nC : Type u\ninst✝¹² : Category.{v, u} C\nD : Type u_1\ninst✝¹¹ : Category.{u_2, u_1} D\ninst✝¹⁰ : Preadditive C\ninst✝⁹ : HasZeroObject C\ninst✝⁸ : HasEqualizers C\ninst✝⁷ : HasImages C\ninst✝⁶ : HasProjectiveResolutions C\ninst✝⁵ : Preadditive D\ninst✝⁴ : HasEqualizers D\ninst✝³ : HasCokernels D\ninst✝² : HasImages D\ninst✝¹ : HasImageMaps D\nF : C ⥤ D\ninst✝ : Functor.Additive F\nn : ℕ\n⊢ leftDerived (𝟙 F) n = 𝟙 (Functor.leftDerived F n)\n[PROOFSTEP]\nsimp [NatTrans.leftDerived]\n[GOAL]\nC : Type u\ninst✝¹² : Category.{v, u} C\nD : Type u_1\ninst✝¹¹ : Category.{u_2, u_1} D\ninst✝¹⁰ : Preadditive C\ninst✝⁹ : HasZeroObject C\ninst✝⁸ : HasEqualizers C\ninst✝⁷ : HasImages C\ninst✝⁶ : HasProjectiveResolutions C\ninst✝⁵ : Preadditive D\ninst✝⁴ : HasEqualizers D\ninst✝³ : HasCokernels D\ninst✝² : HasImages D\ninst✝¹ : HasImageMaps D\nF : C ⥤ D\ninst✝ : Functor.Additive F\nn : ℕ\n⊢ 𝟙\n (projectiveResolutions C ⋙\n Functor.mapHomotopyCategory F (ComplexShape.down ℕ) ⋙\n HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n) =\n 𝟙 (Functor.leftDerived F n)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝¹⁴ : Category.{v, u} C\nD : Type u_1\ninst✝¹³ : Category.{u_2, u_1} D\ninst✝¹² : Preadditive C\ninst✝¹¹ : HasZeroObject C\ninst✝¹⁰ : HasEqualizers C\ninst✝⁹ : HasImages C\ninst✝⁸ : HasProjectiveResolutions C\ninst✝⁷ : Preadditive D\ninst✝⁶ : HasEqualizers D\ninst✝⁵ : HasCokernels D\ninst✝⁴ : HasImages D\ninst✝³ : HasImageMaps D\nF G H : C ⥤ D\ninst✝² : Functor.Additive F\ninst✝¹ : Functor.Additive G\ninst✝ : Functor.Additive H\nα : F ⟶ G\nβ : G ⟶ H\nn : ℕ\n⊢ leftDerived (α ≫ β) n = leftDerived α n ≫ leftDerived β n\n[PROOFSTEP]\nsimp [NatTrans.leftDerived]\n[GOAL]\nC : Type u\ninst✝¹³ : Category.{v, u} C\nD : Type u_1\ninst✝¹² : Category.{u_2, u_1} D\ninst✝¹¹ : Preadditive C\ninst✝¹⁰ : HasZeroObject C\ninst✝⁹ : HasEqualizers C\ninst✝⁸ : HasImages C\ninst✝⁷ : HasProjectiveResolutions C\ninst✝⁶ : Preadditive D\ninst✝⁵ : HasEqualizers D\ninst✝⁴ : HasCokernels D\ninst✝³ : HasImages D\ninst✝² : HasImageMaps D\nF G : C ⥤ D\ninst✝¹ : Functor.Additive F\ninst✝ : Functor.Additive G\nα : F ⟶ G\nn : ℕ\nX : C\nP : ProjectiveResolution X\n⊢ app (leftDerived α n) X =\n (Functor.leftDerivedObjIso F n P).hom ≫\n (homologyFunctor D (ComplexShape.down ℕ) n).map (app (mapHomologicalComplex α (ComplexShape.down ℕ)) P.complex) ≫\n (Functor.leftDerivedObjIso G n P).inv\n[PROOFSTEP]\nsymm\n[GOAL]\nC : Type u\ninst✝¹³ : Category.{v, u} C\nD : Type u_1\ninst✝¹² : Category.{u_2, u_1} D\ninst✝¹¹ : Preadditive C\ninst✝¹⁰ : HasZeroObject C\ninst✝⁹ : HasEqualizers C\ninst✝⁸ : HasImages C\ninst✝⁷ : HasProjectiveResolutions C\ninst✝⁶ : Preadditive D\ninst✝⁵ : HasEqualizers D\ninst✝⁴ : HasCokernels D\ninst✝³ : HasImages D\ninst✝² : HasImageMaps D\nF G : C ⥤ D\ninst✝¹ : Functor.Additive F\ninst✝ : Functor.Additive G\nα : F ⟶ G\nn : ℕ\nX : C\nP : ProjectiveResolution X\n⊢ (Functor.leftDerivedObjIso F n P).hom ≫\n (homologyFunctor D (ComplexShape.down ℕ) n).map (app (mapHomologicalComplex α (ComplexShape.down ℕ)) P.complex) ≫\n (Functor.leftDerivedObjIso G n P).inv =\n app (leftDerived α n) X\n[PROOFSTEP]\ndsimp [NatTrans.leftDerived, Functor.leftDerivedObjIso]\n[GOAL]\nC : Type u\ninst✝¹³ : Category.{v, u} C\nD : Type u_1\ninst✝¹² : Category.{u_2, u_1} D\ninst✝¹¹ : Preadditive C\ninst✝¹⁰ : HasZeroObject C\ninst✝⁹ : HasEqualizers C\ninst✝⁸ : HasImages C\ninst✝⁷ : HasProjectiveResolutions C\ninst✝⁶ : Preadditive D\ninst✝⁵ : HasEqualizers D\ninst✝⁴ : HasCokernels D\ninst✝³ : HasImages D\ninst✝² : HasImageMaps D\nF G : C ⥤ D\ninst✝¹ : Functor.Additive F\ninst✝ : Functor.Additive G\nα : F ⟶ G\nn : ℕ\nX : C\nP : ProjectiveResolution X\n⊢ ((HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).map\n (ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).hom)) ≫\n 𝟙\n ((HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).obj\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).obj\n ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)))) ≫\n homology.map\n (_ :\n HomologicalComplex.dTo ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) n ≫\n HomologicalComplex.dFrom ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) n =\n 0)\n (_ :\n HomologicalComplex.dTo ((Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).obj P.complex) n ≫\n HomologicalComplex.dFrom ((Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).obj P.complex) n =\n 0)\n (HomologicalComplex.Hom.sqTo (app (mapHomologicalComplex α (ComplexShape.down ℕ)) P.complex) n)\n (HomologicalComplex.Hom.sqFrom (app (mapHomologicalComplex α (ComplexShape.down ℕ)) P.complex) n)\n (_ :\n (HomologicalComplex.Hom.sqTo (app (mapHomologicalComplex α (ComplexShape.down ℕ)) P.complex) n).right =\n (HomologicalComplex.Hom.sqTo (app (mapHomologicalComplex α (ComplexShape.down ℕ)) P.complex) n).right) ≫\n 𝟙 (HomologicalComplex.homology ((Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).obj P.complex) n) ≫\n (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n ((Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).map\n (ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).inv)) =\n (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n (app (mapHomologicalComplex α (ComplexShape.down ℕ)) ((projectiveResolutions C).obj X).as))\n[PROOFSTEP]\nsimp only [Category.comp_id, Category.id_comp]\n[GOAL]\nC : Type u\ninst✝¹³ : Category.{v, u} C\nD : Type u_1\ninst✝¹² : Category.{u_2, u_1} D\ninst✝¹¹ : Preadditive C\ninst✝¹⁰ : HasZeroObject C\ninst✝⁹ : HasEqualizers C\ninst✝⁸ : HasImages C\ninst✝⁷ : HasProjectiveResolutions C\ninst✝⁶ : Preadditive D\ninst✝⁵ : HasEqualizers D\ninst✝⁴ : HasCokernels D\ninst✝³ : HasImages D\ninst✝² : HasImageMaps D\nF G : C ⥤ D\ninst✝¹ : Functor.Additive F\ninst✝ : Functor.Additive G\nα : F ⟶ G\nn : ℕ\nX : C\nP : ProjectiveResolution X\n⊢ (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).map\n (ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).hom)) ≫\n homology.map\n (_ :\n HomologicalComplex.dTo ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) n ≫\n HomologicalComplex.dFrom ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) n =\n 0)\n (_ :\n HomologicalComplex.dTo ((Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).obj P.complex) n ≫\n HomologicalComplex.dFrom ((Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).obj P.complex) n =\n 0)\n (HomologicalComplex.Hom.sqTo (app (mapHomologicalComplex α (ComplexShape.down ℕ)) P.complex) n)\n (HomologicalComplex.Hom.sqFrom (app (mapHomologicalComplex α (ComplexShape.down ℕ)) P.complex) n)\n (_ :\n (HomologicalComplex.Hom.sqTo (app (mapHomologicalComplex α (ComplexShape.down ℕ)) P.complex) n).right =\n (HomologicalComplex.Hom.sqTo (app (mapHomologicalComplex α (ComplexShape.down ℕ)) P.complex) n).right) ≫\n (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n ((Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).map\n (ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).inv)) =\n (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n (app (mapHomologicalComplex α (ComplexShape.down ℕ)) ((projectiveResolutions C).obj X).as))\n[PROOFSTEP]\nrw [← homologyFunctor_map, HomotopyCategory.homologyFunctor_map_factors]\n[GOAL]\nC : Type u\ninst✝¹³ : Category.{v, u} C\nD : Type u_1\ninst✝¹² : Category.{u_2, u_1} D\ninst✝¹¹ : Preadditive C\ninst✝¹⁰ : HasZeroObject C\ninst✝⁹ : HasEqualizers C\ninst✝⁸ : HasImages C\ninst✝⁷ : HasProjectiveResolutions C\ninst✝⁶ : Preadditive D\ninst✝⁵ : HasEqualizers D\ninst✝⁴ : HasCokernels D\ninst✝³ : HasImages D\ninst✝² : HasImageMaps D\nF G : C ⥤ D\ninst✝¹ : Functor.Additive F\ninst✝ : Functor.Additive G\nα : F ⟶ G\nn : ℕ\nX : C\nP : ProjectiveResolution X\n⊢ (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).map\n (ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).hom)) ≫\n (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n (app (mapHomologicalComplex α (ComplexShape.down ℕ)) P.complex)) ≫\n (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n ((Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).map\n (ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).inv)) =\n (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n (app (mapHomologicalComplex α (ComplexShape.down ℕ)) ((projectiveResolutions C).obj X).as))\n[PROOFSTEP]\nsimp only [← Functor.map_comp]\n[GOAL]\nC : Type u\ninst✝¹³ : Category.{v, u} C\nD : Type u_1\ninst✝¹² : Category.{u_2, u_1} D\ninst✝¹¹ : Preadditive C\ninst✝¹⁰ : HasZeroObject C\ninst✝⁹ : HasEqualizers C\ninst✝⁸ : HasImages C\ninst✝⁷ : HasProjectiveResolutions C\ninst✝⁶ : Preadditive D\ninst✝⁵ : HasEqualizers D\ninst✝⁴ : HasCokernels D\ninst✝³ : HasImages D\ninst✝² : HasImageMaps D\nF G : C ⥤ D\ninst✝¹ : Functor.Additive F\ninst✝ : Functor.Additive G\nα : F ⟶ G\nn : ℕ\nX : C\nP : ProjectiveResolution X\n⊢ (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).map\n (ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).hom ≫\n app (mapHomologicalComplex α (ComplexShape.down ℕ)) P.complex ≫\n (Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).map\n (ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).inv)) =\n (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map\n ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n (app (mapHomologicalComplex α (ComplexShape.down ℕ)) ((projectiveResolutions C).obj X).as))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nC : Type u\ninst✝¹³ : Category.{v, u} C\nD : Type u_1\ninst✝¹² : Category.{u_2, u_1} D\ninst✝¹¹ : Preadditive C\ninst✝¹⁰ : HasZeroObject C\ninst✝⁹ : HasEqualizers C\ninst✝⁸ : HasImages C\ninst✝⁷ : HasProjectiveResolutions C\ninst✝⁶ : Preadditive D\ninst✝⁵ : HasEqualizers D\ninst✝⁴ : HasCokernels D\ninst✝³ : HasImages D\ninst✝² : HasImageMaps D\nF G : C ⥤ D\ninst✝¹ : Functor.Additive F\ninst✝ : Functor.Additive G\nα : F ⟶ G\nn : ℕ\nX : C\nP : ProjectiveResolution X\n⊢ (HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).map\n (ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).hom ≫\n app (mapHomologicalComplex α (ComplexShape.down ℕ)) P.complex ≫\n (Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).map\n (ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).inv) =\n (HomotopyCategory.quotient D (ComplexShape.down ℕ)).map\n (app (mapHomologicalComplex α (ComplexShape.down ℕ)) ((projectiveResolutions C).obj X).as)\n[PROOFSTEP]\napply HomotopyCategory.eq_of_homotopy\n[GOAL]\ncase e_a.h\nC : Type u\ninst✝¹³ : Category.{v, u} C\nD : Type u_1\ninst✝¹² : Category.{u_2, u_1} D\ninst✝¹¹ : Preadditive C\ninst✝¹⁰ : HasZeroObject C\ninst✝⁹ : HasEqualizers C\ninst✝⁸ : HasImages C\ninst✝⁷ : HasProjectiveResolutions C\ninst✝⁶ : Preadditive D\ninst✝⁵ : HasEqualizers D\ninst✝⁴ : HasCokernels D\ninst✝³ : HasImages D\ninst✝² : HasImageMaps D\nF G : C ⥤ D\ninst✝¹ : Functor.Additive F\ninst✝ : Functor.Additive G\nα : F ⟶ G\nn : ℕ\nX : C\nP : ProjectiveResolution X\n⊢ Homotopy\n ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).map\n (ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).hom ≫\n app (mapHomologicalComplex α (ComplexShape.down ℕ)) P.complex ≫\n (Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).map\n (ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).inv)\n (app (mapHomologicalComplex α (ComplexShape.down ℕ)) ((projectiveResolutions C).obj X).as)\n[PROOFSTEP]\nsimp only [NatTrans.mapHomologicalComplex_naturality_assoc, ← Functor.map_comp]\n[GOAL]\ncase e_a.h\nC : Type u\ninst✝¹³ : Category.{v, u} C\nD : Type u_1\ninst✝¹² : Category.{u_2, u_1} D\ninst✝¹¹ : Preadditive C\ninst✝¹⁰ : HasZeroObject C\ninst✝⁹ : HasEqualizers C\ninst✝⁸ : HasImages C\ninst✝⁷ : HasProjectiveResolutions C\ninst✝⁶ : Preadditive D\ninst✝⁵ : HasEqualizers D\ninst✝⁴ : HasCokernels D\ninst✝³ : HasImages D\ninst✝² : HasImageMaps D\nF G : C ⥤ D\ninst✝¹ : Functor.Additive F\ninst✝ : Functor.Additive G\nα : F ⟶ G\nn : ℕ\nX : C\nP : ProjectiveResolution X\n⊢ Homotopy\n (app (mapHomologicalComplex α (ComplexShape.down ℕ)) ((projectiveResolutions C).obj X).as ≫\n (Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).map\n ((ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).hom ≫\n (ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).inv))\n (app (mapHomologicalComplex α (ComplexShape.down ℕ)) ((projectiveResolutions C).obj X).as)\n[PROOFSTEP]\napply Homotopy.compLeftId\n[GOAL]\ncase e_a.h.h\nC : Type u\ninst✝¹³ : Category.{v, u} C\nD : Type u_1\ninst✝¹² : Category.{u_2, u_1} D\ninst✝¹¹ : Preadditive C\ninst✝¹⁰ : HasZeroObject C\ninst✝⁹ : HasEqualizers C\ninst✝⁸ : HasImages C\ninst✝⁷ : HasProjectiveResolutions C\ninst✝⁶ : Preadditive D\ninst✝⁵ : HasEqualizers D\ninst✝⁴ : HasCokernels D\ninst✝³ : HasImages D\ninst✝² : HasImageMaps D\nF G : C ⥤ D\ninst✝¹ : Functor.Additive F\ninst✝ : Functor.Additive G\nα : F ⟶ G\nn : ℕ\nX : C\nP : ProjectiveResolution X\n⊢ Homotopy\n ((Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).map\n ((ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).hom ≫\n (ProjectiveResolution.homotopyEquiv (projectiveResolution X) P).inv))\n (𝟙 ((Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as))\n[PROOFSTEP]\nrefine' (Functor.mapHomotopy _ (HomotopyEquiv.homotopyHomInvId _)).trans _\n[GOAL]\ncase e_a.h.h\nC : Type u\ninst✝¹³ : Category.{v, u} C\nD : Type u_1\ninst✝¹² : Category.{u_2, u_1} D\ninst✝¹¹ : Preadditive C\ninst✝¹⁰ : HasZeroObject C\ninst✝⁹ : HasEqualizers C\ninst✝⁸ : HasImages C\ninst✝⁷ : HasProjectiveResolutions C\ninst✝⁶ : Preadditive D\ninst✝⁵ : HasEqualizers D\ninst✝⁴ : HasCokernels D\ninst✝³ : HasImages D\ninst✝² : HasImageMaps D\nF G : C ⥤ D\ninst✝¹ : Functor.Additive F\ninst✝ : Functor.Additive G\nα : F ⟶ G\nn : ℕ\nX : C\nP : ProjectiveResolution X\n⊢ Homotopy ((Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).map (𝟙 ((projectiveResolutions C).obj X).as))\n (𝟙 ((Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as))\n[PROOFSTEP]\napply Homotopy.ofEq\n[GOAL]\ncase e_a.h.h.h\nC : Type u\ninst✝¹³ : Category.{v, u} C\nD : Type u_1\ninst✝¹² : Category.{u_2, u_1} D\ninst✝¹¹ : Preadditive C\ninst✝¹⁰ : HasZeroObject C\ninst✝⁹ : HasEqualizers C\ninst✝⁸ : HasImages C\ninst✝⁷ : HasProjectiveResolutions C\ninst✝⁶ : Preadditive D\ninst✝⁵ : HasEqualizers D\ninst✝⁴ : HasCokernels D\ninst✝³ : HasImages D\ninst✝² : HasImageMaps D\nF G : C ⥤ D\ninst✝¹ : Functor.Additive F\ninst✝ : Functor.Additive G\nα : F ⟶ G\nn : ℕ\nX : C\nP : ProjectiveResolution X\n⊢ (Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).map (𝟙 ((projectiveResolutions C).obj X).as) =\n 𝟙 ((Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as)\n[PROOFSTEP]\nsimp only [Functor.map_id]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Functor.LeftDerived", "llama_tokens": 12226, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8438950907764118, "lm_q2_score": 0.6584174938590246, "lm_q1q2_score": 0.5556352907489391}} {"text": "[GOAL]\nn : ℕ\nhn1 : n ≠ 1\nhn : Odd n\n⊢ (n + 1)# = n#\n[PROOFSTEP]\nrefine prod_congr ?_ fun _ _ ↦ rfl\n[GOAL]\nn : ℕ\nhn1 : n ≠ 1\nhn : Odd n\n⊢ filter Nat.Prime (range (n + 1 + 1)) = filter Nat.Prime (range (n + 1))\n[PROOFSTEP]\nrw [range_succ, filter_insert, if_neg fun h ↦ odd_iff_not_even.mp hn _]\n[GOAL]\nn : ℕ\nhn1 : n ≠ 1\nhn : Odd n\n⊢ Nat.Prime (n + 1) → Even n\n[PROOFSTEP]\nexact fun h ↦ h.even_sub_one <| mt succ.inj hn1\n[GOAL]\nm n : ℕ\n⊢ (m + n)# = m# * ∏ p in filter Nat.Prime (Ico (m + 1) (m + n + 1)), p\n[PROOFSTEP]\nrw [primorial, primorial, ← Ico_zero_eq_range, ← prod_union, ← filter_union, Ico_union_Ico_eq_Ico]\n[GOAL]\ncase hab\nm n : ℕ\n⊢ 0 ≤ m + 1\ncase hbc\nm n : ℕ\n⊢ m + 1 ≤ m + n + 1\nm n : ℕ ⊢ Disjoint (filter Nat.Prime (Ico 0 (m + 1))) (filter Nat.Prime (Ico (m + 1) (m + n + 1)))\n[PROOFSTEP]\nexacts [Nat.zero_le _, add_le_add_right (Nat.le_add_right _ _) _,\n disjoint_filter_filter <| Ico_disjoint_Ico_consecutive _ _ _]\n[GOAL]\nm n : ℕ\nh : n ≤ m\np : ℕ\nhp : p ∈ filter Nat.Prime (Ico (m + 1) (m + n + 1))\n⊢ p ∣ Nat.choose (m + n) m\n[PROOFSTEP]\nrw [mem_filter, mem_Ico] at hp \n[GOAL]\nm n : ℕ\nh : n ≤ m\np : ℕ\nhp : (m + 1 ≤ p ∧ p < m + n + 1) ∧ Nat.Prime p\n⊢ p ∣ Nat.choose (m + n) m\n[PROOFSTEP]\nexact hp.2.dvd_choose_add hp.1.1 (h.trans_lt (m.lt_succ_self.trans_le hp.1.1)) (Nat.lt_succ_iff.1 hp.1.2)\n[GOAL]\nn : ℕ\n⊢ n# ≤ 4 ^ n\n[PROOFSTEP]\ninduction' n using Nat.strong_induction_on with n ihn\n[GOAL]\ncase h\nn : ℕ\nihn : ∀ (m : ℕ), m < n → m# ≤ 4 ^ m\n⊢ n# ≤ 4 ^ n\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase h.zero\nihn : ∀ (m : ℕ), m < zero → m# ≤ 4 ^ m\n⊢ zero# ≤ 4 ^ zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.succ\nn : ℕ\nihn : ∀ (m : ℕ), m < succ n → m# ≤ 4 ^ m\n⊢ succ n# ≤ 4 ^ succ n\n[PROOFSTEP]\nrcases n.even_or_odd with (⟨m, rfl⟩ | ho)\n[GOAL]\ncase h.succ.inl.intro\nm : ℕ\nihn : ∀ (m_1 : ℕ), m_1 < succ (m + m) → m_1# ≤ 4 ^ m_1\n⊢ succ (m + m)# ≤ 4 ^ succ (m + m)\n[PROOFSTEP]\nrcases m.eq_zero_or_pos with (rfl | hm)\n[GOAL]\ncase h.succ.inl.intro.inl\nihn : ∀ (m : ℕ), m < succ (0 + 0) → m# ≤ 4 ^ m\n⊢ succ (0 + 0)# ≤ 4 ^ succ (0 + 0)\n[PROOFSTEP]\ndecide\n[GOAL]\ncase h.succ.inl.intro.inr\nm : ℕ\nihn : ∀ (m_1 : ℕ), m_1 < succ (m + m) → m_1# ≤ 4 ^ m_1\nhm : m > 0\n⊢ succ (m + m)# ≤ 4 ^ succ (m + m)\n[PROOFSTEP]\ncalc\n (m + m + 1)# = (m + 1 + m)# := by rw [add_right_comm]\n _ ≤ (m + 1)# * choose (m + 1 + m) (m + 1) := (primorial_add_le m.le_succ)\n _ = (m + 1)# * choose (2 * m + 1) m := by rw [choose_symm_add, two_mul, add_right_comm]\n _ ≤ 4 ^ (m + 1) * 4 ^ m :=\n (mul_le_mul' (ihn _ <| succ_lt_succ <| (lt_add_iff_pos_left _).2 hm) (choose_middle_le_pow _))\n _ ≤ 4 ^ (m + m + 1) := by rw [← pow_add, add_right_comm]\n[GOAL]\nm : ℕ\nihn : ∀ (m_1 : ℕ), m_1 < succ (m + m) → m_1# ≤ 4 ^ m_1\nhm : m > 0\n⊢ (m + m + 1)# = (m + 1 + m)#\n[PROOFSTEP]\nrw [add_right_comm]\n[GOAL]\nm : ℕ\nihn : ∀ (m_1 : ℕ), m_1 < succ (m + m) → m_1# ≤ 4 ^ m_1\nhm : m > 0\n⊢ (m + 1)# * Nat.choose (m + 1 + m) (m + 1) = (m + 1)# * Nat.choose (2 * m + 1) m\n[PROOFSTEP]\nrw [choose_symm_add, two_mul, add_right_comm]\n[GOAL]\nm : ℕ\nihn : ∀ (m_1 : ℕ), m_1 < succ (m + m) → m_1# ≤ 4 ^ m_1\nhm : m > 0\n⊢ 4 ^ (m + 1) * 4 ^ m ≤ 4 ^ (m + m + 1)\n[PROOFSTEP]\nrw [← pow_add, add_right_comm]\n[GOAL]\ncase h.succ.inr\nn : ℕ\nihn : ∀ (m : ℕ), m < succ n → m# ≤ 4 ^ m\nho : Odd n\n⊢ succ n# ≤ 4 ^ succ n\n[PROOFSTEP]\nrcases Decidable.eq_or_ne n 1 with (rfl | hn)\n[GOAL]\ncase h.succ.inr.inl\nihn : ∀ (m : ℕ), m < succ 1 → m# ≤ 4 ^ m\nho : Odd 1\n⊢ succ 1# ≤ 4 ^ succ 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase h.succ.inr.inr\nn : ℕ\nihn : ∀ (m : ℕ), m < succ n → m# ≤ 4 ^ m\nho : Odd n\nhn : n ≠ 1\n⊢ succ n# ≤ 4 ^ succ n\n[PROOFSTEP]\ncalc\n (n + 1)# = n# := primorial_succ hn ho\n _ ≤ 4 ^ n := (ihn n n.lt_succ_self)\n _ ≤ 4 ^ (n + 1) := pow_le_pow_of_le_right four_pos n.le_succ\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.Primorial", "llama_tokens": 2119, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7799929002541068, "lm_q2_score": 0.7122321903471563, "lm_q1q2_score": 0.5555360518032135}} {"text": "[GOAL]\n⊢ StableUnderComposition @FiniteType\n[PROOFSTEP]\nintrov R hf hg\n[GOAL]\nR S T : Type u_1\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nf : R →+* S\ng : S →+* T\nhf : FiniteType f\nhg : FiniteType g\n⊢ FiniteType (comp g f)\n[PROOFSTEP]\nexact hg.comp hf\n[GOAL]\n⊢ HoldsForLocalizationAway @FiniteType\n[PROOFSTEP]\nintrov R _\n[GOAL]\nR S : Type u_1\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\nr : R\ninst✝ : IsLocalization.Away r S\n⊢ FiniteType (algebraMap R S)\n[PROOFSTEP]\nsuffices Algebra.FiniteType R S by\n rw [RingHom.FiniteType]\n convert this; ext; rw [Algebra.smul_def]; rfl\n[GOAL]\nR S : Type u_1\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\nr : R\ninst✝ : IsLocalization.Away r S\nthis : Algebra.FiniteType R S\n⊢ FiniteType (algebraMap R S)\n[PROOFSTEP]\nrw [RingHom.FiniteType]\n[GOAL]\nR S : Type u_1\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\nr : R\ninst✝ : IsLocalization.Away r S\nthis : Algebra.FiniteType R S\n⊢ Algebra.FiniteType R S\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_5\nR S : Type u_1\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\nr : R\ninst✝ : IsLocalization.Away r S\nthis : Algebra.FiniteType R S\n⊢ toAlgebra (algebraMap R S) = inst✝¹\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_5.h\nR S : Type u_1\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\nr : R\ninst✝ : IsLocalization.Away r S\nthis : Algebra.FiniteType R S\nr✝ : R\nx✝ : S\n⊢ (let_fun I := toAlgebra (algebraMap R S);\n r✝ • x✝) =\n r✝ • x✝\n[PROOFSTEP]\nrw [Algebra.smul_def]\n[GOAL]\ncase h.e'_5.h\nR S : Type u_1\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\nr : R\ninst✝ : IsLocalization.Away r S\nthis : Algebra.FiniteType R S\nr✝ : R\nx✝ : S\n⊢ (let_fun I := toAlgebra (algebraMap R S);\n r✝ • x✝) =\n ↑(algebraMap R S) r✝ * x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR S : Type u_1\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\nr : R\ninst✝ : IsLocalization.Away r S\n⊢ Algebra.FiniteType R S\n[PROOFSTEP]\nexact IsLocalization.finiteType_of_monoid_fg (Submonoid.powers r) S\n[GOAL]\n⊢ OfLocalizationSpanTarget @FiniteType\n[PROOFSTEP]\nrw [ofLocalizationSpanTarget_iff_finite]\n[GOAL]\n⊢ OfLocalizationFiniteSpanTarget @FiniteType\n[PROOFSTEP]\nintrov R hs H\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), FiniteType (comp (algebraMap S (Localization.Away ↑r)) f)\n⊢ FiniteType f\n[PROOFSTEP]\nclassical\nletI := f.toAlgebra\nreplace H : ∀ r : s, Algebra.FiniteType R (Localization.Away (r : S))\n· intro r; simp_rw [RingHom.FiniteType] at H ; convert H r; ext; simp_rw [Algebra.smul_def]; rfl\nreplace H := fun r => (H r).1\nconstructor\n -- Suppose `s : Finset S` spans `S`, and each `Sᵣ` is finitely generated as an `R`-algebra.\n -- Say `t r : Finset Sᵣ` generates `Sᵣ`. By assumption, we may find `lᵢ` such that\n -- `∑ lᵢ * sᵢ = 1`. I claim that all `s` and `l` and the numerators of `t` and generates `S`.\nchoose t ht using H\nobtain ⟨l, hl⟩ :=\n (Finsupp.mem_span_iff_total S (s : Set S) 1).mp (show (1 : S) ∈ Ideal.span (s : Set S) by rw [hs]; trivial)\nlet sf := fun x : s => IsLocalization.finsetIntegerMultiple (Submonoid.powers (x : S)) (t x)\nuse s.attach.biUnion sf ∪ s ∪ l.support.image l\nrw [eq_top_iff]\n -- We need to show that every `x` falls in the subalgebra generated by those elements.\n -- Since all `s` and `l` are in the subalgebra, it suffices to check that `sᵢ ^ nᵢ • x` falls in\n -- the algebra for each `sᵢ` and some `nᵢ`.\nrintro x -\napply Subalgebra.mem_of_span_eq_top_of_smul_pow_mem _ (s : Set S) l hl _ _ x _\n· intro x hx\n apply Algebra.subset_adjoin\n rw [Finset.coe_union, Finset.coe_union]\n exact Or.inl (Or.inr hx)\n· intro i\n by_cases h : l i = 0; · rw [h]; exact zero_mem _\n apply Algebra.subset_adjoin\n rw [Finset.coe_union, Finset.coe_image]\n exact Or.inr (Set.mem_image_of_mem _ (Finsupp.mem_support_iff.mpr h))\n· intro r\n rw [Finset.coe_union, Finset.coe_union, Finset.coe_biUnion]\n -- Since all `sᵢ` and numerators of `t r` are in the algebra, it suffices to show that the\n -- image of `x` in `Sᵣ` falls in the `R`-adjoin of `t r`, which is of course true.\n -- Porting note: The following `obtain` fails because Lean wants to know right away what the\n -- placeholders are, so we need to provide a little more guidance\n -- obtain ⟨⟨_, n₂, rfl⟩, hn₂⟩ := IsLocalization.exists_smul_mem_of_mem_adjoin\n -- (Submonoid.powers (r : S)) x (t r) (Algebra.adjoin R _) _ _ _\n rw [show\n ∀ A : Set S,\n (∃ n, (r : S) ^ n • x ∈ Algebra.adjoin R A) ↔\n (∃ m : (Submonoid.powers (r : S)), (m : S) • x ∈ Algebra.adjoin R A)\n by {exact fun _ => by simp [Submonoid.mem_powers_iff]\n }]\n refine IsLocalization.exists_smul_mem_of_mem_adjoin (Submonoid.powers (r : S)) x (t r) (Algebra.adjoin R _) ?_ ?_ ?_\n · intro x hx\n apply Algebra.subset_adjoin\n exact Or.inl (Or.inl ⟨_, ⟨r, rfl⟩, _, ⟨s.mem_attach r, rfl⟩, hx⟩)\n · rw [Submonoid.powers_eq_closure, Submonoid.closure_le, Set.singleton_subset_iff]\n apply Algebra.subset_adjoin\n exact Or.inl (Or.inr r.2)\n · rw [ht]; trivial\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), FiniteType (comp (algebraMap S (Localization.Away ↑r)) f)\n⊢ FiniteType f\n[PROOFSTEP]\nletI := f.toAlgebra\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), FiniteType (comp (algebraMap S (Localization.Away ↑r)) f)\nthis : Algebra R S := toAlgebra f\n⊢ FiniteType f\n[PROOFSTEP]\nreplace H : ∀ r : s, Algebra.FiniteType R (Localization.Away (r : S))\n[GOAL]\ncase H\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), FiniteType (comp (algebraMap S (Localization.Away ↑r)) f)\nthis : Algebra R S := toAlgebra f\n⊢ ∀ (r : { x // x ∈ s }), Algebra.FiniteType R (Localization.Away ↑r)\n[PROOFSTEP]\nintro r\n[GOAL]\ncase H\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), FiniteType (comp (algebraMap S (Localization.Away ↑r)) f)\nthis : Algebra R S := toAlgebra f\nr : { x // x ∈ s }\n⊢ Algebra.FiniteType R (Localization.Away ↑r)\n[PROOFSTEP]\nsimp_rw [RingHom.FiniteType] at H \n[GOAL]\ncase H\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), Algebra.FiniteType R (Localization.Away ↑r)\nthis : Algebra R S := toAlgebra f\nr : { x // x ∈ s }\n⊢ Algebra.FiniteType R (Localization.Away ↑r)\n[PROOFSTEP]\nconvert H r\n[GOAL]\ncase h.e'_5\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), Algebra.FiniteType R (Localization.Away ↑r)\nthis : Algebra R S := toAlgebra f\nr : { x // x ∈ s }\n⊢ Localization.algebra = toAlgebra (comp (algebraMap S (Localization.Away ↑r)) f)\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_5.h\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), Algebra.FiniteType R (Localization.Away ↑r)\nthis : Algebra R S := toAlgebra f\nr : { x // x ∈ s }\nr✝ : R\nx✝ : Localization (Submonoid.powers ↑r)\n⊢ (let_fun I := Localization.algebra;\n r✝ • x✝) =\n r✝ • x✝\n[PROOFSTEP]\nsimp_rw [Algebra.smul_def]\n[GOAL]\ncase h.e'_5.h\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), Algebra.FiniteType R (Localization.Away ↑r)\nthis : Algebra R S := toAlgebra f\nr : { x // x ∈ s }\nr✝ : R\nx✝ : Localization (Submonoid.powers ↑r)\n⊢ ↑(algebraMap R (Localization (Submonoid.powers ↑r))) r✝ * x✝ = r✝ • x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nH : ∀ (r : { x // x ∈ s }), Algebra.FiniteType R (Localization.Away ↑r)\n⊢ FiniteType f\n[PROOFSTEP]\nreplace H := fun r => (H r).1\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nH : ∀ (r : { x // x ∈ s }), Subalgebra.FG ⊤\n⊢ FiniteType f\n[PROOFSTEP]\nconstructor\n -- Suppose `s : Finset S` spans `S`, and each `Sᵣ` is finitely generated as an `R`-algebra.\n -- Say `t r : Finset Sᵣ` generates `Sᵣ`. By assumption, we may find `lᵢ` such that\n -- `∑ lᵢ * sᵢ = 1`. I claim that all `s` and `l` and the numerators of `t` and generates `S`.\n[GOAL]\ncase out\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nH : ∀ (r : { x // x ∈ s }), Subalgebra.FG ⊤\n⊢ Subalgebra.FG ⊤\n[PROOFSTEP]\nchoose t ht using H\n[GOAL]\ncase out\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\n⊢ Subalgebra.FG ⊤\n[PROOFSTEP]\nobtain ⟨l, hl⟩ :=\n (Finsupp.mem_span_iff_total S (s : Set S) 1).mp (show (1 : S) ∈ Ideal.span (s : Set S) by rw [hs]; trivial)\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\n⊢ 1 ∈ Ideal.span ↑s\n[PROOFSTEP]\nrw [hs]\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\n⊢ 1 ∈ ⊤\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase out.intro\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\n⊢ Subalgebra.FG ⊤\n[PROOFSTEP]\nlet sf := fun x : s => IsLocalization.finsetIntegerMultiple (Submonoid.powers (x : S)) (t x)\n[GOAL]\ncase out.intro\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\n⊢ Subalgebra.FG ⊤\n[PROOFSTEP]\nuse s.attach.biUnion sf ∪ s ∪ l.support.image l\n[GOAL]\ncase h\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\n⊢ Algebra.adjoin R ↑(Finset.biUnion (Finset.attach s) sf ∪ s ∪ Finset.image (↑l) l.support) = ⊤\n[PROOFSTEP]\nrw [eq_top_iff]\n -- We need to show that every `x` falls in the subalgebra generated by those elements.\n -- Since all `s` and `l` are in the subalgebra, it suffices to check that `sᵢ ^ nᵢ • x` falls in\n -- the algebra for each `sᵢ` and some `nᵢ`.\n[GOAL]\ncase h\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\n⊢ ⊤ ≤ Algebra.adjoin R ↑(Finset.biUnion (Finset.attach s) sf ∪ s ∪ Finset.image (↑l) l.support)\n[PROOFSTEP]\nrintro x -\n[GOAL]\ncase h\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\n⊢ x ∈ Algebra.adjoin R ↑(Finset.biUnion (Finset.attach s) sf ∪ s ∪ Finset.image (↑l) l.support)\n[PROOFSTEP]\napply Subalgebra.mem_of_span_eq_top_of_smul_pow_mem _ (s : Set S) l hl _ _ x _\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\n⊢ ↑s ⊆ ↑(Algebra.adjoin R ↑(Finset.biUnion (Finset.attach s) sf ∪ s ∪ Finset.image (↑l) l.support))\n[PROOFSTEP]\nintro x hx\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx✝ x : S\nhx : x ∈ ↑s\n⊢ x ∈ ↑(Algebra.adjoin R ↑(Finset.biUnion (Finset.attach s) sf ∪ s ∪ Finset.image (↑l) l.support))\n[PROOFSTEP]\napply Algebra.subset_adjoin\n[GOAL]\ncase a\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx✝ x : S\nhx : x ∈ ↑s\n⊢ x ∈ ↑(Finset.biUnion (Finset.attach s) sf ∪ s ∪ Finset.image (↑l) l.support)\n[PROOFSTEP]\nrw [Finset.coe_union, Finset.coe_union]\n[GOAL]\ncase a\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx✝ x : S\nhx : x ∈ ↑s\n⊢ x ∈ ↑(Finset.biUnion (Finset.attach s) sf) ∪ ↑s ∪ ↑(Finset.image (↑l) l.support)\n[PROOFSTEP]\nexact Or.inl (Or.inr hx)\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\n⊢ ∀ (i : ↑↑s), ↑l i ∈ Algebra.adjoin R ↑(Finset.biUnion (Finset.attach s) sf ∪ s ∪ Finset.image (↑l) l.support)\n[PROOFSTEP]\nintro i\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\ni : ↑↑s\n⊢ ↑l i ∈ Algebra.adjoin R ↑(Finset.biUnion (Finset.attach s) sf ∪ s ∪ Finset.image (↑l) l.support)\n[PROOFSTEP]\nby_cases h : l i = 0\n[GOAL]\ncase pos\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\ni : ↑↑s\nh : ↑l i = 0\n⊢ ↑l i ∈ Algebra.adjoin R ↑(Finset.biUnion (Finset.attach s) sf ∪ s ∪ Finset.image (↑l) l.support)\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\ni : ↑↑s\nh : ↑l i = 0\n⊢ 0 ∈ Algebra.adjoin R ↑(Finset.biUnion (Finset.attach s) sf ∪ s ∪ Finset.image (↑l) l.support)\n[PROOFSTEP]\nexact zero_mem _\n[GOAL]\ncase neg\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\ni : ↑↑s\nh : ¬↑l i = 0\n⊢ ↑l i ∈ Algebra.adjoin R ↑(Finset.biUnion (Finset.attach s) sf ∪ s ∪ Finset.image (↑l) l.support)\n[PROOFSTEP]\napply Algebra.subset_adjoin\n[GOAL]\ncase neg.a\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\ni : ↑↑s\nh : ¬↑l i = 0\n⊢ ↑l i ∈ ↑(Finset.biUnion (Finset.attach s) sf ∪ s ∪ Finset.image (↑l) l.support)\n[PROOFSTEP]\nrw [Finset.coe_union, Finset.coe_image]\n[GOAL]\ncase neg.a\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\ni : ↑↑s\nh : ¬↑l i = 0\n⊢ ↑l i ∈ ↑(Finset.biUnion (Finset.attach s) sf ∪ s) ∪ ↑l '' ↑l.support\n[PROOFSTEP]\nexact Or.inr (Set.mem_image_of_mem _ (Finsupp.mem_support_iff.mpr h))\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\n⊢ ∀ (r : ↑↑s),\n ∃ n, ↑r ^ n • x ∈ Algebra.adjoin R ↑(Finset.biUnion (Finset.attach s) sf ∪ s ∪ Finset.image (↑l) l.support)\n[PROOFSTEP]\nintro r\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\nr : ↑↑s\n⊢ ∃ n, ↑r ^ n • x ∈ Algebra.adjoin R ↑(Finset.biUnion (Finset.attach s) sf ∪ s ∪ Finset.image (↑l) l.support)\n[PROOFSTEP]\nrw [Finset.coe_union, Finset.coe_union, Finset.coe_biUnion]\n -- Since all `sᵢ` and numerators of `t r` are in the algebra, it suffices to show that the\n -- image of `x` in `Sᵣ` falls in the `R`-adjoin of `t r`, which is of course true.\n -- Porting note: The following `obtain` fails because Lean wants to know right away what the\n -- placeholders are, so we need to provide a little more guidance\n -- obtain ⟨⟨_, n₂, rfl⟩, hn₂⟩ := IsLocalization.exists_smul_mem_of_mem_adjoin\n -- (Submonoid.powers (r : S)) x (t r) (Algebra.adjoin R _) _ _ _\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\nr : ↑↑s\n⊢ ∃ n,\n ↑r ^ n • x ∈\n Algebra.adjoin R\n ((⋃ (x : { x // x ∈ s }) (_ : x ∈ ↑(Finset.attach s)), ↑(sf x)) ∪ ↑s ∪ ↑(Finset.image (↑l) l.support))\n[PROOFSTEP]\nrw [show\n ∀ A : Set S,\n (∃ n, (r : S) ^ n • x ∈ Algebra.adjoin R A) ↔ (∃ m : (Submonoid.powers (r : S)), (m : S) • x ∈ Algebra.adjoin R A)\n by {exact fun _ => by simp [Submonoid.mem_powers_iff]\n }]\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\nr : ↑↑s\n⊢ ∀ (A : Set S), (∃ n, ↑r ^ n • x ∈ Algebra.adjoin R A) ↔ ∃ m, ↑m • x ∈ Algebra.adjoin R A\n[PROOFSTEP]\n{exact fun _ => by simp [Submonoid.mem_powers_iff]\n}\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\nr : ↑↑s\n⊢ ∀ (A : Set S), (∃ n, ↑r ^ n • x ∈ Algebra.adjoin R A) ↔ ∃ m, ↑m • x ∈ Algebra.adjoin R A\n[PROOFSTEP]\nexact fun _ => by simp [Submonoid.mem_powers_iff]\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\nr : ↑↑s\nx✝ : Set S\n⊢ (∃ n, ↑r ^ n • x ∈ Algebra.adjoin R x✝) ↔ ∃ m, ↑m • x ∈ Algebra.adjoin R x✝\n[PROOFSTEP]\nsimp [Submonoid.mem_powers_iff]\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\nr : ↑↑s\n⊢ ∃ m,\n ↑m • x ∈\n Algebra.adjoin R\n ((⋃ (x : { x // x ∈ s }) (_ : x ∈ ↑(Finset.attach s)), ↑(sf x)) ∪ ↑s ∪ ↑(Finset.image (↑l) l.support))\n[PROOFSTEP]\nrefine IsLocalization.exists_smul_mem_of_mem_adjoin (Submonoid.powers (r : S)) x (t r) (Algebra.adjoin R _) ?_ ?_ ?_\n[GOAL]\ncase refine_1\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\nr : ↑↑s\n⊢ ↑(IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑r) (t r)) ⊆\n ↑(Algebra.adjoin R\n ((⋃ (x : { x // x ∈ s }) (_ : x ∈ ↑(Finset.attach s)), ↑(sf x)) ∪ ↑s ∪ ↑(Finset.image (↑l) l.support)))\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine_1\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx✝ : S\nr : ↑↑s\nx : S\nhx : x ∈ ↑(IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑r) (t r))\n⊢ x ∈\n ↑(Algebra.adjoin R\n ((⋃ (x : { x // x ∈ s }) (_ : x ∈ ↑(Finset.attach s)), ↑(sf x)) ∪ ↑s ∪ ↑(Finset.image (↑l) l.support)))\n[PROOFSTEP]\napply Algebra.subset_adjoin\n[GOAL]\ncase refine_1.a\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx✝ : S\nr : ↑↑s\nx : S\nhx : x ∈ ↑(IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑r) (t r))\n⊢ x ∈ (⋃ (x : { x // x ∈ s }) (_ : x ∈ ↑(Finset.attach s)), ↑(sf x)) ∪ ↑s ∪ ↑(Finset.image (↑l) l.support)\n[PROOFSTEP]\nexact Or.inl (Or.inl ⟨_, ⟨r, rfl⟩, _, ⟨s.mem_attach r, rfl⟩, hx⟩)\n[GOAL]\ncase refine_2\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\nr : ↑↑s\n⊢ Submonoid.powers ↑r ≤\n (Algebra.adjoin R\n ((⋃ (x : { x // x ∈ s }) (_ : x ∈ ↑(Finset.attach s)), ↑(sf x)) ∪ ↑s ∪\n ↑(Finset.image (↑l) l.support))).toSubsemiring.toSubmonoid\n[PROOFSTEP]\nrw [Submonoid.powers_eq_closure, Submonoid.closure_le, Set.singleton_subset_iff]\n[GOAL]\ncase refine_2\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\nr : ↑↑s\n⊢ ↑r ∈\n ↑(Algebra.adjoin R\n ((⋃ (x : { x // x ∈ s }) (_ : x ∈ ↑(Finset.attach s)), ↑(sf x)) ∪ ↑s ∪\n ↑(Finset.image (↑l) l.support))).toSubsemiring.toSubmonoid\n[PROOFSTEP]\napply Algebra.subset_adjoin\n[GOAL]\ncase refine_2.a\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\nr : ↑↑s\n⊢ ↑r ∈ (⋃ (x : { x // x ∈ s }) (_ : x ∈ ↑(Finset.attach s)), ↑(sf x)) ∪ ↑s ∪ ↑(Finset.image (↑l) l.support)\n[PROOFSTEP]\nexact Or.inl (Or.inr r.2)\n[GOAL]\ncase refine_3\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\nr : ↑↑s\n⊢ ↑(algebraMap S (Localization.Away ↑r)) x ∈ Algebra.adjoin R ↑(t r)\n[PROOFSTEP]\nrw [ht]\n[GOAL]\ncase refine_3\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset S\nhs : Ideal.span ↑s = ⊤\nthis : Algebra R S := toAlgebra f\nt : (r : { x // x ∈ s }) → Finset (Localization.Away ↑r)\nht : ∀ (r : { x // x ∈ s }), Algebra.adjoin R ↑(t r) = ⊤\nl : ↑↑s →₀ S\nhl : ↑(Finsupp.total (↑↑s) S S Subtype.val) l = 1\nsf : { x // x ∈ s } → Finset S := fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers ↑x) (t x)\nx : S\nr : ↑↑s\n⊢ ↑(algebraMap S (Localization.Away ↑r)) x ∈ ⊤\n[PROOFSTEP]\ntrivial\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.RingHom.FiniteType", "llama_tokens": 14432, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7662936484231889, "lm_q2_score": 0.7248702761768248, "lm_q1q2_score": 0.5554634885650636}} {"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y : α × α\n⊢ Rel α x y → Rel α y x\n[PROOFSTEP]\naesop (rule_sets [Sym2])\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y z : α × α\na : Rel α x y\nb : Rel α y z\n⊢ Rel α x z\n[PROOFSTEP]\naesop (rule_sets [Sym2])\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y z w : α\n⊢ Rel α (x, y) (z, w) ↔ x = z ∧ y = w ∨ x = w ∧ y = z\n[PROOFSTEP]\naesop (rule_sets [Sym2])\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : Sym2 α → Sym2 β → Prop\ni : Sym2 α\nj : Sym2 β\nhf : ∀ (a₁ a₂ : α) (b₁ b₂ : β), f (Quotient.mk (Rel.setoid α) (a₁, a₂)) (Quotient.mk (Rel.setoid β) (b₁, b₂))\n⊢ ∀ (a : α × α) (b : β × β), f (Quotient.mk (Rel.setoid α) a) (Quotient.mk (Rel.setoid β) b)\n[PROOFSTEP]\nintro ⟨a₁, a₂⟩ ⟨b₁, b₂⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : Sym2 α → Sym2 β → Prop\ni : Sym2 α\nj : Sym2 β\nhf : ∀ (a₁ a₂ : α) (b₁ b₂ : β), f (Quotient.mk (Rel.setoid α) (a₁, a₂)) (Quotient.mk (Rel.setoid β) (b₁, b₂))\na₁ a₂ : α\nb₁ b₂ : β\n⊢ f (Quotient.mk (Rel.setoid α) (a₁, a₂)) (Quotient.mk (Rel.setoid β) (b₁, b₂))\n[PROOFSTEP]\nexact hf _ _ _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b : α\n⊢ Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (b, a)\n[PROOFSTEP]\nrw [Quotient.eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b : α\n⊢ (a, b) ≈ (b, a)\n[PROOFSTEP]\napply Rel.swap\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : α × α\n⊢ Quotient.mk (Rel.setoid α) (Prod.swap p) = Quotient.mk (Rel.setoid α) p\n[PROOFSTEP]\ncases p\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nfst✝ snd✝ : α\n⊢ Quotient.mk (Rel.setoid α) (Prod.swap (fst✝, snd✝)) = Quotient.mk (Rel.setoid α) (fst✝, snd✝)\n[PROOFSTEP]\nexact eq_swap\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b c : α\n⊢ Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (a, c) ↔ b = c\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b c : α\n⊢ Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (a, c) → b = c\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b c : α\n⊢ b = c → Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (a, c)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b c : α\nh : Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (a, c)\n⊢ b = c\n[PROOFSTEP]\nrw [Quotient.eq] at h \n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b c : α\nh : (a, b) ≈ (a, c)\n⊢ b = c\n[PROOFSTEP]\ncases h\n[GOAL]\ncase mp.refl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b : α\n⊢ b = b\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mp.swap\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α\n⊢ a = a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b c : α\nh : b = c\n⊢ Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (a, c)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b c : α\n⊢ Quotient.mk (Rel.setoid α) (b, a) = Quotient.mk (Rel.setoid α) (c, a) ↔ b = c\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b c : α\n⊢ Quotient.mk (Rel.setoid α) (b, a) = Quotient.mk (Rel.setoid α) (c, a) → b = c\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b c : α\n⊢ b = c → Quotient.mk (Rel.setoid α) (b, a) = Quotient.mk (Rel.setoid α) (c, a)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b c : α\nh : Quotient.mk (Rel.setoid α) (b, a) = Quotient.mk (Rel.setoid α) (c, a)\n⊢ b = c\n[PROOFSTEP]\nrw [Quotient.eq] at h \n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b c : α\nh : (b, a) ≈ (c, a)\n⊢ b = c\n[PROOFSTEP]\ncases h\n[GOAL]\ncase mp.refl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b : α\n⊢ b = b\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mp.swap\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α\n⊢ a = a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b c : α\nh : b = c\n⊢ Quotient.mk (Rel.setoid α) (b, a) = Quotient.mk (Rel.setoid α) (c, a)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y z w : α\n⊢ Quotient.mk (Rel.setoid α) (x, y) = Quotient.mk (Rel.setoid α) (z, w) ↔ x = z ∧ y = w ∨ x = w ∧ y = z\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α × α\n⊢ Quotient.mk (Rel.setoid α) p = Quotient.mk (Rel.setoid α) q ↔ p = q ∨ p = Prod.swap q\n[PROOFSTEP]\ncases p\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nq : α × α\nfst✝ snd✝ : α\n⊢ Quotient.mk (Rel.setoid α) (fst✝, snd✝) = Quotient.mk (Rel.setoid α) q ↔ (fst✝, snd✝) = q ∨ (fst✝, snd✝) = Prod.swap q\n[PROOFSTEP]\ncases q\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nfst✝¹ snd✝¹ fst✝ snd✝ : α\n⊢ Quotient.mk (Rel.setoid α) (fst✝¹, snd✝¹) = Quotient.mk (Rel.setoid α) (fst✝, snd✝) ↔\n (fst✝¹, snd✝¹) = (fst✝, snd✝) ∨ (fst✝¹, snd✝¹) = Prod.swap (fst✝, snd✝)\n[PROOFSTEP]\nsimp only [eq_iff, Prod.mk.inj_iff, Prod.swap_prod_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : { f // ∀ (a₁ a₂ : α), f a₁ a₂ = f a₂ a₁ }\n⊢ ∀ (a b : α × α), a ≈ b → uncurry (↑f) a = uncurry (↑f) b\n[PROOFSTEP]\nrintro _ _ ⟨⟩\n[GOAL]\ncase refl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : { f // ∀ (a₁ a₂ : α), f a₁ a₂ = f a₂ a₁ }\nx✝ y✝ : α\n⊢ uncurry ↑f (x✝, y✝) = uncurry ↑f (x✝, y✝)\ncase swap\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : { f // ∀ (a₁ a₂ : α), f a₁ a₂ = f a₂ a₁ }\nx✝ y✝ : α\n⊢ uncurry ↑f (x✝, y✝) = uncurry ↑f (y✝, x✝)\n[PROOFSTEP]\nexacts [rfl, f.prop _ _]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : { f // ∀ (a₁ a₂ : α) (b₁ b₂ : β), f a₁ a₂ b₁ b₂ = f a₂ a₁ b₁ b₂ ∧ f a₁ a₂ b₁ b₂ = f a₁ a₂ b₂ b₁ }\n⊢ ∀ (a₁ : α × α) (b₁ : β × β) (a₂ : α × α) (b₂ : β × β),\n a₁ ≈ a₂ → b₁ ≈ b₂ → (fun a b => ↑f a.fst a.snd b.fst b.snd) a₁ b₁ = (fun a b => ↑f a.fst a.snd b.fst b.snd) a₂ b₂\n[PROOFSTEP]\nrintro _ _ _ _ ⟨⟩ ⟨⟩\n[GOAL]\ncase refl.refl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : { f // ∀ (a₁ a₂ : α) (b₁ b₂ : β), f a₁ a₂ b₁ b₂ = f a₂ a₁ b₁ b₂ ∧ f a₁ a₂ b₁ b₂ = f a₁ a₂ b₂ b₁ }\nx✝¹ y✝¹ : α\nx✝ y✝ : β\n⊢ (fun a b => ↑f a.fst a.snd b.fst b.snd) (x✝¹, y✝¹) (x✝, y✝) =\n (fun a b => ↑f a.fst a.snd b.fst b.snd) (x✝¹, y✝¹) (x✝, y✝)\ncase refl.swap\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : { f // ∀ (a₁ a₂ : α) (b₁ b₂ : β), f a₁ a₂ b₁ b₂ = f a₂ a₁ b₁ b₂ ∧ f a₁ a₂ b₁ b₂ = f a₁ a₂ b₂ b₁ }\nx✝¹ y✝¹ : α\nx✝ y✝ : β\n⊢ (fun a b => ↑f a.fst a.snd b.fst b.snd) (x✝¹, y✝¹) (x✝, y✝) =\n (fun a b => ↑f a.fst a.snd b.fst b.snd) (x✝¹, y✝¹) (y✝, x✝)\ncase swap.refl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : { f // ∀ (a₁ a₂ : α) (b₁ b₂ : β), f a₁ a₂ b₁ b₂ = f a₂ a₁ b₁ b₂ ∧ f a₁ a₂ b₁ b₂ = f a₁ a₂ b₂ b₁ }\nx✝¹ y✝¹ : α\nx✝ y✝ : β\n⊢ (fun a b => ↑f a.fst a.snd b.fst b.snd) (x✝¹, y✝¹) (x✝, y✝) =\n (fun a b => ↑f a.fst a.snd b.fst b.snd) (y✝¹, x✝¹) (x✝, y✝)\ncase swap.swap\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : { f // ∀ (a₁ a₂ : α) (b₁ b₂ : β), f a₁ a₂ b₁ b₂ = f a₂ a₁ b₁ b₂ ∧ f a₁ a₂ b₁ b₂ = f a₁ a₂ b₂ b₁ }\nx✝¹ y✝¹ : α\nx✝ y✝ : β\n⊢ (fun a b => ↑f a.fst a.snd b.fst b.snd) (x✝¹, y✝¹) (x✝, y✝) =\n (fun a b => ↑f a.fst a.snd b.fst b.snd) (y✝¹, x✝¹) (y✝, x✝)\n[PROOFSTEP]\nexacts [rfl, (f.2 _ _ _ _).2, (f.2 _ _ _ _).1, (f.2 _ _ _ _).1.trans (f.2 _ _ _ _).2]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Sym2 α → Sym2 β → γ\na₁ a₂ : α\nb₁ b₂ : β\n⊢ (fun a₁ a₂ b₁ b₂ => F (Quotient.mk (Rel.setoid α) (a₁, a₂)) (Quotient.mk (Rel.setoid β) (b₁, b₂))) a₁ a₂ b₁ b₂ =\n (fun a₁ a₂ b₁ b₂ => F (Quotient.mk (Rel.setoid α) (a₁, a₂)) (Quotient.mk (Rel.setoid β) (b₁, b₂))) a₂ a₁ b₁ b₂ ∧\n (fun a₁ a₂ b₁ b₂ => F (Quotient.mk (Rel.setoid α) (a₁, a₂)) (Quotient.mk (Rel.setoid β) (b₁, b₂))) a₁ a₂ b₁ b₂ =\n (fun a₁ a₂ b₁ b₂ => F (Quotient.mk (Rel.setoid α) (a₁, a₂)) (Quotient.mk (Rel.setoid β) (b₁, b₂))) a₁ a₂ b₂ b₁\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Sym2 α → Sym2 β → γ\na₁ a₂ : α\nb₁ b₂ : β\n⊢ (fun a₁ a₂ b₁ b₂ => F (Quotient.mk (Rel.setoid α) (a₁, a₂)) (Quotient.mk (Rel.setoid β) (b₁, b₂))) a₁ a₂ b₁ b₂ =\n (fun a₁ a₂ b₁ b₂ => F (Quotient.mk (Rel.setoid α) (a₁, a₂)) (Quotient.mk (Rel.setoid β) (b₁, b₂))) a₂ a₁ b₁ b₂\ncase right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Sym2 α → Sym2 β → γ\na₁ a₂ : α\nb₁ b₂ : β\n⊢ (fun a₁ a₂ b₁ b₂ => F (Quotient.mk (Rel.setoid α) (a₁, a₂)) (Quotient.mk (Rel.setoid β) (b₁, b₂))) a₁ a₂ b₁ b₂ =\n (fun a₁ a₂ b₁ b₂ => F (Quotient.mk (Rel.setoid α) (a₁, a₂)) (Quotient.mk (Rel.setoid β) (b₁, b₂))) a₁ a₂ b₂ b₁\n[PROOFSTEP]\nexacts [congr_arg₂ F eq_swap rfl, congr_arg₂ F rfl eq_swap]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\n⊢ ((fun x x_1 => x ≈ x_1) ⇒ fun x x_1 => x ≈ x_1) (Prod.map f f) (Prod.map f f)\n[PROOFSTEP]\nintro _ _ h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\na✝ b✝ : α × α\nh : a✝ ≈ b✝\n⊢ Prod.map f f a✝ ≈ Prod.map f f b✝\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nx✝ y✝ : α\n⊢ Prod.map f f (x✝, y✝) ≈ Prod.map f f (x✝, y✝)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase swap\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nx✝ y✝ : α\n⊢ Prod.map f f (x✝, y✝) ≈ Prod.map f f (y✝, x✝)\n[PROOFSTEP]\napply Rel.swap\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ map id = id\n[PROOFSTEP]\next ⟨⟨x, y⟩⟩\n[GOAL]\ncase h.mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : Sym2 α\nx y : α\n⊢ map id (Quot.mk Setoid.r (x, y)) = id (Quot.mk Setoid.r (x, y))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ng : β → γ\nf : α → β\n⊢ map (g ∘ f) = map g ∘ map f\n[PROOFSTEP]\next ⟨⟨x, y⟩⟩\n[GOAL]\ncase h.mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ng : β → γ\nf : α → β\nx✝ : Sym2 α\nx y : α\n⊢ map (g ∘ f) (Quot.mk Setoid.r (x, y)) = (map g ∘ map f) (Quot.mk Setoid.r (x, y))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ng : β → γ\nf : α → β\nx : Sym2 α\n⊢ map g (map f x) = map (g ∘ f) x\n[PROOFSTEP]\nrevert x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ng : β → γ\nf : α → β\n⊢ ∀ (x : Sym2 α), map g (map f x) = map (g ∘ f) x\n[PROOFSTEP]\napply Sym2.ind\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ng : β → γ\nf : α → β\n⊢ ∀ (x y : α), map g (map f (Quotient.mk (Rel.setoid α) (x, y))) = map (g ∘ f) (Quotient.mk (Rel.setoid α) (x, y))\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nhinj : Injective f\n⊢ Injective (map f)\n[PROOFSTEP]\nintro z z'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nhinj : Injective f\nz z' : Sym2 α\n⊢ map f z = map f z' → z = z'\n[PROOFSTEP]\nrefine' Quotient.ind₂ (fun z z' => _) z z'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nhinj : Injective f\nz✝ z'✝ : Sym2 α\nz z' : α × α\n⊢ map f (Quotient.mk (Rel.setoid α) z) = map f (Quotient.mk (Rel.setoid α) z') →\n Quotient.mk (Rel.setoid α) z = Quotient.mk (Rel.setoid α) z'\n[PROOFSTEP]\ncases' z with x y\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nhinj : Injective f\nz z'✝ : Sym2 α\nz' : α × α\nx y : α\n⊢ map f (Quotient.mk (Rel.setoid α) (x, y)) = map f (Quotient.mk (Rel.setoid α) z') →\n Quotient.mk (Rel.setoid α) (x, y) = Quotient.mk (Rel.setoid α) z'\n[PROOFSTEP]\ncases' z' with x' y'\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nhinj : Injective f\nz z' : Sym2 α\nx y x' y' : α\n⊢ map f (Quotient.mk (Rel.setoid α) (x, y)) = map f (Quotient.mk (Rel.setoid α) (x', y')) →\n Quotient.mk (Rel.setoid α) (x, y) = Quotient.mk (Rel.setoid α) (x', y')\n[PROOFSTEP]\nrepeat' rw [map_pair_eq, eq_iff]\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nhinj : Injective f\nz z' : Sym2 α\nx y x' y' : α\n⊢ map f (Quotient.mk (Rel.setoid α) (x, y)) = map f (Quotient.mk (Rel.setoid α) (x', y')) →\n Quotient.mk (Rel.setoid α) (x, y) = Quotient.mk (Rel.setoid α) (x', y')\n[PROOFSTEP]\nrw [map_pair_eq, eq_iff]\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nhinj : Injective f\nz z' : Sym2 α\nx y x' y' : α\n⊢ Quotient.mk (Rel.setoid β) (f x, f y) = map f (Quotient.mk (Rel.setoid α) (x', y')) →\n x = x' ∧ y = y' ∨ x = y' ∧ y = x'\n[PROOFSTEP]\nrw [map_pair_eq, eq_iff]\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nhinj : Injective f\nz z' : Sym2 α\nx y x' y' : α\n⊢ f x = f x' ∧ f y = f y' ∨ f x = f y' ∧ f y = f x' → x = x' ∧ y = y' ∨ x = y' ∧ y = x'\n[PROOFSTEP]\nrw [map_pair_eq, eq_iff]\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nhinj : Injective f\nz z' : Sym2 α\nx y x' y' : α\n⊢ f x = f x' ∧ f y = f y' ∨ f x = f y' ∧ f y = f x' → x = x' ∧ y = y' ∨ x = y' ∧ y = x'\n[PROOFSTEP]\nrintro (h | h)\n[GOAL]\ncase mk.mk.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nhinj : Injective f\nz z' : Sym2 α\nx y x' y' : α\nh : f x = f x' ∧ f y = f y'\n⊢ x = x' ∧ y = y' ∨ x = y' ∧ y = x'\n[PROOFSTEP]\nsimp [hinj h.1, hinj h.2]\n[GOAL]\ncase mk.mk.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nhinj : Injective f\nz z' : Sym2 α\nx y x' y' : α\nh : f x = f y' ∧ f y = f x'\n⊢ x = x' ∧ y = y' ∨ x = y' ∧ y = x'\n[PROOFSTEP]\nsimp [hinj h.1, hinj h.2]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b c : α\n⊢ Sym2.Mem a (Quotient.mk (Rel.setoid α) (b, c)) → a = b ∨ a = c\n[PROOFSTEP]\nrintro ⟨_, h⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b c w✝ : α\nh : Quotient.mk (Rel.setoid α) (b, c) = Quotient.mk (Rel.setoid α) (a, w✝)\n⊢ a = b ∨ a = c\n[PROOFSTEP]\nrw [eq_iff] at h \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b c w✝ : α\nh : b = a ∧ c = w✝ ∨ b = w✝ ∧ c = a\n⊢ a = b ∨ a = c\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b c : α\n⊢ a = b ∨ a = c → Sym2.Mem a (Quotient.mk (Rel.setoid α) (b, c))\n[PROOFSTEP]\nrintro (rfl | rfl)\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na c : α\n⊢ Sym2.Mem a (Quotient.mk (Rel.setoid α) (a, c))\n[PROOFSTEP]\nexact ⟨_, rfl⟩\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b : α\n⊢ Sym2.Mem a (Quotient.mk (Rel.setoid α) (b, a))\n[PROOFSTEP]\nrw [eq_swap]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na b : α\n⊢ Sym2.Mem a (Quotient.mk (Rel.setoid α) (a, b))\n[PROOFSTEP]\nexact ⟨_, rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nz z' : Sym2 α\nh : (fun z => {x | Sym2.Mem x z}) z = (fun z => {x | Sym2.Mem x z}) z'\n⊢ z = z'\n[PROOFSTEP]\nsimp only [Set.ext_iff, Set.mem_setOf_eq] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nz z' : Sym2 α\nh : ∀ (x : α), Sym2.Mem x z ↔ Sym2.Mem x z'\n⊢ z = z'\n[PROOFSTEP]\ninduction' z using Sym2.ind with x y\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nz z' : Sym2 α\nh✝ : ∀ (x : α), Sym2.Mem x z ↔ Sym2.Mem x z'\nx y : α\nh : ∀ (x_1 : α), Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x_1 z'\n⊢ Quotient.mk (Rel.setoid α) (x, y) = z'\n[PROOFSTEP]\ninduction' z' using Sym2.ind with x' y'\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nz z' : Sym2 α\nh✝² : ∀ (x : α), Sym2.Mem x z ↔ Sym2.Mem x z'\nx y : α\nh✝¹ : ∀ (x_1 : α), Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x_1 z'\nx' y' : α\nh✝ : ∀ (x : α), Sym2.Mem x z ↔ Sym2.Mem x (Quotient.mk (Rel.setoid α) (x', y'))\nh : ∀ (x_1 : α), Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x', y'))\n⊢ Quotient.mk (Rel.setoid α) (x, y) = Quotient.mk (Rel.setoid α) (x', y')\n[PROOFSTEP]\nhave hx := h x\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nz z' : Sym2 α\nh✝² : ∀ (x : α), Sym2.Mem x z ↔ Sym2.Mem x z'\nx y : α\nh✝¹ : ∀ (x_1 : α), Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x_1 z'\nx' y' : α\nh✝ : ∀ (x : α), Sym2.Mem x z ↔ Sym2.Mem x (Quotient.mk (Rel.setoid α) (x', y'))\nh : ∀ (x_1 : α), Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x', y'))\nhx : Sym2.Mem x (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x (Quotient.mk (Rel.setoid α) (x', y'))\n⊢ Quotient.mk (Rel.setoid α) (x, y) = Quotient.mk (Rel.setoid α) (x', y')\n[PROOFSTEP]\nhave hy := h y\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nz z' : Sym2 α\nh✝² : ∀ (x : α), Sym2.Mem x z ↔ Sym2.Mem x z'\nx y : α\nh✝¹ : ∀ (x_1 : α), Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x_1 z'\nx' y' : α\nh✝ : ∀ (x : α), Sym2.Mem x z ↔ Sym2.Mem x (Quotient.mk (Rel.setoid α) (x', y'))\nh : ∀ (x_1 : α), Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x', y'))\nhx : Sym2.Mem x (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x (Quotient.mk (Rel.setoid α) (x', y'))\nhy : Sym2.Mem y (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem y (Quotient.mk (Rel.setoid α) (x', y'))\n⊢ Quotient.mk (Rel.setoid α) (x, y) = Quotient.mk (Rel.setoid α) (x', y')\n[PROOFSTEP]\nhave hx' := h x'\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nz z' : Sym2 α\nh✝² : ∀ (x : α), Sym2.Mem x z ↔ Sym2.Mem x z'\nx y : α\nh✝¹ : ∀ (x_1 : α), Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x_1 z'\nx' y' : α\nh✝ : ∀ (x : α), Sym2.Mem x z ↔ Sym2.Mem x (Quotient.mk (Rel.setoid α) (x', y'))\nh : ∀ (x_1 : α), Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x', y'))\nhx : Sym2.Mem x (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x (Quotient.mk (Rel.setoid α) (x', y'))\nhy : Sym2.Mem y (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem y (Quotient.mk (Rel.setoid α) (x', y'))\nhx' : Sym2.Mem x' (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x' (Quotient.mk (Rel.setoid α) (x', y'))\n⊢ Quotient.mk (Rel.setoid α) (x, y) = Quotient.mk (Rel.setoid α) (x', y')\n[PROOFSTEP]\nhave hy' := h y'\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nz z' : Sym2 α\nh✝² : ∀ (x : α), Sym2.Mem x z ↔ Sym2.Mem x z'\nx y : α\nh✝¹ : ∀ (x_1 : α), Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x_1 z'\nx' y' : α\nh✝ : ∀ (x : α), Sym2.Mem x z ↔ Sym2.Mem x (Quotient.mk (Rel.setoid α) (x', y'))\nh : ∀ (x_1 : α), Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x', y'))\nhx : Sym2.Mem x (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x (Quotient.mk (Rel.setoid α) (x', y'))\nhy : Sym2.Mem y (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem y (Quotient.mk (Rel.setoid α) (x', y'))\nhx' : Sym2.Mem x' (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x' (Quotient.mk (Rel.setoid α) (x', y'))\nhy' : Sym2.Mem y' (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem y' (Quotient.mk (Rel.setoid α) (x', y'))\n⊢ Quotient.mk (Rel.setoid α) (x, y) = Quotient.mk (Rel.setoid α) (x', y')\n[PROOFSTEP]\nsimp only [mem_iff', eq_self_iff_true, or_true_iff, iff_true_iff, true_or_iff, true_iff_iff] at hx hy hx' hy' \n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nz z' : Sym2 α\nh✝² : ∀ (x : α), Sym2.Mem x z ↔ Sym2.Mem x z'\nx y : α\nh✝¹ : ∀ (x_1 : α), Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x_1 z'\nx' y' : α\nh✝ : ∀ (x : α), Sym2.Mem x z ↔ Sym2.Mem x (Quotient.mk (Rel.setoid α) (x', y'))\nh : ∀ (x_1 : α), Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x, y)) ↔ Sym2.Mem x_1 (Quotient.mk (Rel.setoid α) (x', y'))\nhx : x = x' ∨ x = y'\nhy : y = x' ∨ y = y'\nhx' : x' = x ∨ x' = y\nhy' : y' = x ∨ y' = y\n⊢ Quotient.mk (Rel.setoid α) (x, y) = Quotient.mk (Rel.setoid α) (x', y')\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ne : Sym2 α\n⊢ e = Quotient.mk (Rel.setoid α) ((Quotient.out e).fst, (Quotient.out e).snd)\n[PROOFSTEP]\nrw [Prod.mk.eta, e.out_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ne : Sym2 α\n⊢ e = Quotient.mk (Rel.setoid α) ((Quotient.out e).snd, (Quotient.out e).fst)\n[PROOFSTEP]\nrw [eq_swap, Prod.mk.eta, e.out_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : α → Prop\na b : α\n⊢ (∀ (c : α), c ∈ Quotient.mk (Rel.setoid α) (a, b) → p c) ↔ p a ∧ p b\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨h _ <| mem_mk''_left _ _, h _ <| mem_mk''_right _ _⟩, fun h c hc => _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : α → Prop\na b : α\nh : p a ∧ p b\nc : α\nhc : c ∈ Quotient.mk (Rel.setoid α) (a, b)\n⊢ p c\n[PROOFSTEP]\nobtain rfl | rfl := Sym2.mem_iff.1 hc\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : α → Prop\nb c : α\nh : p c ∧ p b\nhc : c ∈ Quotient.mk (Rel.setoid α) (c, b)\n⊢ p c\n[PROOFSTEP]\nexact h.1\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : α → Prop\na c : α\nh : p a ∧ p c\nhc : c ∈ Quotient.mk (Rel.setoid α) (a, c)\n⊢ p c\n[PROOFSTEP]\nexact h.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α\nz : Sym2 α\nh : a ∈ z\n⊢ Quotient.mk (Rel.setoid α) (a, Mem.other h) = z\n[PROOFSTEP]\nerw [← Classical.choose_spec h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α\nz : Sym2 α\nh : a ∈ z\n⊢ Mem.other h ∈ z\n[PROOFSTEP]\nconvert mem_mk''_right a <| Mem.other h\n[GOAL]\ncase h.e'_5\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α\nz : Sym2 α\nh : a ∈ z\n⊢ z = Quotient.mk (Rel.setoid α) (a, Mem.other h)\n[PROOFSTEP]\nrw [other_spec h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y : α\nz : Sym2 α\nhne : x ≠ y\n⊢ x ∈ z ∧ y ∈ z ↔ z = Quotient.mk (Rel.setoid α) (x, y)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y : α\nz : Sym2 α\nhne : x ≠ y\n⊢ x ∈ z ∧ y ∈ z → z = Quotient.mk (Rel.setoid α) (x, y)\n[PROOFSTEP]\ninduction' z using Sym2.ind with x' y'\n[GOAL]\ncase mp.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y : α\nhne : x ≠ y\nx' y' : α\n⊢ x ∈ Quotient.mk (Rel.setoid α) (x', y') ∧ y ∈ Quotient.mk (Rel.setoid α) (x', y') →\n Quotient.mk (Rel.setoid α) (x', y') = Quotient.mk (Rel.setoid α) (x, y)\n[PROOFSTEP]\nrw [mem_iff, mem_iff]\n[GOAL]\ncase mp.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y : α\nhne : x ≠ y\nx' y' : α\n⊢ (x = x' ∨ x = y') ∧ (y = x' ∨ y = y') → Quotient.mk (Rel.setoid α) (x', y') = Quotient.mk (Rel.setoid α) (x, y)\n[PROOFSTEP]\naesop\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y : α\nz : Sym2 α\nhne : x ≠ y\n⊢ z = Quotient.mk (Rel.setoid α) (x, y) → x ∈ z ∧ y ∈ z\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y : α\nhne : x ≠ y\n⊢ x ∈ Quotient.mk (Rel.setoid α) (x, y) ∧ y ∈ Quotient.mk (Rel.setoid α) (x, y)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nb : β\nz : Sym2 α\n⊢ b ∈ map f z ↔ ∃ a, a ∈ z ∧ f a = b\n[PROOFSTEP]\ninduction' z using Sym2.ind with x y\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nb : β\nx y : α\n⊢ b ∈ map f (Quotient.mk (Rel.setoid α) (x, y)) ↔ ∃ a, a ∈ Quotient.mk (Rel.setoid α) (x, y) ∧ f a = b\n[PROOFSTEP]\nsimp only [map, Quotient.map_mk, Prod.map_mk, mem_iff]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nb : β\nx y : α\n⊢ b = f x ∨ b = f y ↔ ∃ a, (a = x ∨ a = y) ∧ f a = b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nb : β\nx y : α\n⊢ b = f x ∨ b = f y → ∃ a, (a = x ∨ a = y) ∧ f a = b\n[PROOFSTEP]\nrintro (rfl | rfl)\n[GOAL]\ncase h.mp.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nx y : α\n⊢ ∃ a, (a = x ∨ a = y) ∧ f a = f x\n[PROOFSTEP]\nexact ⟨x, by simp⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nx y : α\n⊢ (x = x ∨ x = y) ∧ f x = f x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.mp.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nx y : α\n⊢ ∃ a, (a = x ∨ a = y) ∧ f a = f y\n[PROOFSTEP]\nexact ⟨y, by simp⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nx y : α\n⊢ (y = x ∨ y = y) ∧ f y = f y\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nb : β\nx y : α\n⊢ (∃ a, (a = x ∨ a = y) ∧ f a = b) → b = f x ∨ b = f y\n[PROOFSTEP]\nrintro ⟨w, rfl | rfl, rfl⟩\n[GOAL]\ncase h.mpr.intro.intro.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\ny w : α\n⊢ f w = f w ∨ f w = f y\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.mpr.intro.intro.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nx w : α\n⊢ f w = f x ∨ f w = f w\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\ns : Sym2 α\nh : ∀ (x : α), x ∈ s → f x = g x\n⊢ map f s = map g s\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\ns : Sym2 α\nh : ∀ (x : α), x ∈ s → f x = g x\ny : β\n⊢ y ∈ map f s ↔ y ∈ map g s\n[PROOFSTEP]\nsimp only [mem_map]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\ns : Sym2 α\nh : ∀ (x : α), x ∈ s → f x = g x\ny : β\n⊢ (∃ a, a ∈ s ∧ f a = y) ↔ ∃ a, a ∈ s ∧ g a = y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\ns : Sym2 α\nh : ∀ (x : α), x ∈ s → f x = g x\ny : β\n⊢ (∃ a, a ∈ s ∧ f a = y) → ∃ a, a ∈ s ∧ g a = y\n[PROOFSTEP]\nrintro ⟨w, hw, rfl⟩\n[GOAL]\ncase h.mp.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\ns : Sym2 α\nh : ∀ (x : α), x ∈ s → f x = g x\nw : α\nhw : w ∈ s\n⊢ ∃ a, a ∈ s ∧ g a = f w\n[PROOFSTEP]\nexact ⟨w, hw, by simp [hw, h]⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\ns : Sym2 α\nh : ∀ (x : α), x ∈ s → f x = g x\nw : α\nhw : w ∈ s\n⊢ g w = f w\n[PROOFSTEP]\nsimp [hw, h]\n[GOAL]\ncase h.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\ns : Sym2 α\nh : ∀ (x : α), x ∈ s → f x = g x\ny : β\n⊢ (∃ a, a ∈ s ∧ g a = y) → ∃ a, a ∈ s ∧ f a = y\n[PROOFSTEP]\nrintro ⟨w, hw, rfl⟩\n[GOAL]\ncase h.mpr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\ns : Sym2 α\nh : ∀ (x : α), x ∈ s → f x = g x\nw : α\nhw : w ∈ s\n⊢ ∃ a, a ∈ s ∧ f a = g w\n[PROOFSTEP]\nexact ⟨w, hw, by simp [hw, h]⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\ns : Sym2 α\nh : ∀ (x : α), x ∈ s → f x = g x\nw : α\nhw : w ∈ s\n⊢ f w = g w\n[PROOFSTEP]\nsimp [hw, h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y : α\nh : diag x = diag y\n⊢ x = y\n[PROOFSTEP]\ncases Quotient.exact h\n[GOAL]\ncase refl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx : α\nh : diag x = diag x\n⊢ x = x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase swap\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx : α\nh : diag x = diag x\n⊢ x = x\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nz : Sym2 α\n⊢ IsDiag z → z ∈ Set.range diag\n[PROOFSTEP]\ninduction' z using Sym2.ind with x y\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y : α\n⊢ IsDiag (Quotient.mk (Rel.setoid α) (x, y)) → Quotient.mk (Rel.setoid α) (x, y) ∈ Set.range diag\n[PROOFSTEP]\nrintro (rfl : x = y)\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx : α\n⊢ Quotient.mk (Rel.setoid α) (x, x) ∈ Set.range diag\n[PROOFSTEP]\nexact ⟨_, rfl⟩\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u\ninst✝ : DecidableEq α\n⊢ DecidablePred IsDiag\n[PROOFSTEP]\nrefine' fun z => Quotient.recOnSubsingleton z fun a => _\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u\ninst✝ : DecidableEq α\nz : Sym2 α\na : α × α\n⊢ Decidable (IsDiag (Quotient.mk (Rel.setoid α) a))\n[PROOFSTEP]\nerw [isDiag_iff_proj_eq]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u\ninst✝ : DecidableEq α\nz : Sym2 α\na : α × α\n⊢ Decidable (a.fst = a.snd)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α\nz : Sym2 α\nhd : ¬IsDiag z\nh : a ∈ z\n⊢ Mem.other h ≠ a\n[PROOFSTEP]\ncontrapose! hd\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α\nz : Sym2 α\nh : a ∈ z\nhd : Mem.other h = a\n⊢ IsDiag z\n[PROOFSTEP]\nhave h' := Sym2.other_spec h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α\nz : Sym2 α\nh : a ∈ z\nhd : Mem.other h = a\nh' : Quotient.mk (Rel.setoid α) (a, Mem.other h) = z\n⊢ IsDiag z\n[PROOFSTEP]\nrw [hd] at h' \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α\nz : Sym2 α\nh : a ∈ z\nhd : Mem.other h = a\nh' : Quotient.mk (Rel.setoid α) (a, a) = z\n⊢ IsDiag z\n[PROOFSTEP]\nrw [← h']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α\nz : Sym2 α\nh : a ∈ z\nhd : Mem.other h = a\nh' : Quotient.mk (Rel.setoid α) (a, a) = z\n⊢ IsDiag (Quotient.mk (Rel.setoid α) (a, a))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\n⊢ fromRel (_ : ∀ (x y : α), ⊥ x y → ⊥ x y) = ∅\n[PROOFSTEP]\napply Set.eq_empty_of_forall_not_mem fun e => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\n⊢ ∀ (e : Sym2 α), ¬e ∈ fromRel (_ : ∀ (x y : α), ⊥ x y → ⊥ x y)\n[PROOFSTEP]\napply Sym2.ind\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\n⊢ ∀ (x y : α), ¬Quotient.mk (Rel.setoid α) (x, y) ∈ fromRel (_ : ∀ (x y : α), ⊥ x y → ⊥ x y)\n[PROOFSTEP]\nsimp [-Set.bot_eq_empty, Prop.bot_eq_false]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\n⊢ fromRel (_ : ∀ (x y : α), ⊤ x y → ⊤ x y) = Set.univ\n[PROOFSTEP]\napply Set.eq_univ_of_forall fun e => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\n⊢ ∀ (e : Sym2 α), e ∈ fromRel (_ : ∀ (x y : α), ⊤ x y → ⊤ x y)\n[PROOFSTEP]\napply Sym2.ind\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\n⊢ ∀ (x y : α), Quotient.mk (Rel.setoid α) (x, y) ∈ fromRel (_ : ∀ (x y : α), ⊤ x y → ⊤ x y)\n[PROOFSTEP]\nsimp [-Set.top_eq_univ, Prop.top_eq_true]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\nsym : Symmetric r\n⊢ Irreflexive r → ∀ {z : Sym2 α}, z ∈ fromRel sym → ¬IsDiag z\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\nsym : Symmetric r\nh : Irreflexive r\n⊢ ∀ {z : Sym2 α}, z ∈ fromRel sym → ¬IsDiag z\n[PROOFSTEP]\napply Sym2.ind\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\nsym : Symmetric r\nh : Irreflexive r\n⊢ ∀ (x y : α), Quotient.mk (Rel.setoid α) (x, y) ∈ fromRel sym → ¬IsDiag (Quotient.mk (Rel.setoid α) (x, y))\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : Set (Sym2 α)\nx y : α\n⊢ ToRel s x y → ToRel s y x\n[PROOFSTEP]\nsimp [eq_swap]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na₁ b₁ a₂ b₂ : α\n⊢ [a₁, b₁] ~ [a₂, b₂] → a₁ = a₂ ∧ b₁ = b₂ ∨ a₁ = b₂ ∧ b₁ = a₂\n[PROOFSTEP]\nsimp [← Multiset.coe_eq_coe, ← Multiset.cons_coe, Multiset.cons_eq_cons]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na₁ b₁ a₂ b₂ : α\n⊢ a₁ = a₂ ∧ b₁ = b₂ ∨ ¬a₁ = a₂ ∧ b₁ = a₂ ∧ b₂ = a₁ → a₁ = a₂ ∧ b₁ = b₂ ∨ a₁ = b₂ ∧ b₁ = a₂\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na₁ b₁ a₂ b₂ : α\nh₁ : a₁ = a₂\nh₂ : b₁ = b₂\n⊢ [a₁, b₁] ~ [a₂, b₂]\n[PROOFSTEP]\nrw [h₁, h₂]\n[GOAL]\n\n[PROOFSTEP]\nfirst\n| done\n| apply List.Perm.swap'; rfl\n[GOAL]\n\n[PROOFSTEP]\ndone\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na₁ b₁ a₂ b₂ : α\nh₁ : a₁ = b₂\nh₂ : b₁ = a₂\n⊢ [a₁, b₁] ~ [a₂, b₂]\n[PROOFSTEP]\nrw [h₁, h₂]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na₁ b₁ a₂ b₂ : α\nh₁ : a₁ = b₂\nh₂ : b₁ = a₂\n⊢ [b₂, a₂] ~ [a₂, b₂]\n[PROOFSTEP]\nfirst\n| done\n| apply List.Perm.swap'; rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na₁ b₁ a₂ b₂ : α\nh₁ : a₁ = b₂\nh₂ : b₁ = a₂\n⊢ [b₂, a₂] ~ [a₂, b₂]\n[PROOFSTEP]\ndone\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na₁ b₁ a₂ b₂ : α\nh₁ : a₁ = b₂\nh₂ : b₁ = a₂\n⊢ [b₂, a₂] ~ [a₂, b₂]\n[PROOFSTEP]\napply List.Perm.swap'\n[GOAL]\ncase p\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na₁ b₁ a₂ b₂ : α\nh₁ : a₁ = b₂\nh₂ : b₁ = a₂\n⊢ [] ~ []\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ ((fun x x_1 => x ≈ x_1) ⇒ fun x x_1 => x ≈ x_1)\n (fun x => { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n fun x => { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) }\n[PROOFSTEP]\nrintro _ _ ⟨_⟩\n[GOAL]\ncase refl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ y✝ : α\n⊢ (fun x => { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n (x✝, y✝) ≈\n (fun x => { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n (x✝, y✝)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase refl.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ y✝ : α\n⊢ [(x✝, y✝).snd] ~ [(x✝, y✝).snd]\n[PROOFSTEP]\napply List.Perm.refl\n[GOAL]\ncase swap\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ y✝ : α\n⊢ (fun x => { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n (x✝, y✝) ≈\n (fun x => { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n (y✝, x✝)\n[PROOFSTEP]\napply List.Perm.swap'\n[GOAL]\ncase swap.p\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ y✝ : α\n⊢ [] ~ []\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ ((fun x x_1 => x ≈ x_1) ⇒ fun x x_1 => x ≈ x_1) Sym2.fromVector Sym2.fromVector\n[PROOFSTEP]\nrintro ⟨x, hx⟩ ⟨y, hy⟩ h\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx : List α\nhx : List.length x = 2\ny : List α\nhy : List.length y = 2\nh : { val := x, property := hx } ≈ { val := y, property := hy }\n⊢ Sym2.fromVector { val := x, property := hx } ≈ Sym2.fromVector { val := y, property := hy }\n[PROOFSTEP]\ncases' x with _ x\n[GOAL]\ncase mk.mk.nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ny : List α\nhy : List.length y = 2\nhx : List.length [] = 2\nh : { val := [], property := hx } ≈ { val := y, property := hy }\n⊢ Sym2.fromVector { val := [], property := hx } ≈ Sym2.fromVector { val := y, property := hy }\n[PROOFSTEP]\nsimp at hx \n[GOAL]\ncase mk.mk.cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ny : List α\nhy : List.length y = 2\nhead✝ : α\nx : List α\nhx : List.length (head✝ :: x) = 2\nh : { val := head✝ :: x, property := hx } ≈ { val := y, property := hy }\n⊢ Sym2.fromVector { val := head✝ :: x, property := hx } ≈ Sym2.fromVector { val := y, property := hy }\n[PROOFSTEP]\ncases' x with _ x\n[GOAL]\ncase mk.mk.cons.nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ny : List α\nhy : List.length y = 2\nhead✝ : α\nhx : List.length [head✝] = 2\nh : { val := [head✝], property := hx } ≈ { val := y, property := hy }\n⊢ Sym2.fromVector { val := [head✝], property := hx } ≈ Sym2.fromVector { val := y, property := hy }\n[PROOFSTEP]\nsimp at hx \n[GOAL]\ncase mk.mk.cons.cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ny : List α\nhy : List.length y = 2\nhead✝¹ head✝ : α\nx : List α\nhx : List.length (head✝¹ :: head✝ :: x) = 2\nh : { val := head✝¹ :: head✝ :: x, property := hx } ≈ { val := y, property := hy }\n⊢ Sym2.fromVector { val := head✝¹ :: head✝ :: x, property := hx } ≈ Sym2.fromVector { val := y, property := hy }\n[PROOFSTEP]\ncases' x with _ x\n[GOAL]\ncase mk.mk.cons.cons.nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ny : List α\nhy : List.length y = 2\nhead✝¹ head✝ : α\nhx : List.length [head✝¹, head✝] = 2\nh : { val := [head✝¹, head✝], property := hx } ≈ { val := y, property := hy }\n⊢ Sym2.fromVector { val := [head✝¹, head✝], property := hx } ≈ Sym2.fromVector { val := y, property := hy }\ncase mk.mk.cons.cons.cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ny : List α\nhy : List.length y = 2\nhead✝² head✝¹ head✝ : α\nx : List α\nhx : List.length (head✝² :: head✝¹ :: head✝ :: x) = 2\nh : { val := head✝² :: head✝¹ :: head✝ :: x, property := hx } ≈ { val := y, property := hy }\n⊢ Sym2.fromVector { val := head✝² :: head✝¹ :: head✝ :: x, property := hx } ≈\n Sym2.fromVector { val := y, property := hy }\n[PROOFSTEP]\nswap\n[GOAL]\ncase mk.mk.cons.cons.cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ny : List α\nhy : List.length y = 2\nhead✝² head✝¹ head✝ : α\nx : List α\nhx : List.length (head✝² :: head✝¹ :: head✝ :: x) = 2\nh : { val := head✝² :: head✝¹ :: head✝ :: x, property := hx } ≈ { val := y, property := hy }\n⊢ Sym2.fromVector { val := head✝² :: head✝¹ :: head✝ :: x, property := hx } ≈\n Sym2.fromVector { val := y, property := hy }\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase mk.mk.cons.cons.cons.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ny : List α\nhy : List.length y = 2\nhead✝² head✝¹ head✝ : α\nx : List α\nhx : List.length (head✝² :: head✝¹ :: head✝ :: x) = 2\nh : { val := head✝² :: head✝¹ :: head✝ :: x, property := hx } ≈ { val := y, property := hy }\n⊢ False\n[PROOFSTEP]\nsimp at hx \n[GOAL]\ncase mk.mk.cons.cons.nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ny : List α\nhy : List.length y = 2\nhead✝¹ head✝ : α\nhx : List.length [head✝¹, head✝] = 2\nh : { val := [head✝¹, head✝], property := hx } ≈ { val := y, property := hy }\n⊢ Sym2.fromVector { val := [head✝¹, head✝], property := hx } ≈ Sym2.fromVector { val := y, property := hy }\n[PROOFSTEP]\ncases' y with _ y\n[GOAL]\ncase mk.mk.cons.cons.nil.nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nhead✝¹ head✝ : α\nhx : List.length [head✝¹, head✝] = 2\nhy : List.length [] = 2\nh : { val := [head✝¹, head✝], property := hx } ≈ { val := [], property := hy }\n⊢ Sym2.fromVector { val := [head✝¹, head✝], property := hx } ≈ Sym2.fromVector { val := [], property := hy }\n[PROOFSTEP]\nsimp at hy \n[GOAL]\ncase mk.mk.cons.cons.nil.cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nhead✝² head✝¹ : α\nhx : List.length [head✝², head✝¹] = 2\nhead✝ : α\ny : List α\nhy : List.length (head✝ :: y) = 2\nh : { val := [head✝², head✝¹], property := hx } ≈ { val := head✝ :: y, property := hy }\n⊢ Sym2.fromVector { val := [head✝², head✝¹], property := hx } ≈ Sym2.fromVector { val := head✝ :: y, property := hy }\n[PROOFSTEP]\ncases' y with _ y\n[GOAL]\ncase mk.mk.cons.cons.nil.cons.nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nhead✝² head✝¹ : α\nhx : List.length [head✝², head✝¹] = 2\nhead✝ : α\nhy : List.length [head✝] = 2\nh : { val := [head✝², head✝¹], property := hx } ≈ { val := [head✝], property := hy }\n⊢ Sym2.fromVector { val := [head✝², head✝¹], property := hx } ≈ Sym2.fromVector { val := [head✝], property := hy }\n[PROOFSTEP]\nsimp at hy \n[GOAL]\ncase mk.mk.cons.cons.nil.cons.cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nhead✝³ head✝² : α\nhx : List.length [head✝³, head✝²] = 2\nhead✝¹ head✝ : α\ny : List α\nhy : List.length (head✝¹ :: head✝ :: y) = 2\nh : { val := [head✝³, head✝²], property := hx } ≈ { val := head✝¹ :: head✝ :: y, property := hy }\n⊢ Sym2.fromVector { val := [head✝³, head✝²], property := hx } ≈\n Sym2.fromVector { val := head✝¹ :: head✝ :: y, property := hy }\n[PROOFSTEP]\ncases' y with _ y\n[GOAL]\ncase mk.mk.cons.cons.nil.cons.cons.nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nhead✝³ head✝² : α\nhx : List.length [head✝³, head✝²] = 2\nhead✝¹ head✝ : α\nhy : List.length [head✝¹, head✝] = 2\nh : { val := [head✝³, head✝²], property := hx } ≈ { val := [head✝¹, head✝], property := hy }\n⊢ Sym2.fromVector { val := [head✝³, head✝²], property := hx } ≈\n Sym2.fromVector { val := [head✝¹, head✝], property := hy }\ncase mk.mk.cons.cons.nil.cons.cons.cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nhead✝⁴ head✝³ : α\nhx : List.length [head✝⁴, head✝³] = 2\nhead✝² head✝¹ head✝ : α\ny : List α\nhy : List.length (head✝² :: head✝¹ :: head✝ :: y) = 2\nh : { val := [head✝⁴, head✝³], property := hx } ≈ { val := head✝² :: head✝¹ :: head✝ :: y, property := hy }\n⊢ Sym2.fromVector { val := [head✝⁴, head✝³], property := hx } ≈\n Sym2.fromVector { val := head✝² :: head✝¹ :: head✝ :: y, property := hy }\n[PROOFSTEP]\nswap\n[GOAL]\ncase mk.mk.cons.cons.nil.cons.cons.cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nhead✝⁴ head✝³ : α\nhx : List.length [head✝⁴, head✝³] = 2\nhead✝² head✝¹ head✝ : α\ny : List α\nhy : List.length (head✝² :: head✝¹ :: head✝ :: y) = 2\nh : { val := [head✝⁴, head✝³], property := hx } ≈ { val := head✝² :: head✝¹ :: head✝ :: y, property := hy }\n⊢ Sym2.fromVector { val := [head✝⁴, head✝³], property := hx } ≈\n Sym2.fromVector { val := head✝² :: head✝¹ :: head✝ :: y, property := hy }\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase mk.mk.cons.cons.nil.cons.cons.cons.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nhead✝⁴ head✝³ : α\nhx : List.length [head✝⁴, head✝³] = 2\nhead✝² head✝¹ head✝ : α\ny : List α\nhy : List.length (head✝² :: head✝¹ :: head✝ :: y) = 2\nh : { val := [head✝⁴, head✝³], property := hx } ≈ { val := head✝² :: head✝¹ :: head✝ :: y, property := hy }\n⊢ False\n[PROOFSTEP]\nsimp at hy \n[GOAL]\ncase mk.mk.cons.cons.nil.cons.cons.nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nhead✝³ head✝² : α\nhx : List.length [head✝³, head✝²] = 2\nhead✝¹ head✝ : α\nhy : List.length [head✝¹, head✝] = 2\nh : { val := [head✝³, head✝²], property := hx } ≈ { val := [head✝¹, head✝], property := hy }\n⊢ Sym2.fromVector { val := [head✝³, head✝²], property := hx } ≈\n Sym2.fromVector { val := [head✝¹, head✝], property := hy }\n[PROOFSTEP]\nrcases perm_card_two_iff.mp h with (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩)\n[GOAL]\ncase mk.mk.cons.cons.nil.cons.cons.nil.inl.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nhead✝¹ head✝ : α\nhx hy : List.length [head✝¹, head✝] = 2\nh : { val := [head✝¹, head✝], property := hx } ≈ { val := [head✝¹, head✝], property := hy }\n⊢ Sym2.fromVector { val := [head✝¹, head✝], property := hx } ≈\n Sym2.fromVector { val := [head✝¹, head✝], property := hy }\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mk.mk.cons.cons.nil.cons.cons.nil.inr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nhead✝¹ head✝ : α\nhx : List.length [head✝¹, head✝] = 2\nhy : List.length [head✝, head✝¹] = 2\nh : { val := [head✝¹, head✝], property := hx } ≈ { val := [head✝, head✝¹], property := hy }\n⊢ Sym2.fromVector { val := [head✝¹, head✝], property := hx } ≈\n Sym2.fromVector { val := [head✝, head✝¹], property := hy }\n[PROOFSTEP]\napply Sym2.Rel.swap\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ LeftInverse\n (Quotient.map Sym2.fromVector\n (_ :\n ∀ ⦃a b : Vector α 2⦄,\n (fun x x_1 => x ≈ x_1) a b → (fun x x_1 => x ≈ x_1) (Sym2.fromVector a) (Sym2.fromVector b)))\n (Quotient.map\n (fun x => { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n (_ :\n ∀ ⦃a b : α × α⦄,\n a ≈ b →\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n a ≈\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n b))\n[PROOFSTEP]\napply Sym2.ind\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ ∀ (x y : α),\n Quotient.map Sym2.fromVector\n (_ :\n ∀ ⦃a b : Vector α 2⦄,\n (fun x x_1 => x ≈ x_1) a b → (fun x x_1 => x ≈ x_1) (Sym2.fromVector a) (Sym2.fromVector b))\n (Quotient.map\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n (_ :\n ∀ ⦃a b : α × α⦄,\n a ≈ b →\n (fun x =>\n { val := [x.fst, x.snd],\n property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n a ≈\n (fun x =>\n { val := [x.fst, x.snd],\n property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n b)\n (Quotient.mk (Rel.setoid α) (x, y))) =\n Quotient.mk (Rel.setoid α) (x, y)\n[PROOFSTEP]\naesop (add norm unfold [Sym2.fromVector])\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx : Sym' α 2\n⊢ Quotient.map\n (fun x => { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n (_ :\n ∀ ⦃a b : α × α⦄,\n a ≈ b →\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n a ≈\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n b)\n (Quotient.map Sym2.fromVector\n (_ :\n ∀ ⦃a b : Vector α 2⦄,\n (fun x x_1 => x ≈ x_1) a b → (fun x x_1 => x ≈ x_1) (Sym2.fromVector a) (Sym2.fromVector b))\n x) =\n x\n[PROOFSTEP]\nrefine' Quotient.recOnSubsingleton x fun x => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : Sym' α 2\nx : Vector α 2\n⊢ Quotient.map\n (fun x => { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n (_ :\n ∀ ⦃a b : α × α⦄,\n a ≈ b →\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n a ≈\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n b)\n (Quotient.map Sym2.fromVector\n (_ :\n ∀ ⦃a b : Vector α 2⦄,\n (fun x x_1 => x ≈ x_1) a b → (fun x x_1 => x ≈ x_1) (Sym2.fromVector a) (Sym2.fromVector b))\n (Quotient.mk (Vector.Perm.isSetoid α 2) x)) =\n Quotient.mk (Vector.Perm.isSetoid α 2) x\n[PROOFSTEP]\ncases' x with x hx\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : Sym' α 2\nx : List α\nhx : List.length x = 2\n⊢ Quotient.map\n (fun x => { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n (_ :\n ∀ ⦃a b : α × α⦄,\n a ≈ b →\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n a ≈\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n b)\n (Quotient.map Sym2.fromVector\n (_ :\n ∀ ⦃a b : Vector α 2⦄,\n (fun x x_1 => x ≈ x_1) a b → (fun x x_1 => x ≈ x_1) (Sym2.fromVector a) (Sym2.fromVector b))\n (Quotient.mk (Vector.Perm.isSetoid α 2) { val := x, property := hx })) =\n Quotient.mk (Vector.Perm.isSetoid α 2) { val := x, property := hx }\n[PROOFSTEP]\ncases' x with _ x\n[GOAL]\ncase mk.nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx : Sym' α 2\nhx : List.length [] = 2\n⊢ Quotient.map\n (fun x => { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n (_ :\n ∀ ⦃a b : α × α⦄,\n a ≈ b →\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n a ≈\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n b)\n (Quotient.map Sym2.fromVector\n (_ :\n ∀ ⦃a b : Vector α 2⦄,\n (fun x x_1 => x ≈ x_1) a b → (fun x x_1 => x ≈ x_1) (Sym2.fromVector a) (Sym2.fromVector b))\n (Quotient.mk (Vector.Perm.isSetoid α 2) { val := [], property := hx })) =\n Quotient.mk (Vector.Perm.isSetoid α 2) { val := [], property := hx }\n[PROOFSTEP]\nsimp at hx \n[GOAL]\ncase mk.cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : Sym' α 2\nhead✝ : α\nx : List α\nhx : List.length (head✝ :: x) = 2\n⊢ Quotient.map\n (fun x => { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n (_ :\n ∀ ⦃a b : α × α⦄,\n a ≈ b →\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n a ≈\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n b)\n (Quotient.map Sym2.fromVector\n (_ :\n ∀ ⦃a b : Vector α 2⦄,\n (fun x x_1 => x ≈ x_1) a b → (fun x x_1 => x ≈ x_1) (Sym2.fromVector a) (Sym2.fromVector b))\n (Quotient.mk (Vector.Perm.isSetoid α 2) { val := head✝ :: x, property := hx })) =\n Quotient.mk (Vector.Perm.isSetoid α 2) { val := head✝ :: x, property := hx }\n[PROOFSTEP]\ncases' x with _ x\n[GOAL]\ncase mk.cons.nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx : Sym' α 2\nhead✝ : α\nhx : List.length [head✝] = 2\n⊢ Quotient.map\n (fun x => { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n (_ :\n ∀ ⦃a b : α × α⦄,\n a ≈ b →\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n a ≈\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n b)\n (Quotient.map Sym2.fromVector\n (_ :\n ∀ ⦃a b : Vector α 2⦄,\n (fun x x_1 => x ≈ x_1) a b → (fun x x_1 => x ≈ x_1) (Sym2.fromVector a) (Sym2.fromVector b))\n (Quotient.mk (Vector.Perm.isSetoid α 2) { val := [head✝], property := hx })) =\n Quotient.mk (Vector.Perm.isSetoid α 2) { val := [head✝], property := hx }\n[PROOFSTEP]\nsimp at hx \n[GOAL]\ncase mk.cons.cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : Sym' α 2\nhead✝¹ head✝ : α\nx : List α\nhx : List.length (head✝¹ :: head✝ :: x) = 2\n⊢ Quotient.map\n (fun x => { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n (_ :\n ∀ ⦃a b : α × α⦄,\n a ≈ b →\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n a ≈\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n b)\n (Quotient.map Sym2.fromVector\n (_ :\n ∀ ⦃a b : Vector α 2⦄,\n (fun x x_1 => x ≈ x_1) a b → (fun x x_1 => x ≈ x_1) (Sym2.fromVector a) (Sym2.fromVector b))\n (Quotient.mk (Vector.Perm.isSetoid α 2) { val := head✝¹ :: head✝ :: x, property := hx })) =\n Quotient.mk (Vector.Perm.isSetoid α 2) { val := head✝¹ :: head✝ :: x, property := hx }\n[PROOFSTEP]\ncases' x with _ x\n[GOAL]\ncase mk.cons.cons.nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx : Sym' α 2\nhead✝¹ head✝ : α\nhx : List.length [head✝¹, head✝] = 2\n⊢ Quotient.map\n (fun x => { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n (_ :\n ∀ ⦃a b : α × α⦄,\n a ≈ b →\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n a ≈\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n b)\n (Quotient.map Sym2.fromVector\n (_ :\n ∀ ⦃a b : Vector α 2⦄,\n (fun x x_1 => x ≈ x_1) a b → (fun x x_1 => x ≈ x_1) (Sym2.fromVector a) (Sym2.fromVector b))\n (Quotient.mk (Vector.Perm.isSetoid α 2) { val := [head✝¹, head✝], property := hx })) =\n Quotient.mk (Vector.Perm.isSetoid α 2) { val := [head✝¹, head✝], property := hx }\ncase mk.cons.cons.cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : Sym' α 2\nhead✝² head✝¹ head✝ : α\nx : List α\nhx : List.length (head✝² :: head✝¹ :: head✝ :: x) = 2\n⊢ Quotient.map\n (fun x => { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n (_ :\n ∀ ⦃a b : α × α⦄,\n a ≈ b →\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n a ≈\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n b)\n (Quotient.map Sym2.fromVector\n (_ :\n ∀ ⦃a b : Vector α 2⦄,\n (fun x x_1 => x ≈ x_1) a b → (fun x x_1 => x ≈ x_1) (Sym2.fromVector a) (Sym2.fromVector b))\n (Quotient.mk (Vector.Perm.isSetoid α 2) { val := head✝² :: head✝¹ :: head✝ :: x, property := hx })) =\n Quotient.mk (Vector.Perm.isSetoid α 2) { val := head✝² :: head✝¹ :: head✝ :: x, property := hx }\n[PROOFSTEP]\nswap\n[GOAL]\ncase mk.cons.cons.cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : Sym' α 2\nhead✝² head✝¹ head✝ : α\nx : List α\nhx : List.length (head✝² :: head✝¹ :: head✝ :: x) = 2\n⊢ Quotient.map\n (fun x => { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n (_ :\n ∀ ⦃a b : α × α⦄,\n a ≈ b →\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n a ≈\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n b)\n (Quotient.map Sym2.fromVector\n (_ :\n ∀ ⦃a b : Vector α 2⦄,\n (fun x x_1 => x ≈ x_1) a b → (fun x x_1 => x ≈ x_1) (Sym2.fromVector a) (Sym2.fromVector b))\n (Quotient.mk (Vector.Perm.isSetoid α 2) { val := head✝² :: head✝¹ :: head✝ :: x, property := hx })) =\n Quotient.mk (Vector.Perm.isSetoid α 2) { val := head✝² :: head✝¹ :: head✝ :: x, property := hx }\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase mk.cons.cons.cons.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : Sym' α 2\nhead✝² head✝¹ head✝ : α\nx : List α\nhx : List.length (head✝² :: head✝¹ :: head✝ :: x) = 2\n⊢ False\n[PROOFSTEP]\nsimp at hx \n[GOAL]\ncase mk.cons.cons.nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx : Sym' α 2\nhead✝¹ head✝ : α\nhx : List.length [head✝¹, head✝] = 2\n⊢ Quotient.map\n (fun x => { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n (_ :\n ∀ ⦃a b : α × α⦄,\n a ≈ b →\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n a ≈\n (fun x =>\n { val := [x.fst, x.snd], property := (_ : List.length [x.fst, x.snd] = List.length [x.fst, x.snd]) })\n b)\n (Quotient.map Sym2.fromVector\n (_ :\n ∀ ⦃a b : Vector α 2⦄,\n (fun x x_1 => x ≈ x_1) a b → (fun x x_1 => x ≈ x_1) (Sym2.fromVector a) (Sym2.fromVector b))\n (Quotient.mk (Vector.Perm.isSetoid α 2) { val := [head✝¹, head✝], property := hx })) =\n Quotient.mk (Vector.Perm.isSetoid α 2) { val := [head✝¹, head✝], property := hx }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nx y : α × α\n⊢ relBool x y = true ↔ Rel α x y\n[PROOFSTEP]\ncases' x with x₁ x₂\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ny : α × α\nx₁ x₂ : α\n⊢ relBool (x₁, x₂) y = true ↔ Rel α (x₁, x₂) y\n[PROOFSTEP]\ncases' y with y₁ y₂\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nx₁ x₂ y₁ y₂ : α\n⊢ relBool (x₁, x₂) (y₁, y₂) = true ↔ Rel α (x₁, x₂) (y₁, y₂)\n[PROOFSTEP]\naesop (rule_sets [Sym2]) (add norm unfold [relBool])\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\n⊢ ∀ (a₁ a₂ b₁ b₂ : α),\n (fun x₁ x₂ y₁ y₂ => relBool (x₁, x₂) (y₁, y₂)) a₁ a₂ b₁ b₂ =\n (fun x₁ x₂ y₁ y₂ => relBool (x₁, x₂) (y₁, y₂)) a₂ a₁ b₁ b₂ ∧\n (fun x₁ x₂ y₁ y₂ => relBool (x₁, x₂) (y₁, y₂)) a₁ a₂ b₁ b₂ =\n (fun x₁ x₂ y₁ y₂ => relBool (x₁, x₂) (y₁, y₂)) a₁ a₂ b₂ b₁\n[PROOFSTEP]\naesop (add norm unfold [relBool])\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na b : Sym2 α\n⊢ ∀ (a₁ a₂ b₁ b₂ : α),\n eqBool (Quotient.mk (Rel.setoid α) (a₁, a₂)) (Quotient.mk (Rel.setoid α) (b₁, b₂)) = true ↔\n Quotient.mk (Rel.setoid α) (a₁, a₂) = Quotient.mk (Rel.setoid α) (b₁, b₂)\n[PROOFSTEP]\naesop (rule_sets [Sym2])\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\nz : Sym2 α\nh : a ∈ z\n⊢ ∀ (a_1 b : α × α) (p : a_1 ≈ b),\n Eq.ndrec (motive := fun x => a ∈ x → α) (fun x => Sym2.pairOther a a_1)\n (_ : Quotient.mk (Rel.setoid α) a_1 = Quotient.mk (Rel.setoid α) b) =\n fun x => Sym2.pairOther a b\n[PROOFSTEP]\nclear h z\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\n⊢ ∀ (a_1 b : α × α) (p : a_1 ≈ b),\n Eq.ndrec (motive := fun x => a ∈ x → α) (fun x => Sym2.pairOther a a_1)\n (_ : Quotient.mk (Rel.setoid α) a_1 = Quotient.mk (Rel.setoid α) b) =\n fun x => Sym2.pairOther a b\n[PROOFSTEP]\nintro x y h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\nx y : α × α\nh : x ≈ y\n⊢ Eq.ndrec (motive := fun x => a ∈ x → α) (fun x_1 => Sym2.pairOther a x)\n (_ : Quotient.mk (Rel.setoid α) x = Quotient.mk (Rel.setoid α) y) =\n fun x => Sym2.pairOther a y\n[PROOFSTEP]\next hy\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\nx y : α × α\nh : x ≈ y\nhy : a ∈ Quotient.mk (Rel.setoid α) y\n⊢ Eq.ndrec (motive := fun x => a ∈ x → α) (fun x_1 => Sym2.pairOther a x)\n (_ : Quotient.mk (Rel.setoid α) x = Quotient.mk (Rel.setoid α) y) hy =\n Sym2.pairOther a y\n[PROOFSTEP]\nconvert_to Sym2.pairOther a x = _\n[GOAL]\ncase h.e'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\nx y : α × α\nh : x ≈ y\nhy : a ∈ Quotient.mk (Rel.setoid α) y\n⊢ Eq.ndrec (motive := fun x => a ∈ x → α) (fun x_1 => Sym2.pairOther a x)\n (_ : Quotient.mk (Rel.setoid α) x = Quotient.mk (Rel.setoid α) y) hy =\n Sym2.pairOther a x\n[PROOFSTEP]\nhave :\n ∀ {c e h},\n @Eq.ndrec (Quotient (Rel.setoid α)) (Quotient.mk (Rel.setoid α) x) (fun x => a ∈ x → α)\n (fun _ => Sym2.pairOther a x) c e h =\n Sym2.pairOther a x :=\n by intro _ e _; subst e; rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\nx y : α × α\nh : x ≈ y\nhy : a ∈ Quotient.mk (Rel.setoid α) y\n⊢ ∀ {c : Quotient (Rel.setoid α)} {e : Quotient.mk (Rel.setoid α) x = c} {h : a ∈ c},\n Eq.ndrec (motive := fun x => a ∈ x → α) (fun x_1 => Sym2.pairOther a x) e h = Sym2.pairOther a x\n[PROOFSTEP]\nintro _ e _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\nx y : α × α\nh : x ≈ y\nhy : a ∈ Quotient.mk (Rel.setoid α) y\nc✝ : Quotient (Rel.setoid α)\ne : Quotient.mk (Rel.setoid α) x = c✝\nh✝ : a ∈ c✝\n⊢ Eq.ndrec (motive := fun x => a ∈ x → α) (fun x_1 => Sym2.pairOther a x) e h✝ = Sym2.pairOther a x\n[PROOFSTEP]\nsubst e\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\nx y : α × α\nh : x ≈ y\nhy : a ∈ Quotient.mk (Rel.setoid α) y\nh✝ : a ∈ Quotient.mk (Rel.setoid α) x\n⊢ Eq.ndrec (motive := fun x => a ∈ x → α) (fun x_1 => Sym2.pairOther a x)\n (_ : Quotient.mk (Rel.setoid α) x = Quotient.mk (Rel.setoid α) x) h✝ =\n Sym2.pairOther a x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\nx y : α × α\nh : x ≈ y\nhy : a ∈ Quotient.mk (Rel.setoid α) y\nthis :\n ∀ {c : Quotient (Rel.setoid α)} {e : Quotient.mk (Rel.setoid α) x = c} {h : a ∈ c},\n Eq.ndrec (motive := fun x => a ∈ x → α) (fun x_1 => Sym2.pairOther a x) e h = Sym2.pairOther a x\n⊢ Eq.ndrec (motive := fun x => a ∈ x → α) (fun x_1 => Sym2.pairOther a x)\n (_ : Quotient.mk (Rel.setoid α) x = Quotient.mk (Rel.setoid α) y) hy =\n Sym2.pairOther a x\n[PROOFSTEP]\napply this\n[GOAL]\ncase h.convert_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\nx y : α × α\nh : x ≈ y\nhy : a ∈ Quotient.mk (Rel.setoid α) y\n⊢ Sym2.pairOther a x = Sym2.pairOther a y\n[PROOFSTEP]\nrw [mem_iff] at hy \n[GOAL]\ncase h.convert_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\nx y : α × α\nh : x ≈ y\nhy : a = y.fst ∨ a = y.snd\n⊢ Sym2.pairOther a x = Sym2.pairOther a y\n[PROOFSTEP]\nhave : relBool x y := (relBool_spec x y).mpr h\n[GOAL]\ncase h.convert_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\nx y : α × α\nh : x ≈ y\nhy : a = y.fst ∨ a = y.snd\nthis : relBool x y = true\n⊢ Sym2.pairOther a x = Sym2.pairOther a y\n[PROOFSTEP]\naesop (add norm unfold [pairOther, relBool])\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\nz : Sym2 α\nh : a ∈ z\n⊢ Quotient.mk (Rel.setoid α) (a, Mem.other' h) = z\n[PROOFSTEP]\ninduction z using Sym2.ind\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na x✝ y✝ : α\nh : a ∈ Quotient.mk (Rel.setoid α) (x✝, y✝)\n⊢ Quotient.mk (Rel.setoid α) (a, Mem.other' h) = Quotient.mk (Rel.setoid α) (x✝, y✝)\n[PROOFSTEP]\nhave h' := mem_iff.mp h\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na x✝ y✝ : α\nh : a ∈ Quotient.mk (Rel.setoid α) (x✝, y✝)\nh' : a = x✝ ∨ a = y✝\n⊢ Quotient.mk (Rel.setoid α) (a, Mem.other' h) = Quotient.mk (Rel.setoid α) (x✝, y✝)\n[PROOFSTEP]\naesop (add norm unfold [Quotient.rec, Quot.rec]) (rule_sets [Sym2])\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\nz : Sym2 α\nh : a ∈ z\n⊢ Mem.other h = Mem.other' h\n[PROOFSTEP]\nrw [← congr_right, other_spec' h, other_spec]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\nz : Sym2 α\nh : a ∈ z\n⊢ Mem.other' h ∈ z\n[PROOFSTEP]\nrw [← other_eq_other']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\nz : Sym2 α\nh : a ∈ z\n⊢ Mem.other h ∈ z\n[PROOFSTEP]\nexact other_mem h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\nz : Sym2 α\nha : a ∈ z\nhb : Mem.other' ha ∈ z\n⊢ Mem.other' hb = a\n[PROOFSTEP]\ninduction z using Sym2.ind\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na x✝ y✝ : α\nha : a ∈ Quotient.mk (Rel.setoid α) (x✝, y✝)\nhb : Mem.other' ha ∈ Quotient.mk (Rel.setoid α) (x✝, y✝)\n⊢ Mem.other' hb = a\n[PROOFSTEP]\naesop (rule_sets [Sym2]) (add norm unfold [Quotient.rec, Quot.rec])\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α\nz : Sym2 α\nha : a ∈ z\nhb : Mem.other ha ∈ z\n⊢ Mem.other hb = a\n[PROOFSTEP]\nclassical\nrw [other_eq_other'] at hb ⊢\nconvert other_invol' ha hb using 2\napply other_eq_other'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α\nz : Sym2 α\nha : a ∈ z\nhb : Mem.other ha ∈ z\n⊢ Mem.other hb = a\n[PROOFSTEP]\nrw [other_eq_other'] at hb ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α\nz : Sym2 α\nha : a ∈ z\nhb✝ : Mem.other ha ∈ z\nhb : Mem.other' ha ∈ z\n⊢ Mem.other' hb✝ = a\n[PROOFSTEP]\nconvert other_invol' ha hb using 2\n[GOAL]\ncase h.e'_2.h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α\nz : Sym2 α\nha : a ∈ z\nhb✝ : Mem.other ha ∈ z\nhb : Mem.other' ha ∈ z\n⊢ Mem.other ha = Mem.other' ha\n[PROOFSTEP]\napply other_eq_other'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\n⊢ filter IsDiag (image Quotient.mk'' (s ×ˢ s)) = image Quotient.mk'' (Finset.diag s)\n[PROOFSTEP]\next z\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\nz : Sym2 α\n⊢ z ∈ filter IsDiag (image Quotient.mk'' (s ×ˢ s)) ↔ z ∈ image Quotient.mk'' (Finset.diag s)\n[PROOFSTEP]\ninduction' z using Sym2.inductionOn\n[GOAL]\ncase a.hf\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\nx✝ y✝ : α\n⊢ Quotient.mk (Rel.setoid α) (x✝, y✝) ∈ filter IsDiag (image Quotient.mk'' (s ×ˢ s)) ↔\n Quotient.mk (Rel.setoid α) (x✝, y✝) ∈ image Quotient.mk'' (Finset.diag s)\n[PROOFSTEP]\nsimp only [mem_image, mem_diag, exists_prop, mem_filter, Prod.exists, mem_product]\n[GOAL]\ncase a.hf\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\nx✝ y✝ : α\n⊢ (∃ a b, (a ∈ s ∧ b ∈ s) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)) ∧\n IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝)) ↔\n ∃ a b, (a ∈ s ∧ a = b) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.hf.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\nx✝ y✝ : α\n⊢ (∃ a b, (a ∈ s ∧ b ∈ s) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)) ∧\n IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝)) →\n ∃ a b, (a ∈ s ∧ a = b) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)\n[PROOFSTEP]\nrintro ⟨⟨a, b, ⟨ha, hb⟩, (h : Quotient.mk _ _ = _)⟩, hab⟩\n[GOAL]\ncase a.hf.mp.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\nx✝ y✝ : α\nhab : IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝))\na b : α\nh : Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)\nha : a ∈ s\nhb : b ∈ s\n⊢ ∃ a b, (a ∈ s ∧ a = b) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)\n[PROOFSTEP]\nrw [← h, Sym2.mk''_isDiag_iff] at hab \n[GOAL]\ncase a.hf.mp.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\nx✝ y✝ a b : α\nhab : a = b\nh : Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)\nha : a ∈ s\nhb : b ∈ s\n⊢ ∃ a b, (a ∈ s ∧ a = b) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)\n[PROOFSTEP]\nexact ⟨a, b, ⟨ha, hab⟩, h⟩\n[GOAL]\ncase a.hf.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\nx✝ y✝ : α\n⊢ (∃ a b, (a ∈ s ∧ a = b) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)) →\n (∃ a b, (a ∈ s ∧ b ∈ s) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)) ∧\n IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝))\n[PROOFSTEP]\nrintro ⟨a, b, ⟨ha, rfl⟩, h⟩\n[GOAL]\ncase a.hf.mpr.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\nx✝ y✝ a : α\nha : a ∈ s\nh : Quotient.mk'' (a, a) = Quotient.mk (Rel.setoid α) (x✝, y✝)\n⊢ (∃ a b, (a ∈ s ∧ b ∈ s) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)) ∧\n IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝))\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase a.hf.mpr.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\nx✝ y✝ a : α\nha : a ∈ s\nh : Quotient.mk'' (a, a) = Quotient.mk (Rel.setoid α) (x✝, y✝)\n⊢ (∃ a_1 b, (a_1 ∈ s ∧ b ∈ s) ∧ Quotient.mk'' (a_1, b) = Quotient.mk'' (a, a)) ∧ IsDiag (Quotient.mk'' (a, a))\n[PROOFSTEP]\nexact ⟨⟨a, a, ⟨ha, ha⟩, rfl⟩, rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\n⊢ filter (fun a => ¬IsDiag a) (image Quotient.mk'' (s ×ˢ s)) = image Quotient.mk'' (offDiag s)\n[PROOFSTEP]\next z\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\nz : Sym2 α\n⊢ z ∈ filter (fun a => ¬IsDiag a) (image Quotient.mk'' (s ×ˢ s)) ↔ z ∈ image Quotient.mk'' (offDiag s)\n[PROOFSTEP]\ninduction z using Sym2.inductionOn\n[GOAL]\ncase a.hf\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\nx✝ y✝ : α\n⊢ Quotient.mk (Rel.setoid α) (x✝, y✝) ∈ filter (fun a => ¬IsDiag a) (image Quotient.mk'' (s ×ˢ s)) ↔\n Quotient.mk (Rel.setoid α) (x✝, y✝) ∈ image Quotient.mk'' (offDiag s)\n[PROOFSTEP]\nsimp only [mem_image, mem_offDiag, mem_filter, Prod.exists, mem_product]\n[GOAL]\ncase a.hf\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\nx✝ y✝ : α\n⊢ (∃ a b, (a ∈ s ∧ b ∈ s) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)) ∧\n ¬IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝)) ↔\n ∃ a b, (a ∈ s ∧ b ∈ s ∧ a ≠ b) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.hf.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\nx✝ y✝ : α\n⊢ (∃ a b, (a ∈ s ∧ b ∈ s) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)) ∧\n ¬IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝)) →\n ∃ a b, (a ∈ s ∧ b ∈ s ∧ a ≠ b) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)\n[PROOFSTEP]\nrintro ⟨⟨a, b, ⟨ha, hb⟩, (h : Quotient.mk _ _ = _)⟩, hab⟩\n[GOAL]\ncase a.hf.mp.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\nx✝ y✝ : α\nhab : ¬IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝))\na b : α\nh : Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)\nha : a ∈ s\nhb : b ∈ s\n⊢ ∃ a b, (a ∈ s ∧ b ∈ s ∧ a ≠ b) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)\n[PROOFSTEP]\nrw [← h, Sym2.mk''_isDiag_iff] at hab \n[GOAL]\ncase a.hf.mp.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\nx✝ y✝ a b : α\nhab : ¬a = b\nh : Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)\nha : a ∈ s\nhb : b ∈ s\n⊢ ∃ a b, (a ∈ s ∧ b ∈ s ∧ a ≠ b) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)\n[PROOFSTEP]\nexact ⟨a, b, ⟨ha, hb, hab⟩, h⟩\n[GOAL]\ncase a.hf.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\nx✝ y✝ : α\n⊢ (∃ a b, (a ∈ s ∧ b ∈ s ∧ a ≠ b) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)) →\n (∃ a b, (a ∈ s ∧ b ∈ s) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)) ∧\n ¬IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝))\n[PROOFSTEP]\nrintro ⟨a, b, ⟨ha, hb, hab⟩, (h : Quotient.mk _ _ = _)⟩\n[GOAL]\ncase a.hf.mpr.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\nx✝ y✝ a b : α\nh : Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)\nha : a ∈ s\nhb : b ∈ s\nhab : a ≠ b\n⊢ (∃ a b, (a ∈ s ∧ b ∈ s) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)) ∧\n ¬IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝))\n[PROOFSTEP]\nrw [Ne.def, ← Sym2.mk''_isDiag_iff, h] at hab \n[GOAL]\ncase a.hf.mpr.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\nx✝ y✝ a b : α\nh : Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)\nha : a ∈ s\nhb : b ∈ s\nhab : ¬IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝))\n⊢ (∃ a b, (a ∈ s ∧ b ∈ s) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)) ∧\n ¬IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝))\n[PROOFSTEP]\nexact ⟨⟨a, b, ⟨ha, hb⟩, h⟩, hab⟩\n", "meta": {"mathlib_filename": "Mathlib.Data.Sym.Sym2", "llama_tokens": 35764, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8056321889812553, "lm_q2_score": 0.6893056040203135, "lm_q1q2_score": 0.5553267826439315}} {"text": "[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx : M ⧸ S\n⊢ ‖x‖ = infDist 0 {m | ↑m = x}\n[PROOFSTEP]\nsimp only [AddSubgroup.quotient_norm_eq, infDist_eq_iInf, sInf_image', dist_zero_left]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx : M\n⊢ ‖↑x‖ = infDist x ↑S\n[PROOFSTEP]\nrw [norm_eq_infDist, ← infDist_image (IsometryEquiv.subLeft x).isometry, IsometryEquiv.subLeft_apply, sub_zero, ←\n IsometryEquiv.preimage_symm]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx : M\n⊢ infDist x (↑(IsometryEquiv.symm (IsometryEquiv.subLeft x)) ⁻¹' {m | ↑m = ↑x}) = infDist x ↑S\n[PROOFSTEP]\ncongr 1 with y\n[GOAL]\ncase e_s.h\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx y : M\n⊢ y ∈ ↑(IsometryEquiv.symm (IsometryEquiv.subLeft x)) ⁻¹' {m | ↑m = ↑x} ↔ y ∈ ↑S\n[PROOFSTEP]\nsimp only [mem_preimage, IsometryEquiv.subLeft_symm_apply, mem_setOf_eq, QuotientAddGroup.eq, neg_add, neg_neg,\n neg_add_cancel_right, SetLike.mem_coe]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx : M ⧸ S\n⊢ ‖-x‖ = ‖x‖\n[PROOFSTEP]\nsimp only [AddSubgroup.quotient_norm_eq]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx : M ⧸ S\n⊢ sInf (norm '' {m | ↑m = -x}) = sInf (norm '' {m | ↑m = x})\n[PROOFSTEP]\ncongr 1 with r\n[GOAL]\ncase e_a.h\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx : M ⧸ S\nr : ℝ\n⊢ r ∈ norm '' {m | ↑m = -x} ↔ r ∈ norm '' {m | ↑m = x}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase e_a.h.mp\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx : M ⧸ S\nr : ℝ\n⊢ r ∈ norm '' {m | ↑m = -x} → r ∈ norm '' {m | ↑m = x}\n[PROOFSTEP]\n{rintro ⟨m, hm, rfl⟩; use-m; simpa [neg_eq_iff_eq_neg] using hm\n}\n[GOAL]\ncase e_a.h.mp\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx : M ⧸ S\nr : ℝ\n⊢ r ∈ norm '' {m | ↑m = -x} → r ∈ norm '' {m | ↑m = x}\n[PROOFSTEP]\nrintro ⟨m, hm, rfl⟩\n[GOAL]\ncase e_a.h.mp.intro.intro\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx : M ⧸ S\nm : M\nhm : m ∈ {m | ↑m = -x}\n⊢ ‖m‖ ∈ norm '' {m | ↑m = x}\n[PROOFSTEP]\nuse-m\n[GOAL]\ncase h\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx : M ⧸ S\nm : M\nhm : m ∈ {m | ↑m = -x}\n⊢ -m ∈ {m | ↑m = x} ∧ ‖-m‖ = ‖m‖\n[PROOFSTEP]\nsimpa [neg_eq_iff_eq_neg] using hm\n[GOAL]\ncase e_a.h.mpr\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx : M ⧸ S\nr : ℝ\n⊢ r ∈ norm '' {m | ↑m = x} → r ∈ norm '' {m | ↑m = -x}\n[PROOFSTEP]\n{rintro ⟨m, hm, rfl⟩; use-m; simpa [neg_eq_iff_eq_neg] using hm\n}\n[GOAL]\ncase e_a.h.mpr\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx : M ⧸ S\nr : ℝ\n⊢ r ∈ norm '' {m | ↑m = x} → r ∈ norm '' {m | ↑m = -x}\n[PROOFSTEP]\nrintro ⟨m, hm, rfl⟩\n[GOAL]\ncase e_a.h.mpr.intro.intro\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx : M ⧸ S\nm : M\nhm : m ∈ {m | ↑m = x}\n⊢ ‖m‖ ∈ norm '' {m | ↑m = -x}\n[PROOFSTEP]\nuse-m\n[GOAL]\ncase h\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx : M ⧸ S\nm : M\nhm : m ∈ {m | ↑m = x}\n⊢ -m ∈ {m | ↑m = -x} ∧ ‖-m‖ = ‖m‖\n[PROOFSTEP]\nsimpa [neg_eq_iff_eq_neg] using hm\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx y : M ⧸ S\n⊢ ‖x - y‖ = ‖y - x‖\n[PROOFSTEP]\nrw [← neg_sub, quotient_norm_neg]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nm : M\n⊢ ‖↑(mk' S) m‖ = sInf ((fun x => ‖m + x‖) '' ↑S)\n[PROOFSTEP]\nrw [mk'_apply, norm_mk, sInf_image', ← infDist_image isometry_neg, image_neg, neg_coe_set (H := S), infDist_eq_iInf]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nm : M\n⊢ ⨅ (y : ↑↑S), dist (-m) ↑y = ⨅ (a : ↑↑S), ‖m + ↑a‖\n[PROOFSTEP]\nsimp only [dist_eq_norm', sub_neg_eq_add, add_comm]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nm : M\n⊢ ‖↑(mk' S) m‖ = 0 ↔ m ∈ closure ↑S\n[PROOFSTEP]\nrw [mk'_apply, norm_mk, ← mem_closure_iff_infDist_zero]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nm : M\n⊢ Set.Nonempty ↑S\n[PROOFSTEP]\nexact ⟨0, S.zero_mem⟩\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx : M ⧸ S\nr : ℝ\n⊢ ‖x‖ < r ↔ ∃ m, ↑m = x ∧ ‖m‖ < r\n[PROOFSTEP]\nrw [isGLB_lt_iff (isGLB_quotient_norm _), bex_image_iff]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx : M ⧸ S\nr : ℝ\n⊢ (∃ x_1, x_1 ∈ {m | ↑(mk' S) m = x} ∧ ‖x_1‖ < r) ↔ ∃ m, ↑m = x ∧ ‖m‖ < r\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nm : M\nε : ℝ\nhε : 0 < ε\n⊢ ∃ s, s ∈ S ∧ ‖m + s‖ < ‖↑(mk' S) m‖ + ε\n[PROOFSTEP]\nobtain ⟨n : M, hn : mk' S n = mk' S m, hn' : ‖n‖ < ‖mk' S m‖ + ε⟩ := norm_mk_lt (QuotientAddGroup.mk' S m) hε\n[GOAL]\ncase intro.intro\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nm : M\nε : ℝ\nhε : 0 < ε\nn : M\nhn : ↑(mk' S) n = ↑(mk' S) m\nhn' : ‖n‖ < ‖↑(mk' S) m‖ + ε\n⊢ ∃ s, s ∈ S ∧ ‖m + s‖ < ‖↑(mk' S) m‖ + ε\n[PROOFSTEP]\nerw [eq_comm, QuotientAddGroup.eq] at hn \n[GOAL]\ncase intro.intro\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nm : M\nε : ℝ\nhε : 0 < ε\nn : M\nhn : -m + n ∈ S\nhn' : ‖n‖ < ‖↑(mk' S) m‖ + ε\n⊢ ∃ s, s ∈ S ∧ ‖m + s‖ < ‖↑(mk' S) m‖ + ε\n[PROOFSTEP]\nuse-m + n, hn\n[GOAL]\ncase right\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nm : M\nε : ℝ\nhε : 0 < ε\nn : M\nhn : -m + n ∈ S\nhn' : ‖n‖ < ‖↑(mk' S) m‖ + ε\n⊢ ‖m + (-m + n)‖ < ‖↑(mk' S) m‖ + ε\n[PROOFSTEP]\nrwa [add_neg_cancel_left]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx y : M ⧸ S\n⊢ ‖x + y‖ ≤ ‖x‖ + ‖y‖\n[PROOFSTEP]\nrcases And.intro (mk_surjective x) (mk_surjective y) with ⟨⟨x, rfl⟩, ⟨y, rfl⟩⟩\n[GOAL]\ncase intro.intro.intro\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx y : M\n⊢ ‖↑x + ↑y‖ ≤ ‖↑x‖ + ‖↑y‖\n[PROOFSTEP]\nsimp only [← mk'_apply, ← map_add, quotient_norm_mk_eq, sInf_image']\n[GOAL]\ncase intro.intro.intro\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx y : M\n⊢ ⨅ (a : ↑↑S), ‖x + y + ↑a‖ ≤ (⨅ (a : ↑↑S), ‖x + ↑a‖) + ⨅ (a : ↑↑S), ‖y + ↑a‖\n[PROOFSTEP]\nrefine le_ciInf_add_ciInf fun a b ↦ ?_\n[GOAL]\ncase intro.intro.intro\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx y : M\na b : ↑↑S\n⊢ ⨅ (a : ↑↑S), ‖x + y + ↑a‖ ≤ ‖x + ↑a‖ + ‖y + ↑b‖\n[PROOFSTEP]\nrefine ciInf_le_of_le ⟨0, forall_range_iff.2 fun _ ↦ norm_nonneg _⟩ (a + b) ?_\n[GOAL]\ncase intro.intro.intro\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx y : M\na b : ↑↑S\n⊢ ‖x + y + ↑(a + b)‖ ≤ ‖x + ↑a‖ + ‖y + ↑b‖\n[PROOFSTEP]\nexact (congr_arg norm (add_add_add_comm _ _ _ _)).trans_le (norm_add_le _ _)\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\n⊢ ‖0‖ = 0\n[PROOFSTEP]\nerw [quotient_norm_eq_zero_iff]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\n⊢ 0 ∈ closure ↑S\n[PROOFSTEP]\nexact subset_closure S.zero_mem\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nhS : IsClosed ↑S\nm : M\nh : ‖↑(mk' S) m‖ = 0\n⊢ m ∈ S\n[PROOFSTEP]\nrwa [quotient_norm_eq_zero_iff, hS.closure_eq] at h \n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\n⊢ Filter.HasBasis (𝓝 0) (fun ε => 0 < ε) fun ε => {x | ‖x‖ < ε}\n[PROOFSTEP]\nhave : ∀ ε : ℝ, mk '' ball (0 : M) ε = {x : M ⧸ S | ‖x‖ < ε}\n[GOAL]\ncase this\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\n⊢ ∀ (ε : ℝ), mk '' ball 0 ε = {x | ‖x‖ < ε}\n[PROOFSTEP]\nrefine fun ε ↦ Set.ext <| forall_mk.2 fun x ↦ ?_\n[GOAL]\ncase this\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nε : ℝ\nx : M\n⊢ ↑x ∈ mk '' ball 0 ε ↔ ↑x ∈ {x | ‖x‖ < ε}\n[PROOFSTEP]\nrw [ball_zero_eq, mem_setOf_eq, norm_lt_iff, mem_image]\n[GOAL]\ncase this\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nε : ℝ\nx : M\n⊢ (∃ x_1, x_1 ∈ {x | ‖x‖ < ε} ∧ ↑x_1 = ↑x) ↔ ∃ m, ↑m = ↑x ∧ ‖m‖ < ε\n[PROOFSTEP]\nexact exists_congr fun _ ↦ and_comm\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nthis : ∀ (ε : ℝ), mk '' ball 0 ε = {x | ‖x‖ < ε}\n⊢ Filter.HasBasis (𝓝 0) (fun ε => 0 < ε) fun ε => {x | ‖x‖ < ε}\n[PROOFSTEP]\nrw [← mk_zero, nhds_eq, ← funext this]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nthis : ∀ (ε : ℝ), mk '' ball 0 ε = {x | ‖x‖ < ε}\n⊢ Filter.HasBasis (Filter.map mk (𝓝 0)) (fun ε => 0 < ε) fun x => mk '' ball 0 x\n[PROOFSTEP]\nexact .map _ Metric.nhds_basis_ball\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx : M ⧸ S\n⊢ dist x x = 0\n[PROOFSTEP]\nsimp only [norm_mk_zero, sub_self]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx y z : M ⧸ S\n⊢ dist x z ≤ dist x y + dist y z\n[PROOFSTEP]\nrefine le_trans ?_ (quotient_norm_add_le _ _ _)\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx y z : M ⧸ S\n⊢ dist x z ≤ ‖x - y + (y - z)‖\n[PROOFSTEP]\nexact (congr_arg norm (sub_add_sub_cancel _ _ _).symm).le\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nx y : M ⧸ S\n⊢ (fun x y => ↑{ val := ‖x - y‖, property := (_ : 0 ≤ ‖x - y‖) }) x y = ENNReal.ofReal (dist x y)\n[PROOFSTEP]\nexact ENNReal.coe_nnreal_eq _\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\n⊢ uniformity (M ⧸ S) = ⨅ (ε : ℝ) (_ : ε > 0), Filter.principal {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\nrw [uniformity_eq_comap_nhds_zero', ((quotient_nhd_basis S).comap _).eq_biInf]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\n⊢ ⨅ (i : ℝ) (_ : 0 < i), Filter.principal ((fun p => p.snd - p.fst) ⁻¹' {x | ‖x‖ < i}) =\n ⨅ (ε : ℝ) (_ : ε > 0), Filter.principal {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\nsimp only [dist, quotient_norm_sub_rev (Prod.fst _), preimage_setOf_eq]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nsrc✝ : M →+ M ⧸ S := mk' S\nm : M\n⊢ ‖ZeroHom.toFun (↑src✝) m‖ ≤ 1 * ‖m‖\n[PROOFSTEP]\nsimpa [one_mul] using quotient_norm_mk_le _ m\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nm : M\n⊢ ‖↑(normedMk S) m‖ ≤ 1 * ‖m‖\n[PROOFSTEP]\nsimp [quotient_norm_mk_le']\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nf : NormedAddGroupHom M N\nhf : ∀ (x : M), x ∈ S → ↑f x = 0\nx : M ⧸ S\n⊢ ‖↑(lift S (toAddMonoidHom f) hf) x‖ ≤ ‖f‖ * ‖x‖\n[PROOFSTEP]\ncases (norm_nonneg f).eq_or_gt with\n| inl h =>\n rcases mk_surjective x with ⟨x, rfl⟩\n simpa [h] using le_opNorm f x\n| inr h =>\n rw [← not_lt, ← _root_.lt_div_iff' h, norm_lt_iff]\n rintro ⟨x, rfl, hx⟩\n exact ((lt_div_iff' h).1 hx).not_le (le_opNorm f x)\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nf : NormedAddGroupHom M N\nhf : ∀ (x : M), x ∈ S → ↑f x = 0\nx : M ⧸ S\nx✝ : ‖f‖ = 0 ∨ 0 < ‖f‖\n⊢ ‖↑(lift S (toAddMonoidHom f) hf) x‖ ≤ ‖f‖ * ‖x‖\n[PROOFSTEP]\ncases (norm_nonneg f).eq_or_gt with\n| inl h =>\n rcases mk_surjective x with ⟨x, rfl⟩\n simpa [h] using le_opNorm f x\n| inr h =>\n rw [← not_lt, ← _root_.lt_div_iff' h, norm_lt_iff]\n rintro ⟨x, rfl, hx⟩\n exact ((lt_div_iff' h).1 hx).not_le (le_opNorm f x)\n[GOAL]\ncase inl\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nf : NormedAddGroupHom M N\nhf : ∀ (x : M), x ∈ S → ↑f x = 0\nx : M ⧸ S\nh : ‖f‖ = 0\n⊢ ‖↑(lift S (toAddMonoidHom f) hf) x‖ ≤ ‖f‖ * ‖x‖\n[PROOFSTEP]\n\n| inl h =>\n rcases mk_surjective x with ⟨x, rfl⟩\n simpa [h] using le_opNorm f x\n[GOAL]\ncase inl\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nf : NormedAddGroupHom M N\nhf : ∀ (x : M), x ∈ S → ↑f x = 0\nx : M ⧸ S\nh : ‖f‖ = 0\n⊢ ‖↑(lift S (toAddMonoidHom f) hf) x‖ ≤ ‖f‖ * ‖x‖\n[PROOFSTEP]\nrcases mk_surjective x with ⟨x, rfl⟩\n[GOAL]\ncase inl.intro\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nf : NormedAddGroupHom M N\nhf : ∀ (x : M), x ∈ S → ↑f x = 0\nh : ‖f‖ = 0\nx : M\n⊢ ‖↑(lift S (toAddMonoidHom f) hf) ↑x‖ ≤ ‖f‖ * ‖↑x‖\n[PROOFSTEP]\nsimpa [h] using le_opNorm f x\n[GOAL]\ncase inr\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nf : NormedAddGroupHom M N\nhf : ∀ (x : M), x ∈ S → ↑f x = 0\nx : M ⧸ S\nh : 0 < ‖f‖\n⊢ ‖↑(lift S (toAddMonoidHom f) hf) x‖ ≤ ‖f‖ * ‖x‖\n[PROOFSTEP]\n\n| inr h =>\n rw [← not_lt, ← _root_.lt_div_iff' h, norm_lt_iff]\n rintro ⟨x, rfl, hx⟩\n exact ((lt_div_iff' h).1 hx).not_le (le_opNorm f x)\n[GOAL]\ncase inr\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nf : NormedAddGroupHom M N\nhf : ∀ (x : M), x ∈ S → ↑f x = 0\nx : M ⧸ S\nh : 0 < ‖f‖\n⊢ ‖↑(lift S (toAddMonoidHom f) hf) x‖ ≤ ‖f‖ * ‖x‖\n[PROOFSTEP]\nrw [← not_lt, ← _root_.lt_div_iff' h, norm_lt_iff]\n[GOAL]\ncase inr\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nf : NormedAddGroupHom M N\nhf : ∀ (x : M), x ∈ S → ↑f x = 0\nx : M ⧸ S\nh : 0 < ‖f‖\n⊢ ¬∃ m, ↑m = x ∧ ‖m‖ < ‖↑(lift S (toAddMonoidHom f) hf) x‖ / ‖f‖\n[PROOFSTEP]\nrintro ⟨x, rfl, hx⟩\n[GOAL]\ncase inr.intro.intro\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nf : NormedAddGroupHom M N\nhf : ∀ (x : M), x ∈ S → ↑f x = 0\nh : 0 < ‖f‖\nx : M\nhx : ‖x‖ < ‖↑(lift S (toAddMonoidHom f) hf) ↑x‖ / ‖f‖\n⊢ False\n[PROOFSTEP]\nexact ((lt_div_iff' h).1 hx).not_le (le_opNorm f x)\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nh : ↑(topologicalClosure S) ≠ univ\n⊢ ‖normedMk S‖ = 1\n[PROOFSTEP]\nrefine le_antisymm (norm_normedMk_le S) ?_\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nh : ↑(topologicalClosure S) ≠ univ\n⊢ 1 ≤ ‖normedMk S‖\n[PROOFSTEP]\nobtain ⟨x, hx⟩ : ∃ x : M, 0 < ‖(x : M ⧸ S)‖\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nh : ↑(topologicalClosure S) ≠ univ\n⊢ ∃ x, 0 < ‖↑x‖\n[PROOFSTEP]\nrefine (Set.nonempty_compl.2 h).imp fun x hx ↦ ?_\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nh : ↑(topologicalClosure S) ≠ univ\nx : M\nhx : x ∈ (↑(topologicalClosure S))ᶜ\n⊢ 0 < ‖↑x‖\n[PROOFSTEP]\nexact (norm_nonneg _).lt_of_ne' <| mt (quotient_norm_eq_zero_iff S x).1 hx\n[GOAL]\ncase intro\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nh : ↑(topologicalClosure S) ≠ univ\nx : M\nhx : 0 < ‖↑x‖\n⊢ 1 ≤ ‖normedMk S‖\n[PROOFSTEP]\nrefine (le_mul_iff_one_le_left hx).1 ?_\n[GOAL]\ncase intro\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nh : ↑(topologicalClosure S) ≠ univ\nx : M\nhx : 0 < ‖↑x‖\n⊢ ‖↑x‖ ≤ ‖normedMk S‖ * ‖↑x‖\n[PROOFSTEP]\nexact norm_lift_apply_le S.normedMk (fun x ↦ (eq_zero_iff x).2) x\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nh : ↑(topologicalClosure S) = univ\n⊢ ‖normedMk S‖ = 0\n[PROOFSTEP]\nrefine' le_antisymm (opNorm_le_bound _ le_rfl fun x => _) (norm_nonneg _)\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nh : ↑(topologicalClosure S) = univ\nx : M\n⊢ ‖↑(normedMk S) x‖ ≤ 0 * ‖x‖\n[PROOFSTEP]\nhave hker : x ∈ S.normedMk.ker.topologicalClosure :=\n by\n rw [S.ker_normedMk, ← SetLike.mem_coe, h]\n trivial\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nh : ↑(topologicalClosure S) = univ\nx : M\n⊢ x ∈ topologicalClosure (ker (normedMk S))\n[PROOFSTEP]\nrw [S.ker_normedMk, ← SetLike.mem_coe, h]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nh : ↑(topologicalClosure S) = univ\nx : M\n⊢ x ∈ univ\n[PROOFSTEP]\ntrivial\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nh : ↑(topologicalClosure S) = univ\nx : M\nhker : x ∈ topologicalClosure (ker (normedMk S))\n⊢ ‖↑(normedMk S) x‖ ≤ 0 * ‖x‖\n[PROOFSTEP]\nrw [ker_normedMk] at hker \n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nh : ↑(topologicalClosure S) = univ\nx : M\nhker : x ∈ topologicalClosure S\n⊢ ‖↑(normedMk S) x‖ ≤ 0 * ‖x‖\n[PROOFSTEP]\nsimp only [(quotient_norm_eq_zero_iff S x).mpr hker, normedMk.apply, zero_mul, le_rfl]\n[GOAL]\nM : Type u_1\nN✝ : Type u_2\ninst✝² : SeminormedAddCommGroup M\ninst✝¹ : SeminormedAddCommGroup N✝\nN : Type u_3\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nf : NormedAddGroupHom M N\nhf : ∀ (s : M), s ∈ S → ↑f s = 0\ng : NormedAddGroupHom (M ⧸ S) N\nh : NormedAddGroupHom.comp g (AddSubgroup.normedMk S) = f\n⊢ g = lift S f hf\n[PROOFSTEP]\next x\n[GOAL]\ncase H\nM : Type u_1\nN✝ : Type u_2\ninst✝² : SeminormedAddCommGroup M\ninst✝¹ : SeminormedAddCommGroup N✝\nN : Type u_3\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nf : NormedAddGroupHom M N\nhf : ∀ (s : M), s ∈ S → ↑f s = 0\ng : NormedAddGroupHom (M ⧸ S) N\nh : NormedAddGroupHom.comp g (AddSubgroup.normedMk S) = f\nx : M ⧸ S\n⊢ ↑g x = ↑(lift S f hf) x\n[PROOFSTEP]\nrcases AddSubgroup.surjective_normedMk _ x with ⟨x, rfl⟩\n[GOAL]\ncase H.intro\nM : Type u_1\nN✝ : Type u_2\ninst✝² : SeminormedAddCommGroup M\ninst✝¹ : SeminormedAddCommGroup N✝\nN : Type u_3\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nf : NormedAddGroupHom M N\nhf : ∀ (s : M), s ∈ S → ↑f s = 0\ng : NormedAddGroupHom (M ⧸ S) N\nh : NormedAddGroupHom.comp g (AddSubgroup.normedMk S) = f\nx : M\n⊢ ↑g (↑(AddSubgroup.normedMk S) x) = ↑(lift S f hf) (↑(AddSubgroup.normedMk S) x)\n[PROOFSTEP]\nchange g.comp S.normedMk x = _\n[GOAL]\ncase H.intro\nM : Type u_1\nN✝ : Type u_2\ninst✝² : SeminormedAddCommGroup M\ninst✝¹ : SeminormedAddCommGroup N✝\nN : Type u_3\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nf : NormedAddGroupHom M N\nhf : ∀ (s : M), s ∈ S → ↑f s = 0\ng : NormedAddGroupHom (M ⧸ S) N\nh : NormedAddGroupHom.comp g (AddSubgroup.normedMk S) = f\nx : M\n⊢ ↑(NormedAddGroupHom.comp g (AddSubgroup.normedMk S)) x = ↑(lift S f hf) (↑(AddSubgroup.normedMk S) x)\n[PROOFSTEP]\nsimp only [h]\n[GOAL]\ncase H.intro\nM : Type u_1\nN✝ : Type u_2\ninst✝² : SeminormedAddCommGroup M\ninst✝¹ : SeminormedAddCommGroup N✝\nN : Type u_3\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nf : NormedAddGroupHom M N\nhf : ∀ (s : M), s ∈ S → ↑f s = 0\ng : NormedAddGroupHom (M ⧸ S) N\nh : NormedAddGroupHom.comp g (AddSubgroup.normedMk S) = f\nx : M\n⊢ ↑f x = ↑(lift S f hf) (↑(AddSubgroup.normedMk S) x)\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nm : M\n⊢ ‖↑(AddSubgroup.normedMk S) m‖ = sInf ((fun m_1 => ‖m + m_1‖) '' ↑(ker (AddSubgroup.normedMk S)))\n[PROOFSTEP]\nsimpa [S.ker_normedMk] using quotient_norm_mk_eq _ m\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nf : NormedAddGroupHom M N\nhquot : IsQuotient f\nε : ℝ\nhε : 0 < ε\nn : N\n⊢ ∃ m, ↑f m = n ∧ ‖m‖ < ‖n‖ + ε\n[PROOFSTEP]\nobtain ⟨m, rfl⟩ := hquot.surjective n\n[GOAL]\ncase intro\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nf : NormedAddGroupHom M N\nhquot : IsQuotient f\nε : ℝ\nhε : 0 < ε\nm : M\n⊢ ∃ m_1, ↑f m_1 = ↑f m ∧ ‖m_1‖ < ‖↑f m‖ + ε\n[PROOFSTEP]\nhave nonemp : ((fun m' => ‖m + m'‖) '' f.ker).Nonempty :=\n by\n rw [Set.nonempty_image_iff]\n exact ⟨0, f.ker.zero_mem⟩\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nf : NormedAddGroupHom M N\nhquot : IsQuotient f\nε : ℝ\nhε : 0 < ε\nm : M\n⊢ Set.Nonempty ((fun m' => ‖m + m'‖) '' ↑(ker f))\n[PROOFSTEP]\nrw [Set.nonempty_image_iff]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nf : NormedAddGroupHom M N\nhquot : IsQuotient f\nε : ℝ\nhε : 0 < ε\nm : M\n⊢ Set.Nonempty ↑(ker f)\n[PROOFSTEP]\nexact ⟨0, f.ker.zero_mem⟩\n[GOAL]\ncase intro\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nf : NormedAddGroupHom M N\nhquot : IsQuotient f\nε : ℝ\nhε : 0 < ε\nm : M\nnonemp : Set.Nonempty ((fun m' => ‖m + m'‖) '' ↑(ker f))\n⊢ ∃ m_1, ↑f m_1 = ↑f m ∧ ‖m_1‖ < ‖↑f m‖ + ε\n[PROOFSTEP]\nrcases Real.lt_sInf_add_pos nonemp hε with\n ⟨_, ⟨⟨x, hx, rfl⟩, H : ‖m + x‖ < sInf ((fun m' : M => ‖m + m'‖) '' f.ker) + ε⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nf : NormedAddGroupHom M N\nhquot : IsQuotient f\nε : ℝ\nhε : 0 < ε\nm : M\nnonemp : Set.Nonempty ((fun m' => ‖m + m'‖) '' ↑(ker f))\nx : M\nhx : x ∈ ↑(ker f)\nH : ‖m + x‖ < sInf ((fun m' => ‖m + m'‖) '' ↑(ker f)) + ε\n⊢ ∃ m_1, ↑f m_1 = ↑f m ∧ ‖m_1‖ < ‖↑f m‖ + ε\n[PROOFSTEP]\nexact ⟨m + x, by rw [map_add, (NormedAddGroupHom.mem_ker f x).mp hx, add_zero], by rwa [hquot.norm]⟩\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nf : NormedAddGroupHom M N\nhquot : IsQuotient f\nε : ℝ\nhε : 0 < ε\nm : M\nnonemp : Set.Nonempty ((fun m' => ‖m + m'‖) '' ↑(ker f))\nx : M\nhx : x ∈ ↑(ker f)\nH : ‖m + x‖ < sInf ((fun m' => ‖m + m'‖) '' ↑(ker f)) + ε\n⊢ ↑f (m + x) = ↑f m\n[PROOFSTEP]\nrw [map_add, (NormedAddGroupHom.mem_ker f x).mp hx, add_zero]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nf : NormedAddGroupHom M N\nhquot : IsQuotient f\nε : ℝ\nhε : 0 < ε\nm : M\nnonemp : Set.Nonempty ((fun m' => ‖m + m'‖) '' ↑(ker f))\nx : M\nhx : x ∈ ↑(ker f)\nH : ‖m + x‖ < sInf ((fun m' => ‖m + m'‖) '' ↑(ker f)) + ε\n⊢ ‖m + x‖ < ‖↑f m‖ + ε\n[PROOFSTEP]\nrwa [hquot.norm]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nf : NormedAddGroupHom M N\nhquot : IsQuotient f\nm : M\n⊢ ‖↑f m‖ ≤ ‖m‖\n[PROOFSTEP]\nrw [hquot.norm]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nf : NormedAddGroupHom M N\nhquot : IsQuotient f\nm : M\n⊢ sInf ((fun m_1 => ‖m + m_1‖) '' ↑(ker f)) ≤ ‖m‖\n[PROOFSTEP]\napply csInf_le\n[GOAL]\ncase h₁\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nf : NormedAddGroupHom M N\nhquot : IsQuotient f\nm : M\n⊢ BddBelow ((fun m_1 => ‖m + m_1‖) '' ↑(ker f))\n[PROOFSTEP]\nuse 0\n[GOAL]\ncase h\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nf : NormedAddGroupHom M N\nhquot : IsQuotient f\nm : M\n⊢ 0 ∈ lowerBounds ((fun m_1 => ‖m + m_1‖) '' ↑(ker f))\n[PROOFSTEP]\nrintro _ ⟨m', -, rfl⟩\n[GOAL]\ncase h.intro.intro\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nf : NormedAddGroupHom M N\nhquot : IsQuotient f\nm m' : M\n⊢ 0 ≤ (fun m_1 => ‖m + m_1‖) m'\n[PROOFSTEP]\napply norm_nonneg\n[GOAL]\ncase h₂\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nf : NormedAddGroupHom M N\nhquot : IsQuotient f\nm : M\n⊢ ‖m‖ ∈ (fun m_1 => ‖m + m_1‖) '' ↑(ker f)\n[PROOFSTEP]\nexact ⟨0, f.ker.zero_mem, by simp⟩\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : SeminormedAddCommGroup M\ninst✝ : SeminormedAddCommGroup N\nf : NormedAddGroupHom M N\nhquot : IsQuotient f\nm : M\n⊢ (fun m_1 => ‖m + m_1‖) 0 = ‖m‖\n[PROOFSTEP]\nsimp\n[GOAL]\nM : Type u_1\nN✝ : Type u_2\ninst✝² : SeminormedAddCommGroup M\ninst✝¹ : SeminormedAddCommGroup N✝\nN : Type u_3\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nf : NormedAddGroupHom M N\nhf : ∀ (s : M), s ∈ S → ↑f s = 0\nfb : NormNoninc f\nx : M ⧸ S\n⊢ ‖↑(lift S f hf) x‖ ≤ ‖x‖\n[PROOFSTEP]\nhave fb' : ‖f‖ ≤ (1 : ℝ≥0) := NormNoninc.normNoninc_iff_norm_le_one.mp fb\n[GOAL]\nM : Type u_1\nN✝ : Type u_2\ninst✝² : SeminormedAddCommGroup M\ninst✝¹ : SeminormedAddCommGroup N✝\nN : Type u_3\ninst✝ : SeminormedAddCommGroup N\nS : AddSubgroup M\nf : NormedAddGroupHom M N\nhf : ∀ (s : M), s ∈ S → ↑f s = 0\nfb : NormNoninc f\nx : M ⧸ S\nfb' : ‖f‖ ≤ ↑1\n⊢ ‖↑(lift S f hf) x‖ ≤ ‖x‖\n[PROOFSTEP]\nsimpa using le_of_opNorm_le _ (f.lift_norm_le _ _ fb') _\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝⁷ : SeminormedAddCommGroup M\ninst✝⁶ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝⁵ : Ring R\ninst✝⁴ : Module R M\nS : Submodule R M\n𝕜 : Type u_4\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 M\ninst✝¹ : SMul 𝕜 R\ninst✝ : IsScalarTower 𝕜 R M\nsrc✝ : Module 𝕜 (M ⧸ S) := module' S\nk : 𝕜\nx : M ⧸ S\nε : ℝ\nhε : 0 < ε\n⊢ ‖k • x‖ ≤ ‖k‖ * ‖x‖ + ε\n[PROOFSTEP]\nhave :=\n (nhds_basis_ball.tendsto_iff nhds_basis_ball).mp ((@Real.uniformContinuous_const_mul ‖k‖).continuous.tendsto ‖x‖) ε hε\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝⁷ : SeminormedAddCommGroup M\ninst✝⁶ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝⁵ : Ring R\ninst✝⁴ : Module R M\nS : Submodule R M\n𝕜 : Type u_4\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 M\ninst✝¹ : SMul 𝕜 R\ninst✝ : IsScalarTower 𝕜 R M\nsrc✝ : Module 𝕜 (M ⧸ S) := module' S\nk : 𝕜\nx : M ⧸ S\nε : ℝ\nhε : 0 < ε\nthis :\n ∃ ia,\n 0 < ia ∧ ∀ (x_1 : ℝ), x_1 ∈ ball ‖x‖ ia → (fun x x_2 => x * x_2) ‖k‖ x_1 ∈ ball ((fun x x_2 => x * x_2) ‖k‖ ‖x‖) ε\n⊢ ‖k • x‖ ≤ ‖k‖ * ‖x‖ + ε\n[PROOFSTEP]\nsimp only [mem_ball, exists_prop, dist, abs_sub_lt_iff] at this \n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝⁷ : SeminormedAddCommGroup M\ninst✝⁶ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝⁵ : Ring R\ninst✝⁴ : Module R M\nS : Submodule R M\n𝕜 : Type u_4\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 M\ninst✝¹ : SMul 𝕜 R\ninst✝ : IsScalarTower 𝕜 R M\nsrc✝ : Module 𝕜 (M ⧸ S) := module' S\nk : 𝕜\nx : M ⧸ S\nε : ℝ\nhε : 0 < ε\nthis :\n ∃ ia, 0 < ia ∧ ∀ (x_1 : ℝ), x_1 - ‖x‖ < ia ∧ ‖x‖ - x_1 < ia → ‖k‖ * x_1 - ‖k‖ * ‖x‖ < ε ∧ ‖k‖ * ‖x‖ - ‖k‖ * x_1 < ε\n⊢ ‖k • x‖ ≤ ‖k‖ * ‖x‖ + ε\n[PROOFSTEP]\nrcases this with ⟨δ, hδ, h⟩\n[GOAL]\ncase intro.intro\nM : Type u_1\nN : Type u_2\ninst✝⁷ : SeminormedAddCommGroup M\ninst✝⁶ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝⁵ : Ring R\ninst✝⁴ : Module R M\nS : Submodule R M\n𝕜 : Type u_4\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 M\ninst✝¹ : SMul 𝕜 R\ninst✝ : IsScalarTower 𝕜 R M\nsrc✝ : Module 𝕜 (M ⧸ S) := module' S\nk : 𝕜\nx : M ⧸ S\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ : 0 < δ\nh : ∀ (x_1 : ℝ), x_1 - ‖x‖ < δ ∧ ‖x‖ - x_1 < δ → ‖k‖ * x_1 - ‖k‖ * ‖x‖ < ε ∧ ‖k‖ * ‖x‖ - ‖k‖ * x_1 < ε\n⊢ ‖k • x‖ ≤ ‖k‖ * ‖x‖ + ε\n[PROOFSTEP]\nobtain ⟨a, rfl, ha⟩ := Submodule.Quotient.norm_mk_lt x hδ\n[GOAL]\ncase intro.intro.intro.intro\nM : Type u_1\nN : Type u_2\ninst✝⁷ : SeminormedAddCommGroup M\ninst✝⁶ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝⁵ : Ring R\ninst✝⁴ : Module R M\nS : Submodule R M\n𝕜 : Type u_4\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 M\ninst✝¹ : SMul 𝕜 R\ninst✝ : IsScalarTower 𝕜 R M\nsrc✝ : Module 𝕜 (M ⧸ S) := module' S\nk : 𝕜\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ : 0 < δ\na : M\nh : ∀ (x : ℝ), x - ‖mk a‖ < δ ∧ ‖mk a‖ - x < δ → ‖k‖ * x - ‖k‖ * ‖mk a‖ < ε ∧ ‖k‖ * ‖mk a‖ - ‖k‖ * x < ε\nha : ‖a‖ < ‖mk a‖ + δ\n⊢ ‖k • mk a‖ ≤ ‖k‖ * ‖mk a‖ + ε\n[PROOFSTEP]\nspecialize h ‖a‖ ⟨by linarith, by linarith [Submodule.Quotient.norm_mk_le S a]⟩\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝⁷ : SeminormedAddCommGroup M\ninst✝⁶ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝⁵ : Ring R\ninst✝⁴ : Module R M\nS : Submodule R M\n𝕜 : Type u_4\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 M\ninst✝¹ : SMul 𝕜 R\ninst✝ : IsScalarTower 𝕜 R M\nsrc✝ : Module 𝕜 (M ⧸ S) := module' S\nk : 𝕜\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ : 0 < δ\na : M\nh : ∀ (x : ℝ), x - ‖mk a‖ < δ ∧ ‖mk a‖ - x < δ → ‖k‖ * x - ‖k‖ * ‖mk a‖ < ε ∧ ‖k‖ * ‖mk a‖ - ‖k‖ * x < ε\nha : ‖a‖ < ‖mk a‖ + δ\n⊢ ‖a‖ - ‖mk a‖ < δ\n[PROOFSTEP]\nlinarith\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝⁷ : SeminormedAddCommGroup M\ninst✝⁶ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝⁵ : Ring R\ninst✝⁴ : Module R M\nS : Submodule R M\n𝕜 : Type u_4\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 M\ninst✝¹ : SMul 𝕜 R\ninst✝ : IsScalarTower 𝕜 R M\nsrc✝ : Module 𝕜 (M ⧸ S) := module' S\nk : 𝕜\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ : 0 < δ\na : M\nh : ∀ (x : ℝ), x - ‖mk a‖ < δ ∧ ‖mk a‖ - x < δ → ‖k‖ * x - ‖k‖ * ‖mk a‖ < ε ∧ ‖k‖ * ‖mk a‖ - ‖k‖ * x < ε\nha : ‖a‖ < ‖mk a‖ + δ\n⊢ ‖mk a‖ - ‖a‖ < δ\n[PROOFSTEP]\nlinarith [Submodule.Quotient.norm_mk_le S a]\n[GOAL]\ncase intro.intro.intro.intro\nM : Type u_1\nN : Type u_2\ninst✝⁷ : SeminormedAddCommGroup M\ninst✝⁶ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝⁵ : Ring R\ninst✝⁴ : Module R M\nS : Submodule R M\n𝕜 : Type u_4\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 M\ninst✝¹ : SMul 𝕜 R\ninst✝ : IsScalarTower 𝕜 R M\nsrc✝ : Module 𝕜 (M ⧸ S) := module' S\nk : 𝕜\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ : 0 < δ\na : M\nha : ‖a‖ < ‖mk a‖ + δ\nh : ‖k‖ * ‖a‖ - ‖k‖ * ‖mk a‖ < ε ∧ ‖k‖ * ‖mk a‖ - ‖k‖ * ‖a‖ < ε\n⊢ ‖k • mk a‖ ≤ ‖k‖ * ‖mk a‖ + ε\n[PROOFSTEP]\ncalc\n _ ≤ ‖k‖ * ‖a‖ := (quotient_norm_mk_le S.toAddSubgroup (k • a)).trans_eq (norm_smul k a)\n _ ≤ _ := (sub_lt_iff_lt_add'.mp h.1).le\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝² : SeminormedAddCommGroup M\ninst✝¹ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝ : SeminormedCommRing R\nI : Ideal R\nx y : R ⧸ I\nε : ℝ\nhε : 0 < ε\n⊢ ‖x * y‖ ≤ ‖x‖ * ‖y‖ + ε\n[PROOFSTEP]\nhave :=\n ((nhds_basis_ball.prod_nhds nhds_basis_ball).tendsto_iff nhds_basis_ball).mp (continuous_mul.tendsto (‖x‖, ‖y‖)) ε hε\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝² : SeminormedAddCommGroup M\ninst✝¹ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝ : SeminormedCommRing R\nI : Ideal R\nx y : R ⧸ I\nε : ℝ\nhε : 0 < ε\nthis :\n ∃ ia,\n (0 < ia.fst ∧ 0 < ia.snd) ∧\n ∀ (x_1 : ℝ × ℝ),\n x_1 ∈ ball ‖x‖ ia.fst ×ˢ ball ‖y‖ ia.snd → x_1.fst * x_1.snd ∈ ball ((‖x‖, ‖y‖).fst * (‖x‖, ‖y‖).snd) ε\n⊢ ‖x * y‖ ≤ ‖x‖ * ‖y‖ + ε\n[PROOFSTEP]\nsimp only [Set.mem_prod, mem_ball, and_imp, Prod.forall, exists_prop, Prod.exists] at this \n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝² : SeminormedAddCommGroup M\ninst✝¹ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝ : SeminormedCommRing R\nI : Ideal R\nx y : R ⧸ I\nε : ℝ\nhε : 0 < ε\nthis : ∃ a b, (0 < a ∧ 0 < b) ∧ ∀ (a_1 b_1 : ℝ), dist a_1 ‖x‖ < a → dist b_1 ‖y‖ < b → dist (a_1 * b_1) (‖x‖ * ‖y‖) < ε\n⊢ ‖x * y‖ ≤ ‖x‖ * ‖y‖ + ε\n[PROOFSTEP]\nrcases this with ⟨ε₁, ε₂, ⟨h₁, h₂⟩, h⟩\n[GOAL]\ncase intro.intro.intro.intro\nM : Type u_1\nN : Type u_2\ninst✝² : SeminormedAddCommGroup M\ninst✝¹ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝ : SeminormedCommRing R\nI : Ideal R\nx y : R ⧸ I\nε : ℝ\nhε : 0 < ε\nε₁ ε₂ : ℝ\nh : ∀ (a b : ℝ), dist a ‖x‖ < ε₁ → dist b ‖y‖ < ε₂ → dist (a * b) (‖x‖ * ‖y‖) < ε\nh₁ : 0 < ε₁\nh₂ : 0 < ε₂\n⊢ ‖x * y‖ ≤ ‖x‖ * ‖y‖ + ε\n[PROOFSTEP]\nobtain ⟨⟨a, rfl, ha⟩, ⟨b, rfl, hb⟩⟩ := Ideal.Quotient.norm_mk_lt x h₁, Ideal.Quotient.norm_mk_lt y h₂\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nM : Type u_1\nN : Type u_2\ninst✝² : SeminormedAddCommGroup M\ninst✝¹ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝ : SeminormedCommRing R\nI : Ideal R\nε : ℝ\nhε : 0 < ε\nε₁ ε₂ : ℝ\nh₁ : 0 < ε₁\nh₂ : 0 < ε₂\na : R\nha : ‖a‖ < ‖↑(mk I) a‖ + ε₁\nb : R\nh :\n ∀ (a_1 b_1 : ℝ),\n dist a_1 ‖↑(mk I) a‖ < ε₁ → dist b_1 ‖↑(mk I) b‖ < ε₂ → dist (a_1 * b_1) (‖↑(mk I) a‖ * ‖↑(mk I) b‖) < ε\nhb : ‖b‖ < ‖↑(mk I) b‖ + ε₂\n⊢ ‖↑(mk I) a * ↑(mk I) b‖ ≤ ‖↑(mk I) a‖ * ‖↑(mk I) b‖ + ε\n[PROOFSTEP]\nsimp only [dist, abs_sub_lt_iff] at h \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nM : Type u_1\nN : Type u_2\ninst✝² : SeminormedAddCommGroup M\ninst✝¹ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝ : SeminormedCommRing R\nI : Ideal R\nε : ℝ\nhε : 0 < ε\nε₁ ε₂ : ℝ\nh₁ : 0 < ε₁\nh₂ : 0 < ε₂\na : R\nha : ‖a‖ < ‖↑(mk I) a‖ + ε₁\nb : R\nhb : ‖b‖ < ‖↑(mk I) b‖ + ε₂\nh :\n ∀ (a_1 b_1 : ℝ),\n a_1 - ‖↑(mk I) a‖ < ε₁ ∧ ‖↑(mk I) a‖ - a_1 < ε₁ →\n b_1 - ‖↑(mk I) b‖ < ε₂ ∧ ‖↑(mk I) b‖ - b_1 < ε₂ →\n a_1 * b_1 - ‖↑(mk I) a‖ * ‖↑(mk I) b‖ < ε ∧ ‖↑(mk I) a‖ * ‖↑(mk I) b‖ - a_1 * b_1 < ε\n⊢ ‖↑(mk I) a * ↑(mk I) b‖ ≤ ‖↑(mk I) a‖ * ‖↑(mk I) b‖ + ε\n[PROOFSTEP]\nspecialize\n h ‖a‖ ‖b‖ ⟨by linarith, by linarith [Ideal.Quotient.norm_mk_le I a]⟩\n ⟨by linarith, by linarith [Ideal.Quotient.norm_mk_le I b]⟩\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝² : SeminormedAddCommGroup M\ninst✝¹ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝ : SeminormedCommRing R\nI : Ideal R\nε : ℝ\nhε : 0 < ε\nε₁ ε₂ : ℝ\nh₁ : 0 < ε₁\nh₂ : 0 < ε₂\na : R\nha : ‖a‖ < ‖↑(mk I) a‖ + ε₁\nb : R\nhb : ‖b‖ < ‖↑(mk I) b‖ + ε₂\nh :\n ∀ (a_1 b_1 : ℝ),\n a_1 - ‖↑(mk I) a‖ < ε₁ ∧ ‖↑(mk I) a‖ - a_1 < ε₁ →\n b_1 - ‖↑(mk I) b‖ < ε₂ ∧ ‖↑(mk I) b‖ - b_1 < ε₂ →\n a_1 * b_1 - ‖↑(mk I) a‖ * ‖↑(mk I) b‖ < ε ∧ ‖↑(mk I) a‖ * ‖↑(mk I) b‖ - a_1 * b_1 < ε\n⊢ ‖a‖ - ‖↑(mk I) a‖ < ε₁\n[PROOFSTEP]\nlinarith\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝² : SeminormedAddCommGroup M\ninst✝¹ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝ : SeminormedCommRing R\nI : Ideal R\nε : ℝ\nhε : 0 < ε\nε₁ ε₂ : ℝ\nh₁ : 0 < ε₁\nh₂ : 0 < ε₂\na : R\nha : ‖a‖ < ‖↑(mk I) a‖ + ε₁\nb : R\nhb : ‖b‖ < ‖↑(mk I) b‖ + ε₂\nh :\n ∀ (a_1 b_1 : ℝ),\n a_1 - ‖↑(mk I) a‖ < ε₁ ∧ ‖↑(mk I) a‖ - a_1 < ε₁ →\n b_1 - ‖↑(mk I) b‖ < ε₂ ∧ ‖↑(mk I) b‖ - b_1 < ε₂ →\n a_1 * b_1 - ‖↑(mk I) a‖ * ‖↑(mk I) b‖ < ε ∧ ‖↑(mk I) a‖ * ‖↑(mk I) b‖ - a_1 * b_1 < ε\n⊢ ‖↑(mk I) a‖ - ‖a‖ < ε₁\n[PROOFSTEP]\nlinarith [Ideal.Quotient.norm_mk_le I a]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝² : SeminormedAddCommGroup M\ninst✝¹ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝ : SeminormedCommRing R\nI : Ideal R\nε : ℝ\nhε : 0 < ε\nε₁ ε₂ : ℝ\nh₁ : 0 < ε₁\nh₂ : 0 < ε₂\na : R\nha : ‖a‖ < ‖↑(mk I) a‖ + ε₁\nb : R\nhb : ‖b‖ < ‖↑(mk I) b‖ + ε₂\nh :\n ∀ (a_1 b_1 : ℝ),\n a_1 - ‖↑(mk I) a‖ < ε₁ ∧ ‖↑(mk I) a‖ - a_1 < ε₁ →\n b_1 - ‖↑(mk I) b‖ < ε₂ ∧ ‖↑(mk I) b‖ - b_1 < ε₂ →\n a_1 * b_1 - ‖↑(mk I) a‖ * ‖↑(mk I) b‖ < ε ∧ ‖↑(mk I) a‖ * ‖↑(mk I) b‖ - a_1 * b_1 < ε\n⊢ ‖b‖ - ‖↑(mk I) b‖ < ε₂\n[PROOFSTEP]\nlinarith\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝² : SeminormedAddCommGroup M\ninst✝¹ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝ : SeminormedCommRing R\nI : Ideal R\nε : ℝ\nhε : 0 < ε\nε₁ ε₂ : ℝ\nh₁ : 0 < ε₁\nh₂ : 0 < ε₂\na : R\nha : ‖a‖ < ‖↑(mk I) a‖ + ε₁\nb : R\nhb : ‖b‖ < ‖↑(mk I) b‖ + ε₂\nh :\n ∀ (a_1 b_1 : ℝ),\n a_1 - ‖↑(mk I) a‖ < ε₁ ∧ ‖↑(mk I) a‖ - a_1 < ε₁ →\n b_1 - ‖↑(mk I) b‖ < ε₂ ∧ ‖↑(mk I) b‖ - b_1 < ε₂ →\n a_1 * b_1 - ‖↑(mk I) a‖ * ‖↑(mk I) b‖ < ε ∧ ‖↑(mk I) a‖ * ‖↑(mk I) b‖ - a_1 * b_1 < ε\n⊢ ‖↑(mk I) b‖ - ‖b‖ < ε₂\n[PROOFSTEP]\nlinarith [Ideal.Quotient.norm_mk_le I b]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nM : Type u_1\nN : Type u_2\ninst✝² : SeminormedAddCommGroup M\ninst✝¹ : SeminormedAddCommGroup N\nR : Type u_3\ninst✝ : SeminormedCommRing R\nI : Ideal R\nε : ℝ\nhε : 0 < ε\nε₁ ε₂ : ℝ\nh₁ : 0 < ε₁\nh₂ : 0 < ε₂\na : R\nha : ‖a‖ < ‖↑(mk I) a‖ + ε₁\nb : R\nhb : ‖b‖ < ‖↑(mk I) b‖ + ε₂\nh : ‖a‖ * ‖b‖ - ‖↑(mk I) a‖ * ‖↑(mk I) b‖ < ε ∧ ‖↑(mk I) a‖ * ‖↑(mk I) b‖ - ‖a‖ * ‖b‖ < ε\n⊢ ‖↑(mk I) a * ↑(mk I) b‖ ≤ ‖↑(mk I) a‖ * ‖↑(mk I) b‖ + ε\n[PROOFSTEP]\ncalc\n _ ≤ ‖a‖ * ‖b‖ := (Ideal.Quotient.norm_mk_le I (a * b)).trans (norm_mul_le a b)\n _ ≤ _ := (sub_lt_iff_lt_add'.mp h.1).le\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Normed.Group.Quotient", "llama_tokens": 20079, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7431680086124811, "lm_q2_score": 0.7461389930307512, "lm_q1q2_score": 0.5545066295987853}} {"text": "[GOAL]\nr : ℝ\nhr : 0 ≤ r\n⊢ Real.toNNReal r = { val := r, property := hr }\n[PROOFSTEP]\nsimp_rw [Real.toNNReal, max_eq_left hr]\n[GOAL]\n⊢ Zero ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ One ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ Add ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ Sub ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ Mul ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ Inv ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ Div ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ LE ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ Bot ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ Inhabited ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ Nontrivial ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nr₁ r₂ : ℝ≥0\nh : r₂ ≤ r₁\n⊢ ↑r₂ ≤ ↑r₁ - 0\n[PROOFSTEP]\nsimp [show (r₂ : ℝ) ≤ r₁ from h]\n[GOAL]\nr : ℝ≥0\n⊢ ↑r = 0 ↔ r = 0\n[PROOFSTEP]\nrw [← NNReal.coe_zero, NNReal.coe_eq]\n[GOAL]\nr : ℝ≥0\n⊢ ↑r = 1 ↔ r = 1\n[PROOFSTEP]\nrw [← NNReal.coe_one, NNReal.coe_eq]\n[GOAL]\n⊢ CommSemiring ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra ℝ A\nr : ℝ≥0\nx : (fun x => A) r\n⊢ ↑(RingHom.comp (algebraMap ℝ A) toRealHom) r * x = x * ↑(RingHom.comp (algebraMap ℝ A) toRealHom) r\n[PROOFSTEP]\nsimp [Algebra.commutes]\n[GOAL]\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra ℝ A\nr : ℝ≥0\nx : (fun x => A) r\n⊢ r • x = ↑(RingHom.comp (algebraMap ℝ A) toRealHom) r * x\n[PROOFSTEP]\nsimp [← Algebra.smul_def (r : ℝ) x, smul_def]\n[GOAL]\n⊢ Algebra ℝ≥0 ℝ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ DistribMulAction ℝ≥0ˣ ℝ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ MonoidWithZero ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ CommMonoidWithZero ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ CommGroupWithZero ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\ns : Finset α\nf : α → ℝ\nhf : ∀ (a : α), a ∈ s → 0 ≤ f a\n⊢ Real.toNNReal (∑ a in s, f a) = ∑ a in s, Real.toNNReal (f a)\n[PROOFSTEP]\nrw [← NNReal.coe_eq, NNReal.coe_sum, Real.coe_toNNReal _ (Finset.sum_nonneg hf)]\n[GOAL]\nα : Type u_1\ns : Finset α\nf : α → ℝ\nhf : ∀ (a : α), a ∈ s → 0 ≤ f a\n⊢ ∑ i in s, f i = ∑ a in s, ↑(Real.toNNReal (f a))\n[PROOFSTEP]\nexact Finset.sum_congr rfl fun x hxs => by rw [Real.coe_toNNReal _ (hf x hxs)]\n[GOAL]\nα : Type u_1\ns : Finset α\nf : α → ℝ\nhf : ∀ (a : α), a ∈ s → 0 ≤ f a\nx : α\nhxs : x ∈ s\n⊢ f x = ↑(Real.toNNReal (f x))\n[PROOFSTEP]\nrw [Real.coe_toNNReal _ (hf x hxs)]\n[GOAL]\nα : Type u_1\ns : Finset α\nf : α → ℝ\nhf : ∀ (a : α), a ∈ s → 0 ≤ f a\n⊢ Real.toNNReal (∏ a in s, f a) = ∏ a in s, Real.toNNReal (f a)\n[PROOFSTEP]\nrw [← NNReal.coe_eq, NNReal.coe_prod, Real.coe_toNNReal _ (Finset.prod_nonneg hf)]\n[GOAL]\nα : Type u_1\ns : Finset α\nf : α → ℝ\nhf : ∀ (a : α), a ∈ s → 0 ≤ f a\n⊢ ∏ i in s, f i = ∏ a in s, ↑(Real.toNNReal (f a))\n[PROOFSTEP]\nexact Finset.prod_congr rfl fun x hxs => by rw [Real.coe_toNNReal _ (hf x hxs)]\n[GOAL]\nα : Type u_1\ns : Finset α\nf : α → ℝ\nhf : ∀ (a : α), a ∈ s → 0 ≤ f a\nx : α\nhxs : x ∈ s\n⊢ f x = ↑(Real.toNNReal (f x))\n[PROOFSTEP]\nrw [Real.coe_toNNReal _ (hf x hxs)]\n[GOAL]\n⊢ LinearOrder ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nn : ℕ\n⊢ ↑(Real.toNNReal ↑n) = ↑↑n\n[PROOFSTEP]\nsimp [Real.coe_toNNReal]\n[GOAL]\n⊢ OrderBot ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ PartialOrder ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ CanonicallyLinearOrderedAddMonoid ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ LinearOrderedAddCommMonoid ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ DistribLattice ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ SemilatticeInf ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ SemilatticeSup ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ LinearOrderedSemiring ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ OrderedCommSemiring ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ LinearOrderedCommMonoid ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ LinearOrderedCommMonoidWithZero ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ LinearOrderedCommGroupWithZero ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ CanonicallyOrderedCommSemiring ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ DenselyOrdered ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ NoMaxOrder ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nι : Sort u_1\ns : ι → ℝ≥0\n⊢ ↑(⨆ (i : ι), s i) = ⨆ (i : ι), ↑(s i)\n[PROOFSTEP]\nrw [iSup, iSup, coe_sSup, ← Set.range_comp]\n[GOAL]\nι : Sort u_1\ns : ι → ℝ≥0\n⊢ sSup (Set.range (toReal ∘ fun i => s i)) = sSup (Set.range fun i => ↑(s i))\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ sInf ∅ = 0\n[PROOFSTEP]\nrw [← NNReal.coe_eq_zero, coe_sInf, Set.image_empty, Real.sInf_empty]\n[GOAL]\nι : Sort u_1\ns : ι → ℝ≥0\n⊢ ↑(⨅ (i : ι), s i) = ⨅ (i : ι), ↑(s i)\n[PROOFSTEP]\nrw [iInf, iInf, coe_sInf, ← Set.range_comp]\n[GOAL]\nι : Sort u_1\ns : ι → ℝ≥0\n⊢ sInf (Set.range (toReal ∘ fun i => s i)) = sInf (Set.range fun i => ↑(s i))\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Sort u_1\nι' : Sort u_2\ninst✝¹ : Nonempty ι\ninst✝ : Nonempty ι'\nf : ι → ℝ≥0\ng : ι' → ℝ≥0\na : ℝ≥0\nh : ∀ (i : ι) (j : ι'), a ≤ f i + g j\n⊢ a ≤ (⨅ (i : ι), f i) + ⨅ (j : ι'), g j\n[PROOFSTEP]\nrw [← NNReal.coe_le_coe, NNReal.coe_add, coe_iInf, coe_iInf]\n[GOAL]\nι : Sort u_1\nι' : Sort u_2\ninst✝¹ : Nonempty ι\ninst✝ : Nonempty ι'\nf : ι → ℝ≥0\ng : ι' → ℝ≥0\na : ℝ≥0\nh : ∀ (i : ι) (j : ι'), a ≤ f i + g j\n⊢ ↑a ≤ (⨅ (i : ι), ↑(f i)) + ⨅ (i : ι'), ↑(g i)\n[PROOFSTEP]\nexact le_ciInf_add_ciInf h\n[GOAL]\n⊢ Archimedean ℝ≥0\n[PROOFSTEP]\ninfer_instance\n -- porting note: TODO: remove?\n[GOAL]\na b : ℝ≥0\nh : ↑a < ↑b\nq : ℚ\nhaq : ↑a < ↑q\nhqb : ↑q < ↑b\nthis : 0 ≤ ↑q\n⊢ a < Real.toNNReal ↑q ∧ Real.toNNReal ↑q < b\n[PROOFSTEP]\nsimp [Real.coe_toNNReal _ this, NNReal.coe_lt_coe.symm, haq, hqb]\n[GOAL]\nα : Type u_1\nf : α → ℝ≥0\ns : Finset α\nr : ℝ≥0\n⊢ Finset.sup s f / r = Finset.sup s fun a => f a / r\n[PROOFSTEP]\nsimp only [div_eq_inv_mul, mul_finset_sup]\n[GOAL]\nr : ℝ\n⊢ 0 < toNNReal r ↔ 0 < r\n[PROOFSTEP]\nsimp [← NNReal.coe_lt_coe, lt_irrefl]\n[GOAL]\nr : ℝ\n⊢ toNNReal r = 0 ↔ r ≤ 0\n[PROOFSTEP]\nsimpa [-toNNReal_pos] using not_iff_not.2 (@toNNReal_pos r)\n[GOAL]\nr p : ℝ\nhp : 0 ≤ p\n⊢ toNNReal r ≤ toNNReal p ↔ r ≤ p\n[PROOFSTEP]\nsimp [← NNReal.coe_le_coe, hp]\n[GOAL]\nr p : ℝ\nhr : 0 ≤ r\nhp : 0 ≤ p\n⊢ toNNReal r = toNNReal p ↔ r = p\n[PROOFSTEP]\nsimp [← NNReal.coe_eq, coe_toNNReal, hr, hp]\n[GOAL]\nr p : ℝ\nhr : 0 ≤ r\nhp : 0 ≤ p\n⊢ ↑(toNNReal (r + p)) = ↑(toNNReal r + toNNReal p)\n[PROOFSTEP]\nsimp [hr, hp, add_nonneg]\n[GOAL]\nr : ℝ≥0\np : ℝ\nhp : 0 ≤ p\n⊢ r ≤ toNNReal p ↔ ↑r ≤ p\n[PROOFSTEP]\nrw [← NNReal.coe_le_coe, Real.coe_toNNReal p hp]\n[GOAL]\nr : ℝ≥0\np : ℝ\nhr : 0 < r\nhp : p < 0\n⊢ r ≤ toNNReal p ↔ ↑r ≤ p\n[PROOFSTEP]\nsimp only [(hp.trans_le r.coe_nonneg).not_le, toNNReal_eq_zero.2 hp.le, hr.not_le]\n[GOAL]\nr : ℝ\np : ℝ≥0\nha : 0 ≤ r\n⊢ toNNReal r < p ↔ r < ↑p\n[PROOFSTEP]\nrw [← NNReal.coe_lt_coe, Real.coe_toNNReal r ha]\n[GOAL]\nx : ℝ\nhx : 0 ≤ x\nn : ℕ\n⊢ toNNReal (x ^ n) = toNNReal x ^ n\n[PROOFSTEP]\nrw [← NNReal.coe_eq, NNReal.coe_pow, Real.coe_toNNReal _ (pow_nonneg hx _), Real.coe_toNNReal x hx]\n[GOAL]\np q : ℝ\nhp : 0 ≤ p\n⊢ ↑(toNNReal (p * q)) = ↑(toNNReal p * toNNReal q)\n[PROOFSTEP]\nsimp [mul_max_of_nonneg, hp]\n[GOAL]\na b c : ℝ≥0\nh : a ≠ 0\n⊢ a * b = a * c ↔ b = c\n[PROOFSTEP]\nrw [mul_eq_mul_left_iff, or_iff_left h]\n[GOAL]\na b : ℝ≥0\nha : 0 < a\nhb : b < 1\n⊢ ∃ n, b ^ n < a\n[PROOFSTEP]\nsimpa only [← coe_pow, NNReal.coe_lt_coe] using exists_pow_lt_of_lt_one (NNReal.coe_pos.2 ha) (NNReal.coe_lt_coe.2 hb)\n[GOAL]\n⊢ OrderedSub ℝ≥0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nr p : ℝ≥0\nh : r ≠ 0\n⊢ r⁻¹ ≤ p ↔ 1 ≤ r * p\n[PROOFSTEP]\nrw [← mul_le_mul_left (pos_iff_ne_zero.2 h), mul_inv_cancel h]\n[GOAL]\nr p : ℝ≥0\nh : 1 ≤ r * p\n⊢ r⁻¹ ≤ p\n[PROOFSTEP]\nby_cases r = 0\n[GOAL]\nr p : ℝ≥0\nh : 1 ≤ r * p\n⊢ r⁻¹ ≤ p\n[PROOFSTEP]\nby_cases r = 0\n[GOAL]\ncase pos\nr p : ℝ≥0\nh✝ : 1 ≤ r * p\nh : r = 0\n⊢ r⁻¹ ≤ p\n[PROOFSTEP]\nsimp [*, inv_le]\n[GOAL]\ncase neg\nr p : ℝ≥0\nh✝ : 1 ≤ r * p\nh : ¬r = 0\n⊢ r⁻¹ ≤ p\n[PROOFSTEP]\nsimp [*, inv_le]\n[GOAL]\nr p : ℝ≥0\nh : p ≠ 0\n⊢ r ≤ p⁻¹ ↔ r * p ≤ 1\n[PROOFSTEP]\nrw [← mul_le_mul_left (pos_iff_ne_zero.2 h), mul_inv_cancel h, mul_comm]\n[GOAL]\nr p : ℝ≥0\nh : p ≠ 0\n⊢ r < p⁻¹ ↔ r * p < 1\n[PROOFSTEP]\nrw [← mul_lt_mul_left (pos_iff_ne_zero.2 h), mul_inv_cancel h, mul_comm]\n[GOAL]\na b r : ℝ≥0\nhr : r ≠ 0\n⊢ r * a ≤ b ↔ a ≤ r⁻¹ * b\n[PROOFSTEP]\nhave : 0 < r := lt_of_le_of_ne (zero_le r) hr.symm\n[GOAL]\na b r : ℝ≥0\nhr : r ≠ 0\nthis : 0 < r\n⊢ r * a ≤ b ↔ a ≤ r⁻¹ * b\n[PROOFSTEP]\nrw [← mul_le_mul_left (inv_pos.mpr this), ← mul_assoc, inv_mul_cancel hr, one_mul]\n[GOAL]\na b c : ℝ≥0\nh : a ≤ b * c\nh0 : c = 0\n⊢ a / c ≤ b\n[PROOFSTEP]\nsimp [h0]\n[GOAL]\na b r : ℝ≥0\nh : a < b / r\nhr : r = 0\n⊢ False\n[PROOFSTEP]\nsimp [hr] at h \n[GOAL]\nx y : ℝ≥0\nh : ∀ (a : ℝ≥0), a < 1 → a * x ≤ y\na : ℝ≥0\nha : a < x\n⊢ a ≤ y\n[PROOFSTEP]\nhave hx : x ≠ 0 := pos_iff_ne_zero.1 (lt_of_le_of_lt (zero_le _) ha)\n[GOAL]\nx y : ℝ≥0\nh : ∀ (a : ℝ≥0), a < 1 → a * x ≤ y\na : ℝ≥0\nha : a < x\nhx : x ≠ 0\n⊢ a ≤ y\n[PROOFSTEP]\nhave hx' : x⁻¹ ≠ 0 := by rwa [Ne.def, inv_eq_zero]\n[GOAL]\nx y : ℝ≥0\nh : ∀ (a : ℝ≥0), a < 1 → a * x ≤ y\na : ℝ≥0\nha : a < x\nhx : x ≠ 0\n⊢ x⁻¹ ≠ 0\n[PROOFSTEP]\nrwa [Ne.def, inv_eq_zero]\n[GOAL]\nx y : ℝ≥0\nh : ∀ (a : ℝ≥0), a < 1 → a * x ≤ y\na : ℝ≥0\nha : a < x\nhx : x ≠ 0\nhx' : x⁻¹ ≠ 0\n⊢ a ≤ y\n[PROOFSTEP]\nhave : a * x⁻¹ < 1 := by rwa [← lt_inv_iff_mul_lt hx', inv_inv]\n[GOAL]\nx y : ℝ≥0\nh : ∀ (a : ℝ≥0), a < 1 → a * x ≤ y\na : ℝ≥0\nha : a < x\nhx : x ≠ 0\nhx' : x⁻¹ ≠ 0\n⊢ a * x⁻¹ < 1\n[PROOFSTEP]\nrwa [← lt_inv_iff_mul_lt hx', inv_inv]\n[GOAL]\nx y : ℝ≥0\nh : ∀ (a : ℝ≥0), a < 1 → a * x ≤ y\na : ℝ≥0\nha : a < x\nhx : x ≠ 0\nhx' : x⁻¹ ≠ 0\nthis : a * x⁻¹ < 1\n⊢ a ≤ y\n[PROOFSTEP]\nhave : a * x⁻¹ * x ≤ y := h _ this\n[GOAL]\nx y : ℝ≥0\nh : ∀ (a : ℝ≥0), a < 1 → a * x ≤ y\na : ℝ≥0\nha : a < x\nhx : x ≠ 0\nhx' : x⁻¹ ≠ 0\nthis✝ : a * x⁻¹ < 1\nthis : a * x⁻¹ * x ≤ y\n⊢ a ≤ y\n[PROOFSTEP]\nrwa [mul_assoc, inv_mul_cancel hx, mul_one] at this \n[GOAL]\na b : ℝ≥0\nh : a < b\n⊢ a / b < 1\n[PROOFSTEP]\nrwa [div_lt_iff, one_mul]\n[GOAL]\na b : ℝ≥0\nh : a < b\n⊢ b ≠ 0\n[PROOFSTEP]\nexact ne_of_gt (lt_of_le_of_lt (zero_le _) h)\n[GOAL]\nx : ℝ\n⊢ toNNReal x⁻¹ = (toNNReal x)⁻¹\n[PROOFSTEP]\ncases' le_total 0 x with hx hx\n[GOAL]\ncase inl\nx : ℝ\nhx : 0 ≤ x\n⊢ toNNReal x⁻¹ = (toNNReal x)⁻¹\n[PROOFSTEP]\nnth_rw 1 [← Real.coe_toNNReal x hx]\n[GOAL]\ncase inl\nx : ℝ\nhx : 0 ≤ x\n⊢ toNNReal (↑(toNNReal x))⁻¹ = (toNNReal x)⁻¹\n[PROOFSTEP]\nrw [← NNReal.coe_inv, Real.toNNReal_coe]\n[GOAL]\ncase inr\nx : ℝ\nhx : x ≤ 0\n⊢ toNNReal x⁻¹ = (toNNReal x)⁻¹\n[PROOFSTEP]\nrw [toNNReal_eq_zero.mpr hx, inv_zero, toNNReal_eq_zero.mpr (inv_nonpos.mpr hx)]\n[GOAL]\nx y : ℝ\nhx : 0 ≤ x\n⊢ toNNReal (x / y) = toNNReal x / toNNReal y\n[PROOFSTEP]\nrw [div_eq_mul_inv, div_eq_mul_inv, ← Real.toNNReal_inv, ← Real.toNNReal_mul hx]\n[GOAL]\nx y : ℝ\nhy : 0 ≤ y\n⊢ toNNReal (x / y) = toNNReal x / toNNReal y\n[PROOFSTEP]\nrw [div_eq_inv_mul, div_eq_inv_mul, Real.toNNReal_mul (inv_nonneg.2 hy), Real.toNNReal_inv]\n[GOAL]\nx : ℝ≥0\nhx : x ≠ 0\n⊢ x⁻¹ < 1 ↔ 1 < x\n[PROOFSTEP]\nrw [← one_div, div_lt_iff hx, one_mul]\n[GOAL]\nι : Sort u_1\nf : ι → ℝ≥0\ns : Set ℝ≥0\nhs : ¬BddAbove s\n⊢ sSup s = 0\n[PROOFSTEP]\nrw [← bddAbove_coe] at hs \n[GOAL]\nι : Sort u_1\nf : ι → ℝ≥0\ns : Set ℝ≥0\nhs : ¬BddAbove (toReal '' s)\n⊢ sSup s = 0\n[PROOFSTEP]\nrw [← NNReal.coe_eq, coe_sSup, NNReal.coe_zero]\n[GOAL]\nι : Sort u_1\nf : ι → ℝ≥0\ns : Set ℝ≥0\nhs : ¬BddAbove (toReal '' s)\n⊢ sSup (toReal '' s) = 0\n[PROOFSTEP]\nexact sSup_of_not_bddAbove hs\n[GOAL]\nι : Sort u_1\nf✝ : ι → ℝ≥0\ninst✝ : IsEmpty ι\nf : ι → ℝ≥0\n⊢ ⨅ (i : ι), f i = 0\n[PROOFSTEP]\nrw [iInf_of_empty', sInf_empty]\n[GOAL]\nι : Sort u_1\nf : ι → ℝ≥0\nα : Sort u_2\n⊢ ⨅ (x : α), 0 = 0\n[PROOFSTEP]\nrw [← NNReal.coe_eq, coe_iInf]\n[GOAL]\nι : Sort u_1\nf : ι → ℝ≥0\nα : Sort u_2\n⊢ ⨅ (i : α), ↑0 = ↑0\n[PROOFSTEP]\nexact Real.ciInf_const_zero\n[GOAL]\nι : Sort u_1\nf✝ f : ι → ℝ≥0\na : ℝ≥0\n⊢ iInf f * a = ⨅ (i : ι), f i * a\n[PROOFSTEP]\nrw [← NNReal.coe_eq, NNReal.coe_mul, coe_iInf, coe_iInf]\n[GOAL]\nι : Sort u_1\nf✝ f : ι → ℝ≥0\na : ℝ≥0\n⊢ (⨅ (i : ι), ↑(f i)) * ↑a = ⨅ (i : ι), ↑(f i * a)\n[PROOFSTEP]\nexact Real.iInf_mul_of_nonneg (NNReal.coe_nonneg _) _\n[GOAL]\nι : Sort u_1\nf✝ f : ι → ℝ≥0\na : ℝ≥0\n⊢ a * iInf f = ⨅ (i : ι), a * f i\n[PROOFSTEP]\nsimpa only [mul_comm] using iInf_mul f a\n[GOAL]\nι : Sort u_1\nf✝ f : ι → ℝ≥0\na : ℝ≥0\n⊢ a * ⨆ (i : ι), f i = ⨆ (i : ι), a * f i\n[PROOFSTEP]\nrw [← NNReal.coe_eq, NNReal.coe_mul, NNReal.coe_iSup, NNReal.coe_iSup]\n[GOAL]\nι : Sort u_1\nf✝ f : ι → ℝ≥0\na : ℝ≥0\n⊢ ↑a * ⨆ (i : ι), ↑(f i) = ⨆ (i : ι), ↑(a * f i)\n[PROOFSTEP]\nexact Real.mul_iSup_of_nonneg (NNReal.coe_nonneg _) _\n[GOAL]\nι : Sort u_1\nf✝ f : ι → ℝ≥0\na : ℝ≥0\n⊢ (⨆ (i : ι), f i) * a = ⨆ (i : ι), f i * a\n[PROOFSTEP]\nrw [mul_comm, mul_iSup]\n[GOAL]\nι : Sort u_1\nf✝ f : ι → ℝ≥0\na : ℝ≥0\n⊢ ⨆ (i : ι), a * f i = ⨆ (i : ι), f i * a\n[PROOFSTEP]\nsimp_rw [mul_comm]\n[GOAL]\nι : Sort u_1\nf✝ f : ι → ℝ≥0\na : ℝ≥0\n⊢ (⨆ (i : ι), f i) / a = ⨆ (i : ι), f i / a\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, iSup_mul]\n[GOAL]\nι : Sort u_1\nf : ι → ℝ≥0\na g : ℝ≥0\nh : ι → ℝ≥0\nH : ∀ (j : ι), g * h j ≤ a\n⊢ g * iSup h ≤ a\n[PROOFSTEP]\nrw [mul_iSup]\n[GOAL]\nι : Sort u_1\nf : ι → ℝ≥0\na g : ℝ≥0\nh : ι → ℝ≥0\nH : ∀ (j : ι), g * h j ≤ a\n⊢ ⨆ (i : ι), g * h i ≤ a\n[PROOFSTEP]\nexact ciSup_le' H\n[GOAL]\nι : Sort u_1\nf : ι → ℝ≥0\na : ℝ≥0\ng : ι → ℝ≥0\nh : ℝ≥0\nH : ∀ (i : ι), g i * h ≤ a\n⊢ iSup g * h ≤ a\n[PROOFSTEP]\nrw [iSup_mul]\n[GOAL]\nι : Sort u_1\nf : ι → ℝ≥0\na : ℝ≥0\ng : ι → ℝ≥0\nh : ℝ≥0\nH : ∀ (i : ι), g i * h ≤ a\n⊢ ⨆ (i : ι), g i * h ≤ a\n[PROOFSTEP]\nexact ciSup_le' H\n[GOAL]\nι : Sort u_1\nf : ι → ℝ≥0\ninst✝ : Nonempty ι\na g : ℝ≥0\nh : ι → ℝ≥0\nH : ∀ (j : ι), a ≤ g * h j\n⊢ a ≤ g * iInf h\n[PROOFSTEP]\nrw [mul_iInf]\n[GOAL]\nι : Sort u_1\nf : ι → ℝ≥0\ninst✝ : Nonempty ι\na g : ℝ≥0\nh : ι → ℝ≥0\nH : ∀ (j : ι), a ≤ g * h j\n⊢ a ≤ ⨅ (i : ι), g * h i\n[PROOFSTEP]\nexact le_ciInf H\n[GOAL]\nι : Sort u_1\nf : ι → ℝ≥0\ninst✝ : Nonempty ι\na : ℝ≥0\ng : ι → ℝ≥0\nh : ℝ≥0\nH : ∀ (i : ι), a ≤ g i * h\n⊢ a ≤ iInf g * h\n[PROOFSTEP]\nrw [iInf_mul]\n[GOAL]\nι : Sort u_1\nf : ι → ℝ≥0\ninst✝ : Nonempty ι\na : ℝ≥0\ng : ι → ℝ≥0\nh : ℝ≥0\nH : ∀ (i : ι), a ≤ g i * h\n⊢ a ≤ ⨅ (i : ι), g i * h\n[PROOFSTEP]\nexact le_ciInf H\n[GOAL]\ns : Set ℝ\nt : Set ℝ≥0\nh : OrdConnected s\n⊢ OrdConnected (toNNReal '' s)\n[PROOFSTEP]\nrefine' ⟨ball_image_iff.2 fun x hx => ball_image_iff.2 fun y hy z hz => _⟩\n[GOAL]\ns : Set ℝ\nt : Set ℝ≥0\nh : OrdConnected s\nx : ℝ\nhx : x ∈ s\ny : ℝ\nhy : y ∈ s\nz : ℝ≥0\nhz : z ∈ Icc (toNNReal x) (toNNReal y)\n⊢ z ∈ toNNReal '' s\n[PROOFSTEP]\ncases' le_total y 0 with hy₀ hy₀\n[GOAL]\ncase inl\ns : Set ℝ\nt : Set ℝ≥0\nh : OrdConnected s\nx : ℝ\nhx : x ∈ s\ny : ℝ\nhy : y ∈ s\nz : ℝ≥0\nhz : z ∈ Icc (toNNReal x) (toNNReal y)\nhy₀ : y ≤ 0\n⊢ z ∈ toNNReal '' s\n[PROOFSTEP]\nrw [mem_Icc, Real.toNNReal_of_nonpos hy₀, nonpos_iff_eq_zero] at hz \n[GOAL]\ncase inl\ns : Set ℝ\nt : Set ℝ≥0\nh : OrdConnected s\nx : ℝ\nhx : x ∈ s\ny : ℝ\nhy : y ∈ s\nz : ℝ≥0\nhz : toNNReal x ≤ z ∧ z = 0\nhy₀ : y ≤ 0\n⊢ z ∈ toNNReal '' s\n[PROOFSTEP]\nexact ⟨y, hy, (toNNReal_of_nonpos hy₀).trans hz.2.symm⟩\n[GOAL]\ncase inr\ns : Set ℝ\nt : Set ℝ≥0\nh : OrdConnected s\nx : ℝ\nhx : x ∈ s\ny : ℝ\nhy : y ∈ s\nz : ℝ≥0\nhz : z ∈ Icc (toNNReal x) (toNNReal y)\nhy₀ : 0 ≤ y\n⊢ z ∈ toNNReal '' s\n[PROOFSTEP]\nlift y to ℝ≥0 using hy₀\n[GOAL]\ncase inr.intro\ns : Set ℝ\nt : Set ℝ≥0\nh : OrdConnected s\nx : ℝ\nhx : x ∈ s\nz y : ℝ≥0\nhy : ↑y ∈ s\nhz : z ∈ Icc (toNNReal x) (toNNReal ↑y)\n⊢ z ∈ toNNReal '' s\n[PROOFSTEP]\nrw [toNNReal_coe] at hz \n[GOAL]\ncase inr.intro\ns : Set ℝ\nt : Set ℝ≥0\nh : OrdConnected s\nx : ℝ\nhx : x ∈ s\nz y : ℝ≥0\nhy : ↑y ∈ s\nhz : z ∈ Icc (toNNReal x) y\n⊢ z ∈ toNNReal '' s\n[PROOFSTEP]\nexact ⟨z, h.out hx hy ⟨toNNReal_le_iff_le_coe.1 hz.1, hz.2⟩, toNNReal_coe⟩\n[GOAL]\n⊢ (fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0 = 0\n[PROOFSTEP]\next\n[GOAL]\ncase a\n⊢ ↑((fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0) = ↑0\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ ZeroHom.toFun\n { toFun := fun x => { val := |x|, property := (_ : 0 ≤ |x|) },\n map_zero' := (_ : (fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0 = 0) }\n 1 =\n 1\n[PROOFSTEP]\next\n[GOAL]\ncase a\n⊢ ↑(ZeroHom.toFun\n { toFun := fun x => { val := |x|, property := (_ : 0 ≤ |x|) },\n map_zero' := (_ : (fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0 = 0) }\n 1) =\n ↑1\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : ℝ\n⊢ ZeroHom.toFun\n { toFun := fun x => { val := |x|, property := (_ : 0 ≤ |x|) },\n map_zero' := (_ : (fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0 = 0) }\n (x * y) =\n ZeroHom.toFun\n { toFun := fun x => { val := |x|, property := (_ : 0 ≤ |x|) },\n map_zero' := (_ : (fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0 = 0) }\n x *\n ZeroHom.toFun\n { toFun := fun x => { val := |x|, property := (_ : 0 ≤ |x|) },\n map_zero' := (_ : (fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0 = 0) }\n y\n[PROOFSTEP]\next\n[GOAL]\ncase a\nx y : ℝ\n⊢ ↑(ZeroHom.toFun\n { toFun := fun x => { val := |x|, property := (_ : 0 ≤ |x|) },\n map_zero' := (_ : (fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0 = 0) }\n (x * y)) =\n ↑(ZeroHom.toFun\n { toFun := fun x => { val := |x|, property := (_ : 0 ≤ |x|) },\n map_zero' := (_ : (fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0 = 0) }\n x *\n ZeroHom.toFun\n { toFun := fun x => { val := |x|, property := (_ : 0 ≤ |x|) },\n map_zero' := (_ : (fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0 = 0) }\n y)\n[PROOFSTEP]\nsimp [abs_mul]\n[GOAL]\nx : ℝ\nh : 0 ≤ x\n⊢ ↑nnabs x = toNNReal x\n[PROOFSTEP]\next\n[GOAL]\ncase a\nx : ℝ\nh : 0 ≤ x\n⊢ ↑(↑nnabs x) = ↑(toNNReal x)\n[PROOFSTEP]\nrw [coe_toNNReal x h, coe_nnabs, abs_of_nonneg h]\n[GOAL]\nx : ℝ≥0\n⊢ ↑nnabs ↑x = x\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℤ\n⊢ ↑(Int.natAbs n) = ↑nnabs ↑n\n[PROOFSTEP]\next\n[GOAL]\ncase a\nn : ℤ\n⊢ ↑↑(Int.natAbs n) = ↑(↑nnabs ↑n)\n[PROOFSTEP]\nrw [NNReal.coe_nat_cast, Int.cast_natAbs, Real.coe_nnabs, Int.cast_abs]\n", "meta": {"mathlib_filename": "Mathlib.Data.Real.NNReal", "llama_tokens": 10032, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8080672135527631, "lm_q2_score": 0.6859494550081925, "lm_q1q2_score": 0.5542932647465065}} {"text": "[GOAL]\nR : Type u_1\ninst✝ : Zero R\nn : R\n⊢ ¬NeZero n ↔ n = 0\n[PROOFSTEP]\nsimp [neZero_iff]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.NeZero", "llama_tokens": 52, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8418256472515684, "lm_q2_score": 0.658417500561683, "lm_q1q2_score": 0.5542727385720987}} {"text": "[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\nA B : Set (Finset α)\nr : ℕ\nf : ι → Set (Finset α)\n⊢ Sized r (⋃ (i : ι), f i) ↔ ∀ (i : ι), Sized r (f i)\n[PROOFSTEP]\nsimp_rw [Set.Sized, Set.mem_iUnion, forall_exists_index]\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\nA B : Set (Finset α)\nr : ℕ\nf : ι → Set (Finset α)\n⊢ (∀ ⦃x : Finset α⦄ (x_1 : ι), x ∈ f x_1 → card x = r) ↔ ∀ (i : ι) ⦃x : Finset α⦄, x ∈ f i → card x = r\n[PROOFSTEP]\nexact forall_swap\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\nA B : Set (Finset α)\nr : ℕ\nf : (i : ι) → κ i → Set (Finset α)\n⊢ Sized r (⋃ (i : ι) (j : κ i), f i j) ↔ ∀ (i : ι) (j : κ i), Sized r (f i j)\n[PROOFSTEP]\nsimp only [Set.sized_iUnion]\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns : Finset α\nr : ℕ\nA : Finset α\n⊢ A ∈ 𝒜 → A ∈ powersetLen r univ ↔ A ∈ ↑𝒜 → card A = r\n[PROOFSTEP]\nrw [mem_powerset_len_univ_iff, mem_coe]\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns : Finset α\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\n⊢ card 𝒜 ≤ Nat.choose (Fintype.card α) r\n[PROOFSTEP]\nrw [Fintype.card, ← card_powersetLen]\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns : Finset α\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\n⊢ card 𝒜 ≤ card (powersetLen r univ)\n[PROOFSTEP]\nexact card_le_of_subset (subset_powersetLen_univ_iff.mpr h𝒜)\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\n𝒜 : Finset (Finset α)\nA A₁ A₂ : Finset α\nr r₁ r₂ : ℕ\ninst✝ : Fintype α\n⊢ ∑ r in Iic (Fintype.card α), card (𝒜 # r) = card 𝒜\n[PROOFSTEP]\nletI := Classical.decEq α\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\n𝒜 : Finset (Finset α)\nA A₁ A₂ : Finset α\nr r₁ r₂ : ℕ\ninst✝ : Fintype α\nthis : DecidableEq α := Classical.decEq α\n⊢ ∑ r in Iic (Fintype.card α), card (𝒜 # r) = card 𝒜\n[PROOFSTEP]\nrw [← card_biUnion, biUnion_slice]\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\n𝒜 : Finset (Finset α)\nA A₁ A₂ : Finset α\nr r₁ r₂ : ℕ\ninst✝ : Fintype α\nthis : DecidableEq α := Classical.decEq α\n⊢ ∀ (x : ℕ), x ∈ Iic (Fintype.card α) → ∀ (y : ℕ), y ∈ Iic (Fintype.card α) → x ≠ y → Disjoint (𝒜 # x) (𝒜 # y)\n[PROOFSTEP]\nexact Finset.pairwiseDisjoint_slice.subset (Set.subset_univ _)\n", "meta": {"mathlib_filename": "Mathlib.Data.Finset.Slice", "llama_tokens": 1233, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7956581000631542, "lm_q2_score": 0.6959583250334526, "lm_q1q2_score": 0.553744878619252}} {"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Set α\nf : α → ℕ\n⊢ EquitableOn s f ↔ ∃ b, ∀ (a : α), a ∈ s → b ≤ f a ∧ f a ≤ b + 1\n[PROOFSTEP]\nrefine' ⟨_, fun ⟨b, hb⟩ x y hx hy => (hb x hx).2.trans (add_le_add_right (hb y hy).1 _)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Set α\nf : α → ℕ\n⊢ EquitableOn s f → ∃ b, ∀ (a : α), a ∈ s → b ≤ f a ∧ f a ≤ b + 1\n[PROOFSTEP]\nobtain rfl | ⟨x, hx⟩ := s.eq_empty_or_nonempty\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nf : α → ℕ\n⊢ EquitableOn ∅ f → ∃ b, ∀ (a : α), a ∈ ∅ → b ≤ f a ∧ f a ≤ b + 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.intro\nα : Type u_1\nβ : Type u_2\ns : Set α\nf : α → ℕ\nx : α\nhx : x ∈ s\n⊢ EquitableOn s f → ∃ b, ∀ (a : α), a ∈ s → b ≤ f a ∧ f a ≤ b + 1\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase inr.intro\nα : Type u_1\nβ : Type u_2\ns : Set α\nf : α → ℕ\nx : α\nhx : x ∈ s\nhs : EquitableOn s f\n⊢ ∃ b, ∀ (a : α), a ∈ s → b ≤ f a ∧ f a ≤ b + 1\n[PROOFSTEP]\nby_cases h : ∀ y ∈ s, f x ≤ f y\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ns : Set α\nf : α → ℕ\nx : α\nhx : x ∈ s\nhs : EquitableOn s f\nh : ∀ (y : α), y ∈ s → f x ≤ f y\n⊢ ∃ b, ∀ (a : α), a ∈ s → b ≤ f a ∧ f a ≤ b + 1\n[PROOFSTEP]\nexact ⟨f x, fun y hy => ⟨h _ hy, hs hy hx⟩⟩\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ns : Set α\nf : α → ℕ\nx : α\nhx : x ∈ s\nhs : EquitableOn s f\nh : ¬∀ (y : α), y ∈ s → f x ≤ f y\n⊢ ∃ b, ∀ (a : α), a ∈ s → b ≤ f a ∧ f a ≤ b + 1\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ns : Set α\nf : α → ℕ\nx : α\nhx : x ∈ s\nhs : EquitableOn s f\nh : ∃ y, y ∈ s ∧ f y < f x\n⊢ ∃ b, ∀ (a : α), a ∈ s → b ≤ f a ∧ f a ≤ b + 1\n[PROOFSTEP]\nobtain ⟨w, hw, hwx⟩ := h\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nβ : Type u_2\ns : Set α\nf : α → ℕ\nx : α\nhx : x ∈ s\nhs : EquitableOn s f\nw : α\nhw : w ∈ s\nhwx : f w < f x\n⊢ ∃ b, ∀ (a : α), a ∈ s → b ≤ f a ∧ f a ≤ b + 1\n[PROOFSTEP]\nrefine' ⟨f w, fun y hy => ⟨Nat.le_of_succ_le_succ _, hs hy hw⟩⟩\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nβ : Type u_2\ns : Set α\nf : α → ℕ\nx : α\nhx : x ∈ s\nhs : EquitableOn s f\nw : α\nhw : w ∈ s\nhwx : f w < f x\ny : α\nhy : y ∈ s\n⊢ Nat.succ (f w) ≤ Nat.succ (f y)\n[PROOFSTEP]\nrw [(Nat.succ_le_of_lt hwx).antisymm (hs hx hw)]\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nβ : Type u_2\ns : Set α\nf : α → ℕ\nx : α\nhx : x ∈ s\nhs : EquitableOn s f\nw : α\nhw : w ∈ s\nhwx : f w < f x\ny : α\nhy : y ∈ s\n⊢ f x ≤ Nat.succ (f y)\n[PROOFSTEP]\nexact hs hx hy\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Set α\nf : α → ℕ\n⊢ EquitableOn s f ↔ ∃ b, f '' s ⊆ Icc b (b + 1)\n[PROOFSTEP]\nsimpa only [image_subset_iff] using equitableOn_iff_exists_le_le_add_one\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Set α\nf : α → ℕ\n⊢ EquitableOn s f ↔ ∃ b, ∀ (a : α), a ∈ s → f a = b ∨ f a = b + 1\n[PROOFSTEP]\nsimp_rw [equitableOn_iff_exists_le_le_add_one, Nat.le_and_le_add_one_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : OrderedSemiring β\ns : Set α\nhs : Set.Subsingleton s\nf : α → β\ni j : α\nhi : i ∈ s\nhj : j ∈ s\n⊢ f i ≤ f j + 1\n[PROOFSTEP]\nrw [hs hi hj]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : OrderedSemiring β\ns : Set α\nhs : Set.Subsingleton s\nf : α → β\ni j : α\nhi : i ∈ s\nhj : j ∈ s\n⊢ f j ≤ f j + 1\n[PROOFSTEP]\nexact le_add_of_nonneg_right zero_le_one\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Finset α\nf : α → ℕ\na : α\n⊢ EquitableOn (↑s) f ↔ ∀ (a : α), a ∈ s → (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1\n[PROOFSTEP]\nrw [Set.equitableOn_iff_exists_le_le_add_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Finset α\nf : α → ℕ\na : α\n⊢ (∃ b, ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1) ↔\n ∀ (a : α), a ∈ s → (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1\n[PROOFSTEP]\nrefine' ⟨_, fun h => ⟨_, h⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Finset α\nf : α → ℕ\na : α\n⊢ (∃ b, ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1) →\n ∀ (a : α), a ∈ s → (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1\n[PROOFSTEP]\nrintro ⟨b, hb⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ns : Finset α\nf : α → ℕ\na : α\nb : ℕ\nhb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1\n⊢ ∀ (a : α), a ∈ s → (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1\n[PROOFSTEP]\nby_cases h : ∀ a ∈ s, f a = b + 1\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ns : Finset α\nf : α → ℕ\na : α\nb : ℕ\nhb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1\nh : ∀ (a : α), a ∈ s → f a = b + 1\n⊢ ∀ (a : α), a ∈ s → (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1\n[PROOFSTEP]\nintro a ha\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ns : Finset α\nf : α → ℕ\na✝ : α\nb : ℕ\nhb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1\nh : ∀ (a : α), a ∈ s → f a = b + 1\na : α\nha : a ∈ s\n⊢ (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1\n[PROOFSTEP]\nrw [h _ ha, sum_const_nat h, Nat.mul_div_cancel_left _ (card_pos.2 ⟨a, ha⟩)]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ns : Finset α\nf : α → ℕ\na✝ : α\nb : ℕ\nhb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1\nh : ∀ (a : α), a ∈ s → f a = b + 1\na : α\nha : a ∈ s\n⊢ b + 1 ≤ b + 1 ∧ b + 1 ≤ b + 1 + 1\n[PROOFSTEP]\nexact ⟨le_rfl, Nat.le_succ _⟩\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ns : Finset α\nf : α → ℕ\na : α\nb : ℕ\nhb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1\nh : ¬∀ (a : α), a ∈ s → f a = b + 1\n⊢ ∀ (a : α), a ∈ s → (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ns : Finset α\nf : α → ℕ\na : α\nb : ℕ\nhb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1\nh : ∃ a, a ∈ s ∧ f a ≠ b + 1\n⊢ ∀ (a : α), a ∈ s → (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1\n[PROOFSTEP]\nobtain ⟨x, hx₁, hx₂⟩ := h\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nβ : Type u_2\ns : Finset α\nf : α → ℕ\na : α\nb : ℕ\nhb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1\nx : α\nhx₁ : x ∈ s\nhx₂ : f x ≠ b + 1\n⊢ ∀ (a : α), a ∈ s → (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1\n[PROOFSTEP]\nsuffices h : b = (∑ i in s, f i) / s.card\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nβ : Type u_2\ns : Finset α\nf : α → ℕ\na : α\nb : ℕ\nhb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1\nx : α\nhx₁ : x ∈ s\nhx₂ : f x ≠ b + 1\nh : b = (∑ i in s, f i) / card s\n⊢ ∀ (a : α), a ∈ s → (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1\n[PROOFSTEP]\nsimp_rw [← h]\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nβ : Type u_2\ns : Finset α\nf : α → ℕ\na : α\nb : ℕ\nhb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1\nx : α\nhx₁ : x ∈ s\nhx₂ : f x ≠ b + 1\nh : b = (∑ i in s, f i) / card s\n⊢ ∀ (a : α), a ∈ s → b ≤ f a ∧ f a ≤ b + 1\n[PROOFSTEP]\napply hb\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ns : Finset α\nf : α → ℕ\na : α\nb : ℕ\nhb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1\nx : α\nhx₁ : x ∈ s\nhx₂ : f x ≠ b + 1\n⊢ b = (∑ i in s, f i) / card s\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ns : Finset α\nf : α → ℕ\na : α\nb : ℕ\nhb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1\nx : α\nhx₁ : x ∈ s\nhx₂ : f x ≠ b + 1\n⊢ (∑ i in s, f i) / card s = b\n[PROOFSTEP]\nrefine'\n Nat.div_eq_of_lt_le (le_trans (by simp [mul_comm]) (sum_le_sum fun a ha => (hb a ha).1))\n ((sum_lt_sum (fun a ha => (hb a ha).2) ⟨_, hx₁, (hb _ hx₁).2.lt_of_ne hx₂⟩).trans_le _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Finset α\nf : α → ℕ\na : α\nb : ℕ\nhb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1\nx : α\nhx₁ : x ∈ s\nhx₂ : f x ≠ b + 1\n⊢ b * card s ≤ ∑ i in s, b\n[PROOFSTEP]\nsimp [mul_comm]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ns : Finset α\nf : α → ℕ\na : α\nb : ℕ\nhb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1\nx : α\nhx₁ : x ∈ s\nhx₂ : f x ≠ b + 1\n⊢ ∑ i in s, (b + 1) ≤ Nat.succ b * card s\n[PROOFSTEP]\nrw [mul_comm, sum_const_nat]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ns : Finset α\nf : α → ℕ\na : α\nb : ℕ\nhb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1\nx : α\nhx₁ : x ∈ s\nhx₂ : f x ≠ b + 1\n⊢ ∀ (x : α), x ∈ s → b + 1 = Nat.succ b\n[PROOFSTEP]\nexact fun _ _ => rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Finset α\nf : α → ℕ\na : α\n⊢ EquitableOn (↑s) f ↔ ∀ (a : α), a ∈ s → f a = (∑ i in s, f i) / card s ∨ f a = (∑ i in s, f i) / card s + 1\n[PROOFSTEP]\nsimp_rw [equitableOn_iff_le_le_add_one, Nat.le_and_le_add_one_iff]\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Equitable", "llama_tokens": 4614, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7956580903722561, "lm_q2_score": 0.6959583250334526, "lm_q1q2_score": 0.5537448718747908}} {"text": "[GOAL]\nE : Type u_1\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nx : E\nx✝ : x ∈ univ\n⊢ (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1\n[PROOFSTEP]\nhave : 0 < 1 + ‖x‖ ^ 2 := by positivity\n[GOAL]\nE : Type u_1\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nx : E\nx✝ : x ∈ univ\n⊢ 0 < 1 + ‖x‖ ^ 2\n[PROOFSTEP]\npositivity\n[GOAL]\nE : Type u_1\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nx : E\nx✝ : x ∈ univ\nthis : 0 < 1 + ‖x‖ ^ 2\n⊢ (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1\n[PROOFSTEP]\nrw [mem_ball_zero_iff, norm_smul, Real.norm_eq_abs, abs_inv, ← _root_.div_eq_inv_mul,\n div_lt_one (abs_pos.mpr <| Real.sqrt_ne_zero'.mpr this), ← abs_norm x, ← sq_lt_sq, abs_norm, Real.sq_sqrt this.le]\n[GOAL]\nE : Type u_1\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nx : E\nx✝ : x ∈ univ\nthis : 0 < 1 + ‖x‖ ^ 2\n⊢ ‖x‖ ^ 2 < 1 + ‖x‖ ^ 2\n[PROOFSTEP]\nexact lt_one_add _\n[GOAL]\nE : Type u_1\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nx : E\nx✝ : x ∈ univ\n⊢ (fun y => (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y) ((fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) x) = x\n[PROOFSTEP]\nfield_simp [norm_smul, smul_smul, (zero_lt_one_add_norm_sq x).ne', sq_abs, Real.sq_sqrt (zero_lt_one_add_norm_sq x).le,\n ← Real.sqrt_div (zero_lt_one_add_norm_sq x).le]\n[GOAL]\nE : Type u_1\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ny : E\nhy : y ∈ ball 0 1\n⊢ (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) ((fun y => (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y) y) = y\n[PROOFSTEP]\nhave : 0 < 1 - ‖y‖ ^ 2 := by nlinarith [norm_nonneg y, mem_ball_zero_iff.1 hy]\n[GOAL]\nE : Type u_1\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ny : E\nhy : y ∈ ball 0 1\n⊢ 0 < 1 - ‖y‖ ^ 2\n[PROOFSTEP]\nnlinarith [norm_nonneg y, mem_ball_zero_iff.1 hy]\n[GOAL]\nE : Type u_1\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ny : E\nhy : y ∈ ball 0 1\nthis : 0 < 1 - ‖y‖ ^ 2\n⊢ (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) ((fun y => (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y) y) = y\n[PROOFSTEP]\nfield_simp [norm_smul, smul_smul, this.ne', sq_abs, Real.sq_sqrt this.le, ← Real.sqrt_div this.le]\n[GOAL]\nE : Type u_1\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\n⊢ ContinuousOn\n ↑{ toFun := fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y,\n source := univ, target := ball 0 1,\n map_source' := (_ : ∀ (x : E), x ∈ univ → (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1),\n map_target' := (_ : ∀ (x : E), x ∈ ball 0 1 → True),\n left_inv' :=\n (_ :\n ∀ (x : E),\n x ∈ univ →\n (Real.sqrt (1 - ‖(Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x‖ ^ 2))⁻¹ • (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x = x),\n right_inv' :=\n (_ :\n ∀ (y : E),\n y ∈ ball 0 1 →\n (Real.sqrt (1 + ‖(Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y‖ ^ 2))⁻¹ • (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y = y) }\n { toFun := fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y,\n source := univ, target := ball 0 1,\n map_source' := (_ : ∀ (x : E), x ∈ univ → (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1),\n map_target' := (_ : ∀ (x : E), x ∈ ball 0 1 → True),\n left_inv' :=\n (_ :\n ∀ (x : E),\n x ∈ univ →\n (Real.sqrt (1 - ‖(Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x‖ ^ 2))⁻¹ • (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x = x),\n right_inv' :=\n (_ :\n ∀ (y : E),\n y ∈ ball 0 1 →\n (Real.sqrt (1 + ‖(Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y‖ ^ 2))⁻¹ • (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y =\n y) }.source\n[PROOFSTEP]\nsuffices Continuous fun (x : E) => (1 + ‖x‖ ^ 2).sqrt⁻¹ from (this.smul continuous_id).continuousOn\n[GOAL]\nE : Type u_1\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\n⊢ Continuous fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹\n[PROOFSTEP]\nrefine' Continuous.inv₀ _ fun x => Real.sqrt_ne_zero'.mpr (by positivity)\n[GOAL]\nE : Type u_1\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nx : E\n⊢ 0 < 1 + ‖x‖ ^ 2\n[PROOFSTEP]\npositivity\n[GOAL]\nE : Type u_1\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\n⊢ Continuous fun x => Real.sqrt (1 + ‖x‖ ^ 2)\n[PROOFSTEP]\ncontinuity\n[GOAL]\nE : Type u_1\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\n⊢ ContinuousOn\n { toFun := fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y,\n source := univ, target := ball 0 1,\n map_source' := (_ : ∀ (x : E), x ∈ univ → (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1),\n map_target' := (_ : ∀ (x : E), x ∈ ball 0 1 → True),\n left_inv' :=\n (_ :\n ∀ (x : E),\n x ∈ univ →\n (Real.sqrt (1 - ‖(Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x‖ ^ 2))⁻¹ • (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x = x),\n right_inv' :=\n (_ :\n ∀ (y : E),\n y ∈ ball 0 1 →\n (Real.sqrt (1 + ‖(Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y‖ ^ 2))⁻¹ • (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y =\n y) }.invFun\n { toFun := fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y,\n source := univ, target := ball 0 1,\n map_source' := (_ : ∀ (x : E), x ∈ univ → (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1),\n map_target' := (_ : ∀ (x : E), x ∈ ball 0 1 → True),\n left_inv' :=\n (_ :\n ∀ (x : E),\n x ∈ univ →\n (Real.sqrt (1 - ‖(Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x‖ ^ 2))⁻¹ • (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x = x),\n right_inv' :=\n (_ :\n ∀ (y : E),\n y ∈ ball 0 1 →\n (Real.sqrt (1 + ‖(Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y‖ ^ 2))⁻¹ • (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y =\n y) }.target\n[PROOFSTEP]\nhave : ∀ y ∈ ball (0 : E) 1, (1 - ‖(y : E)‖ ^ 2).sqrt ≠ 0 := fun y hy ↦\n by\n rw [Real.sqrt_ne_zero']\n nlinarith [norm_nonneg y, mem_ball_zero_iff.1 hy]\n[GOAL]\nE : Type u_1\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ny : E\nhy : y ∈ ball 0 1\n⊢ Real.sqrt (1 - ‖y‖ ^ 2) ≠ 0\n[PROOFSTEP]\nrw [Real.sqrt_ne_zero']\n[GOAL]\nE : Type u_1\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ny : E\nhy : y ∈ ball 0 1\n⊢ 0 < 1 - ‖y‖ ^ 2\n[PROOFSTEP]\nnlinarith [norm_nonneg y, mem_ball_zero_iff.1 hy]\n[GOAL]\nE : Type u_1\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nthis : ∀ (y : E), y ∈ ball 0 1 → Real.sqrt (1 - ‖y‖ ^ 2) ≠ 0\n⊢ ContinuousOn\n { toFun := fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y,\n source := univ, target := ball 0 1,\n map_source' := (_ : ∀ (x : E), x ∈ univ → (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1),\n map_target' := (_ : ∀ (x : E), x ∈ ball 0 1 → True),\n left_inv' :=\n (_ :\n ∀ (x : E),\n x ∈ univ →\n (Real.sqrt (1 - ‖(Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x‖ ^ 2))⁻¹ • (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x = x),\n right_inv' :=\n (_ :\n ∀ (y : E),\n y ∈ ball 0 1 →\n (Real.sqrt (1 + ‖(Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y‖ ^ 2))⁻¹ • (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y =\n y) }.invFun\n { toFun := fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y,\n source := univ, target := ball 0 1,\n map_source' := (_ : ∀ (x : E), x ∈ univ → (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1),\n map_target' := (_ : ∀ (x : E), x ∈ ball 0 1 → True),\n left_inv' :=\n (_ :\n ∀ (x : E),\n x ∈ univ →\n (Real.sqrt (1 - ‖(Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x‖ ^ 2))⁻¹ • (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x = x),\n right_inv' :=\n (_ :\n ∀ (y : E),\n y ∈ ball 0 1 →\n (Real.sqrt (1 + ‖(Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y‖ ^ 2))⁻¹ • (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y =\n y) }.target\n[PROOFSTEP]\nexact\n ContinuousOn.smul (ContinuousOn.inv₀ (continuousOn_const.sub (continuous_norm.continuousOn.pow _)).sqrt this)\n continuousOn_id\n[GOAL]\nE : Type u_1\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\n⊢ ↑univUnitBall 0 = 0\n[PROOFSTEP]\nsimp [LocalHomeomorph.univUnitBall_apply]\n[GOAL]\nE : Type u_1\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\n⊢ ↑(LocalHomeomorph.symm univUnitBall) 0 = 0\n[PROOFSTEP]\nsimp [LocalHomeomorph.univUnitBall_symm_apply]\n[GOAL]\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\nhr : 0 < r\n⊢ ↑(Homeomorph.trans (Homeomorph.smulOfNeZero r (_ : r ≠ 0))\n (IsometryEquiv.toHomeomorph (IsometryEquiv.vaddConst c))) ''\n ball 0 1 =\n ball c r\n[PROOFSTEP]\nchange (IsometryEquiv.vaddConst c) ∘ (r • ·) '' ball (0 : E) 1 = ball c r\n[GOAL]\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\nhr : 0 < r\n⊢ (↑(IsometryEquiv.vaddConst c) ∘ fun x => r • x) '' ball 0 1 = ball c r\n[PROOFSTEP]\nrw [image_comp, image_smul, smul_unitBall hr.ne', IsometryEquiv.image_ball]\n[GOAL]\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\nhr : 0 < r\n⊢ ball (↑(IsometryEquiv.vaddConst c) 0) ‖r‖ = ball c r\n[PROOFSTEP]\nsimp [abs_of_pos hr]\n[GOAL]\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\n⊢ (univBall c r).toLocalEquiv.source = univ\n[PROOFSTEP]\nunfold univBall\n[GOAL]\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\n⊢ (if h : 0 < r then\n LocalHomeomorph.trans' univUnitBall (unitBallBall c r h)\n (_ : univUnitBall.toLocalEquiv.target = univUnitBall.toLocalEquiv.target)\n else\n Homeomorph.toLocalHomeomorph (IsometryEquiv.toHomeomorph (IsometryEquiv.vaddConst c))).toLocalEquiv.source =\n univ\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\nh✝ : 0 < r\n⊢ (LocalHomeomorph.trans' univUnitBall (unitBallBall c r h✝)\n (_ : univUnitBall.toLocalEquiv.target = univUnitBall.toLocalEquiv.target)).toLocalEquiv.source =\n univ\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\nh✝ : ¬0 < r\n⊢ (Homeomorph.toLocalHomeomorph (IsometryEquiv.toHomeomorph (IsometryEquiv.vaddConst c))).toLocalEquiv.source = univ\n[PROOFSTEP]\nrfl\n[GOAL]\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\nhr : 0 < r\n⊢ (univBall c r).toLocalEquiv.target = ball c r\n[PROOFSTEP]\nrw [univBall, dif_pos hr]\n[GOAL]\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\nhr : 0 < r\n⊢ (LocalHomeomorph.trans' univUnitBall (unitBallBall c r hr)\n (_ : univUnitBall.toLocalEquiv.target = univUnitBall.toLocalEquiv.target)).toLocalEquiv.target =\n ball c r\n[PROOFSTEP]\nrfl\n[GOAL]\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\n⊢ ball c r ⊆ (univBall c r).toLocalEquiv.target\n[PROOFSTEP]\nby_cases hr : 0 < r\n[GOAL]\ncase pos\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\nhr : 0 < r\n⊢ ball c r ⊆ (univBall c r).toLocalEquiv.target\n[PROOFSTEP]\nrw [univBall_target c hr]\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\nhr : ¬0 < r\n⊢ ball c r ⊆ (univBall c r).toLocalEquiv.target\n[PROOFSTEP]\nrw [univBall, dif_neg hr]\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\nhr : ¬0 < r\n⊢ ball c r ⊆ (Homeomorph.toLocalHomeomorph (IsometryEquiv.toHomeomorph (IsometryEquiv.vaddConst c))).toLocalEquiv.target\n[PROOFSTEP]\nexact subset_univ _\n[GOAL]\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\n⊢ ↑(univBall c r) 0 = c\n[PROOFSTEP]\nunfold univBall\n[GOAL]\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\n⊢ ↑(if h : 0 < r then\n LocalHomeomorph.trans' univUnitBall (unitBallBall c r h)\n (_ : univUnitBall.toLocalEquiv.target = univUnitBall.toLocalEquiv.target)\n else Homeomorph.toLocalHomeomorph (IsometryEquiv.toHomeomorph (IsometryEquiv.vaddConst c)))\n 0 =\n c\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\nh✝ : 0 < r\n⊢ ↑(LocalHomeomorph.trans' univUnitBall (unitBallBall c r h✝)\n (_ : univUnitBall.toLocalEquiv.target = univUnitBall.toLocalEquiv.target))\n 0 =\n c\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\nh✝ : ¬0 < r\n⊢ ↑(Homeomorph.toLocalHomeomorph (IsometryEquiv.toHomeomorph (IsometryEquiv.vaddConst c))) 0 = c\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\n⊢ ↑(LocalHomeomorph.symm (univBall c r)) c = 0\n[PROOFSTEP]\nhave : 0 ∈ (univBall c r).source := by simp\n[GOAL]\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\n⊢ 0 ∈ (univBall c r).toLocalEquiv.source\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\nthis : 0 ∈ (univBall c r).toLocalEquiv.source\n⊢ ↑(LocalHomeomorph.symm (univBall c r)) c = 0\n[PROOFSTEP]\nsimpa only [univBall_apply_zero] using (univBall c r).left_inv this\n[GOAL]\nE : Type u_1\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nP : Type u_2\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor E P\nc : P\nr : ℝ\n⊢ Continuous ↑(univBall c r)\n[PROOFSTEP]\nsimpa [continuous_iff_continuousOn_univ] using (univBall c r).continuousOn\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.HomeomorphBall", "llama_tokens": 7227, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.849971175657575, "lm_q2_score": 0.6513548782017745, "lm_q1q2_score": 0.5536328715954588}} {"text": "[GOAL]\nX₁ X₂ Y : TopCat\nf : C(↑X₁, ↑Y)\ng : C(↑X₂, ↑Y)\nx₀ x₁ : ↑X₁\nx₂ x₃ : ↑X₂\np : Path x₀ x₁\nq : Path x₂ x₃\nhfg : ∀ (t : ↑I), ↑f (↑p t) = ↑g (↑q t)\n⊢ HEq ((π.map f).map (Quotient.mk (Path.Homotopic.setoid x₀ x₁) p))\n ((π.map g).map (Quotient.mk (Path.Homotopic.setoid x₂ x₃) q))\n[PROOFSTEP]\nsimp only [map_eq, ← Path.Homotopic.map_lift]\n[GOAL]\nX₁ X₂ Y : TopCat\nf : C(↑X₁, ↑Y)\ng : C(↑X₂, ↑Y)\nx₀ x₁ : ↑X₁\nx₂ x₃ : ↑X₂\np : Path x₀ x₁\nq : Path x₂ x₃\nhfg : ∀ (t : ↑I), ↑f (↑p t) = ↑g (↑q t)\n⊢ HEq (Quotient.mk (Path.Homotopic.setoid (↑f x₀) (↑f x₁)) (Path.map p (_ : Continuous ↑f)))\n (Quotient.mk (Path.Homotopic.setoid (↑g x₂) (↑g x₃)) (Path.map q (_ : Continuous ↑g)))\n[PROOFSTEP]\napply Path.Homotopic.hpath_hext\n[GOAL]\ncase hp\nX₁ X₂ Y : TopCat\nf : C(↑X₁, ↑Y)\ng : C(↑X₂, ↑Y)\nx₀ x₁ : ↑X₁\nx₂ x₃ : ↑X₂\np : Path x₀ x₁\nq : Path x₂ x₃\nhfg : ∀ (t : ↑I), ↑f (↑p t) = ↑g (↑q t)\n⊢ ∀ (t : ↑I), ↑(Path.map p (_ : Continuous ↑f)) t = ↑(Path.map q (_ : Continuous ↑g)) t\n[PROOFSTEP]\nexact hfg\n[GOAL]\nX₁ X₂ Y : TopCat\nf : C(↑X₁, ↑Y)\ng : C(↑X₂, ↑Y)\nx₀ x₁ : ↑X₁\nx₂ x₃ : ↑X₂\np : Path x₀ x₁\nq : Path x₂ x₃\nhfg : ∀ (t : ↑I), ↑f (↑p t) = ↑g (↑q t)\n⊢ ↑f x₀ = ↑g x₂\n[PROOFSTEP]\nconvert hfg 0\n[GOAL]\ncase h.e'_2.h.e'_6\nX₁ X₂ Y : TopCat\nf : C(↑X₁, ↑Y)\ng : C(↑X₂, ↑Y)\nx₀ x₁ : ↑X₁\nx₂ x₃ : ↑X₂\np : Path x₀ x₁\nq : Path x₂ x₃\nhfg : ∀ (t : ↑I), ↑f (↑p t) = ↑g (↑q t)\n⊢ x₀ = ↑p 0\n[PROOFSTEP]\nsimp only [Path.source]\n[GOAL]\ncase h.e'_3.h.e'_6\nX₁ X₂ Y : TopCat\nf : C(↑X₁, ↑Y)\ng : C(↑X₂, ↑Y)\nx₀ x₁ : ↑X₁\nx₂ x₃ : ↑X₂\np : Path x₀ x₁\nq : Path x₂ x₃\nhfg : ∀ (t : ↑I), ↑f (↑p t) = ↑g (↑q t)\n⊢ x₂ = ↑q 0\n[PROOFSTEP]\nsimp only [Path.source]\n[GOAL]\nX₁ X₂ Y : TopCat\nf : C(↑X₁, ↑Y)\ng : C(↑X₂, ↑Y)\nx₀ x₁ : ↑X₁\nx₂ x₃ : ↑X₂\np : Path x₀ x₁\nq : Path x₂ x₃\nhfg : ∀ (t : ↑I), ↑f (↑p t) = ↑g (↑q t)\n⊢ ↑f x₁ = ↑g x₃\n[PROOFSTEP]\nconvert hfg 1\n[GOAL]\ncase h.e'_2.h.e'_6\nX₁ X₂ Y : TopCat\nf : C(↑X₁, ↑Y)\ng : C(↑X₂, ↑Y)\nx₀ x₁ : ↑X₁\nx₂ x₃ : ↑X₂\np : Path x₀ x₁\nq : Path x₂ x₃\nhfg : ∀ (t : ↑I), ↑f (↑p t) = ↑g (↑q t)\n⊢ x₁ = ↑p 1\n[PROOFSTEP]\nsimp only [Path.target]\n[GOAL]\ncase h.e'_3.h.e'_6\nX₁ X₂ Y : TopCat\nf : C(↑X₁, ↑Y)\ng : C(↑X₂, ↑Y)\nx₀ x₁ : ↑X₁\nx₂ x₃ : ↑X₂\np : Path x₀ x₁\nq : Path x₂ x₃\nhfg : ∀ (t : ↑I), ↑f (↑p t) = ↑g (↑q t)\n⊢ x₃ = ↑q 1\n[PROOFSTEP]\nsimp only [Path.target]\n[GOAL]\nX₁ X₂ Y : TopCat\nf : C(↑X₁, ↑Y)\ng : C(↑X₂, ↑Y)\nx₀ x₁ : ↑X₁\nx₂ x₃ : ↑X₂\np : Path x₀ x₁\nq : Path x₂ x₃\nhfg : ∀ (t : ↑I), ↑f (↑p t) = ↑g (↑q t)\n⊢ (π.map f).map (Quotient.mk (Path.Homotopic.setoid x₀ x₁) p) =\n hcast (_ : ↑f x₀ = ↑g x₂) ≫ (π.map g).map (Quotient.mk (Path.Homotopic.setoid x₂ x₃) q) ≫ hcast (_ : ↑g x₃ = ↑f x₁)\n[PROOFSTEP]\nrw [Functor.conj_eqToHom_iff_heq ((πₘ f).map ⟦p⟧) ((πₘ g).map ⟦q⟧) (start_path hfg) (end_path hfg)]\n[GOAL]\nX₁ X₂ Y : TopCat\nf : C(↑X₁, ↑Y)\ng : C(↑X₂, ↑Y)\nx₀ x₁ : ↑X₁\nx₂ x₃ : ↑X₂\np : Path x₀ x₁\nq : Path x₂ x₃\nhfg : ∀ (t : ↑I), ↑f (↑p t) = ↑g (↑q t)\n⊢ HEq ((π.map f).map (Quotient.mk (Path.Homotopic.setoid x₀ x₁) p))\n ((π.map g).map (Quotient.mk (Path.Homotopic.setoid x₂ x₃) q))\n[PROOFSTEP]\nexact heq_path_of_eq_image hfg\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\np' : Path (fromTop x₀) (fromTop x₁)\n⊢ (π.map f).map (Quotient.mk (Path.Homotopic.setoid (fromTop x₀) (fromTop x₁)) p') =\n hcast (_ : ↑f x₀ = ↑H (0, x₀)) ≫\n (π.map (uliftMap H)).map\n (prodToProdTopI (𝟙 (fromTop { down := 0 }))\n (Quotient.mk (Path.Homotopic.setoid (fromTop x₀) (fromTop x₁)) p')) ≫\n hcast (_ : ↑H (0, x₁) = ↑f x₁)\n[PROOFSTEP]\napply @eq_path_of_eq_image _ _ _ _ H.uliftMap _ _ _ _ _ ((Path.refl (ULift.up _)).prod p')\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\np' : Path (fromTop x₀) (fromTop x₁)\n⊢ ∀ (t : ↑I), ↑f (↑p' t) = ↑(uliftMap H) (↑(Path.prod (Path.refl { down := 0 }) p') t)\n[PROOFSTEP]\nrw [Path.prod_coe]\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\np' : Path (fromTop x₀) (fromTop x₁)\n⊢ ∀ (t : ↑I), ↑f (↑p' t) = ↑(uliftMap H) ((fun t => (↑(Path.refl { down := 0 }) t, ↑p' t)) t)\n[PROOFSTEP]\nsimp_rw [ulift_apply]\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\np' : Path (fromTop x₀) (fromTop x₁)\n⊢ ∀ (t : ↑I), ↑f (↑p' t) = ↑H ((↑(Path.refl { down := 0 }) t).down, ↑p' t)\n[PROOFSTEP]\nsimp\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\np' : Path (fromTop x₀) (fromTop x₁)\n⊢ (π.map g).map (Quotient.mk (Path.Homotopic.setoid (fromTop x₀) (fromTop x₁)) p') =\n hcast (_ : ↑g x₀ = ↑H (1, x₀)) ≫\n (π.map (uliftMap H)).map\n (prodToProdTopI (𝟙 (fromTop { down := 1 }))\n (Quotient.mk (Path.Homotopic.setoid (fromTop x₀) (fromTop x₁)) p')) ≫\n hcast (_ : ↑H (1, x₁) = ↑g x₁)\n[PROOFSTEP]\napply @eq_path_of_eq_image _ _ _ _ H.uliftMap _ _ _ _ _ ((Path.refl (ULift.up _)).prod p')\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\np' : Path (fromTop x₀) (fromTop x₁)\n⊢ ∀ (t : ↑I), ↑g (↑p' t) = ↑(uliftMap H) (↑(Path.prod (Path.refl { down := 1 }) p') t)\n[PROOFSTEP]\nrw [Path.prod_coe]\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\np' : Path (fromTop x₀) (fromTop x₁)\n⊢ ∀ (t : ↑I), ↑g (↑p' t) = ↑(uliftMap H) ((fun t => (↑(Path.refl { down := 1 }) t, ↑p' t)) t)\n[PROOFSTEP]\nsimp_rw [ulift_apply]\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\np' : Path (fromTop x₀) (fromTop x₁)\n⊢ ∀ (t : ↑I), ↑g (↑p' t) = ↑H ((↑(Path.refl { down := 1 }) t).down, ↑p' t)\n[PROOFSTEP]\nsimp\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\nx : ↑X\n⊢ Quotient.mk (Path.Homotopic.setoid (fromTop (↑f x)) (fromTop (↑g x))) (evalAt H x) =\n hcast (_ : ↑f x = ↑H (0, x)) ≫\n (π.map (uliftMap H)).map (prodToProdTopI uhpath01 (𝟙 x)) ≫ hcast (_ : ↑H (1, x) = ↑g x)\n[PROOFSTEP]\ndsimp only [prodToProdTopI, uhpath01, hcast]\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\nx : ↑X\n⊢ Quotient.mk (Path.Homotopic.setoid (fromTop (↑f x)) (fromTop (↑g x))) (evalAt H x) =\n eqToHom (_ : ↑f x = ↑H (0, x)) ≫\n (π.map (uliftMap H)).map\n ((prodToProdTop (TopCat.of (ULift ↑I)) X).map\n (Quotient.mk (Path.Homotopic.setoid (fromTop { down := 0 }) (fromTop { down := 1 })) unitInterval.upath01,\n 𝟙 x)) ≫\n eqToHom (_ : ↑H (1, x) = ↑g x)\n[PROOFSTEP]\nrefine' (@Functor.conj_eqToHom_iff_heq (πₓ Y) _ _ _ _ _ _ _ _ (H.apply_one x).symm).mpr _\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\nx : ↑X\n⊢ HEq (Quotient.mk (Path.Homotopic.setoid (fromTop (↑f x)) (fromTop (↑g x))) (evalAt H x))\n ((π.map (uliftMap H)).map\n ((prodToProdTop (TopCat.of (ULift ↑I)) X).map\n (Quotient.mk (Path.Homotopic.setoid (fromTop { down := 0 }) (fromTop { down := 1 })) unitInterval.upath01,\n 𝟙 x)))\n[PROOFSTEP]\nsimp only [id_eq_path_refl, prodToProdTop_map, Path.Homotopic.prod_lift, map_eq, ← Path.Homotopic.map_lift]\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\nx : ↑X\n⊢ HEq (Quotient.mk (Path.Homotopic.setoid (fromTop (↑f x)) (fromTop (↑g x))) (evalAt H x))\n (Path.Homotopic.Quotient.mapFn\n ((prodToProdTop (TopCat.of (ULift ↑I)) X).map\n (Quotient.mk (Path.Homotopic.setoid (fromTop { down := 0 }) (fromTop { down := 1 })) unitInterval.upath01,\n Quotient.mk (Path.Homotopic.setoid x x) (Path.refl x)))\n (uliftMap H))\n[PROOFSTEP]\napply Path.Homotopic.hpath_hext\n[GOAL]\ncase hp\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\nx : ↑X\n⊢ ∀ (t : ↑I),\n ↑(evalAt H x) t =\n ↑((fun q => Path.map q (_ : Continuous ↑(uliftMap H))) (Path.prod unitInterval.upath01 (Path.refl x))) t\n[PROOFSTEP]\nintro\n[GOAL]\ncase hp\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\nx : ↑X\nt✝ : ↑I\n⊢ ↑(evalAt H x) t✝ =\n ↑((fun q => Path.map q (_ : Continuous ↑(uliftMap H))) (Path.prod unitInterval.upath01 (Path.refl x))) t✝\n[PROOFSTEP]\nrfl\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n⊢ (π.map f).map p ≫ Quotient.mk (Path.Homotopic.setoid ((π.map f).obj (fromTop x₁)) (↑g x₁)) (evalAt H x₁) =\n diagonalPath' H p ∧\n Quotient.mk (Path.Homotopic.setoid (fromTop (↑f x₀)) (↑g x₀)) (evalAt H x₀) ≫ (π.map g).map p = diagonalPath' H p\n[PROOFSTEP]\nrw [H.apply_zero_path, H.apply_one_path, H.evalAt_eq]\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n⊢ (hcast (_ : ↑f x₀ = ↑H (0, x₀)) ≫\n (π.map (uliftMap H)).map (prodToProdTopI (𝟙 (fromTop { down := 0 })) p) ≫ hcast (_ : ↑H (0, x₁) = ↑f x₁)) ≫\n Quotient.mk (Path.Homotopic.setoid ((π.map f).obj (fromTop x₁)) (↑g x₁)) (evalAt H x₁) =\n diagonalPath' H p ∧\n (hcast (_ : ↑f x₀ = ↑H (0, x₀)) ≫\n (π.map (uliftMap H)).map (prodToProdTopI uhpath01 (𝟙 x₀)) ≫ hcast (_ : ↑H (1, x₀) = ↑g x₀)) ≫\n hcast (_ : ↑g x₀ = ↑H (1, x₀)) ≫\n (π.map (uliftMap H)).map (prodToProdTopI (𝟙 (fromTop { down := 1 })) p) ≫ hcast (_ : ↑H (1, x₁) = ↑g x₁) =\n diagonalPath' H p\n[PROOFSTEP]\nerw [H.evalAt_eq]\n -- Porting note: `rw` didn't work, so using `erw`\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n⊢ (hcast (_ : ↑f x₀ = ↑H (0, x₀)) ≫\n (π.map (uliftMap H)).map (prodToProdTopI (𝟙 (fromTop { down := 0 })) p) ≫ hcast (_ : ↑H (0, x₁) = ↑f x₁)) ≫\n hcast (_ : ↑f (fromTop x₁) = ↑H (0, fromTop x₁)) ≫\n (π.map (uliftMap H)).map (prodToProdTopI uhpath01 (𝟙 (fromTop x₁))) ≫\n hcast (_ : ↑H (1, fromTop x₁) = ↑g (fromTop x₁)) =\n diagonalPath' H p ∧\n (hcast (_ : ↑f x₀ = ↑H (0, x₀)) ≫\n (π.map (uliftMap H)).map (prodToProdTopI uhpath01 (𝟙 x₀)) ≫ hcast (_ : ↑H (1, x₀) = ↑g x₀)) ≫\n hcast (_ : ↑g x₀ = ↑H (1, x₀)) ≫\n (π.map (uliftMap H)).map (prodToProdTopI (𝟙 (fromTop { down := 1 })) p) ≫ hcast (_ : ↑H (1, x₁) = ↑g x₁) =\n diagonalPath' H p\n[PROOFSTEP]\ndsimp only [prodToProdTopI]\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n⊢ (hcast (_ : ↑f x₀ = ↑H (0, x₀)) ≫\n (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (𝟙 (fromTop { down := 0 }), p)) ≫\n hcast (_ : ↑H (0, x₁) = ↑f x₁)) ≫\n hcast (_ : ↑f (fromTop x₁) = ↑H (0, fromTop x₁)) ≫\n (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (uhpath01, 𝟙 (fromTop x₁))) ≫\n hcast (_ : ↑H (1, fromTop x₁) = ↑g (fromTop x₁)) =\n diagonalPath' H p ∧\n (hcast (_ : ↑f x₀ = ↑H (0, x₀)) ≫\n (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (uhpath01, 𝟙 x₀)) ≫\n hcast (_ : ↑H (1, x₀) = ↑g x₀)) ≫\n hcast (_ : ↑g x₀ = ↑H (1, x₀)) ≫\n (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (𝟙 (fromTop { down := 1 }), p)) ≫\n hcast (_ : ↑H (1, x₁) = ↑g x₁) =\n diagonalPath' H p\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n⊢ (hcast (_ : ↑f x₀ = ↑H (0, x₀)) ≫\n (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (𝟙 (fromTop { down := 0 }), p)) ≫\n hcast (_ : ↑H (0, x₁) = ↑f x₁)) ≫\n hcast (_ : ↑f (fromTop x₁) = ↑H (0, fromTop x₁)) ≫\n (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (uhpath01, 𝟙 (fromTop x₁))) ≫\n hcast (_ : ↑H (1, fromTop x₁) = ↑g (fromTop x₁)) =\n diagonalPath' H p\n[PROOFSTEP]\nslice_lhs 2 4 =>\n rw [eqToHom_trans, eqToHom_refl]\n -- Porting note: this ↓ `simp` didn't do this\n[GOAL]\ncase a.a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (𝟙 (fromTop { down := 0 }), p)) ≫\n hcast (_ : ↑H (0, x₁) = ↑f x₁) ≫ hcast (_ : ↑f (fromTop x₁) = ↑H (0, fromTop x₁))\ncase a.a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (uhpath01, 𝟙 (fromTop x₁)))\ncase a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑H (1, fromTop x₁) = ↑g (fromTop x₁))\ncase a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑f x₀ = ↑H (0, x₀))\n[PROOFSTEP]\nrw [eqToHom_trans, eqToHom_refl]\n -- Porting note: this ↓ `simp` didn't do this\n[GOAL]\ncase a.a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (𝟙 (fromTop { down := 0 }), p)) ≫\n hcast (_ : ↑H (0, x₁) = ↑f x₁) ≫ hcast (_ : ↑f (fromTop x₁) = ↑H (0, fromTop x₁))\ncase a.a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (uhpath01, 𝟙 (fromTop x₁)))\ncase a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑H (1, fromTop x₁) = ↑g (fromTop x₁))\ncase a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑f x₀ = ↑H (0, x₀))\n[PROOFSTEP]\nrw [eqToHom_trans, eqToHom_refl]\n -- Porting note: this ↓ `simp` didn't do this\n[GOAL]\ncase a.a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (𝟙 (fromTop { down := 0 }), p)) ≫\n hcast (_ : ↑H (0, x₁) = ↑f x₁) ≫ hcast (_ : ↑f (fromTop x₁) = ↑H (0, fromTop x₁))\ncase a.a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (uhpath01, 𝟙 (fromTop x₁)))\ncase a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑H (1, fromTop x₁) = ↑g (fromTop x₁))\ncase a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑f x₀ = ↑H (0, x₀))\n[PROOFSTEP]\nrw [eqToHom_trans, eqToHom_refl]\n -- Porting note: this ↓ `simp` didn't do this\n[GOAL]\ncase left\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n⊢ hcast (_ : ↑f x₀ = ↑H (0, x₀)) ≫\n (((π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (𝟙 (fromTop { down := 0 }), p)) ≫\n 𝟙 ((π.map (uliftMap H)).obj ((prodToProdTop (TopCat.of (ULift ↑I)) X).obj ({ down := 0 }, x₁)))) ≫\n (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (uhpath01, 𝟙 (fromTop x₁)))) ≫\n hcast (_ : ↑H (1, fromTop x₁) = ↑g (fromTop x₁)) =\n diagonalPath' H p\n[PROOFSTEP]\nslice_lhs 2 4 => simp [← CategoryTheory.Functor.map_comp]\n[GOAL]\ncase a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (𝟙 (fromTop { down := 0 }), p)) ≫\n 𝟙 ((π.map (uliftMap H)).obj ((prodToProdTop (TopCat.of (ULift ↑I)) X).obj ({ down := 0 }, x₁))) ≫\n (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (uhpath01, 𝟙 (fromTop x₁)))\ncase a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑H (1, fromTop x₁) = ↑g (fromTop x₁))\ncase a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑f x₀ = ↑H (0, x₀))\n[PROOFSTEP]\nsimp [← CategoryTheory.Functor.map_comp]\n[GOAL]\ncase a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (𝟙 (fromTop { down := 0 }), p)) ≫\n 𝟙 ((π.map (uliftMap H)).obj ((prodToProdTop (TopCat.of (ULift ↑I)) X).obj ({ down := 0 }, x₁))) ≫\n (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (uhpath01, 𝟙 (fromTop x₁)))\ncase a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑H (1, fromTop x₁) = ↑g (fromTop x₁))\ncase a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑f x₀ = ↑H (0, x₀))\n[PROOFSTEP]\nsimp [← CategoryTheory.Functor.map_comp]\n[GOAL]\ncase a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (𝟙 (fromTop { down := 0 }), p)) ≫\n 𝟙 ((π.map (uliftMap H)).obj ((prodToProdTop (TopCat.of (ULift ↑I)) X).obj ({ down := 0 }, x₁))) ≫\n (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (uhpath01, 𝟙 (fromTop x₁)))\ncase a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑H (1, fromTop x₁) = ↑g (fromTop x₁))\ncase a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑f x₀ = ↑H (0, x₀))\n[PROOFSTEP]\nsimp [← CategoryTheory.Functor.map_comp]\n[GOAL]\ncase right\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n⊢ (hcast (_ : ↑f x₀ = ↑H (0, x₀)) ≫\n (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (uhpath01, 𝟙 x₀)) ≫\n hcast (_ : ↑H (1, x₀) = ↑g x₀)) ≫\n hcast (_ : ↑g x₀ = ↑H (1, x₀)) ≫\n (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (𝟙 (fromTop { down := 1 }), p)) ≫\n hcast (_ : ↑H (1, x₁) = ↑g x₁) =\n diagonalPath' H p\n[PROOFSTEP]\nslice_lhs 2 4 =>\n rw [eqToHom_trans, eqToHom_refl]\n -- Porting note: this ↓ `simp` didn't do this\n[GOAL]\ncase a.a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (uhpath01, 𝟙 x₀)) ≫\n hcast (_ : ↑H (1, x₀) = ↑g x₀) ≫ hcast (_ : ↑g x₀ = ↑H (1, x₀))\ncase a.a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (𝟙 (fromTop { down := 1 }), p))\ncase a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑H (1, x₁) = ↑g x₁)\ncase a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑f x₀ = ↑H (0, x₀))\n[PROOFSTEP]\nrw [eqToHom_trans, eqToHom_refl]\n -- Porting note: this ↓ `simp` didn't do this\n[GOAL]\ncase a.a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (uhpath01, 𝟙 x₀)) ≫\n hcast (_ : ↑H (1, x₀) = ↑g x₀) ≫ hcast (_ : ↑g x₀ = ↑H (1, x₀))\ncase a.a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (𝟙 (fromTop { down := 1 }), p))\ncase a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑H (1, x₁) = ↑g x₁)\ncase a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑f x₀ = ↑H (0, x₀))\n[PROOFSTEP]\nrw [eqToHom_trans, eqToHom_refl]\n -- Porting note: this ↓ `simp` didn't do this\n[GOAL]\ncase a.a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (uhpath01, 𝟙 x₀)) ≫\n hcast (_ : ↑H (1, x₀) = ↑g x₀) ≫ hcast (_ : ↑g x₀ = ↑H (1, x₀))\ncase a.a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (𝟙 (fromTop { down := 1 }), p))\ncase a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑H (1, x₁) = ↑g x₁)\ncase a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑f x₀ = ↑H (0, x₀))\n[PROOFSTEP]\nrw [eqToHom_trans, eqToHom_refl]\n -- Porting note: this ↓ `simp` didn't do this\n[GOAL]\ncase right\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n⊢ hcast (_ : ↑f x₀ = ↑H (0, x₀)) ≫\n (((π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (uhpath01, 𝟙 x₀)) ≫\n 𝟙 ((π.map (uliftMap H)).obj ((prodToProdTop (TopCat.of (ULift ↑I)) X).obj ({ down := 1 }, x₀)))) ≫\n (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (𝟙 (fromTop { down := 1 }), p))) ≫\n hcast (_ : ↑H (1, x₁) = ↑g x₁) =\n diagonalPath' H p\n[PROOFSTEP]\nslice_lhs 2 4 => simp [← CategoryTheory.Functor.map_comp]\n[GOAL]\ncase a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (uhpath01, 𝟙 x₀)) ≫\n 𝟙 ((π.map (uliftMap H)).obj ((prodToProdTop (TopCat.of (ULift ↑I)) X).obj ({ down := 1 }, x₀))) ≫\n (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (𝟙 (fromTop { down := 1 }), p))\ncase a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑H (1, x₁) = ↑g x₁)\ncase a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑f x₀ = ↑H (0, x₀))\n[PROOFSTEP]\nsimp [← CategoryTheory.Functor.map_comp]\n[GOAL]\ncase a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (uhpath01, 𝟙 x₀)) ≫\n 𝟙 ((π.map (uliftMap H)).obj ((prodToProdTop (TopCat.of (ULift ↑I)) X).obj ({ down := 1 }, x₀))) ≫\n (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (𝟙 (fromTop { down := 1 }), p))\ncase a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑H (1, x₁) = ↑g x₁)\ncase a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑f x₀ = ↑H (0, x₀))\n[PROOFSTEP]\nsimp [← CategoryTheory.Functor.map_comp]\n[GOAL]\ncase a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (uhpath01, 𝟙 x₀)) ≫\n 𝟙 ((π.map (uliftMap H)).obj ((prodToProdTop (TopCat.of (ULift ↑I)) X).obj ({ down := 1 }, x₀))) ≫\n (π.map (uliftMap H)).map ((prodToProdTop (TopCat.of (ULift ↑I)) X).map (𝟙 (fromTop { down := 1 }), p))\ncase a.a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑H (1, x₁) = ↑g x₁)\ncase a\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : Homotopy f g\nx₀ x₁ : ↑X\np : fromTop x₀ ⟶ fromTop x₁\n| hcast (_ : ↑f x₀ = ↑H (0, x₀))\n[PROOFSTEP]\nsimp [← CategoryTheory.Functor.map_comp]\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : ContinuousMap.Homotopy f g\nx y : ↑(π.obj X)\np : x ⟶ y\n⊢ (π.map f).map p ≫\n (fun x =>\n Quotient.mk (Path.Homotopic.setoid ((π.map f).obj x) ((π.map g).obj x)) (ContinuousMap.Homotopy.evalAt H x))\n y =\n (fun x =>\n Quotient.mk (Path.Homotopic.setoid ((π.map f).obj x) ((π.map g).obj x)) (ContinuousMap.Homotopy.evalAt H x))\n x ≫\n (π.map g).map p\n[PROOFSTEP]\nerw [(H.eq_diag_path p).1, (H.eq_diag_path p).2]\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : ContinuousMap.Homotopy f g\n⊢ IsIso (homotopicMapsNatIso H)\n[PROOFSTEP]\napply NatIso.isIso_of_isIso_app\n[GOAL]\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : ContinuousMap.Homotopy f g\nhequiv : ↑X ≃ₕ ↑Y\n⊢ ↑(π.obj X) ≌ ↑(π.obj Y)\n[PROOFSTEP]\napply CategoryTheory.Equivalence.mk (πₘ hequiv.toFun : πₓ X ⥤ πₓ Y) (πₘ hequiv.invFun : πₓ Y ⥤ πₓ X)\n[GOAL]\ncase η\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : ContinuousMap.Homotopy f g\nhequiv : ↑X ≃ₕ ↑Y\n⊢ 𝟭 ↑(π.obj X) ≅ π.map hequiv.toFun ⋙ π.map hequiv.invFun\n[PROOFSTEP]\nsimp only [Grpd.hom_to_functor, Grpd.id_to_functor]\n[GOAL]\ncase ε\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : ContinuousMap.Homotopy f g\nhequiv : ↑X ≃ₕ ↑Y\n⊢ π.map hequiv.invFun ⋙ π.map hequiv.toFun ≅ 𝟭 ↑(π.obj Y)\n[PROOFSTEP]\nsimp only [Grpd.hom_to_functor, Grpd.id_to_functor]\n[GOAL]\ncase η\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : ContinuousMap.Homotopy f g\nhequiv : ↑X ≃ₕ ↑Y\n⊢ 𝟙 (π.obj X) ≅ π.map hequiv.toFun ⋙ π.map hequiv.invFun\n[PROOFSTEP]\nconvert (asIso (homotopicMapsNatIso hequiv.left_inv.some)).symm\n[GOAL]\ncase h.e'_3\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : ContinuousMap.Homotopy f g\nhequiv : ↑X ≃ₕ ↑Y\n⊢ 𝟙 (π.obj X) = π.map (ContinuousMap.id ↑X)\ncase h.e'_4\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : ContinuousMap.Homotopy f g\nhequiv : ↑X ≃ₕ ↑Y\n⊢ π.map hequiv.toFun ⋙ π.map hequiv.invFun = π.map (ContinuousMap.comp hequiv.invFun hequiv.toFun)\n[PROOFSTEP]\nexacts [((π).map_id X).symm, ((π).map_comp _ _).symm]\n[GOAL]\ncase ε\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : ContinuousMap.Homotopy f g\nhequiv : ↑X ≃ₕ ↑Y\n⊢ π.map hequiv.invFun ⋙ π.map hequiv.toFun ≅ 𝟙 (π.obj Y)\n[PROOFSTEP]\nconvert asIso (homotopicMapsNatIso hequiv.right_inv.some)\n[GOAL]\ncase h.e'_3\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : ContinuousMap.Homotopy f g\nhequiv : ↑X ≃ₕ ↑Y\n⊢ π.map hequiv.invFun ⋙ π.map hequiv.toFun = π.map (ContinuousMap.comp hequiv.toFun hequiv.invFun)\ncase h.e'_4\nX Y : TopCat\nf g : C(↑X, ↑Y)\nH : ContinuousMap.Homotopy f g\nhequiv : ↑X ≃ₕ ↑Y\n⊢ 𝟙 (π.obj Y) = π.map (ContinuousMap.id ↑Y)\n[PROOFSTEP]\nexacts [((π).map_comp _ _).symm, ((π).map_id Y).symm]\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicTopology.FundamentalGroupoid.InducedMaps", "llama_tokens": 13795, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8311430478583168, "lm_q2_score": 0.665410558746814, "lm_q1q2_score": 0.5530513598739326}} {"text": "[GOAL]\nn k : ℕ\nx : Fin k → ℕ\n⊢ x ∈ antidiagonalTuple k n ↔ ∑ i : Fin k, x i = n\n[PROOFSTEP]\ninduction x using Fin.consInduction generalizing n with\n| h0 =>\n cases n\n · simp\n · simp [eq_comm]\n| h x₀ x ih =>\n simp_rw [Fin.sum_cons]\n rw [antidiagonalTuple]\n -- porting note: simp_rw doesn't use the equation lemma properly\n simp_rw [List.mem_bind, List.mem_map, List.Nat.mem_antidiagonal, Fin.cons_eq_cons, exists_eq_right_right, ih,\n @eq_comm _ _ (Prod.snd _), and_comm (a := Prod.snd _ = _), ← Prod.mk.inj_iff (a₁ := Prod.fst _), Prod.mk.eta,\n exists_eq_right]\n[GOAL]\nn k : ℕ\nx : Fin k → ℕ\n⊢ x ∈ antidiagonalTuple k n ↔ ∑ i : Fin k, x i = n\n[PROOFSTEP]\ninduction x using Fin.consInduction generalizing n with\n| h0 =>\n cases n\n · simp\n · simp [eq_comm]\n| h x₀ x ih =>\n simp_rw [Fin.sum_cons]\n rw [antidiagonalTuple]\n -- porting note: simp_rw doesn't use the equation lemma properly\n simp_rw [List.mem_bind, List.mem_map, List.Nat.mem_antidiagonal, Fin.cons_eq_cons, exists_eq_right_right, ih,\n @eq_comm _ _ (Prod.snd _), and_comm (a := Prod.snd _ = _), ← Prod.mk.inj_iff (a₁ := Prod.fst _), Prod.mk.eta,\n exists_eq_right]\n[GOAL]\ncase h0\nk n : ℕ\n⊢ Fin.elim0 ∈ antidiagonalTuple 0 n ↔ ∑ i : Fin 0, Fin.elim0 i = n\n[PROOFSTEP]\n\n| h0 =>\n cases n\n · simp\n · simp [eq_comm]\n[GOAL]\ncase h0\nk n : ℕ\n⊢ Fin.elim0 ∈ antidiagonalTuple 0 n ↔ ∑ i : Fin 0, Fin.elim0 i = n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase h0.zero\nk : ℕ\n⊢ Fin.elim0 ∈ antidiagonalTuple 0 Nat.zero ↔ ∑ i : Fin 0, Fin.elim0 i = Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h0.succ\nk n✝ : ℕ\n⊢ Fin.elim0 ∈ antidiagonalTuple 0 (Nat.succ n✝) ↔ ∑ i : Fin 0, Fin.elim0 i = Nat.succ n✝\n[PROOFSTEP]\nsimp [eq_comm]\n[GOAL]\ncase h\nk n✝ x₀ : ℕ\nx : Fin n✝ → ℕ\nih : ∀ {n : ℕ}, x ∈ antidiagonalTuple n✝ n ↔ ∑ i : Fin n✝, x i = n\nn : ℕ\n⊢ Fin.cons x₀ x ∈ antidiagonalTuple (n✝ + 1) n ↔ ∑ i : Fin (n✝ + 1), Fin.cons x₀ x i = n\n[PROOFSTEP]\n\n| h x₀ x ih =>\n simp_rw [Fin.sum_cons]\n rw [antidiagonalTuple]\n -- porting note: simp_rw doesn't use the equation lemma properly\n simp_rw [List.mem_bind, List.mem_map, List.Nat.mem_antidiagonal, Fin.cons_eq_cons, exists_eq_right_right, ih,\n @eq_comm _ _ (Prod.snd _), and_comm (a := Prod.snd _ = _), ← Prod.mk.inj_iff (a₁ := Prod.fst _), Prod.mk.eta,\n exists_eq_right]\n[GOAL]\ncase h\nk n✝ x₀ : ℕ\nx : Fin n✝ → ℕ\nih : ∀ {n : ℕ}, x ∈ antidiagonalTuple n✝ n ↔ ∑ i : Fin n✝, x i = n\nn : ℕ\n⊢ Fin.cons x₀ x ∈ antidiagonalTuple (n✝ + 1) n ↔ ∑ i : Fin (n✝ + 1), Fin.cons x₀ x i = n\n[PROOFSTEP]\nsimp_rw [Fin.sum_cons]\n[GOAL]\ncase h\nk n✝ x₀ : ℕ\nx : Fin n✝ → ℕ\nih : ∀ {n : ℕ}, x ∈ antidiagonalTuple n✝ n ↔ ∑ i : Fin n✝, x i = n\nn : ℕ\n⊢ Fin.cons x₀ x ∈ antidiagonalTuple (n✝ + 1) n ↔ x₀ + ∑ i : Fin n✝, x i = n\n[PROOFSTEP]\nrw [antidiagonalTuple]\n -- porting note: simp_rw doesn't use the equation lemma properly\n[GOAL]\ncase h\nk n✝ x₀ : ℕ\nx : Fin n✝ → ℕ\nih : ∀ {n : ℕ}, x ∈ antidiagonalTuple n✝ n ↔ ∑ i : Fin n✝, x i = n\nn : ℕ\n⊢ (Fin.cons x₀ x ∈\n List.bind (antidiagonal n) fun ni => map (fun x => Fin.cons ni.fst x) (antidiagonalTuple n✝ ni.snd)) ↔\n x₀ + ∑ i : Fin n✝, x i = n\n[PROOFSTEP]\nsimp_rw [List.mem_bind, List.mem_map, List.Nat.mem_antidiagonal, Fin.cons_eq_cons, exists_eq_right_right, ih,\n @eq_comm _ _ (Prod.snd _), and_comm (a := Prod.snd _ = _), ← Prod.mk.inj_iff (a₁ := Prod.fst _), Prod.mk.eta,\n exists_eq_right]\n[GOAL]\nk n : ℕ\n⊢ Nodup (antidiagonalTuple k n)\n[PROOFSTEP]\ninduction' k with k ih generalizing n\n[GOAL]\ncase zero\nn✝ n : ℕ\n⊢ Nodup (antidiagonalTuple Nat.zero n)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero.zero\nn : ℕ\n⊢ Nodup (antidiagonalTuple Nat.zero Nat.zero)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase zero.succ\nn n✝ : ℕ\n⊢ Nodup (antidiagonalTuple Nat.zero (Nat.succ n✝))\n[PROOFSTEP]\nsimp [eq_comm]\n[GOAL]\ncase succ\nn✝ k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\nn : ℕ\n⊢ Nodup (antidiagonalTuple (Nat.succ k) n)\n[PROOFSTEP]\nsimp_rw [antidiagonalTuple, List.nodup_bind]\n[GOAL]\ncase succ\nn✝ k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\nn : ℕ\n⊢ (∀ (x : ℕ × ℕ), x ∈ antidiagonal n → Nodup (map (fun x_1 => Fin.cons x.fst x_1) (antidiagonalTuple k x.snd))) ∧\n Pairwise\n (fun a b =>\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd)))\n (antidiagonal n)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase succ.left\nn✝ k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\nn : ℕ\n⊢ ∀ (x : ℕ × ℕ), x ∈ antidiagonal n → Nodup (map (fun x_1 => Fin.cons x.fst x_1) (antidiagonalTuple k x.snd))\n[PROOFSTEP]\nintro i _\n[GOAL]\ncase succ.left\nn✝ k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\nn : ℕ\ni : ℕ × ℕ\na✝ : i ∈ antidiagonal n\n⊢ Nodup (map (fun x => Fin.cons i.fst x) (antidiagonalTuple k i.snd))\n[PROOFSTEP]\nexact (ih i.snd).map (Fin.cons_right_injective (α := fun _ => ℕ) i.fst)\n[GOAL]\ncase succ.right\nn✝ k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\nn : ℕ\n⊢ Pairwise\n (fun a b =>\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd)))\n (antidiagonal n)\n[PROOFSTEP]\ninduction' n with n n_ih\n[GOAL]\ncase succ.right.zero\nn k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\n⊢ Pairwise\n (fun a b =>\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd)))\n (antidiagonal Nat.zero)\n[PROOFSTEP]\nexact List.pairwise_singleton _ _\n[GOAL]\ncase succ.right.succ\nn✝ k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\nn : ℕ\nn_ih :\n Pairwise\n (fun a b =>\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd)))\n (antidiagonal n)\n⊢ Pairwise\n (fun a b =>\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd)))\n (antidiagonal (Nat.succ n))\n[PROOFSTEP]\nrw [List.Nat.antidiagonal_succ]\n[GOAL]\ncase succ.right.succ\nn✝ k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\nn : ℕ\nn_ih :\n Pairwise\n (fun a b =>\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd)))\n (antidiagonal n)\n⊢ Pairwise\n (fun a b =>\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd)))\n ((0, n + 1) :: map (Prod.map Nat.succ id) (antidiagonal n))\n[PROOFSTEP]\nrefine' List.Pairwise.cons (fun a ha x hx₁ hx₂ => _) (n_ih.map _ fun a b h x hx₁ hx₂ => _)\n[GOAL]\ncase succ.right.succ.refine'_1\nn✝ k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\nn : ℕ\nn_ih :\n Pairwise\n (fun a b =>\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd)))\n (antidiagonal n)\na : ℕ × ℕ\nha : a ∈ map (Prod.map Nat.succ id) (antidiagonal n)\nx : Fin (Nat.succ k) → ℕ\nhx₁ : x ∈ map (fun x => Fin.cons (0, n + 1).fst x) (antidiagonalTuple k (0, n + 1).snd)\nhx₂ : x ∈ map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd)\n⊢ False\n[PROOFSTEP]\nrw [List.mem_map] at hx₁ hx₂ ha \n[GOAL]\ncase succ.right.succ.refine'_1\nn✝ k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\nn : ℕ\nn_ih :\n Pairwise\n (fun a b =>\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd)))\n (antidiagonal n)\na : ℕ × ℕ\nha : ∃ a_1, a_1 ∈ antidiagonal n ∧ Prod.map Nat.succ id a_1 = a\nx : Fin (Nat.succ k) → ℕ\nhx₁ : ∃ a, a ∈ antidiagonalTuple k (0, n + 1).snd ∧ Fin.cons (0, n + 1).fst a = x\nhx₂ : ∃ a_1, a_1 ∈ antidiagonalTuple k a.snd ∧ Fin.cons a.fst a_1 = x\n⊢ False\n[PROOFSTEP]\nobtain ⟨⟨a, -, rfl⟩, ⟨x₁, -, rfl⟩, ⟨x₂, -, h⟩⟩ := ha, hx₁, hx₂\n[GOAL]\ncase succ.right.succ.refine'_1.intro.intro.intro.intro.intro.intro\nn✝ k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\nn : ℕ\nn_ih :\n Pairwise\n (fun a b =>\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd)))\n (antidiagonal n)\na : ℕ × ℕ\nx₁ x₂ : Fin k → ℕ\nh : Fin.cons (Prod.map Nat.succ id a).fst x₂ = Fin.cons (0, n + 1).fst x₁\n⊢ False\n[PROOFSTEP]\nrw [Fin.cons_eq_cons] at h \n[GOAL]\ncase succ.right.succ.refine'_1.intro.intro.intro.intro.intro.intro\nn✝ k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\nn : ℕ\nn_ih :\n Pairwise\n (fun a b =>\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd)))\n (antidiagonal n)\na : ℕ × ℕ\nx₁ x₂ : Fin k → ℕ\nh : (Prod.map Nat.succ id a).fst = (0, n + 1).fst ∧ x₂ = x₁\n⊢ False\n[PROOFSTEP]\ninjection h.1\n[GOAL]\ncase succ.right.succ.refine'_2\nn✝ k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\nn : ℕ\nn_ih :\n Pairwise\n (fun a b =>\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd)))\n (antidiagonal n)\na b : ℕ × ℕ\nh :\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd))\nx : Fin (Nat.succ k) → ℕ\nhx₁ : x ∈ map (fun x => Fin.cons (Prod.map Nat.succ id a).fst x) (antidiagonalTuple k (Prod.map Nat.succ id a).snd)\nhx₂ : x ∈ map (fun x => Fin.cons (Prod.map Nat.succ id b).fst x) (antidiagonalTuple k (Prod.map Nat.succ id b).snd)\n⊢ False\n[PROOFSTEP]\nrw [List.mem_map] at hx₁ hx₂ \n[GOAL]\ncase succ.right.succ.refine'_2\nn✝ k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\nn : ℕ\nn_ih :\n Pairwise\n (fun a b =>\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd)))\n (antidiagonal n)\na b : ℕ × ℕ\nh :\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd))\nx : Fin (Nat.succ k) → ℕ\nhx₁ : ∃ a_1, a_1 ∈ antidiagonalTuple k (Prod.map Nat.succ id a).snd ∧ Fin.cons (Prod.map Nat.succ id a).fst a_1 = x\nhx₂ : ∃ a, a ∈ antidiagonalTuple k (Prod.map Nat.succ id b).snd ∧ Fin.cons (Prod.map Nat.succ id b).fst a = x\n⊢ False\n[PROOFSTEP]\nobtain ⟨⟨x₁, hx₁, rfl⟩, ⟨x₂, hx₂, h₁₂⟩⟩ := hx₁, hx₂\n[GOAL]\ncase succ.right.succ.refine'_2.intro.intro.intro.intro\nn✝ k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\nn : ℕ\nn_ih :\n Pairwise\n (fun a b =>\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd)))\n (antidiagonal n)\na b : ℕ × ℕ\nh :\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd))\nx₁ : Fin k → ℕ\nhx₁ : x₁ ∈ antidiagonalTuple k (Prod.map Nat.succ id a).snd\nx₂ : Fin k → ℕ\nhx₂ : x₂ ∈ antidiagonalTuple k (Prod.map Nat.succ id b).snd\nh₁₂ : Fin.cons (Prod.map Nat.succ id b).fst x₂ = Fin.cons (Prod.map Nat.succ id a).fst x₁\n⊢ False\n[PROOFSTEP]\ndsimp at h₁₂ \n[GOAL]\ncase succ.right.succ.refine'_2.intro.intro.intro.intro\nn✝ k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\nn : ℕ\nn_ih :\n Pairwise\n (fun a b =>\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd)))\n (antidiagonal n)\na b : ℕ × ℕ\nh :\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd))\nx₁ : Fin k → ℕ\nhx₁ : x₁ ∈ antidiagonalTuple k (Prod.map Nat.succ id a).snd\nx₂ : Fin k → ℕ\nhx₂ : x₂ ∈ antidiagonalTuple k (Prod.map Nat.succ id b).snd\nh₁₂ : Fin.cons (Nat.succ b.fst) x₂ = Fin.cons (Nat.succ a.fst) x₁\n⊢ False\n[PROOFSTEP]\nrw [Fin.cons_eq_cons, Nat.succ_inj'] at h₁₂ \n[GOAL]\ncase succ.right.succ.refine'_2.intro.intro.intro.intro\nn✝ k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\nn : ℕ\nn_ih :\n Pairwise\n (fun a b =>\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd)))\n (antidiagonal n)\na b : ℕ × ℕ\nh :\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd))\nx₁ : Fin k → ℕ\nhx₁ : x₁ ∈ antidiagonalTuple k (Prod.map Nat.succ id a).snd\nx₂ : Fin k → ℕ\nhx₂ : x₂ ∈ antidiagonalTuple k (Prod.map Nat.succ id b).snd\nh₁₂ : b.fst = a.fst ∧ x₂ = x₁\n⊢ False\n[PROOFSTEP]\nobtain ⟨h₁₂, rfl⟩ := h₁₂\n[GOAL]\ncase succ.right.succ.refine'_2.intro.intro.intro.intro.intro\nn✝ k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\nn : ℕ\nn_ih :\n Pairwise\n (fun a b =>\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd)))\n (antidiagonal n)\na b : ℕ × ℕ\nh :\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd))\nx₂ : Fin k → ℕ\nhx₂ : x₂ ∈ antidiagonalTuple k (Prod.map Nat.succ id b).snd\nh₁₂ : b.fst = a.fst\nhx₁ : x₂ ∈ antidiagonalTuple k (Prod.map Nat.succ id a).snd\n⊢ False\n[PROOFSTEP]\nrw [h₁₂] at h \n[GOAL]\ncase succ.right.succ.refine'_2.intro.intro.intro.intro.intro\nn✝ k : ℕ\nih : ∀ (n : ℕ), Nodup (antidiagonalTuple k n)\nn : ℕ\nn_ih :\n Pairwise\n (fun a b =>\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons b.fst x) (antidiagonalTuple k b.snd)))\n (antidiagonal n)\na b : ℕ × ℕ\nh :\n Disjoint (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k a.snd))\n (map (fun x => Fin.cons a.fst x) (antidiagonalTuple k b.snd))\nx₂ : Fin k → ℕ\nhx₂ : x₂ ∈ antidiagonalTuple k (Prod.map Nat.succ id b).snd\nh₁₂ : b.fst = a.fst\nhx₁ : x₂ ∈ antidiagonalTuple k (Prod.map Nat.succ id a).snd\n⊢ False\n[PROOFSTEP]\nexact h (List.mem_map_of_mem _ hx₁) (List.mem_map_of_mem _ hx₂)\n[GOAL]\nk : ℕ\n⊢ antidiagonalTuple (k + 1) 0 = [0]\n[PROOFSTEP]\nrw [antidiagonalTuple, antidiagonal_zero, List.bind_singleton, antidiagonalTuple_zero_right k, List.map_singleton]\n[GOAL]\nk : ℕ\n⊢ [Fin.cons (0, 0).fst 0] = [0]\n[PROOFSTEP]\nexact congr_arg (fun x => [x]) Matrix.cons_zero_zero\n[GOAL]\nn : ℕ\n⊢ antidiagonalTuple 1 n = [![n]]\n[PROOFSTEP]\nsimp_rw [antidiagonalTuple, antidiagonal, List.range_succ, List.map_append, List.map_singleton, tsub_self,\n List.append_bind, List.bind_singleton, List.map_bind]\n[GOAL]\nn : ℕ\n⊢ (List.bind (range n) fun a => map (fun x => Fin.cons a x) (antidiagonalTuple 0 (n - a))) ++\n map (fun x => Fin.cons n x) (antidiagonalTuple 0 0) =\n [![n]]\n[PROOFSTEP]\nconv_rhs => rw [← List.nil_append [![n]]]\n[GOAL]\nn : ℕ\n| [![n]]\n[PROOFSTEP]\nrw [← List.nil_append [![n]]]\n[GOAL]\nn : ℕ\n| [![n]]\n[PROOFSTEP]\nrw [← List.nil_append [![n]]]\n[GOAL]\nn : ℕ\n| [![n]]\n[PROOFSTEP]\nrw [← List.nil_append [![n]]]\n[GOAL]\nn : ℕ\n⊢ (List.bind (range n) fun a => map (fun x => Fin.cons a x) (antidiagonalTuple 0 (n - a))) ++\n map (fun x => Fin.cons n x) (antidiagonalTuple 0 0) =\n [] ++ [![n]]\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nn : ℕ\n⊢ (List.bind (range n) fun a => map (fun x => Fin.cons a x) (antidiagonalTuple 0 (n - a))) = []\n[PROOFSTEP]\nsimp_rw [List.bind_eq_nil, List.mem_range, List.map_eq_nil]\n[GOAL]\ncase e_a\nn : ℕ\n⊢ ∀ (x : ℕ), x < n → antidiagonalTuple 0 (n - x) = []\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase e_a\nn x : ℕ\nhx : x < n\n⊢ antidiagonalTuple 0 (n - x) = []\n[PROOFSTEP]\nobtain ⟨m, rfl⟩ := Nat.exists_eq_add_of_lt hx\n[GOAL]\ncase e_a.intro\nx m : ℕ\nhx : x < x + m + 1\n⊢ antidiagonalTuple 0 (x + m + 1 - x) = []\n[PROOFSTEP]\nrw [add_assoc, add_tsub_cancel_left, antidiagonalTuple_zero_succ]\n[GOAL]\nn : ℕ\n⊢ antidiagonalTuple 2 n = map (fun i => ![i.fst, i.snd]) (antidiagonal n)\n[PROOFSTEP]\nrw [antidiagonalTuple]\n[GOAL]\nn : ℕ\n⊢ (List.bind (antidiagonal n) fun ni => map (fun x => Fin.cons ni.fst x) (antidiagonalTuple 1 ni.snd)) =\n map (fun i => ![i.fst, i.snd]) (antidiagonal n)\n[PROOFSTEP]\nsimp_rw [antidiagonalTuple_one, List.map_singleton]\n[GOAL]\nn : ℕ\n⊢ (List.bind (antidiagonal n) fun ni => [Fin.cons ni.fst ![ni.snd]]) = map (fun i => ![i.fst, i.snd]) (antidiagonal n)\n[PROOFSTEP]\nrw [List.map_eq_bind]\n[GOAL]\nn : ℕ\n⊢ (List.bind (antidiagonal n) fun ni => [Fin.cons ni.fst ![ni.snd]]) =\n List.bind (antidiagonal n) fun x => [![x.fst, x.snd]]\n[PROOFSTEP]\nrfl\n[GOAL]\nk n : ℕ\n⊢ Pairwise (Pi.Lex (fun x x_1 => x < x_1) fun x x x_1 => x < x_1) (antidiagonalTuple (k + 1) n)\n[PROOFSTEP]\nsimp_rw [antidiagonalTuple, List.pairwise_bind, List.pairwise_map, List.mem_map, forall_exists_index, and_imp,\n forall_apply_eq_imp_iff₂]\n[GOAL]\nk n : ℕ\n⊢ (∀ (a : ℕ × ℕ),\n a ∈ antidiagonal n →\n Pairwise\n (fun a_2 b => Pi.Lex (fun x x_1 => x < x_1) (fun x x x_1 => x < x_1) (Fin.cons a.fst a_2) (Fin.cons a.fst b))\n (antidiagonalTuple (Nat.add k 0) a.snd)) ∧\n Pairwise\n (fun a₁ a₂ =>\n ∀ (a : Fin (Nat.add k 0) → ℕ),\n a ∈ antidiagonalTuple (Nat.add k 0) a₁.snd →\n ∀ (a_2 : Fin (Nat.add k 0) → ℕ),\n a_2 ∈ antidiagonalTuple (Nat.add k 0) a₂.snd →\n Pi.Lex (fun x x_1 => x < x_1) (fun x x x_1 => x < x_1) (Fin.cons a₁.fst a) (Fin.cons a₂.fst a_2))\n (antidiagonal n)\n[PROOFSTEP]\nsimp only [mem_antidiagonal, Prod.forall, and_imp, forall_apply_eq_imp_iff₂]\n[GOAL]\nk n : ℕ\n⊢ (∀ (a b : ℕ),\n a + b = n →\n Pairwise (fun a_2 b => Pi.Lex (fun x x_1 => x < x_1) (fun x x x_1 => x < x_1) (Fin.cons a a_2) (Fin.cons a b))\n (antidiagonalTuple (Nat.add k 0) b)) ∧\n Pairwise\n (fun a₁ a₂ =>\n ∀ (a : Fin (Nat.add k 0) → ℕ),\n a ∈ antidiagonalTuple (Nat.add k 0) a₁.snd →\n ∀ (a_2 : Fin (Nat.add k 0) → ℕ),\n a_2 ∈ antidiagonalTuple (Nat.add k 0) a₂.snd →\n Pi.Lex (fun x x_1 => x < x_1) (fun x x x_1 => x < x_1) (Fin.cons a₁.fst a) (Fin.cons a₂.fst a_2))\n (antidiagonal n)\n[PROOFSTEP]\nsimp only [Fin.pi_lex_lt_cons_cons, eq_self_iff_true, true_and_iff, lt_self_iff_false, false_or_iff]\n[GOAL]\nk n : ℕ\n⊢ (∀ (a b : ℕ),\n a + b = n →\n Pairwise (fun a b => Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a b)\n (antidiagonalTuple (Nat.add k 0) b)) ∧\n Pairwise\n (fun a₁ a₂ =>\n ∀ (a : Fin (Nat.add k 0) → ℕ),\n a ∈ antidiagonalTuple (Nat.add k 0) a₁.snd →\n ∀ (a_2 : Fin (Nat.add k 0) → ℕ),\n a_2 ∈ antidiagonalTuple (Nat.add k 0) a₂.snd →\n a₁.fst < a₂.fst ∨ a₁.fst = a₂.fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a a_2)\n (antidiagonal n)\n[PROOFSTEP]\nrefine' ⟨fun _ _ _ => antidiagonalTuple_pairwise_pi_lex k _, _⟩\n[GOAL]\nk n : ℕ\n⊢ Pairwise\n (fun a₁ a₂ =>\n ∀ (a : Fin (Nat.add k 0) → ℕ),\n a ∈ antidiagonalTuple (Nat.add k 0) a₁.snd →\n ∀ (a_2 : Fin (Nat.add k 0) → ℕ),\n a_2 ∈ antidiagonalTuple (Nat.add k 0) a₂.snd →\n a₁.fst < a₂.fst ∨ a₁.fst = a₂.fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a a_2)\n (antidiagonal n)\n[PROOFSTEP]\ninduction' n with n n_ih\n[GOAL]\ncase zero\nk : ℕ\n⊢ Pairwise\n (fun a₁ a₂ =>\n ∀ (a : Fin (Nat.add k 0) → ℕ),\n a ∈ antidiagonalTuple (Nat.add k 0) a₁.snd →\n ∀ (a_2 : Fin (Nat.add k 0) → ℕ),\n a_2 ∈ antidiagonalTuple (Nat.add k 0) a₂.snd →\n a₁.fst < a₂.fst ∨ a₁.fst = a₂.fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a a_2)\n (antidiagonal Nat.zero)\n[PROOFSTEP]\nrw [antidiagonal_zero]\n[GOAL]\ncase zero\nk : ℕ\n⊢ Pairwise\n (fun a₁ a₂ =>\n ∀ (a : Fin (Nat.add k 0) → ℕ),\n a ∈ antidiagonalTuple (Nat.add k 0) a₁.snd →\n ∀ (a_2 : Fin (Nat.add k 0) → ℕ),\n a_2 ∈ antidiagonalTuple (Nat.add k 0) a₂.snd →\n a₁.fst < a₂.fst ∨ a₁.fst = a₂.fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a a_2)\n [(0, 0)]\n[PROOFSTEP]\nexact List.pairwise_singleton _ _\n[GOAL]\ncase succ\nk n : ℕ\nn_ih :\n Pairwise\n (fun a₁ a₂ =>\n ∀ (a : Fin (Nat.add k 0) → ℕ),\n a ∈ antidiagonalTuple (Nat.add k 0) a₁.snd →\n ∀ (a_2 : Fin (Nat.add k 0) → ℕ),\n a_2 ∈ antidiagonalTuple (Nat.add k 0) a₂.snd →\n a₁.fst < a₂.fst ∨ a₁.fst = a₂.fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a a_2)\n (antidiagonal n)\n⊢ Pairwise\n (fun a₁ a₂ =>\n ∀ (a : Fin (Nat.add k 0) → ℕ),\n a ∈ antidiagonalTuple (Nat.add k 0) a₁.snd →\n ∀ (a_2 : Fin (Nat.add k 0) → ℕ),\n a_2 ∈ antidiagonalTuple (Nat.add k 0) a₂.snd →\n a₁.fst < a₂.fst ∨ a₁.fst = a₂.fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a a_2)\n (antidiagonal (Nat.succ n))\n[PROOFSTEP]\nrw [antidiagonal_succ, List.pairwise_cons, List.pairwise_map]\n[GOAL]\ncase succ\nk n : ℕ\nn_ih :\n Pairwise\n (fun a₁ a₂ =>\n ∀ (a : Fin (Nat.add k 0) → ℕ),\n a ∈ antidiagonalTuple (Nat.add k 0) a₁.snd →\n ∀ (a_2 : Fin (Nat.add k 0) → ℕ),\n a_2 ∈ antidiagonalTuple (Nat.add k 0) a₂.snd →\n a₁.fst < a₂.fst ∨ a₁.fst = a₂.fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a a_2)\n (antidiagonal n)\n⊢ (∀ (a' : ℕ × ℕ),\n a' ∈ map (Prod.map Nat.succ id) (antidiagonal n) →\n ∀ (a : Fin (Nat.add k 0) → ℕ),\n a ∈ antidiagonalTuple (Nat.add k 0) (0, n + 1).snd →\n ∀ (a_2 : Fin (Nat.add k 0) → ℕ),\n a_2 ∈ antidiagonalTuple (Nat.add k 0) a'.snd →\n (0, n + 1).fst < a'.fst ∨\n (0, n + 1).fst = a'.fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a a_2) ∧\n Pairwise\n (fun a b =>\n ∀ (a_1 : Fin (Nat.add k 0) → ℕ),\n a_1 ∈ antidiagonalTuple (Nat.add k 0) (Prod.map Nat.succ id a).snd →\n ∀ (a_3 : Fin (Nat.add k 0) → ℕ),\n a_3 ∈ antidiagonalTuple (Nat.add k 0) (Prod.map Nat.succ id b).snd →\n (Prod.map Nat.succ id a).fst < (Prod.map Nat.succ id b).fst ∨\n (Prod.map Nat.succ id a).fst = (Prod.map Nat.succ id b).fst ∧\n Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a_1 a_3)\n (antidiagonal n)\n[PROOFSTEP]\nrefine' ⟨fun p hp x hx y hy => _, _⟩\n[GOAL]\ncase succ.refine'_1\nk n : ℕ\nn_ih :\n Pairwise\n (fun a₁ a₂ =>\n ∀ (a : Fin (Nat.add k 0) → ℕ),\n a ∈ antidiagonalTuple (Nat.add k 0) a₁.snd →\n ∀ (a_2 : Fin (Nat.add k 0) → ℕ),\n a_2 ∈ antidiagonalTuple (Nat.add k 0) a₂.snd →\n a₁.fst < a₂.fst ∨ a₁.fst = a₂.fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a a_2)\n (antidiagonal n)\np : ℕ × ℕ\nhp : p ∈ map (Prod.map Nat.succ id) (antidiagonal n)\nx : Fin (Nat.add k 0) → ℕ\nhx : x ∈ antidiagonalTuple (Nat.add k 0) (0, n + 1).snd\ny : Fin (Nat.add k 0) → ℕ\nhy : y ∈ antidiagonalTuple (Nat.add k 0) p.snd\n⊢ (0, n + 1).fst < p.fst ∨ (0, n + 1).fst = p.fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) x y\n[PROOFSTEP]\nrw [List.mem_map, Prod.exists] at hp \n[GOAL]\ncase succ.refine'_1\nk n : ℕ\nn_ih :\n Pairwise\n (fun a₁ a₂ =>\n ∀ (a : Fin (Nat.add k 0) → ℕ),\n a ∈ antidiagonalTuple (Nat.add k 0) a₁.snd →\n ∀ (a_2 : Fin (Nat.add k 0) → ℕ),\n a_2 ∈ antidiagonalTuple (Nat.add k 0) a₂.snd →\n a₁.fst < a₂.fst ∨ a₁.fst = a₂.fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a a_2)\n (antidiagonal n)\np : ℕ × ℕ\nhp : ∃ a b, (a, b) ∈ antidiagonal n ∧ Prod.map Nat.succ id (a, b) = p\nx : Fin (Nat.add k 0) → ℕ\nhx : x ∈ antidiagonalTuple (Nat.add k 0) (0, n + 1).snd\ny : Fin (Nat.add k 0) → ℕ\nhy : y ∈ antidiagonalTuple (Nat.add k 0) p.snd\n⊢ (0, n + 1).fst < p.fst ∨ (0, n + 1).fst = p.fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) x y\n[PROOFSTEP]\nobtain ⟨a, b, _, rfl : (Nat.succ a, b) = p⟩ := hp\n[GOAL]\ncase succ.refine'_1.intro.intro.intro\nk n : ℕ\nn_ih :\n Pairwise\n (fun a₁ a₂ =>\n ∀ (a : Fin (Nat.add k 0) → ℕ),\n a ∈ antidiagonalTuple (Nat.add k 0) a₁.snd →\n ∀ (a_2 : Fin (Nat.add k 0) → ℕ),\n a_2 ∈ antidiagonalTuple (Nat.add k 0) a₂.snd →\n a₁.fst < a₂.fst ∨ a₁.fst = a₂.fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a a_2)\n (antidiagonal n)\nx : Fin (Nat.add k 0) → ℕ\nhx : x ∈ antidiagonalTuple (Nat.add k 0) (0, n + 1).snd\ny : Fin (Nat.add k 0) → ℕ\na b : ℕ\nleft✝ : (a, b) ∈ antidiagonal n\nhy : y ∈ antidiagonalTuple (Nat.add k 0) (Nat.succ a, b).snd\n⊢ (0, n + 1).fst < (Nat.succ a, b).fst ∨\n (0, n + 1).fst = (Nat.succ a, b).fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) x y\n[PROOFSTEP]\nexact Or.inl (Nat.zero_lt_succ _)\n[GOAL]\ncase succ.refine'_2\nk n : ℕ\nn_ih :\n Pairwise\n (fun a₁ a₂ =>\n ∀ (a : Fin (Nat.add k 0) → ℕ),\n a ∈ antidiagonalTuple (Nat.add k 0) a₁.snd →\n ∀ (a_2 : Fin (Nat.add k 0) → ℕ),\n a_2 ∈ antidiagonalTuple (Nat.add k 0) a₂.snd →\n a₁.fst < a₂.fst ∨ a₁.fst = a₂.fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a a_2)\n (antidiagonal n)\n⊢ Pairwise\n (fun a b =>\n ∀ (a_1 : Fin (Nat.add k 0) → ℕ),\n a_1 ∈ antidiagonalTuple (Nat.add k 0) (Prod.map Nat.succ id a).snd →\n ∀ (a_3 : Fin (Nat.add k 0) → ℕ),\n a_3 ∈ antidiagonalTuple (Nat.add k 0) (Prod.map Nat.succ id b).snd →\n (Prod.map Nat.succ id a).fst < (Prod.map Nat.succ id b).fst ∨\n (Prod.map Nat.succ id a).fst = (Prod.map Nat.succ id b).fst ∧\n Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a_1 a_3)\n (antidiagonal n)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase succ.refine'_2\nk n : ℕ\nn_ih :\n Pairwise\n (fun a₁ a₂ =>\n ∀ (a : Fin (Nat.add k 0) → ℕ),\n a ∈ antidiagonalTuple (Nat.add k 0) a₁.snd →\n ∀ (a_2 : Fin (Nat.add k 0) → ℕ),\n a_2 ∈ antidiagonalTuple (Nat.add k 0) a₂.snd →\n a₁.fst < a₂.fst ∨ a₁.fst = a₂.fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a a_2)\n (antidiagonal n)\n⊢ Pairwise\n (fun a b =>\n ∀ (a_1 : Fin k → ℕ),\n a_1 ∈ antidiagonalTuple k a.snd →\n ∀ (a_3 : Fin k → ℕ),\n a_3 ∈ antidiagonalTuple k b.snd →\n Nat.succ a.fst < Nat.succ b.fst ∨\n Nat.succ a.fst = Nat.succ b.fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a_1 a_3)\n (antidiagonal n)\n[PROOFSTEP]\nsimp_rw [Nat.succ_inj', Nat.succ_lt_succ_iff]\n[GOAL]\ncase succ.refine'_2\nk n : ℕ\nn_ih :\n Pairwise\n (fun a₁ a₂ =>\n ∀ (a : Fin (Nat.add k 0) → ℕ),\n a ∈ antidiagonalTuple (Nat.add k 0) a₁.snd →\n ∀ (a_2 : Fin (Nat.add k 0) → ℕ),\n a_2 ∈ antidiagonalTuple (Nat.add k 0) a₂.snd →\n a₁.fst < a₂.fst ∨ a₁.fst = a₂.fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a a_2)\n (antidiagonal n)\n⊢ Pairwise\n (fun a b =>\n ∀ (a_1 : Fin k → ℕ),\n a_1 ∈ antidiagonalTuple k a.snd →\n ∀ (a_3 : Fin k → ℕ),\n a_3 ∈ antidiagonalTuple k b.snd →\n a.fst < b.fst ∨ a.fst = b.fst ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i x x_1 => x < x_1) a_1 a_3)\n (antidiagonal n)\n[PROOFSTEP]\nexact n_ih\n", "meta": {"mathlib_filename": "Mathlib.Data.Fin.Tuple.NatAntidiagonal", "llama_tokens": 13535, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7799929104825007, "lm_q2_score": 0.7090191399336402, "lm_q1q2_score": 0.5530299025446395}} {"text": "[GOAL]\nR : Type u_1\ninst✝⁸ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝⁷ : Category.{?u.28793, u_2} C\ninst✝⁶ : Category.{?u.28797, u_3} D\ninst✝⁵ : Preadditive C\ninst✝⁴ : Linear R C\ninst✝³ : Preadditive D\ninst✝² : Linear R D\ne : C ≌ D\ninst✝¹ : Functor.Additive e.functor\ninst✝ : Functor.Linear R e.functor\nX✝ Y✝ : D\nr : X✝ ⟶ Y✝\nf : R\n⊢ e.inverse.map (f • r) = f • e.inverse.map r\n[PROOFSTEP]\napply e.functor.map_injective\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁸ : Semiring R\nC : Type u_2\nD : Type u_3\ninst✝⁷ : Category.{?u.28793, u_2} C\ninst✝⁶ : Category.{?u.28797, u_3} D\ninst✝⁵ : Preadditive C\ninst✝⁴ : Linear R C\ninst✝³ : Preadditive D\ninst✝² : Linear R D\ne : C ≌ D\ninst✝¹ : Functor.Additive e.functor\ninst✝ : Functor.Linear R e.functor\nX✝ Y✝ : D\nr : X✝ ⟶ Y✝\nf : R\n⊢ e.functor.map (e.inverse.map (f • r)) = e.functor.map (f • e.inverse.map r)\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Linear.LinearFunctor", "llama_tokens": 483, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8397339596505965, "lm_q2_score": 0.6584175072643415, "lm_q1q2_score": 0.5528955404783609}} {"text": "[GOAL]\nα β : LatCat\ne : ↑α ≃o ↑β\n⊢ { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n map_inf' := (_ : ∀ (a b : ↑α), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) } ≫\n {\n toSupHom :=\n { toFun := ↑(OrderIso.symm e),\n map_sup' := (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n map_inf' := (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) } =\n 𝟙 α\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα β : LatCat\ne : ↑α ≃o ↑β\nx✝ : (forget LatCat).obj α\n⊢ ↑({ toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n map_inf' := (_ : ∀ (a b : ↑α), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) } ≫\n {\n toSupHom :=\n { toFun := ↑(OrderIso.symm e),\n map_sup' :=\n (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n map_inf' := (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) })\n x✝ =\n ↑(𝟙 α) x✝\n[PROOFSTEP]\nexact e.symm_apply_apply _\n[GOAL]\nα β : LatCat\ne : ↑α ≃o ↑β\n⊢ {\n toSupHom :=\n { toFun := ↑(OrderIso.symm e),\n map_sup' := (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n map_inf' := (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) } ≫\n { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n map_inf' := (_ : ∀ (a b : ↑α), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) } =\n 𝟙 β\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα β : LatCat\ne : ↑α ≃o ↑β\nx✝ : (forget LatCat).obj β\n⊢ ↑({\n toSupHom :=\n { toFun := ↑(OrderIso.symm e),\n map_sup' :=\n (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n map_inf' := (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) } ≫\n { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n map_inf' := (_ : ∀ (a b : ↑α), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) })\n x✝ =\n ↑(𝟙 β) x✝\n[PROOFSTEP]\nexact e.apply_symm_apply _\n", "meta": {"mathlib_filename": "Mathlib.Order.Category.LatCat", "llama_tokens": 1341, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8397339756938818, "lm_q2_score": 0.6584174938590246, "lm_q1q2_score": 0.5528955397846407}} {"text": "[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 1 ≤ a\nh : m ≤ n\n⊢ a ^ m ≤ a ^ n\n[PROOFSTEP]\nhave ha₀ : 0 < a := one_pos.trans_le ha\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 1 ≤ a\nh : m ≤ n\nha₀ : 0 < a\n⊢ a ^ m ≤ a ^ n\n[PROOFSTEP]\nlift n - m to ℕ using sub_nonneg.2 h with k hk\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 1 ≤ a\nh : m ≤ n\nha₀ : 0 < a\nk : ℕ\nhk : ↑k = n - m\n⊢ a ^ m ≤ a ^ n\n[PROOFSTEP]\ncalc\n a ^ m = a ^ m * 1 := (mul_one _).symm\n _ ≤ a ^ m * a ^ k := (mul_le_mul_of_nonneg_left (one_le_pow_of_one_le ha _) (zpow_nonneg ha₀.le _))\n _ = a ^ n := by rw [← zpow_ofNat, ← zpow_add₀ ha₀.ne', hk, add_sub_cancel'_right]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nha : 1 ≤ a\nh : m ≤ n\nha₀ : 0 < a\nk : ℕ\nhk : ↑k = n - m\n⊢ a ^ m * a ^ k = a ^ n\n[PROOFSTEP]\nrw [← zpow_ofNat, ← zpow_add₀ ha₀.ne', hk, add_sub_cancel'_right]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\na✝ b c d e : α\nm n✝ : ℤ\na : ℕ\nh : 0 < a\nn : ℤ\n⊢ 0 < ↑a ^ n\n[PROOFSTEP]\napply zpow_pos_of_pos\n[GOAL]\ncase ha\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\na✝ b c d e : α\nm n✝ : ℤ\na : ℕ\nh : 0 < a\nn : ℤ\n⊢ 0 < ↑a\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh₀ : 0 < a\nh₁ : a ≠ 1\n⊢ Injective ((fun x x_1 => x ^ x_1) a)\n[PROOFSTEP]\nrcases h₁.lt_or_lt with (H | H)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh₀ : 0 < a\nh₁ : a ≠ 1\nH : a < 1\n⊢ Injective ((fun x x_1 => x ^ x_1) a)\n[PROOFSTEP]\nexact (zpow_strictAnti h₀ H).injective\n[GOAL]\ncase inr\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\na b c d e : α\nm n : ℤ\nh₀ : 0 < a\nh₁ : a ≠ 1\nH : 1 < a\n⊢ Injective ((fun x x_1 => x ^ x_1) a)\n[PROOFSTEP]\nexact (zpow_strictMono H).injective\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\na✝ b✝ c✝ d e : α\nm n : ℤ\nx : α\nhx : 1 < x\na b c : ℤ\n⊢ x ^ (-c) ≤ max (x ^ (-a)) (x ^ (-b)) ↔ min a b ≤ c\n[PROOFSTEP]\nsimp_rw [le_max_iff, min_le_iff, zpow_le_iff_le hx, neg_le_neg_iff]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ b c d : α\nn : ℤ\na : α\n⊢ 0 ≤ a ^ 2\n[PROOFSTEP]\nconvert zpow_bit0_nonneg a 1\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nh : a ≠ 0\n⊢ 0 < a ^ 2\n[PROOFSTEP]\nconvert zpow_bit0_pos h 1\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhn : n ≠ 0\n⊢ 0 < a ^ bit0 n → a ≠ 0\n[PROOFSTEP]\nrintro h rfl\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nb c d : α\nn : ℤ\nhn : n ≠ 0\nh : 0 < 0 ^ bit0 n\n⊢ False\n[PROOFSTEP]\nrefine' (zero_zpow _ _).not_gt h\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nb c d : α\nn : ℤ\nhn : n ≠ 0\nh : 0 < 0 ^ bit0 n\n⊢ bit0 n ≠ 0\n[PROOFSTEP]\nrwa [bit0_ne_zero]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nh : a < 0\n⊢ a ^ bit1 n < 0\n[PROOFSTEP]\nrw [bit1, zpow_add_one₀ h.ne]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nh : a < 0\n⊢ a ^ bit0 n * a < 0\n[PROOFSTEP]\nexact mul_neg_of_pos_of_neg (zpow_bit0_pos h.ne _) h\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\n⊢ a ^ bit1 n ≤ 0 ↔ a ≤ 0\n[PROOFSTEP]\nrw [le_iff_lt_or_eq, le_iff_lt_or_eq, zpow_bit1_neg_iff, zpow_eq_zero_iff (Int.bit1_ne_zero n)]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ b c d : α\nn : ℤ\nhn : Even n\na : α\n⊢ 0 ≤ a ^ n\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := hn\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ b c d a : α\nk : ℤ\n⊢ 0 ≤ a ^ (k + k)\n[PROOFSTEP]\nexact zpow_bit0_nonneg _ _\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhn : Even n\nh : n ≠ 0\n⊢ 0 < a ^ n ↔ a ≠ 0\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := hn\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : LinearOrderedField α\na b c d : α\nk : ℤ\nh : k + k ≠ 0\n⊢ 0 < a ^ (k + k) ↔ a ≠ 0\n[PROOFSTEP]\nexact zpow_bit0_pos_iff (by rintro rfl; simp at h )\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na b c d : α\nk : ℤ\nh : k + k ≠ 0\n⊢ k ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na b c d : α\nh : 0 + 0 ≠ 0\n⊢ False\n[PROOFSTEP]\nsimp at h \n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhn : Odd n\n⊢ a ^ n < 0 ↔ a < 0\n[PROOFSTEP]\ncases' hn with k hk\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : LinearOrderedField α\na b c d : α\nn k : ℤ\nhk : n = 2 * k + 1\n⊢ a ^ n < 0 ↔ a < 0\n[PROOFSTEP]\nsimpa only [hk, two_mul] using zpow_bit1_neg_iff\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhn : Odd n\n⊢ 0 ≤ a ^ n ↔ 0 ≤ a\n[PROOFSTEP]\ncases' hn with k hk\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : LinearOrderedField α\na b c d : α\nn k : ℤ\nhk : n = 2 * k + 1\n⊢ 0 ≤ a ^ n ↔ 0 ≤ a\n[PROOFSTEP]\nsimpa only [hk, two_mul] using zpow_bit1_nonneg_iff\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhn : Odd n\n⊢ a ^ n ≤ 0 ↔ a ≤ 0\n[PROOFSTEP]\ncases' hn with k hk\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : LinearOrderedField α\na b c d : α\nn k : ℤ\nhk : n = 2 * k + 1\n⊢ a ^ n ≤ 0 ↔ a ≤ 0\n[PROOFSTEP]\nsimpa only [hk, two_mul] using zpow_bit1_nonpos_iff\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na b c d : α\nn : ℤ\nhn : Odd n\n⊢ 0 < a ^ n ↔ 0 < a\n[PROOFSTEP]\ncases' hn with k hk\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : LinearOrderedField α\na b c d : α\nn k : ℤ\nhk : n = 2 * k + 1\n⊢ 0 < a ^ n ↔ 0 < a\n[PROOFSTEP]\nsimpa only [hk, two_mul] using zpow_bit1_pos_iff\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ b c d : α\nn p : ℤ\nhp : Even p\na : α\n⊢ |a| ^ p = a ^ p\n[PROOFSTEP]\ncases' abs_choice a with h h\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ b c d : α\nn p : ℤ\nhp : Even p\na : α\nh : |a| = a\n⊢ |a| ^ p = a ^ p\n[PROOFSTEP]\nsimp only [h, hp.neg_zpow _]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝ : LinearOrderedField α\na✝ b c d : α\nn p : ℤ\nhp : Even p\na : α\nh : |a| = -a\n⊢ |a| ^ p = a ^ p\n[PROOFSTEP]\nsimp only [h, hp.neg_zpow _]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Field.Power", "llama_tokens": 3218, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7981867777396212, "lm_q2_score": 0.6926419831347361, "lm_q1q2_score": 0.5528576726454961}} {"text": "[GOAL]\nα β : Type u\nf : Type u → Type v\ninst✝¹ : Functor f\ninst✝ : LawfulFunctor f\nh : α ≃ β\nx : f α\n⊢ ↑h.symm <$> ↑h <$> x = x\n[PROOFSTEP]\nsimp [map_map]\n[GOAL]\nα β : Type u\nf : Type u → Type v\ninst✝¹ : Functor f\ninst✝ : LawfulFunctor f\nh : α ≃ β\nx : f β\n⊢ ↑h <$> ↑h.symm <$> x = x\n[PROOFSTEP]\nsimp [map_map]\n[GOAL]\nα β : Type u\nf : Type u → Type v\ninst✝¹ : Functor f\ninst✝ : LawfulFunctor f\n⊢ mapEquiv f (Equiv.refl α) = Equiv.refl (f α)\n[PROOFSTEP]\next x\n[GOAL]\ncase H\nα β : Type u\nf : Type u → Type v\ninst✝¹ : Functor f\ninst✝ : LawfulFunctor f\nx : f α\n⊢ ↑(mapEquiv f (Equiv.refl α)) x = ↑(Equiv.refl (f α)) x\n[PROOFSTEP]\nsimp only [mapEquiv_apply, refl_apply]\n[GOAL]\ncase H\nα β : Type u\nf : Type u → Type v\ninst✝¹ : Functor f\ninst✝ : LawfulFunctor f\nx : f α\n⊢ ↑(Equiv.refl α) <$> x = x\n[PROOFSTEP]\nexact LawfulFunctor.id_map x\n[GOAL]\nα β : Type u\nα' β' : Type v\nF : Type u → Type v → Type w\ninst✝¹ : Bifunctor F\ninst✝ : LawfulBifunctor F\nh : α ≃ β\nh' : α' ≃ β'\nx : F α α'\n⊢ bimap (↑h.symm) (↑h'.symm) (bimap (↑h) (↑h') x) = x\n[PROOFSTEP]\nsimp [bimap_bimap, id_bimap]\n[GOAL]\nα β : Type u\nα' β' : Type v\nF : Type u → Type v → Type w\ninst✝¹ : Bifunctor F\ninst✝ : LawfulBifunctor F\nh : α ≃ β\nh' : α' ≃ β'\nx : F β β'\n⊢ bimap (↑h) (↑h') (bimap (↑h.symm) (↑h'.symm) x) = x\n[PROOFSTEP]\nsimp [bimap_bimap, id_bimap]\n[GOAL]\nα β : Type u\nα' β' : Type v\nF : Type u → Type v → Type w\ninst✝¹ : Bifunctor F\ninst✝ : LawfulBifunctor F\n⊢ mapEquiv F (Equiv.refl α) (Equiv.refl α') = Equiv.refl (F α α')\n[PROOFSTEP]\next x\n[GOAL]\ncase H\nα β : Type u\nα' β' : Type v\nF : Type u → Type v → Type w\ninst✝¹ : Bifunctor F\ninst✝ : LawfulBifunctor F\nx : F α α'\n⊢ ↑(mapEquiv F (Equiv.refl α) (Equiv.refl α')) x = ↑(Equiv.refl (F α α')) x\n[PROOFSTEP]\nsimp [id_bimap]\n", "meta": {"mathlib_filename": "Mathlib.Logic.Equiv.Functor", "llama_tokens": 951, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7981867777396211, "lm_q2_score": 0.6926419831347361, "lm_q1q2_score": 0.552857672645496}} {"text": "[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\n⊢ UniformInducing f ↔ UniformContinuous f ∧ comap (Prod.map f f) (𝓤 β) ≤ 𝓤 α\n[PROOFSTEP]\nrw [uniformInducing_iff, UniformContinuous, tendsto_iff_comap, le_antisymm_iff, and_comm]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\n⊢ 𝓤 α ≤ comap (fun x => (f x.fst, f x.snd)) (𝓤 β) ∧ comap (fun x => (f x.fst, f x.snd)) (𝓤 β) ≤ 𝓤 α ↔\n 𝓤 α ≤ comap (fun x => (f x.fst, f x.snd)) (𝓤 β) ∧ comap (Prod.map f f) (𝓤 β) ≤ 𝓤 α\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nι : Sort u_1\nι' : Sort u_2\np : ι → Prop\np' : ι' → Prop\ns : ι → Set (α × α)\ns' : ι' → Set (β × β)\nh : HasBasis (𝓤 α) p s\nh' : HasBasis (𝓤 β) p' s'\nf : α → β\n⊢ UniformInducing f ↔\n (∀ (i : ι'), p' i → ∃ j, p j ∧ ∀ (x y : α), (x, y) ∈ s j → (f x, f y) ∈ s' i) ∧\n ∀ (j : ι), p j → ∃ i, p' i ∧ ∀ (x y : α), (f x, f y) ∈ s' i → (x, y) ∈ s j\n[PROOFSTEP]\nsimp [uniformInducing_iff', h.uniformContinuous_iff h', (h'.comap _).le_basis_iff h, subset_def]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\nh : ∀ (s : Set (α × α)), s ∈ 𝓤 α ↔ ∃ t, t ∈ 𝓤 β ∧ ∀ (x y : α), (f x, f y) ∈ t → (x, y) ∈ s\n⊢ comap (fun x => (f x.fst, f x.snd)) (𝓤 β) = 𝓤 α\n[PROOFSTEP]\nsimp [eq_comm, Filter.ext_iff, subset_def, h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ comap (fun x => (id x.fst, id x.snd)) (𝓤 α) = 𝓤 α\n[PROOFSTEP]\nrw [← Prod.map_def, Prod.map_id, comap_id]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ng : β → γ\nhg : UniformInducing g\nf : α → β\nhf : UniformInducing f\n⊢ comap (fun x => ((g ∘ f) x.fst, (g ∘ f) x.snd)) (𝓤 γ) = 𝓤 α\n[PROOFSTEP]\nrw [← hf.1, ← hg.1, comap_comap]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ng : β → γ\nhg : UniformInducing g\nf : α → β\nhf : UniformInducing f\n⊢ comap (fun x => ((g ∘ f) x.fst, (g ∘ f) x.snd)) (𝓤 γ) =\n comap ((fun x => (g x.fst, g x.snd)) ∘ fun x => (f x.fst, f x.snd)) (𝓤 γ)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\nhf : UniformInducing f\nF : Filter α\n⊢ Cauchy (map f F) ↔ Cauchy F\n[PROOFSTEP]\nsimp only [Cauchy, map_neBot_iff, prod_map_map_eq, map_le_iff_le_comap, ← hf.comap_uniformity]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\ng : β → γ\nhf : UniformContinuous f\nhg : UniformContinuous g\nhgf : UniformInducing (g ∘ f)\n⊢ UniformInducing f\n[PROOFSTEP]\nrefine' ⟨le_antisymm _ hf.le_comap⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\ng : β → γ\nhf : UniformContinuous f\nhg : UniformContinuous g\nhgf : UniformInducing (g ∘ f)\n⊢ comap (fun x => (f x.fst, f x.snd)) (𝓤 β) ≤ 𝓤 α\n[PROOFSTEP]\nrw [← hgf.1, ← Prod.map_def, ← Prod.map_def, ← Prod.map_comp_map f f g g, ← comap_comap]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\ng : β → γ\nhf : UniformContinuous f\nhg : UniformContinuous g\nhgf : UniformInducing (g ∘ f)\n⊢ comap (Prod.map f f) (𝓤 β) ≤ comap (Prod.map f f) (comap (Prod.map g g) (𝓤 γ))\n[PROOFSTEP]\nexact comap_mono hg.le_comap\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\ng : β → γ\nhg : UniformInducing g\n⊢ UniformContinuous f ↔ UniformContinuous (g ∘ f)\n[PROOFSTEP]\ndsimp only [UniformContinuous, Tendsto]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\ng : β → γ\nhg : UniformInducing g\n⊢ map (fun x => (f x.fst, f x.snd)) (𝓤 α) ≤ 𝓤 β ↔ map (fun x => ((g ∘ f) x.fst, (g ∘ f) x.snd)) (𝓤 α) ≤ 𝓤 γ\n[PROOFSTEP]\nrw [← hg.comap_uniformity, ← map_le_iff_le_comap, Filter.map_map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\ng : β → γ\nhg : UniformInducing g\n⊢ map ((fun x => (g x.fst, g x.snd)) ∘ fun x => (f x.fst, f x.snd)) (𝓤 α) ≤ 𝓤 γ ↔\n map (fun x => ((g ∘ f) x.fst, (g ∘ f) x.snd)) (𝓤 α) ≤ 𝓤 γ\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\nh : UniformInducing f\n⊢ Inducing f\n[PROOFSTEP]\nobtain rfl := h.comap_uniformSpace\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\nh : UniformInducing f\n⊢ Inducing f\n[PROOFSTEP]\nexact inducing_induced f\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : UniformSpace γ\nα' : Type u_1\nβ' : Type u_2\ninst✝¹ : UniformSpace α'\ninst✝ : UniformSpace β'\ne₁ : α → α'\ne₂ : β → β'\nh₁ : UniformInducing e₁\nh₂ : UniformInducing e₂\n⊢ comap (fun x => ((e₁ x.fst.fst, e₂ x.fst.snd), e₁ x.snd.fst, e₂ x.snd.snd)) (𝓤 (α' × β')) = 𝓤 (α × β)\n[PROOFSTEP]\nsimp [(· ∘ ·), uniformity_prod, ← h₁.1, ← h₂.1, comap_inf, comap_comap]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\n⊢ UniformEmbedding f ↔ Injective f ∧ UniformContinuous f ∧ comap (Prod.map f f) (𝓤 β) ≤ 𝓤 α\n[PROOFSTEP]\nrw [uniformEmbedding_iff, and_comm, uniformInducing_iff']\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nι : Sort u_1\nι' : Sort u_2\np : ι → Prop\np' : ι' → Prop\ns : ι → Set (α × α)\ns' : ι' → Set (β × β)\nh : HasBasis (𝓤 α) p s\nh' : HasBasis (𝓤 β) p' s'\nf : α → β\n⊢ UniformEmbedding f ↔\n Injective f ∧\n (∀ (i : ι'), p' i → ∃ j, p j ∧ ∀ (x y : α), (x, y) ∈ s j → (f x, f y) ∈ s' i) ∧\n ∀ (j : ι), p j → ∃ i, p' i ∧ ∀ (x y : α), (f x, f y) ∈ s' i → (x, y) ∈ s j\n[PROOFSTEP]\nrw [uniformEmbedding_iff, and_comm, h.uniformInducing_iff h']\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nι : Sort u_1\nι' : Sort u_2\np : ι → Prop\np' : ι' → Prop\ns : ι → Set (α × α)\ns' : ι' → Set (β × β)\nh : HasBasis (𝓤 α) p s\nh' : HasBasis (𝓤 β) p' s'\nf : α → β\n⊢ UniformEmbedding f ↔\n Injective f ∧ UniformContinuous f ∧ ∀ (j : ι), p j → ∃ i, p' i ∧ ∀ (x y : α), (f x, f y) ∈ s' i → (x, y) ∈ s j\n[PROOFSTEP]\nsimp only [h.uniformEmbedding_iff' h', h.uniformContinuous_iff h']\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ns t : Set α\nhst : s ⊆ t\n⊢ comap (fun x => (inclusion hst x.fst, inclusion hst x.snd)) (𝓤 ↑t) = 𝓤 ↑s\n[PROOFSTEP]\nrw [uniformity_subtype, uniformity_subtype, comap_comap]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ns t : Set α\nhst : s ⊆ t\n⊢ comap ((fun q => (↑q.fst, ↑q.snd)) ∘ fun x => (inclusion hst x.fst, inclusion hst x.snd)) (𝓤 α) =\n comap (fun q => (↑q.fst, ↑q.snd)) (𝓤 α)\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\ninst✝⁴ : UniformSpace α✝\ninst✝³ : UniformSpace β✝\ninst✝² : UniformSpace γ\nα : Type u_1\nβ : Type u_2\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : α ≃ β\nh₁ : UniformContinuous ↑f\nh₂ : UniformContinuous ↑f.symm\n⊢ comap (Prod.map ↑f ↑f) (𝓤 β) ≤ 𝓤 α\n[PROOFSTEP]\nrwa [← Equiv.prodCongr_apply, ← map_equiv_symm]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ns : Set (α × α)\nhs : s ∈ 𝓤 α\nx : α × α\nh : x ∈ Prod.map Sum.inl Sum.inl ⁻¹' (Prod.map Sum.inl Sum.inl '' s ∪ range (Prod.map Sum.inr Sum.inr))\n⊢ x ∈ s\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ns : Set (β × β)\nhs : s ∈ 𝓤 β\nx : β × β\nh : x ∈ Prod.map Sum.inr Sum.inr ⁻¹' (range (Prod.map Sum.inl Sum.inl) ∪ Prod.map Sum.inr Sum.inr '' s)\n⊢ x ∈ s\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α✝\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nα : Type u_1\nf : α → β\ns : Set (β × β)\nhs : s ∈ 𝓤 β\nhf : Pairwise fun x y => ¬(f x, f y) ∈ s\n⊢ comap (Prod.map f f) (𝓤 β) = 𝓟 idRel\n[PROOFSTEP]\nrefine' le_antisymm _ (@refl_le_uniformity α (UniformSpace.comap f _))\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α✝\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nα : Type u_1\nf : α → β\ns : Set (β × β)\nhs : s ∈ 𝓤 β\nhf : Pairwise fun x y => ¬(f x, f y) ∈ s\n⊢ comap (Prod.map f f) (𝓤 β) ≤ 𝓟 idRel\n[PROOFSTEP]\ncalc\n comap (Prod.map f f) (𝓤 β) ≤ comap (Prod.map f f) (𝓟 s) := comap_mono (le_principal_iff.2 hs)\n _ = 𝓟 (Prod.map f f ⁻¹' s) := comap_principal\n _ ≤ 𝓟 idRel := principal_mono.2 ?_\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α✝\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nα : Type u_1\nf : α → β\ns : Set (β × β)\nhs : s ∈ 𝓤 β\nhf : Pairwise fun x y => ¬(f x, f y) ∈ s\n⊢ Prod.map f f ⁻¹' s ⊆ idRel\n[PROOFSTEP]\nrintro ⟨x, y⟩\n[GOAL]\ncase mk\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α✝\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nα : Type u_1\nf : α → β\ns : Set (β × β)\nhs : s ∈ 𝓤 β\nhf : Pairwise fun x y => ¬(f x, f y) ∈ s\nx y : α\n⊢ (x, y) ∈ Prod.map f f ⁻¹' s → (x, y) ∈ idRel\n[PROOFSTEP]\nsimpa [not_imp_not] using @hf x y\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α✝\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nα : Type u_1\nf : α → β\ns : Set (β × β)\nhs : s ∈ 𝓤 β\nhf : Pairwise fun x y => ¬(f x, f y) ∈ s\n⊢ UniformEmbedding f\n[PROOFSTEP]\nlet _ : UniformSpace α := ⊥\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α✝\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nα : Type u_1\nf : α → β\ns : Set (β × β)\nhs : s ∈ 𝓤 β\nhf : Pairwise fun x y => ¬(f x, f y) ∈ s\nx✝ : UniformSpace α := ⊥\n⊢ UniformEmbedding f\n[PROOFSTEP]\nhave := discreteTopology_bot α\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α✝\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nα : Type u_1\nf : α → β\ns : Set (β × β)\nhs : s ∈ 𝓤 β\nhf : Pairwise fun x y => ¬(f x, f y) ∈ s\nx✝ : UniformSpace α := ⊥\nthis : DiscreteTopology α\n⊢ UniformEmbedding f\n[PROOFSTEP]\nexact UniformInducing.uniformEmbedding ⟨comap_uniformity_of_spaced_out hs hf⟩\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝⁵ : UniformSpace α✝\ninst✝⁴ : UniformSpace β\ninst✝³ : UniformSpace γ\nα : Type u_1\ninst✝² : TopologicalSpace α\ninst✝¹ : DiscreteTopology α\ninst✝ : SeparatedSpace β\nf : α → β\ns : Set (β × β)\nhs : s ∈ 𝓤 β\nhf : Pairwise fun x y => ¬(f x, f y) ∈ s\n⊢ ClosedEmbedding f\n[PROOFSTEP]\nrcases@DiscreteTopology.eq_bot α _ _ with rfl\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝⁴ : UniformSpace α✝\ninst✝³ : UniformSpace β\ninst✝² : UniformSpace γ\nα : Type u_1\ninst✝¹ : SeparatedSpace β\nf : α → β\ns : Set (β × β)\nhs : s ∈ 𝓤 β\nhf : Pairwise fun x y => ¬(f x, f y) ∈ s\ninst✝ : DiscreteTopology α\n⊢ ClosedEmbedding f\n[PROOFSTEP]\nlet _ : UniformSpace α := ⊥\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝⁴ : UniformSpace α✝\ninst✝³ : UniformSpace β\ninst✝² : UniformSpace γ\nα : Type u_1\ninst✝¹ : SeparatedSpace β\nf : α → β\ns : Set (β × β)\nhs : s ∈ 𝓤 β\nhf : Pairwise fun x y => ¬(f x, f y) ∈ s\ninst✝ : DiscreteTopology α\nx✝ : UniformSpace α := ⊥\n⊢ ClosedEmbedding f\n[PROOFSTEP]\nexact { (uniformEmbedding_of_spaced_out hs hf).embedding with closed_range := isClosed_range_of_spaced_out hs hf }\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ns : Set (α × α)\ne : α → β\nb : β\nhe₁ : UniformInducing e\nhe₂ : DenseInducing e\nhs : s ∈ 𝓤 α\n⊢ ∃ a, closure (e '' {a' | (a, a') ∈ s}) ∈ 𝓝 b\n[PROOFSTEP]\nobtain ⟨U, ⟨hU, hUo, hsymm⟩, hs⟩ : ∃ U, (U ∈ 𝓤 β ∧ IsOpen U ∧ SymmetricRel U) ∧ Prod.map e e ⁻¹' U ⊆ s := by\n rwa [← he₁.comap_uniformity, (uniformity_hasBasis_open_symmetric.comap _).mem_iff] at hs \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ns : Set (α × α)\ne : α → β\nb : β\nhe₁ : UniformInducing e\nhe₂ : DenseInducing e\nhs : s ∈ 𝓤 α\n⊢ ∃ U, (U ∈ 𝓤 β ∧ IsOpen U ∧ SymmetricRel U) ∧ Prod.map e e ⁻¹' U ⊆ s\n[PROOFSTEP]\nrwa [← he₁.comap_uniformity, (uniformity_hasBasis_open_symmetric.comap _).mem_iff] at hs \n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ns : Set (α × α)\ne : α → β\nb : β\nhe₁ : UniformInducing e\nhe₂ : DenseInducing e\nhs✝ : s ∈ 𝓤 α\nU : Set (β × β)\nhs : Prod.map e e ⁻¹' U ⊆ s\nhU : U ∈ 𝓤 β\nhUo : IsOpen U\nhsymm : SymmetricRel U\n⊢ ∃ a, closure (e '' {a' | (a, a') ∈ s}) ∈ 𝓝 b\n[PROOFSTEP]\nrcases he₂.dense.mem_nhds (UniformSpace.ball_mem_nhds b hU) with ⟨a, ha⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ns : Set (α × α)\ne : α → β\nb : β\nhe₁ : UniformInducing e\nhe₂ : DenseInducing e\nhs✝ : s ∈ 𝓤 α\nU : Set (β × β)\nhs : Prod.map e e ⁻¹' U ⊆ s\nhU : U ∈ 𝓤 β\nhUo : IsOpen U\nhsymm : SymmetricRel U\na : α\nha : e a ∈ UniformSpace.ball b U\n⊢ ∃ a, closure (e '' {a' | (a, a') ∈ s}) ∈ 𝓝 b\n[PROOFSTEP]\nrefine ⟨a, mem_of_superset ?_ (closure_mono <| image_subset _ <| ball_mono hs a)⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ns : Set (α × α)\ne : α → β\nb : β\nhe₁ : UniformInducing e\nhe₂ : DenseInducing e\nhs✝ : s ∈ 𝓤 α\nU : Set (β × β)\nhs : Prod.map e e ⁻¹' U ⊆ s\nhU : U ∈ 𝓤 β\nhUo : IsOpen U\nhsymm : SymmetricRel U\na : α\nha : e a ∈ UniformSpace.ball b U\n⊢ closure (e '' UniformSpace.ball a (Prod.map e e ⁻¹' U)) ∈ 𝓝 b\n[PROOFSTEP]\nhave ho : IsOpen (UniformSpace.ball (e a) U) := UniformSpace.isOpen_ball (e a) hUo\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ns : Set (α × α)\ne : α → β\nb : β\nhe₁ : UniformInducing e\nhe₂ : DenseInducing e\nhs✝ : s ∈ 𝓤 α\nU : Set (β × β)\nhs : Prod.map e e ⁻¹' U ⊆ s\nhU : U ∈ 𝓤 β\nhUo : IsOpen U\nhsymm : SymmetricRel U\na : α\nha : e a ∈ UniformSpace.ball b U\nho : IsOpen (UniformSpace.ball (e a) U)\n⊢ closure (e '' UniformSpace.ball a (Prod.map e e ⁻¹' U)) ∈ 𝓝 b\n[PROOFSTEP]\nrefine mem_of_superset (ho.mem_nhds <| (mem_ball_symmetry hsymm).2 ha) fun y hy => ?_\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ns : Set (α × α)\ne : α → β\nb : β\nhe₁ : UniformInducing e\nhe₂ : DenseInducing e\nhs✝ : s ∈ 𝓤 α\nU : Set (β × β)\nhs : Prod.map e e ⁻¹' U ⊆ s\nhU : U ∈ 𝓤 β\nhUo : IsOpen U\nhsymm : SymmetricRel U\na : α\nha : e a ∈ UniformSpace.ball b U\nho : IsOpen (UniformSpace.ball (e a) U)\ny : β\nhy : y ∈ UniformSpace.ball (e a) U\n⊢ y ∈ closure (e '' UniformSpace.ball a (Prod.map e e ⁻¹' U))\n[PROOFSTEP]\nrefine mem_closure_iff_nhds.2 fun V hV => ?_\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ns : Set (α × α)\ne : α → β\nb : β\nhe₁ : UniformInducing e\nhe₂ : DenseInducing e\nhs✝ : s ∈ 𝓤 α\nU : Set (β × β)\nhs : Prod.map e e ⁻¹' U ⊆ s\nhU : U ∈ 𝓤 β\nhUo : IsOpen U\nhsymm : SymmetricRel U\na : α\nha : e a ∈ UniformSpace.ball b U\nho : IsOpen (UniformSpace.ball (e a) U)\ny : β\nhy : y ∈ UniformSpace.ball (e a) U\nV : Set β\nhV : V ∈ 𝓝 y\n⊢ Set.Nonempty (V ∩ e '' UniformSpace.ball a (Prod.map e e ⁻¹' U))\n[PROOFSTEP]\nrcases he₂.dense.mem_nhds (inter_mem hV (ho.mem_nhds hy)) with ⟨x, hxV, hxU⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ns : Set (α × α)\ne : α → β\nb : β\nhe₁ : UniformInducing e\nhe₂ : DenseInducing e\nhs✝ : s ∈ 𝓤 α\nU : Set (β × β)\nhs : Prod.map e e ⁻¹' U ⊆ s\nhU : U ∈ 𝓤 β\nhUo : IsOpen U\nhsymm : SymmetricRel U\na : α\nha : e a ∈ UniformSpace.ball b U\nho : IsOpen (UniformSpace.ball (e a) U)\ny : β\nhy : y ∈ UniformSpace.ball (e a) U\nV : Set β\nhV : V ∈ 𝓝 y\nx : α\nhxV : e x ∈ V\nhxU : e x ∈ UniformSpace.ball (e a) U\n⊢ Set.Nonempty (V ∩ e '' UniformSpace.ball a (Prod.map e e ⁻¹' U))\n[PROOFSTEP]\nexact ⟨e x, hxV, mem_image_of_mem e hxU⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\np : α → Prop\ne : α → β\nue : UniformEmbedding e\nde : DenseEmbedding e\n⊢ comap (fun x => (DenseEmbedding.subtypeEmb p e x.fst, DenseEmbedding.subtypeEmb p e x.snd))\n (𝓤 { x // x ∈ closure (e '' {x | p x}) }) =\n 𝓤 { x // p x }\n[PROOFSTEP]\nsimp [comap_comap, (· ∘ ·), DenseEmbedding.subtypeEmb, uniformity_subtype, ue.comap_uniformity.symm]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\nhs : IsComplete (m '' s)\n⊢ IsComplete s\n[PROOFSTEP]\nintro f hf hfs\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\nhs : IsComplete (m '' s)\nf : Filter α\nhf : Cauchy f\nhfs : f ≤ 𝓟 s\n⊢ ∃ x, x ∈ s ∧ f ≤ 𝓝 x\n[PROOFSTEP]\nrw [le_principal_iff] at hfs \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\nhs : IsComplete (m '' s)\nf : Filter α\nhf : Cauchy f\nhfs : s ∈ f\n⊢ ∃ x, x ∈ s ∧ f ≤ 𝓝 x\n[PROOFSTEP]\nobtain ⟨_, ⟨x, hx, rfl⟩, hyf⟩ : ∃ y ∈ m '' s, map m f ≤ 𝓝 y\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\nhs : IsComplete (m '' s)\nf : Filter α\nhf : Cauchy f\nhfs : s ∈ f\n⊢ ∃ y, y ∈ m '' s ∧ map m f ≤ 𝓝 y\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\nhs : IsComplete (m '' s)\nf : Filter α\nhf : Cauchy f\nhfs : s ∈ f\nx : α\nhx : x ∈ s\nhyf : map m f ≤ 𝓝 (m x)\n⊢ ∃ x, x ∈ s ∧ f ≤ 𝓝 x\n[PROOFSTEP]\nexact hs (f.map m) (hf.map hm.uniformContinuous) (le_principal_iff.2 (image_mem_map hfs))\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\nhs : IsComplete (m '' s)\nf : Filter α\nhf : Cauchy f\nhfs : s ∈ f\nx : α\nhx : x ∈ s\nhyf : map m f ≤ 𝓝 (m x)\n⊢ ∃ x, x ∈ s ∧ f ≤ 𝓝 x\n[PROOFSTEP]\nrw [map_le_iff_le_comap, ← nhds_induced, ← hm.inducing.induced] at hyf \n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\nhs : IsComplete (m '' s)\nf : Filter α\nhf : Cauchy f\nhfs : s ∈ f\nx : α\nhx : x ∈ s\nhyf : f ≤ 𝓝 x\n⊢ ∃ x, x ∈ s ∧ f ≤ 𝓝 x\n[PROOFSTEP]\nexact ⟨x, hx, hyf⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ns : Set α\nhs : IsComplete s\n⊢ IsComplete (Subtype.val '' univ)\n[PROOFSTEP]\nsimp [hs]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\n⊢ IsComplete (m '' s) ↔ IsComplete s\n[PROOFSTEP]\nrefine' ⟨isComplete_of_complete_image hm, fun c => _⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\nc : IsComplete s\n⊢ IsComplete (m '' s)\n[PROOFSTEP]\nhaveI : CompleteSpace s := c.completeSpace_coe\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\nc : IsComplete s\nthis : CompleteSpace ↑s\n⊢ IsComplete (m '' s)\n[PROOFSTEP]\nset m' : s → β := m ∘ (↑)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\nc : IsComplete s\nthis : CompleteSpace ↑s\nm' : ↑s → β := m ∘ Subtype.val\n⊢ IsComplete (m '' s)\n[PROOFSTEP]\nsuffices IsComplete (range m') by rwa [range_comp, Subtype.range_coe] at this \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\nc : IsComplete s\nthis✝ : CompleteSpace ↑s\nm' : ↑s → β := m ∘ Subtype.val\nthis : IsComplete (range m')\n⊢ IsComplete (m '' s)\n[PROOFSTEP]\nrwa [range_comp, Subtype.range_coe] at this \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\nc : IsComplete s\nthis : CompleteSpace ↑s\nm' : ↑s → β := m ∘ Subtype.val\n⊢ IsComplete (range m')\n[PROOFSTEP]\nhave hm' : UniformInducing m' := hm.comp uniformEmbedding_subtype_val.toUniformInducing\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\nc : IsComplete s\nthis : CompleteSpace ↑s\nm' : ↑s → β := m ∘ Subtype.val\nhm' : UniformInducing m'\n⊢ IsComplete (range m')\n[PROOFSTEP]\nintro f hf hfm\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\nc : IsComplete s\nthis : CompleteSpace ↑s\nm' : ↑s → β := m ∘ Subtype.val\nhm' : UniformInducing m'\nf : Filter β\nhf : Cauchy f\nhfm : f ≤ 𝓟 (range m')\n⊢ ∃ x, x ∈ range m' ∧ f ≤ 𝓝 x\n[PROOFSTEP]\nrw [Filter.le_principal_iff] at hfm \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\nc : IsComplete s\nthis : CompleteSpace ↑s\nm' : ↑s → β := m ∘ Subtype.val\nhm' : UniformInducing m'\nf : Filter β\nhf : Cauchy f\nhfm : range m' ∈ f\n⊢ ∃ x, x ∈ range m' ∧ f ≤ 𝓝 x\n[PROOFSTEP]\nhave cf' : Cauchy (comap m' f) := hf.comap' hm'.comap_uniformity.le (NeBot.comap_of_range_mem hf.1 hfm)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\nc : IsComplete s\nthis : CompleteSpace ↑s\nm' : ↑s → β := m ∘ Subtype.val\nhm' : UniformInducing m'\nf : Filter β\nhf : Cauchy f\nhfm : range m' ∈ f\ncf' : Cauchy (comap m' f)\n⊢ ∃ x, x ∈ range m' ∧ f ≤ 𝓝 x\n[PROOFSTEP]\nrcases CompleteSpace.complete cf' with ⟨x, hx⟩\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\nc : IsComplete s\nthis : CompleteSpace ↑s\nm' : ↑s → β := m ∘ Subtype.val\nhm' : UniformInducing m'\nf : Filter β\nhf : Cauchy f\nhfm : range m' ∈ f\ncf' : Cauchy (comap m' f)\nx : ↑s\nhx : comap m' f ≤ 𝓝 x\n⊢ ∃ x, x ∈ range m' ∧ f ≤ 𝓝 x\n[PROOFSTEP]\nrw [hm'.inducing.nhds_eq_comap, comap_le_comap_iff hfm] at hx \n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : α → β\ns : Set α\nhm : UniformInducing m\nc : IsComplete s\nthis : CompleteSpace ↑s\nm' : ↑s → β := m ∘ Subtype.val\nhm' : UniformInducing m'\nf : Filter β\nhf : Cauchy f\nhfm : range m' ∈ f\ncf' : Cauchy (comap m' f)\nx : ↑s\nhx : f ≤ 𝓝 (m' x)\n⊢ ∃ x, x ∈ range m' ∧ f ≤ 𝓝 x\n[PROOFSTEP]\nexact ⟨m' x, mem_range_self _, hx⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\nhf : UniformInducing f\n⊢ CompleteSpace α ↔ IsComplete (range f)\n[PROOFSTEP]\nrw [completeSpace_iff_isComplete_univ, ← isComplete_image_iff hf, image_univ]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ne : α ≃ β\nhe : UniformEmbedding ↑e\n⊢ CompleteSpace α ↔ CompleteSpace β\n[PROOFSTEP]\nrw [completeSpace_iff_isComplete_range he.toUniformInducing, e.range_eq_univ, completeSpace_iff_isComplete_univ]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ns : Set α\n⊢ IsComplete (range Subtype.val) ↔ IsComplete s\n[PROOFSTEP]\nrw [Subtype.range_coe]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nm : β → α\nhm : UniformInducing m\ndense : DenseRange m\nh : ∀ (f : Filter β), Cauchy f → ∃ x, map m f ≤ 𝓝 x\nf : Filter α\nhf : Cauchy f\np : Set (α × α) → Set α → Set α := fun s t => {y | ∃ x, x ∈ t ∧ (x, y) ∈ s}\ng : Filter α := Filter.lift (𝓤 α) fun s => Filter.lift' f (p s)\nmp₀ : Monotone p\nmp₁ : ∀ {s : Set (α × α)}, Monotone (p s)\nthis✝⁵ : f ≤ g\nthis✝⁴ : NeBot g\nthis✝³ : NeBot (comap m g)\nthis✝² : Cauchy g\nthis✝¹ : Cauchy (comap m g)\nx : α\nhx : map m (comap m g) ≤ 𝓝 x\nthis✝ : ClusterPt x (map m (comap m g))\nthis : ClusterPt x g\n⊢ f ≤ g\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\ns : Set β\nhf : UniformEmbedding f\nhs : TotallyBounded s\nt : Set (α × α)\nht : t ∈ 𝓤 α\n⊢ ∃ t_1, Set.Finite t_1 ∧ f ⁻¹' s ⊆ ⋃ (y : α) (_ : y ∈ t_1), {x | (x, y) ∈ t}\n[PROOFSTEP]\nrw [← hf.comap_uniformity] at ht \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\ns : Set β\nhf : UniformEmbedding f\nhs : TotallyBounded s\nt : Set (α × α)\nht : t ∈ comap (fun x => (f x.fst, f x.snd)) (𝓤 β)\n⊢ ∃ t_1, Set.Finite t_1 ∧ f ⁻¹' s ⊆ ⋃ (y : α) (_ : y ∈ t_1), {x | (x, y) ∈ t}\n[PROOFSTEP]\nrcases mem_comap.2 ht with ⟨t', ht', ts⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\ns : Set β\nhf : UniformEmbedding f\nhs : TotallyBounded s\nt : Set (α × α)\nht : t ∈ comap (fun x => (f x.fst, f x.snd)) (𝓤 β)\nt' : Set (β × β)\nht' : t' ∈ 𝓤 β\nts : (fun x => (f x.fst, f x.snd)) ⁻¹' t' ⊆ t\n⊢ ∃ t_1, Set.Finite t_1 ∧ f ⁻¹' s ⊆ ⋃ (y : α) (_ : y ∈ t_1), {x | (x, y) ∈ t}\n[PROOFSTEP]\nrcases totallyBounded_iff_subset.1 (totallyBounded_subset (image_preimage_subset f s) hs) _ ht' with ⟨c, cs, hfc, hct⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\ns : Set β\nhf : UniformEmbedding f\nhs : TotallyBounded s\nt : Set (α × α)\nht : t ∈ comap (fun x => (f x.fst, f x.snd)) (𝓤 β)\nt' : Set (β × β)\nht' : t' ∈ 𝓤 β\nts : (fun x => (f x.fst, f x.snd)) ⁻¹' t' ⊆ t\nc : Set β\ncs : c ⊆ f '' (f ⁻¹' s)\nhfc : Set.Finite c\nhct : f '' (f ⁻¹' s) ⊆ ⋃ (y : β) (_ : y ∈ c), {x | (x, y) ∈ t'}\n⊢ ∃ t_1, Set.Finite t_1 ∧ f ⁻¹' s ⊆ ⋃ (y : α) (_ : y ∈ t_1), {x | (x, y) ∈ t}\n[PROOFSTEP]\nrefine' ⟨f ⁻¹' c, hfc.preimage (hf.inj.injOn _), fun x h => _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\ns : Set β\nhf : UniformEmbedding f\nhs : TotallyBounded s\nt : Set (α × α)\nht : t ∈ comap (fun x => (f x.fst, f x.snd)) (𝓤 β)\nt' : Set (β × β)\nht' : t' ∈ 𝓤 β\nts : (fun x => (f x.fst, f x.snd)) ⁻¹' t' ⊆ t\nc : Set β\ncs : c ⊆ f '' (f ⁻¹' s)\nhfc : Set.Finite c\nhct : f '' (f ⁻¹' s) ⊆ ⋃ (y : β) (_ : y ∈ c), {x | (x, y) ∈ t'}\nx : α\nh : x ∈ f ⁻¹' s\n⊢ x ∈ ⋃ (y : α) (_ : y ∈ f ⁻¹' c), {x | (x, y) ∈ t}\n[PROOFSTEP]\nhave := hct (mem_image_of_mem f h)\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\ns : Set β\nhf : UniformEmbedding f\nhs : TotallyBounded s\nt : Set (α × α)\nht : t ∈ comap (fun x => (f x.fst, f x.snd)) (𝓤 β)\nt' : Set (β × β)\nht' : t' ∈ 𝓤 β\nts : (fun x => (f x.fst, f x.snd)) ⁻¹' t' ⊆ t\nc : Set β\ncs : c ⊆ f '' (f ⁻¹' s)\nhfc : Set.Finite c\nhct : f '' (f ⁻¹' s) ⊆ ⋃ (y : β) (_ : y ∈ c), {x | (x, y) ∈ t'}\nx : α\nh : x ∈ f ⁻¹' s\nthis : f x ∈ ⋃ (y : β) (_ : y ∈ c), {x | (x, y) ∈ t'}\n⊢ x ∈ ⋃ (y : α) (_ : y ∈ f ⁻¹' c), {x | (x, y) ∈ t}\n[PROOFSTEP]\nsimp at this ⊢\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\ns : Set β\nhf : UniformEmbedding f\nhs : TotallyBounded s\nt : Set (α × α)\nht : t ∈ comap (fun x => (f x.fst, f x.snd)) (𝓤 β)\nt' : Set (β × β)\nht' : t' ∈ 𝓤 β\nts : (fun x => (f x.fst, f x.snd)) ⁻¹' t' ⊆ t\nc : Set β\ncs : c ⊆ f '' (f ⁻¹' s)\nhfc : Set.Finite c\nhct : f '' (f ⁻¹' s) ⊆ ⋃ (y : β) (_ : y ∈ c), {x | (x, y) ∈ t'}\nx : α\nh : x ∈ f ⁻¹' s\nthis : ∃ i, i ∈ c ∧ (f x, i) ∈ t'\n⊢ ∃ i, f i ∈ c ∧ (x, i) ∈ t\n[PROOFSTEP]\nrcases this with ⟨z, zc, zt⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\ns : Set β\nhf : UniformEmbedding f\nhs : TotallyBounded s\nt : Set (α × α)\nht : t ∈ comap (fun x => (f x.fst, f x.snd)) (𝓤 β)\nt' : Set (β × β)\nht' : t' ∈ 𝓤 β\nts : (fun x => (f x.fst, f x.snd)) ⁻¹' t' ⊆ t\nc : Set β\ncs : c ⊆ f '' (f ⁻¹' s)\nhfc : Set.Finite c\nhct : f '' (f ⁻¹' s) ⊆ ⋃ (y : β) (_ : y ∈ c), {x | (x, y) ∈ t'}\nx : α\nh : x ∈ f ⁻¹' s\nz : β\nzc : z ∈ c\nzt : (f x, z) ∈ t'\n⊢ ∃ i, f i ∈ c ∧ (x, i) ∈ t\n[PROOFSTEP]\nrcases cs zc with ⟨y, -, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\ns : Set β\nhf : UniformEmbedding f\nhs : TotallyBounded s\nt : Set (α × α)\nht : t ∈ comap (fun x => (f x.fst, f x.snd)) (𝓤 β)\nt' : Set (β × β)\nht' : t' ∈ 𝓤 β\nts : (fun x => (f x.fst, f x.snd)) ⁻¹' t' ⊆ t\nc : Set β\ncs : c ⊆ f '' (f ⁻¹' s)\nhfc : Set.Finite c\nhct : f '' (f ⁻¹' s) ⊆ ⋃ (y : β) (_ : y ∈ c), {x | (x, y) ∈ t'}\nx : α\nh : x ∈ f ⁻¹' s\ny : α\nzc : f y ∈ c\nzt : (f x, f y) ∈ t'\n⊢ ∃ i, f i ∈ c ∧ (x, i) ∈ t\n[PROOFSTEP]\nexact ⟨y, zc, ts zt⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : UniformSpace γ\ninst✝¹ : CompleteSpace α\ninst✝ : CompleteSpace β\n⊢ CompleteSpace (α ⊕ β)\n[PROOFSTEP]\nrw [completeSpace_iff_isComplete_univ, ← range_inl_union_range_inr]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : UniformSpace γ\ninst✝¹ : CompleteSpace α\ninst✝ : CompleteSpace β\n⊢ IsComplete (range Sum.inl ∪ range Sum.inr)\n[PROOFSTEP]\nexact\n uniformEmbedding_inl.toUniformInducing.isComplete_range.union uniformEmbedding_inr.toUniformInducing.isComplete_range\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne✝ : β → α\nh_e : UniformInducing e✝\nh_dense : DenseRange e✝\nf✝ : β → γ\nh_f : UniformContinuous f✝\ninst✝ : CompleteSpace γ\np : α → Prop\ne : α → β\nf : α → γ\nb : β\ns : Set α\nhf : UniformContinuous fun x => f ↑x\nhe : UniformEmbedding e\nhd : ∀ (x : β), x ∈ closure (range e)\nhb : closure (e '' s) ∈ 𝓝 b\nhs : IsClosed s\nhp : ∀ (x : α), x ∈ s → p x\n⊢ ∃ c, Tendsto f (comap e (𝓝 b)) (𝓝 c)\n[PROOFSTEP]\nhave de : DenseEmbedding e := he.denseEmbedding hd\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne✝ : β → α\nh_e : UniformInducing e✝\nh_dense : DenseRange e✝\nf✝ : β → γ\nh_f : UniformContinuous f✝\ninst✝ : CompleteSpace γ\np : α → Prop\ne : α → β\nf : α → γ\nb : β\ns : Set α\nhf : UniformContinuous fun x => f ↑x\nhe : UniformEmbedding e\nhd : ∀ (x : β), x ∈ closure (range e)\nhb : closure (e '' s) ∈ 𝓝 b\nhs : IsClosed s\nhp : ∀ (x : α), x ∈ s → p x\nde : DenseEmbedding e\n⊢ ∃ c, Tendsto f (comap e (𝓝 b)) (𝓝 c)\n[PROOFSTEP]\nhave de' : DenseEmbedding (DenseEmbedding.subtypeEmb p e) := de.subtype p\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne✝ : β → α\nh_e : UniformInducing e✝\nh_dense : DenseRange e✝\nf✝ : β → γ\nh_f : UniformContinuous f✝\ninst✝ : CompleteSpace γ\np : α → Prop\ne : α → β\nf : α → γ\nb : β\ns : Set α\nhf : UniformContinuous fun x => f ↑x\nhe : UniformEmbedding e\nhd : ∀ (x : β), x ∈ closure (range e)\nhb : closure (e '' s) ∈ 𝓝 b\nhs : IsClosed s\nhp : ∀ (x : α), x ∈ s → p x\nde : DenseEmbedding e\nde' : DenseEmbedding (DenseEmbedding.subtypeEmb p e)\n⊢ ∃ c, Tendsto f (comap e (𝓝 b)) (𝓝 c)\n[PROOFSTEP]\nhave ue' : UniformEmbedding (DenseEmbedding.subtypeEmb p e) := uniformEmbedding_subtypeEmb _ he de\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne✝ : β → α\nh_e : UniformInducing e✝\nh_dense : DenseRange e✝\nf✝ : β → γ\nh_f : UniformContinuous f✝\ninst✝ : CompleteSpace γ\np : α → Prop\ne : α → β\nf : α → γ\nb : β\ns : Set α\nhf : UniformContinuous fun x => f ↑x\nhe : UniformEmbedding e\nhd : ∀ (x : β), x ∈ closure (range e)\nhb : closure (e '' s) ∈ 𝓝 b\nhs : IsClosed s\nhp : ∀ (x : α), x ∈ s → p x\nde : DenseEmbedding e\nde' : DenseEmbedding (DenseEmbedding.subtypeEmb p e)\nue' : UniformEmbedding (DenseEmbedding.subtypeEmb p e)\n⊢ ∃ c, Tendsto f (comap e (𝓝 b)) (𝓝 c)\n[PROOFSTEP]\nhave : b ∈ closure (e '' {x | p x}) := (closure_mono <| monotone_image <| hp) (mem_of_mem_nhds hb)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne✝ : β → α\nh_e : UniformInducing e✝\nh_dense : DenseRange e✝\nf✝ : β → γ\nh_f : UniformContinuous f✝\ninst✝ : CompleteSpace γ\np : α → Prop\ne : α → β\nf : α → γ\nb : β\ns : Set α\nhf : UniformContinuous fun x => f ↑x\nhe : UniformEmbedding e\nhd : ∀ (x : β), x ∈ closure (range e)\nhb : closure (e '' s) ∈ 𝓝 b\nhs : IsClosed s\nhp : ∀ (x : α), x ∈ s → p x\nde : DenseEmbedding e\nde' : DenseEmbedding (DenseEmbedding.subtypeEmb p e)\nue' : UniformEmbedding (DenseEmbedding.subtypeEmb p e)\nthis : b ∈ closure (e '' {x | p x})\n⊢ ∃ c, Tendsto f (comap e (𝓝 b)) (𝓝 c)\n[PROOFSTEP]\nlet ⟨c, hc⟩ := uniformly_extend_exists ue'.toUniformInducing de'.dense hf ⟨b, this⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne✝ : β → α\nh_e : UniformInducing e✝\nh_dense : DenseRange e✝\nf✝ : β → γ\nh_f : UniformContinuous f✝\ninst✝ : CompleteSpace γ\np : α → Prop\ne : α → β\nf : α → γ\nb : β\ns : Set α\nhf : UniformContinuous fun x => f ↑x\nhe : UniformEmbedding e\nhd : ∀ (x : β), x ∈ closure (range e)\nhb : closure (e '' s) ∈ 𝓝 b\nhs : IsClosed s\nhp : ∀ (x : α), x ∈ s → p x\nde : DenseEmbedding e\nde' : DenseEmbedding (DenseEmbedding.subtypeEmb p e)\nue' : UniformEmbedding (DenseEmbedding.subtypeEmb p e)\nthis : b ∈ closure (e '' {x | p x})\nc : γ\nhc : Tendsto (fun x => f ↑x) (comap (DenseEmbedding.subtypeEmb p e) (𝓝 { val := b, property := this })) (𝓝 c)\n⊢ ∃ c, Tendsto f (comap e (𝓝 b)) (𝓝 c)\n[PROOFSTEP]\nreplace hc : Tendsto (f ∘ Subtype.val) (((𝓝 b).comap e).comap Subtype.val) (𝓝 c) := by\n simpa only [nhds_subtype_eq_comap, comap_comap, DenseEmbedding.subtypeEmb_coe] using hc\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne✝ : β → α\nh_e : UniformInducing e✝\nh_dense : DenseRange e✝\nf✝ : β → γ\nh_f : UniformContinuous f✝\ninst✝ : CompleteSpace γ\np : α → Prop\ne : α → β\nf : α → γ\nb : β\ns : Set α\nhf : UniformContinuous fun x => f ↑x\nhe : UniformEmbedding e\nhd : ∀ (x : β), x ∈ closure (range e)\nhb : closure (e '' s) ∈ 𝓝 b\nhs : IsClosed s\nhp : ∀ (x : α), x ∈ s → p x\nde : DenseEmbedding e\nde' : DenseEmbedding (DenseEmbedding.subtypeEmb p e)\nue' : UniformEmbedding (DenseEmbedding.subtypeEmb p e)\nthis : b ∈ closure (e '' {x | p x})\nc : γ\nhc : Tendsto (fun x => f ↑x) (comap (DenseEmbedding.subtypeEmb p e) (𝓝 { val := b, property := this })) (𝓝 c)\n⊢ Tendsto (f ∘ Subtype.val) (comap Subtype.val (comap e (𝓝 b))) (𝓝 c)\n[PROOFSTEP]\nsimpa only [nhds_subtype_eq_comap, comap_comap, DenseEmbedding.subtypeEmb_coe] using hc\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne✝ : β → α\nh_e : UniformInducing e✝\nh_dense : DenseRange e✝\nf✝ : β → γ\nh_f : UniformContinuous f✝\ninst✝ : CompleteSpace γ\np : α → Prop\ne : α → β\nf : α → γ\nb : β\ns : Set α\nhf : UniformContinuous fun x => f ↑x\nhe : UniformEmbedding e\nhd : ∀ (x : β), x ∈ closure (range e)\nhb : closure (e '' s) ∈ 𝓝 b\nhs : IsClosed s\nhp : ∀ (x : α), x ∈ s → p x\nde : DenseEmbedding e\nde' : DenseEmbedding (DenseEmbedding.subtypeEmb p e)\nue' : UniformEmbedding (DenseEmbedding.subtypeEmb p e)\nthis : b ∈ closure (e '' {x | p x})\nc : γ\nhc : Tendsto (f ∘ Subtype.val) (comap Subtype.val (comap e (𝓝 b))) (𝓝 c)\n⊢ ∃ c, Tendsto f (comap e (𝓝 b)) (𝓝 c)\n[PROOFSTEP]\nrefine ⟨c, (tendsto_comap'_iff ?_).1 hc⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne✝ : β → α\nh_e : UniformInducing e✝\nh_dense : DenseRange e✝\nf✝ : β → γ\nh_f : UniformContinuous f✝\ninst✝ : CompleteSpace γ\np : α → Prop\ne : α → β\nf : α → γ\nb : β\ns : Set α\nhf : UniformContinuous fun x => f ↑x\nhe : UniformEmbedding e\nhd : ∀ (x : β), x ∈ closure (range e)\nhb : closure (e '' s) ∈ 𝓝 b\nhs : IsClosed s\nhp : ∀ (x : α), x ∈ s → p x\nde : DenseEmbedding e\nde' : DenseEmbedding (DenseEmbedding.subtypeEmb p e)\nue' : UniformEmbedding (DenseEmbedding.subtypeEmb p e)\nthis : b ∈ closure (e '' {x | p x})\nc : γ\nhc : Tendsto (f ∘ Subtype.val) (comap Subtype.val (comap e (𝓝 b))) (𝓝 c)\n⊢ range Subtype.val ∈ comap e (𝓝 b)\n[PROOFSTEP]\nrw [Subtype.range_coe_subtype]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne✝ : β → α\nh_e : UniformInducing e✝\nh_dense : DenseRange e✝\nf✝ : β → γ\nh_f : UniformContinuous f✝\ninst✝ : CompleteSpace γ\np : α → Prop\ne : α → β\nf : α → γ\nb : β\ns : Set α\nhf : UniformContinuous fun x => f ↑x\nhe : UniformEmbedding e\nhd : ∀ (x : β), x ∈ closure (range e)\nhb : closure (e '' s) ∈ 𝓝 b\nhs : IsClosed s\nhp : ∀ (x : α), x ∈ s → p x\nde : DenseEmbedding e\nde' : DenseEmbedding (DenseEmbedding.subtypeEmb p e)\nue' : UniformEmbedding (DenseEmbedding.subtypeEmb p e)\nthis : b ∈ closure (e '' {x | p x})\nc : γ\nhc : Tendsto (f ∘ Subtype.val) (comap Subtype.val (comap e (𝓝 b))) (𝓝 c)\n⊢ {x | p x} ∈ comap e (𝓝 b)\n[PROOFSTEP]\nexact ⟨_, hb, by rwa [← de.toInducing.closure_eq_preimage_closure_image, hs.closure_eq]⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne✝ : β → α\nh_e : UniformInducing e✝\nh_dense : DenseRange e✝\nf✝ : β → γ\nh_f : UniformContinuous f✝\ninst✝ : CompleteSpace γ\np : α → Prop\ne : α → β\nf : α → γ\nb : β\ns : Set α\nhf : UniformContinuous fun x => f ↑x\nhe : UniformEmbedding e\nhd : ∀ (x : β), x ∈ closure (range e)\nhb : closure (e '' s) ∈ 𝓝 b\nhs : IsClosed s\nhp : ∀ (x : α), x ∈ s → p x\nde : DenseEmbedding e\nde' : DenseEmbedding (DenseEmbedding.subtypeEmb p e)\nue' : UniformEmbedding (DenseEmbedding.subtypeEmb p e)\nthis : b ∈ closure (e '' {x | p x})\nc : γ\nhc : Tendsto (f ∘ Subtype.val) (comap Subtype.val (comap e (𝓝 b))) (𝓝 c)\n⊢ e ⁻¹' closure (e '' s) ⊆ {x | p x}\n[PROOFSTEP]\nrwa [← de.toInducing.closure_eq_preimage_closure_image, hs.closure_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne : β → α\nh_e : UniformInducing e\nh_dense : DenseRange e\nf : β → γ\nh_f : UniformContinuous f\ninst✝ : CompleteSpace γ\na : α\n⊢ Tendsto f (comap e (𝓝 a)) (𝓝 (DenseInducing.extend (_ : DenseInducing e) f a))\n[PROOFSTEP]\nsimpa only [DenseInducing.extend] using tendsto_nhds_limUnder (uniformly_extend_exists h_e ‹_› h_f _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne : β → α\nh_e : UniformInducing e\nh_dense : DenseRange e\nf : β → γ\nh_f : UniformContinuous f\ninst✝ : CompleteSpace γ\nd : Set (γ × γ)\nhd : d ∈ 𝓤 γ\ns : Set (γ × γ)\nhs : s ∈ 𝓤 γ\nhs_comp : s ○ (s ○ s) ⊆ d\nh_pnt :\n ∀ {a : α} {m : Set α},\n m ∈ 𝓝 a →\n ∃ c,\n c ∈ f '' (e ⁻¹' m) ∧\n (c, DenseInducing.extend (_ : DenseInducing e) f a) ∈ s ∧\n (DenseInducing.extend (_ : DenseInducing e) f a, c) ∈ s\nthis : Prod.map f f ⁻¹' s ∈ 𝓤 β\n⊢ Prod.map f f ⁻¹' s ∈ comap (Prod.map e e) (𝓤 α)\n[PROOFSTEP]\nrwa [← h_e.comap_uniformity] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne : β → α\nh_e : UniformInducing e\nh_dense : DenseRange e\nf : β → γ\nh_f : UniformContinuous f\ninst✝ : CompleteSpace γ\nd : Set (γ × γ)\nhd : d ∈ 𝓤 γ\ns : Set (γ × γ)\nhs : s ∈ 𝓤 γ\nhs_comp : s ○ (s ○ s) ⊆ d\nh_pnt :\n ∀ {a : α} {m : Set α},\n m ∈ 𝓝 a →\n ∃ c,\n c ∈ f '' (e ⁻¹' m) ∧\n (c, DenseInducing.extend (_ : DenseInducing e) f a) ∈ s ∧\n (DenseInducing.extend (_ : DenseInducing e) f a, c) ∈ s\nthis✝ : Prod.map f f ⁻¹' s ∈ 𝓤 β\nthis : Prod.map f f ⁻¹' s ∈ comap (Prod.map e e) (𝓤 α)\nt : Set (α × α)\nht : t ∈ 𝓤 α\nts : Prod.map e e ⁻¹' t ⊆ Prod.map f f ⁻¹' s\nx✝ : α × α\nx₁ x₂ : α\nhx_t : (x₁, x₂) ∈ interior t\n⊢ (x₁, x₂) ∈\n Prod.map (DenseInducing.extend (_ : DenseInducing e) f) (DenseInducing.extend (_ : DenseInducing e) f) ⁻¹' d\n[PROOFSTEP]\nhave : interior t ∈ 𝓝 (x₁, x₂) := isOpen_interior.mem_nhds hx_t\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne : β → α\nh_e : UniformInducing e\nh_dense : DenseRange e\nf : β → γ\nh_f : UniformContinuous f\ninst✝ : CompleteSpace γ\nd : Set (γ × γ)\nhd : d ∈ 𝓤 γ\ns : Set (γ × γ)\nhs : s ∈ 𝓤 γ\nhs_comp : s ○ (s ○ s) ⊆ d\nh_pnt :\n ∀ {a : α} {m : Set α},\n m ∈ 𝓝 a →\n ∃ c,\n c ∈ f '' (e ⁻¹' m) ∧\n (c, DenseInducing.extend (_ : DenseInducing e) f a) ∈ s ∧\n (DenseInducing.extend (_ : DenseInducing e) f a, c) ∈ s\nthis✝¹ : Prod.map f f ⁻¹' s ∈ 𝓤 β\nthis✝ : Prod.map f f ⁻¹' s ∈ comap (Prod.map e e) (𝓤 α)\nt : Set (α × α)\nht : t ∈ 𝓤 α\nts : Prod.map e e ⁻¹' t ⊆ Prod.map f f ⁻¹' s\nx✝ : α × α\nx₁ x₂ : α\nhx_t : (x₁, x₂) ∈ interior t\nthis : interior t ∈ 𝓝 (x₁, x₂)\n⊢ (x₁, x₂) ∈\n Prod.map (DenseInducing.extend (_ : DenseInducing e) f) (DenseInducing.extend (_ : DenseInducing e) f) ⁻¹' d\n[PROOFSTEP]\nlet ⟨m₁, hm₁, m₂, hm₂, (hm : m₁ ×ˢ m₂ ⊆ interior t)⟩ := mem_nhds_prod_iff.mp this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne : β → α\nh_e : UniformInducing e\nh_dense : DenseRange e\nf : β → γ\nh_f : UniformContinuous f\ninst✝ : CompleteSpace γ\nd : Set (γ × γ)\nhd : d ∈ 𝓤 γ\ns : Set (γ × γ)\nhs : s ∈ 𝓤 γ\nhs_comp : s ○ (s ○ s) ⊆ d\nh_pnt :\n ∀ {a : α} {m : Set α},\n m ∈ 𝓝 a →\n ∃ c,\n c ∈ f '' (e ⁻¹' m) ∧\n (c, DenseInducing.extend (_ : DenseInducing e) f a) ∈ s ∧\n (DenseInducing.extend (_ : DenseInducing e) f a, c) ∈ s\nthis✝¹ : Prod.map f f ⁻¹' s ∈ 𝓤 β\nthis✝ : Prod.map f f ⁻¹' s ∈ comap (Prod.map e e) (𝓤 α)\nt : Set (α × α)\nht : t ∈ 𝓤 α\nts : Prod.map e e ⁻¹' t ⊆ Prod.map f f ⁻¹' s\nx✝ : α × α\nx₁ x₂ : α\nhx_t : (x₁, x₂) ∈ interior t\nthis : interior t ∈ 𝓝 (x₁, x₂)\nm₁ : Set α\nhm₁ : m₁ ∈ 𝓝 x₁\nm₂ : Set α\nhm₂ : m₂ ∈ 𝓝 x₂\nhm : m₁ ×ˢ m₂ ⊆ interior t\n⊢ (x₁, x₂) ∈\n Prod.map (DenseInducing.extend (_ : DenseInducing e) f) (DenseInducing.extend (_ : DenseInducing e) f) ⁻¹' d\n[PROOFSTEP]\nobtain ⟨_, ⟨a, ha₁, rfl⟩, _, ha₂⟩ := h_pnt hm₁\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne : β → α\nh_e : UniformInducing e\nh_dense : DenseRange e\nf : β → γ\nh_f : UniformContinuous f\ninst✝ : CompleteSpace γ\nd : Set (γ × γ)\nhd : d ∈ 𝓤 γ\ns : Set (γ × γ)\nhs : s ∈ 𝓤 γ\nhs_comp : s ○ (s ○ s) ⊆ d\nh_pnt :\n ∀ {a : α} {m : Set α},\n m ∈ 𝓝 a →\n ∃ c,\n c ∈ f '' (e ⁻¹' m) ∧\n (c, DenseInducing.extend (_ : DenseInducing e) f a) ∈ s ∧\n (DenseInducing.extend (_ : DenseInducing e) f a, c) ∈ s\nthis✝¹ : Prod.map f f ⁻¹' s ∈ 𝓤 β\nthis✝ : Prod.map f f ⁻¹' s ∈ comap (Prod.map e e) (𝓤 α)\nt : Set (α × α)\nht : t ∈ 𝓤 α\nts : Prod.map e e ⁻¹' t ⊆ Prod.map f f ⁻¹' s\nx✝ : α × α\nx₁ x₂ : α\nhx_t : (x₁, x₂) ∈ interior t\nthis : interior t ∈ 𝓝 (x₁, x₂)\nm₁ : Set α\nhm₁ : m₁ ∈ 𝓝 x₁\nm₂ : Set α\nhm₂ : m₂ ∈ 𝓝 x₂\nhm : m₁ ×ˢ m₂ ⊆ interior t\na : β\nha₁ : a ∈ e ⁻¹' m₁\nleft✝ : (f a, DenseInducing.extend (_ : DenseInducing e) f x₁) ∈ s\nha₂ : (DenseInducing.extend (_ : DenseInducing e) f x₁, f a) ∈ s\n⊢ (x₁, x₂) ∈\n Prod.map (DenseInducing.extend (_ : DenseInducing e) f) (DenseInducing.extend (_ : DenseInducing e) f) ⁻¹' d\n[PROOFSTEP]\nobtain ⟨_, ⟨b, hb₁, rfl⟩, hb₂, _⟩ := h_pnt hm₂\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne : β → α\nh_e : UniformInducing e\nh_dense : DenseRange e\nf : β → γ\nh_f : UniformContinuous f\ninst✝ : CompleteSpace γ\nd : Set (γ × γ)\nhd : d ∈ 𝓤 γ\ns : Set (γ × γ)\nhs : s ∈ 𝓤 γ\nhs_comp : s ○ (s ○ s) ⊆ d\nh_pnt :\n ∀ {a : α} {m : Set α},\n m ∈ 𝓝 a →\n ∃ c,\n c ∈ f '' (e ⁻¹' m) ∧\n (c, DenseInducing.extend (_ : DenseInducing e) f a) ∈ s ∧\n (DenseInducing.extend (_ : DenseInducing e) f a, c) ∈ s\nthis✝¹ : Prod.map f f ⁻¹' s ∈ 𝓤 β\nthis✝ : Prod.map f f ⁻¹' s ∈ comap (Prod.map e e) (𝓤 α)\nt : Set (α × α)\nht : t ∈ 𝓤 α\nts : Prod.map e e ⁻¹' t ⊆ Prod.map f f ⁻¹' s\nx✝ : α × α\nx₁ x₂ : α\nhx_t : (x₁, x₂) ∈ interior t\nthis : interior t ∈ 𝓝 (x₁, x₂)\nm₁ : Set α\nhm₁ : m₁ ∈ 𝓝 x₁\nm₂ : Set α\nhm₂ : m₂ ∈ 𝓝 x₂\nhm : m₁ ×ˢ m₂ ⊆ interior t\na : β\nha₁ : a ∈ e ⁻¹' m₁\nleft✝ : (f a, DenseInducing.extend (_ : DenseInducing e) f x₁) ∈ s\nha₂ : (DenseInducing.extend (_ : DenseInducing e) f x₁, f a) ∈ s\nb : β\nhb₁ : b ∈ e ⁻¹' m₂\nhb₂ : (f b, DenseInducing.extend (_ : DenseInducing e) f x₂) ∈ s\nright✝ : (DenseInducing.extend (_ : DenseInducing e) f x₂, f b) ∈ s\n⊢ (x₁, x₂) ∈\n Prod.map (DenseInducing.extend (_ : DenseInducing e) f) (DenseInducing.extend (_ : DenseInducing e) f) ⁻¹' d\n[PROOFSTEP]\nhave : Prod.map f f (a, b) ∈ s := ts <| mem_preimage.2 <| interior_subset (@hm (e a, e b) ⟨ha₁, hb₁⟩)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ne : β → α\nh_e : UniformInducing e\nh_dense : DenseRange e\nf : β → γ\nh_f : UniformContinuous f\ninst✝ : CompleteSpace γ\nd : Set (γ × γ)\nhd : d ∈ 𝓤 γ\ns : Set (γ × γ)\nhs : s ∈ 𝓤 γ\nhs_comp : s ○ (s ○ s) ⊆ d\nh_pnt :\n ∀ {a : α} {m : Set α},\n m ∈ 𝓝 a →\n ∃ c,\n c ∈ f '' (e ⁻¹' m) ∧\n (c, DenseInducing.extend (_ : DenseInducing e) f a) ∈ s ∧\n (DenseInducing.extend (_ : DenseInducing e) f a, c) ∈ s\nthis✝² : Prod.map f f ⁻¹' s ∈ 𝓤 β\nthis✝¹ : Prod.map f f ⁻¹' s ∈ comap (Prod.map e e) (𝓤 α)\nt : Set (α × α)\nht : t ∈ 𝓤 α\nts : Prod.map e e ⁻¹' t ⊆ Prod.map f f ⁻¹' s\nx✝ : α × α\nx₁ x₂ : α\nhx_t : (x₁, x₂) ∈ interior t\nthis✝ : interior t ∈ 𝓝 (x₁, x₂)\nm₁ : Set α\nhm₁ : m₁ ∈ 𝓝 x₁\nm₂ : Set α\nhm₂ : m₂ ∈ 𝓝 x₂\nhm : m₁ ×ˢ m₂ ⊆ interior t\na : β\nha₁ : a ∈ e ⁻¹' m₁\nleft✝ : (f a, DenseInducing.extend (_ : DenseInducing e) f x₁) ∈ s\nha₂ : (DenseInducing.extend (_ : DenseInducing e) f x₁, f a) ∈ s\nb : β\nhb₁ : b ∈ e ⁻¹' m₂\nhb₂ : (f b, DenseInducing.extend (_ : DenseInducing e) f x₂) ∈ s\nright✝ : (DenseInducing.extend (_ : DenseInducing e) f x₂, f b) ∈ s\nthis : Prod.map f f (a, b) ∈ s\n⊢ (x₁, x₂) ∈\n Prod.map (DenseInducing.extend (_ : DenseInducing e) f) (DenseInducing.extend (_ : DenseInducing e) f) ⁻¹' d\n[PROOFSTEP]\nexact hs_comp ⟨f a, ha₂, ⟨f b, this, hb₂⟩⟩\n", "meta": {"mathlib_filename": "Mathlib.Topology.UniformSpace.UniformEmbedding", "llama_tokens": 24935, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8221891392358014, "lm_q2_score": 0.6723316860482762, "lm_q1q2_score": 0.5527838102329873}} {"text": "[GOAL]\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\n⊢ { x_1 // x_1 ∈ Algebra.adjoin F {x} } ≃ₐ[F] AdjoinRoot (minpoly F x)\n[PROOFSTEP]\nrefine AlgEquiv.symm ?_\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\n⊢ AdjoinRoot (minpoly F x) ≃ₐ[F] { x_1 // x_1 ∈ Algebra.adjoin F {x} }\n[PROOFSTEP]\nrefine AlgEquiv.ofBijective (AlgHom.codRestrict (AdjoinRoot.liftHom _ x <| minpoly.aeval F x) _ fun p => ?_) ⟨?_, ?_⟩\n[GOAL]\ncase refine_1\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\np : AdjoinRoot (minpoly F x)\n⊢ ↑(AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) p ∈ Algebra.adjoin F {x}\n[PROOFSTEP]\ninduction p using AdjoinRoot.induction_on with\n| ih p => exact (Algebra.adjoin_singleton_eq_range_aeval F x).symm ▸ (Polynomial.aeval _).mem_range.mpr ⟨p, rfl⟩\n[GOAL]\ncase refine_1\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\np : AdjoinRoot (minpoly F x)\n⊢ ↑(AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) p ∈ Algebra.adjoin F {x}\n[PROOFSTEP]\ninduction p using AdjoinRoot.induction_on with\n| ih p => exact (Algebra.adjoin_singleton_eq_range_aeval F x).symm ▸ (Polynomial.aeval _).mem_range.mpr ⟨p, rfl⟩\n[GOAL]\ncase refine_1.ih\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\np : F[X]\n⊢ ↑(AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) (↑(AdjoinRoot.mk (minpoly F x)) p) ∈\n Algebra.adjoin F {x}\n[PROOFSTEP]\n\n| ih p => exact (Algebra.adjoin_singleton_eq_range_aeval F x).symm ▸ (Polynomial.aeval _).mem_range.mpr ⟨p, rfl⟩\n[GOAL]\ncase refine_1.ih\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\np : F[X]\n⊢ ↑(AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) (↑(AdjoinRoot.mk (minpoly F x)) p) ∈\n Algebra.adjoin F {x}\n[PROOFSTEP]\nexact (Algebra.adjoin_singleton_eq_range_aeval F x).symm ▸ (Polynomial.aeval _).mem_range.mpr ⟨p, rfl⟩\n[GOAL]\ncase refine_2\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\n⊢ Function.Injective\n ↑(AlgHom.codRestrict (AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) (Algebra.adjoin F {x})\n (_ :\n ∀ (p : AdjoinRoot (minpoly F x)),\n ↑(AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) p ∈ Algebra.adjoin F {x}))\n[PROOFSTEP]\napply (AlgHom.injective_codRestrict _ _ _).2\n[GOAL]\ncase refine_2\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\n⊢ Function.Injective ↑(AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0))\n[PROOFSTEP]\napply (injective_iff_map_eq_zero _).2\n[GOAL]\ncase refine_2\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\n⊢ ∀ (a : AdjoinRoot (minpoly F x)),\n ↑(AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) a = 0 → a = 0\n[PROOFSTEP]\nintro p\n[GOAL]\ncase refine_2\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\np : AdjoinRoot (minpoly F x)\n⊢ ↑(AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) p = 0 → p = 0\n[PROOFSTEP]\ninduction p using AdjoinRoot.induction_on with\n| ih p =>\n intro hp\n apply Ideal.Quotient.eq_zero_iff_mem.2\n apply Ideal.mem_span_singleton.2\n apply minpoly.dvd F x hp\n[GOAL]\ncase refine_2\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\np : AdjoinRoot (minpoly F x)\n⊢ ↑(AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) p = 0 → p = 0\n[PROOFSTEP]\ninduction p using AdjoinRoot.induction_on with\n| ih p =>\n intro hp\n apply Ideal.Quotient.eq_zero_iff_mem.2\n apply Ideal.mem_span_singleton.2\n apply minpoly.dvd F x hp\n[GOAL]\ncase refine_2.ih\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\np : F[X]\n⊢ ↑(AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) (↑(AdjoinRoot.mk (minpoly F x)) p) = 0 →\n ↑(AdjoinRoot.mk (minpoly F x)) p = 0\n[PROOFSTEP]\n\n| ih p =>\n intro hp\n apply Ideal.Quotient.eq_zero_iff_mem.2\n apply Ideal.mem_span_singleton.2\n apply minpoly.dvd F x hp\n[GOAL]\ncase refine_2.ih\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\np : F[X]\n⊢ ↑(AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) (↑(AdjoinRoot.mk (minpoly F x)) p) = 0 →\n ↑(AdjoinRoot.mk (minpoly F x)) p = 0\n[PROOFSTEP]\nintro hp\n[GOAL]\ncase refine_2.ih\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\np : F[X]\nhp : ↑(AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) (↑(AdjoinRoot.mk (minpoly F x)) p) = 0\n⊢ ↑(AdjoinRoot.mk (minpoly F x)) p = 0\n[PROOFSTEP]\napply Ideal.Quotient.eq_zero_iff_mem.2\n[GOAL]\ncase refine_2.ih\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\np : F[X]\nhp : ↑(AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) (↑(AdjoinRoot.mk (minpoly F x)) p) = 0\n⊢ p ∈ Ideal.span {minpoly F x}\n[PROOFSTEP]\napply Ideal.mem_span_singleton.2\n[GOAL]\ncase refine_2.ih\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\np : F[X]\nhp : ↑(AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) (↑(AdjoinRoot.mk (minpoly F x)) p) = 0\n⊢ minpoly F x ∣ p\n[PROOFSTEP]\napply minpoly.dvd F x hp\n[GOAL]\ncase refine_3\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\n⊢ Function.Surjective\n ↑(AlgHom.codRestrict (AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) (Algebra.adjoin F {x})\n (_ :\n ∀ (p : AdjoinRoot (minpoly F x)),\n ↑(AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) p ∈ Algebra.adjoin F {x}))\n[PROOFSTEP]\nintro y\n[GOAL]\ncase refine_3\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\ny : { x_1 // x_1 ∈ Algebra.adjoin F {x} }\n⊢ ∃ a,\n ↑(AlgHom.codRestrict (AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) (Algebra.adjoin F {x})\n (_ :\n ∀ (p : AdjoinRoot (minpoly F x)),\n ↑(AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) p ∈ Algebra.adjoin F {x}))\n a =\n y\n[PROOFSTEP]\nlet ⟨p, hp⟩ := (SetLike.ext_iff.1 (Algebra.adjoin_singleton_eq_range_aeval F x) (y : R)).1 y.2\n[GOAL]\ncase refine_3\nF : Type u_1\ninst✝² : Field F\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : Algebra F R\nx : R\ny : { x_1 // x_1 ∈ Algebra.adjoin F {x} }\np : F[X]\nhp : ↑↑(aeval x) p = ↑y\n⊢ ∃ a,\n ↑(AlgHom.codRestrict (AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) (Algebra.adjoin F {x})\n (_ :\n ∀ (p : AdjoinRoot (minpoly F x)),\n ↑(AdjoinRoot.liftHom (minpoly F x) x (_ : ↑(aeval x) (minpoly F x) = 0)) p ∈ Algebra.adjoin F {x}))\n a =\n y\n[PROOFSTEP]\nexact ⟨AdjoinRoot.mk _ p, Subtype.eq hp⟩\n[GOAL]\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns : Finset K\n⊢ (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\n[PROOFSTEP]\nclassical\nrefine' Finset.induction_on s (fun _ => _) fun a s _ ih H => _\n· rw [coe_empty, Algebra.adjoin_empty]\n exact ⟨(Algebra.ofId F L).comp (Algebra.botEquiv F K)⟩\nrw [forall_mem_insert] at H \nrcases H with ⟨⟨H1, H2⟩, H3⟩\ncases' ih H3 with f\nchoose H3 _ using H3\nrw [coe_insert, Set.insert_eq, Set.union_comm, Algebra.adjoin_union_eq_adjoin_adjoin]\nletI := (f : Algebra.adjoin F (↑s : Set K) →+* L).toAlgebra\nhaveI : FiniteDimensional F (Algebra.adjoin F (↑s : Set K)) :=\n ((Submodule.fg_iff_finiteDimensional _).1 (FG_adjoin_of_finite s.finite_toSet H3)).of_subalgebra_toSubmodule\nletI := fieldOfFiniteDimensional F (Algebra.adjoin F (↑s : Set K))\nhave H5 : IsIntegral (Algebra.adjoin F (s : Set K)) a := isIntegral_of_isScalarTower H1\nhave H6 : (minpoly (Algebra.adjoin F (s : Set K)) a).Splits (algebraMap (Algebra.adjoin F (s : Set K)) L) :=\n by\n have : Polynomial.map (algebraMap F (Algebra.adjoin F (s : Set K))) (minpoly F a) ≠ 0 :=\n Polynomial.map_ne_zero <| minpoly.ne_zero H1\n refine' Polynomial.splits_of_splits_of_dvd _ this ((Polynomial.splits_map_iff _ _).2 _) (minpoly.dvd _ _ _)\n · rw [← IsScalarTower.algebraMap_eq]\n exact H2\n · rw [Polynomial.aeval_map_algebraMap, minpoly.aeval]\nobtain ⟨y, hy⟩ := Polynomial.exists_root_of_splits _ H6 (ne_of_lt (minpoly.degree_pos H5)).symm\nrefine' ⟨Subalgebra.ofRestrictScalars F _ _⟩\nrefine' (AdjoinRoot.liftHom (minpoly (Algebra.adjoin F (↑s : Set K)) a) y hy).comp _\nexact (AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly (Algebra.adjoin F (↑s : Set K)) a).toAlgHom\n[GOAL]\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns : Finset K\n⊢ (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\n[PROOFSTEP]\nrefine' Finset.induction_on s (fun _ => _) fun a s _ ih H => _\n[GOAL]\ncase refine'_1\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns : Finset K\nx✝ : ∀ (x : K), x ∈ ∅ → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)\n⊢ Nonempty ({ x // x ∈ Algebra.adjoin F ↑∅ } →ₐ[F] L)\n[PROOFSTEP]\nrw [coe_empty, Algebra.adjoin_empty]\n[GOAL]\ncase refine'_1\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns : Finset K\nx✝ : ∀ (x : K), x ∈ ∅ → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)\n⊢ Nonempty ({ x // x ∈ ⊥ } →ₐ[F] L)\n[PROOFSTEP]\nexact ⟨(Algebra.ofId F L).comp (Algebra.botEquiv F K)⟩\n[GOAL]\ncase refine'_2\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH : ∀ (x : K), x ∈ insert a s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)\n⊢ Nonempty ({ x // x ∈ Algebra.adjoin F ↑(insert a s) } →ₐ[F] L)\n[PROOFSTEP]\nrw [forall_mem_insert] at H \n[GOAL]\ncase refine'_2\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH :\n (IsIntegral F a ∧ Splits (algebraMap F L) (minpoly F a)) ∧\n ∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)\n⊢ Nonempty ({ x // x ∈ Algebra.adjoin F ↑(insert a s) } →ₐ[F] L)\n[PROOFSTEP]\nrcases H with ⟨⟨H1, H2⟩, H3⟩\n[GOAL]\ncase refine'_2.intro.intro\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH3 : ∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)\nH1 : IsIntegral F a\nH2 : Splits (algebraMap F L) (minpoly F a)\n⊢ Nonempty ({ x // x ∈ Algebra.adjoin F ↑(insert a s) } →ₐ[F] L)\n[PROOFSTEP]\ncases' ih H3 with f\n[GOAL]\ncase refine'_2.intro.intro.intro\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH3 : ∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)\nH1 : IsIntegral F a\nH2 : Splits (algebraMap F L) (minpoly F a)\nf : { x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L\n⊢ Nonempty ({ x // x ∈ Algebra.adjoin F ↑(insert a s) } →ₐ[F] L)\n[PROOFSTEP]\nchoose H3 _ using H3\n[GOAL]\ncase refine'_2.intro.intro.intro\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH1 : IsIntegral F a\nH2 : Splits (algebraMap F L) (minpoly F a)\nf : { x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L\nH3 : ∀ (x : K), x ∈ s → IsIntegral F x\n✝ : ∀ (x : K), x ∈ s → Splits (algebraMap F L) (minpoly F x)\n⊢ Nonempty ({ x // x ∈ Algebra.adjoin F ↑(insert a s) } →ₐ[F] L)\n[PROOFSTEP]\nrw [coe_insert, Set.insert_eq, Set.union_comm, Algebra.adjoin_union_eq_adjoin_adjoin]\n[GOAL]\ncase refine'_2.intro.intro.intro\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH1 : IsIntegral F a\nH2 : Splits (algebraMap F L) (minpoly F a)\nf : { x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L\nH3 : ∀ (x : K), x ∈ s → IsIntegral F x\n✝ : ∀ (x : K), x ∈ s → Splits (algebraMap F L) (minpoly F x)\n⊢ Nonempty ({ x // x ∈ Subalgebra.restrictScalars F (Algebra.adjoin { x // x ∈ Algebra.adjoin F ↑s } {a}) } →ₐ[F] L)\n[PROOFSTEP]\nletI := (f : Algebra.adjoin F (↑s : Set K) →+* L).toAlgebra\n[GOAL]\ncase refine'_2.intro.intro.intro\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH1 : IsIntegral F a\nH2 : Splits (algebraMap F L) (minpoly F a)\nf : { x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L\nH3 : ∀ (x : K), x ∈ s → IsIntegral F x\n✝ : ∀ (x : K), x ∈ s → Splits (algebraMap F L) (minpoly F x)\nthis : Algebra { x // x ∈ Algebra.adjoin F ↑s } L := RingHom.toAlgebra ↑f\n⊢ Nonempty ({ x // x ∈ Subalgebra.restrictScalars F (Algebra.adjoin { x // x ∈ Algebra.adjoin F ↑s } {a}) } →ₐ[F] L)\n[PROOFSTEP]\nhaveI : FiniteDimensional F (Algebra.adjoin F (↑s : Set K)) :=\n ((Submodule.fg_iff_finiteDimensional _).1 (FG_adjoin_of_finite s.finite_toSet H3)).of_subalgebra_toSubmodule\n[GOAL]\ncase refine'_2.intro.intro.intro\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH1 : IsIntegral F a\nH2 : Splits (algebraMap F L) (minpoly F a)\nf : { x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L\nH3 : ∀ (x : K), x ∈ s → IsIntegral F x\n✝ : ∀ (x : K), x ∈ s → Splits (algebraMap F L) (minpoly F x)\nthis✝ : Algebra { x // x ∈ Algebra.adjoin F ↑s } L := RingHom.toAlgebra ↑f\nthis : FiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\n⊢ Nonempty ({ x // x ∈ Subalgebra.restrictScalars F (Algebra.adjoin { x // x ∈ Algebra.adjoin F ↑s } {a}) } →ₐ[F] L)\n[PROOFSTEP]\nletI := fieldOfFiniteDimensional F (Algebra.adjoin F (↑s : Set K))\n[GOAL]\ncase refine'_2.intro.intro.intro\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH1 : IsIntegral F a\nH2 : Splits (algebraMap F L) (minpoly F a)\nf : { x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L\nH3 : ∀ (x : K), x ∈ s → IsIntegral F x\n✝ : ∀ (x : K), x ∈ s → Splits (algebraMap F L) (minpoly F x)\nthis✝¹ : Algebra { x // x ∈ Algebra.adjoin F ↑s } L := RingHom.toAlgebra ↑f\nthis✝ : FiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nthis : Field { x // x ∈ Algebra.adjoin F ↑s } := fieldOfFiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\n⊢ Nonempty ({ x // x ∈ Subalgebra.restrictScalars F (Algebra.adjoin { x // x ∈ Algebra.adjoin F ↑s } {a}) } →ₐ[F] L)\n[PROOFSTEP]\nhave H5 : IsIntegral (Algebra.adjoin F (s : Set K)) a := isIntegral_of_isScalarTower H1\n[GOAL]\ncase refine'_2.intro.intro.intro\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH1 : IsIntegral F a\nH2 : Splits (algebraMap F L) (minpoly F a)\nf : { x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L\nH3 : ∀ (x : K), x ∈ s → IsIntegral F x\n✝ : ∀ (x : K), x ∈ s → Splits (algebraMap F L) (minpoly F x)\nthis✝¹ : Algebra { x // x ∈ Algebra.adjoin F ↑s } L := RingHom.toAlgebra ↑f\nthis✝ : FiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nthis : Field { x // x ∈ Algebra.adjoin F ↑s } := fieldOfFiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nH5 : IsIntegral { x // x ∈ Algebra.adjoin F ↑s } a\n⊢ Nonempty ({ x // x ∈ Subalgebra.restrictScalars F (Algebra.adjoin { x // x ∈ Algebra.adjoin F ↑s } {a}) } →ₐ[F] L)\n[PROOFSTEP]\nhave H6 : (minpoly (Algebra.adjoin F (s : Set K)) a).Splits (algebraMap (Algebra.adjoin F (s : Set K)) L) :=\n by\n have : Polynomial.map (algebraMap F (Algebra.adjoin F (s : Set K))) (minpoly F a) ≠ 0 :=\n Polynomial.map_ne_zero <| minpoly.ne_zero H1\n refine' Polynomial.splits_of_splits_of_dvd _ this ((Polynomial.splits_map_iff _ _).2 _) (minpoly.dvd _ _ _)\n · rw [← IsScalarTower.algebraMap_eq]\n exact H2\n · rw [Polynomial.aeval_map_algebraMap, minpoly.aeval]\n[GOAL]\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH1 : IsIntegral F a\nH2 : Splits (algebraMap F L) (minpoly F a)\nf : { x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L\nH3 : ∀ (x : K), x ∈ s → IsIntegral F x\n✝ : ∀ (x : K), x ∈ s → Splits (algebraMap F L) (minpoly F x)\nthis✝¹ : Algebra { x // x ∈ Algebra.adjoin F ↑s } L := RingHom.toAlgebra ↑f\nthis✝ : FiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nthis : Field { x // x ∈ Algebra.adjoin F ↑s } := fieldOfFiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nH5 : IsIntegral { x // x ∈ Algebra.adjoin F ↑s } a\n⊢ Splits (algebraMap { x // x ∈ Algebra.adjoin F ↑s } L) (minpoly { x // x ∈ Algebra.adjoin F ↑s } a)\n[PROOFSTEP]\nhave : Polynomial.map (algebraMap F (Algebra.adjoin F (s : Set K))) (minpoly F a) ≠ 0 :=\n Polynomial.map_ne_zero <| minpoly.ne_zero H1\n[GOAL]\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH1 : IsIntegral F a\nH2 : Splits (algebraMap F L) (minpoly F a)\nf : { x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L\nH3 : ∀ (x : K), x ∈ s → IsIntegral F x\n✝ : ∀ (x : K), x ∈ s → Splits (algebraMap F L) (minpoly F x)\nthis✝² : Algebra { x // x ∈ Algebra.adjoin F ↑s } L := RingHom.toAlgebra ↑f\nthis✝¹ : FiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nthis✝ : Field { x // x ∈ Algebra.adjoin F ↑s } := fieldOfFiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nH5 : IsIntegral { x // x ∈ Algebra.adjoin F ↑s } a\nthis : Polynomial.map (algebraMap F { x // x ∈ Algebra.adjoin F ↑s }) (minpoly F a) ≠ 0\n⊢ Splits (algebraMap { x // x ∈ Algebra.adjoin F ↑s } L) (minpoly { x // x ∈ Algebra.adjoin F ↑s } a)\n[PROOFSTEP]\nrefine' Polynomial.splits_of_splits_of_dvd _ this ((Polynomial.splits_map_iff _ _).2 _) (minpoly.dvd _ _ _)\n[GOAL]\ncase refine'_1\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH1 : IsIntegral F a\nH2 : Splits (algebraMap F L) (minpoly F a)\nf : { x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L\nH3 : ∀ (x : K), x ∈ s → IsIntegral F x\n✝ : ∀ (x : K), x ∈ s → Splits (algebraMap F L) (minpoly F x)\nthis✝² : Algebra { x // x ∈ Algebra.adjoin F ↑s } L := RingHom.toAlgebra ↑f\nthis✝¹ : FiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nthis✝ : Field { x // x ∈ Algebra.adjoin F ↑s } := fieldOfFiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nH5 : IsIntegral { x // x ∈ Algebra.adjoin F ↑s } a\nthis : Polynomial.map (algebraMap F { x // x ∈ Algebra.adjoin F ↑s }) (minpoly F a) ≠ 0\n⊢ Splits (RingHom.comp (algebraMap { x // x ∈ Algebra.adjoin F ↑s } L) (algebraMap F { x // x ∈ Algebra.adjoin F ↑s }))\n (minpoly F a)\n[PROOFSTEP]\nrw [← IsScalarTower.algebraMap_eq]\n[GOAL]\ncase refine'_1\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH1 : IsIntegral F a\nH2 : Splits (algebraMap F L) (minpoly F a)\nf : { x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L\nH3 : ∀ (x : K), x ∈ s → IsIntegral F x\n✝ : ∀ (x : K), x ∈ s → Splits (algebraMap F L) (minpoly F x)\nthis✝² : Algebra { x // x ∈ Algebra.adjoin F ↑s } L := RingHom.toAlgebra ↑f\nthis✝¹ : FiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nthis✝ : Field { x // x ∈ Algebra.adjoin F ↑s } := fieldOfFiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nH5 : IsIntegral { x // x ∈ Algebra.adjoin F ↑s } a\nthis : Polynomial.map (algebraMap F { x // x ∈ Algebra.adjoin F ↑s }) (minpoly F a) ≠ 0\n⊢ Splits (algebraMap F L) (minpoly F a)\n[PROOFSTEP]\nexact H2\n[GOAL]\ncase refine'_2\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH1 : IsIntegral F a\nH2 : Splits (algebraMap F L) (minpoly F a)\nf : { x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L\nH3 : ∀ (x : K), x ∈ s → IsIntegral F x\n✝ : ∀ (x : K), x ∈ s → Splits (algebraMap F L) (minpoly F x)\nthis✝² : Algebra { x // x ∈ Algebra.adjoin F ↑s } L := RingHom.toAlgebra ↑f\nthis✝¹ : FiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nthis✝ : Field { x // x ∈ Algebra.adjoin F ↑s } := fieldOfFiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nH5 : IsIntegral { x // x ∈ Algebra.adjoin F ↑s } a\nthis : Polynomial.map (algebraMap F { x // x ∈ Algebra.adjoin F ↑s }) (minpoly F a) ≠ 0\n⊢ ↑(aeval a) (Polynomial.map (algebraMap F { x // x ∈ Algebra.adjoin F ↑s }) (minpoly F a)) = 0\n[PROOFSTEP]\nrw [Polynomial.aeval_map_algebraMap, minpoly.aeval]\n[GOAL]\ncase refine'_2.intro.intro.intro\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH1 : IsIntegral F a\nH2 : Splits (algebraMap F L) (minpoly F a)\nf : { x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L\nH3 : ∀ (x : K), x ∈ s → IsIntegral F x\n✝ : ∀ (x : K), x ∈ s → Splits (algebraMap F L) (minpoly F x)\nthis✝¹ : Algebra { x // x ∈ Algebra.adjoin F ↑s } L := RingHom.toAlgebra ↑f\nthis✝ : FiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nthis : Field { x // x ∈ Algebra.adjoin F ↑s } := fieldOfFiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nH5 : IsIntegral { x // x ∈ Algebra.adjoin F ↑s } a\nH6 : Splits (algebraMap { x // x ∈ Algebra.adjoin F ↑s } L) (minpoly { x // x ∈ Algebra.adjoin F ↑s } a)\n⊢ Nonempty ({ x // x ∈ Subalgebra.restrictScalars F (Algebra.adjoin { x // x ∈ Algebra.adjoin F ↑s } {a}) } →ₐ[F] L)\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := Polynomial.exists_root_of_splits _ H6 (ne_of_lt (minpoly.degree_pos H5)).symm\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH1 : IsIntegral F a\nH2 : Splits (algebraMap F L) (minpoly F a)\nf : { x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L\nH3 : ∀ (x : K), x ∈ s → IsIntegral F x\n✝ : ∀ (x : K), x ∈ s → Splits (algebraMap F L) (minpoly F x)\nthis✝¹ : Algebra { x // x ∈ Algebra.adjoin F ↑s } L := RingHom.toAlgebra ↑f\nthis✝ : FiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nthis : Field { x // x ∈ Algebra.adjoin F ↑s } := fieldOfFiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nH5 : IsIntegral { x // x ∈ Algebra.adjoin F ↑s } a\nH6 : Splits (algebraMap { x // x ∈ Algebra.adjoin F ↑s } L) (minpoly { x // x ∈ Algebra.adjoin F ↑s } a)\ny : L\nhy : eval₂ (algebraMap { x // x ∈ Algebra.adjoin F ↑s } L) y (minpoly { x // x ∈ Algebra.adjoin F ↑s } a) = 0\n⊢ Nonempty ({ x // x ∈ Subalgebra.restrictScalars F (Algebra.adjoin { x // x ∈ Algebra.adjoin F ↑s } {a}) } →ₐ[F] L)\n[PROOFSTEP]\nrefine' ⟨Subalgebra.ofRestrictScalars F _ _⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH1 : IsIntegral F a\nH2 : Splits (algebraMap F L) (minpoly F a)\nf : { x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L\nH3 : ∀ (x : K), x ∈ s → IsIntegral F x\n✝ : ∀ (x : K), x ∈ s → Splits (algebraMap F L) (minpoly F x)\nthis✝¹ : Algebra { x // x ∈ Algebra.adjoin F ↑s } L := RingHom.toAlgebra ↑f\nthis✝ : FiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nthis : Field { x // x ∈ Algebra.adjoin F ↑s } := fieldOfFiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nH5 : IsIntegral { x // x ∈ Algebra.adjoin F ↑s } a\nH6 : Splits (algebraMap { x // x ∈ Algebra.adjoin F ↑s } L) (minpoly { x // x ∈ Algebra.adjoin F ↑s } a)\ny : L\nhy : eval₂ (algebraMap { x // x ∈ Algebra.adjoin F ↑s } L) y (minpoly { x // x ∈ Algebra.adjoin F ↑s } a) = 0\n⊢ { x // x ∈ Algebra.adjoin { x // x ∈ Algebra.adjoin F ↑s } {a} } →ₐ[{ x // x ∈ Algebra.adjoin F ↑s }] L\n[PROOFSTEP]\nrefine' (AdjoinRoot.liftHom (minpoly (Algebra.adjoin F (↑s : Set K)) a) y hy).comp _\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nF✝ : Type u_1\ninst✝⁵ : Field F✝\nF : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\ns✝ : Finset K\na : K\ns : Finset K\nx✝ : ¬a ∈ s\nih :\n (∀ (x : K), x ∈ s → IsIntegral F x ∧ Splits (algebraMap F L) (minpoly F x)) →\n Nonempty ({ x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L)\nH1 : IsIntegral F a\nH2 : Splits (algebraMap F L) (minpoly F a)\nf : { x // x ∈ Algebra.adjoin F ↑s } →ₐ[F] L\nH3 : ∀ (x : K), x ∈ s → IsIntegral F x\n✝ : ∀ (x : K), x ∈ s → Splits (algebraMap F L) (minpoly F x)\nthis✝¹ : Algebra { x // x ∈ Algebra.adjoin F ↑s } L := RingHom.toAlgebra ↑f\nthis✝ : FiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nthis : Field { x // x ∈ Algebra.adjoin F ↑s } := fieldOfFiniteDimensional F { x // x ∈ Algebra.adjoin F ↑s }\nH5 : IsIntegral { x // x ∈ Algebra.adjoin F ↑s } a\nH6 : Splits (algebraMap { x // x ∈ Algebra.adjoin F ↑s } L) (minpoly { x // x ∈ Algebra.adjoin F ↑s } a)\ny : L\nhy : eval₂ (algebraMap { x // x ∈ Algebra.adjoin F ↑s } L) y (minpoly { x // x ∈ Algebra.adjoin F ↑s } a) = 0\n⊢ { x // x ∈ Algebra.adjoin { x // x ∈ Algebra.adjoin F ↑s } {a} } →ₐ[{ x // x ∈ Algebra.adjoin F ↑s }]\n AdjoinRoot (minpoly { x // x ∈ Algebra.adjoin F ↑s } a)\n[PROOFSTEP]\nexact (AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly (Algebra.adjoin F (↑s : Set K)) a).toAlgHom\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Adjoin.Field", "llama_tokens": 14430, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8438951182587158, "lm_q2_score": 0.6548947357776795, "lm_q1q2_score": 0.5526624704961153}} {"text": "[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nc : 𝕜\ns : Set E\n⊢ EMetric.diam (c • s) = ‖c‖₊ • EMetric.diam s\n[PROOFSTEP]\nrefine' le_antisymm (ediam_smul_le c s) _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nc : 𝕜\ns : Set E\n⊢ ‖c‖₊ • EMetric.diam s ≤ EMetric.diam (c • s)\n[PROOFSTEP]\nobtain rfl | hc := eq_or_ne c 0\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\ns : Set E\n⊢ ‖0‖₊ • EMetric.diam s ≤ EMetric.diam (0 • s)\n[PROOFSTEP]\nobtain rfl | hs := s.eq_empty_or_nonempty\n[GOAL]\ncase inl.inl\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\n⊢ ‖0‖₊ • EMetric.diam ∅ ≤ EMetric.diam (0 • ∅)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl.inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\ns : Set E\nhs : Set.Nonempty s\n⊢ ‖0‖₊ • EMetric.diam s ≤ EMetric.diam (0 • s)\n[PROOFSTEP]\nsimp [zero_smul_set hs, ← Set.singleton_zero]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nc : 𝕜\ns : Set E\nhc : c ≠ 0\n⊢ ‖c‖₊ • EMetric.diam s ≤ EMetric.diam (c • s)\n[PROOFSTEP]\nhave := (lipschitzWith_smul c⁻¹).ediam_image_le (c • s)\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nc : 𝕜\ns : Set E\nhc : c ≠ 0\nthis : EMetric.diam ((fun x x_1 => x • x_1) c⁻¹ '' (c • s)) ≤ ↑‖c⁻¹‖₊ * EMetric.diam (c • s)\n⊢ ‖c‖₊ • EMetric.diam s ≤ EMetric.diam (c • s)\n[PROOFSTEP]\nrwa [← smul_eq_mul, ← ENNReal.smul_def, Set.image_smul, inv_smul_smul₀ hc s, nnnorm_inv,\n ENNReal.le_inv_smul_iff (nnnorm_ne_zero_iff.mpr hc)] at this \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nc : 𝕜\nx : Set E\n⊢ diam (c • x) = ‖c‖ * diam x\n[PROOFSTEP]\nsimp_rw [diam, ediam_smul₀, ENNReal.toReal_smul, NNReal.smul_def, coe_nnnorm, smul_eq_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nc : 𝕜\nhc : c ≠ 0\ns : Set E\nx : E\n⊢ EMetric.infEdist (c • x) (c • s) = ‖c‖₊ • EMetric.infEdist x s\n[PROOFSTEP]\nsimp_rw [EMetric.infEdist]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nc : 𝕜\nhc : c ≠ 0\ns : Set E\nx : E\n⊢ ⨅ (y : E) (_ : y ∈ c • s), edist (c • x) y = ‖c‖₊ • ⨅ (y : E) (_ : y ∈ s), edist x y\n[PROOFSTEP]\nhave : Function.Surjective ((c • ·) : E → E) := Function.RightInverse.surjective (smul_inv_smul₀ hc)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nc : 𝕜\nhc : c ≠ 0\ns : Set E\nx : E\nthis : Function.Surjective fun x => c • x\n⊢ ⨅ (y : E) (_ : y ∈ c • s), edist (c • x) y = ‖c‖₊ • ⨅ (y : E) (_ : y ∈ s), edist x y\n[PROOFSTEP]\ntrans ⨅ (y) (_ : y ∈ s), ‖c‖₊ • edist x y\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nc : 𝕜\nhc : c ≠ 0\ns : Set E\nx : E\nthis : Function.Surjective fun x => c • x\n⊢ ⨅ (y : E) (_ : y ∈ c • s), edist (c • x) y = ⨅ (y : E) (_ : y ∈ s), ‖c‖₊ • edist x y\n[PROOFSTEP]\nrefine' (this.iInf_congr _ fun y => _).symm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nc : 𝕜\nhc : c ≠ 0\ns : Set E\nx : E\nthis : Function.Surjective fun x => c • x\ny : E\n⊢ ⨅ (_ : c • y ∈ c • s), edist (c • x) (c • y) = ⨅ (_ : y ∈ s), ‖c‖₊ • edist x y\n[PROOFSTEP]\nsimp_rw [smul_mem_smul_set_iff₀ hc, edist_smul₀]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nc : 𝕜\nhc : c ≠ 0\ns : Set E\nx : E\nthis : Function.Surjective fun x => c • x\n⊢ ⨅ (y : E) (_ : y ∈ s), ‖c‖₊ • edist x y = ‖c‖₊ • ⨅ (y : E) (_ : y ∈ s), edist x y\n[PROOFSTEP]\nhave : (‖c‖₊ : ENNReal) ≠ 0 := by simp [hc]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nc : 𝕜\nhc : c ≠ 0\ns : Set E\nx : E\nthis : Function.Surjective fun x => c • x\n⊢ ↑‖c‖₊ ≠ 0\n[PROOFSTEP]\nsimp [hc]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nc : 𝕜\nhc : c ≠ 0\ns : Set E\nx : E\nthis✝ : Function.Surjective fun x => c • x\nthis : ↑‖c‖₊ ≠ 0\n⊢ ⨅ (y : E) (_ : y ∈ s), ‖c‖₊ • edist x y = ‖c‖₊ • ⨅ (y : E) (_ : y ∈ s), edist x y\n[PROOFSTEP]\nsimp_rw [ENNReal.smul_def, smul_eq_mul, ENNReal.mul_iInf_of_ne this ENNReal.coe_ne_top]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nc : 𝕜\nhc : c ≠ 0\ns : Set E\nx : E\n⊢ infDist (c • x) (c • s) = ‖c‖ * infDist x s\n[PROOFSTEP]\nsimp_rw [Metric.infDist, infEdist_smul₀ hc s, ENNReal.toReal_smul, NNReal.smul_def, coe_nnnorm, smul_eq_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\n⊢ c • ball x r = ball (c • x) (‖c‖ * r)\n[PROOFSTEP]\next y\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\ny : E\n⊢ y ∈ c • ball x r ↔ y ∈ ball (c • x) (‖c‖ * r)\n[PROOFSTEP]\nrw [mem_smul_set_iff_inv_smul_mem₀ hc]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\ny : E\n⊢ c⁻¹ • y ∈ ball x r ↔ y ∈ ball (c • x) (‖c‖ * r)\n[PROOFSTEP]\nconv_lhs => rw [← inv_smul_smul₀ hc x]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\ny : E\n| c⁻¹ • y ∈ ball x r\n[PROOFSTEP]\nrw [← inv_smul_smul₀ hc x]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\ny : E\n| c⁻¹ • y ∈ ball x r\n[PROOFSTEP]\nrw [← inv_smul_smul₀ hc x]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\ny : E\n| c⁻¹ • y ∈ ball x r\n[PROOFSTEP]\nrw [← inv_smul_smul₀ hc x]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\ny : E\n⊢ c⁻¹ • y ∈ ball (c⁻¹ • c • x) r ↔ y ∈ ball (c • x) (‖c‖ * r)\n[PROOFSTEP]\nsimp [← div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hc), mul_comm _ r, dist_smul₀]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\n⊢ c • ball 0 1 = ball 0 ‖c‖\n[PROOFSTEP]\nrw [_root_.smul_ball hc, smul_zero, mul_one]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\n⊢ c • sphere x r = sphere (c • x) (‖c‖ * r)\n[PROOFSTEP]\next y\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\ny : E\n⊢ y ∈ c • sphere x r ↔ y ∈ sphere (c • x) (‖c‖ * r)\n[PROOFSTEP]\nrw [mem_smul_set_iff_inv_smul_mem₀ hc]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\ny : E\n⊢ c⁻¹ • y ∈ sphere x r ↔ y ∈ sphere (c • x) (‖c‖ * r)\n[PROOFSTEP]\nconv_lhs => rw [← inv_smul_smul₀ hc x]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\ny : E\n| c⁻¹ • y ∈ sphere x r\n[PROOFSTEP]\nrw [← inv_smul_smul₀ hc x]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\ny : E\n| c⁻¹ • y ∈ sphere x r\n[PROOFSTEP]\nrw [← inv_smul_smul₀ hc x]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\ny : E\n| c⁻¹ • y ∈ sphere x r\n[PROOFSTEP]\nrw [← inv_smul_smul₀ hc x]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\ny : E\n⊢ c⁻¹ • y ∈ sphere (c⁻¹ • c • x) r ↔ y ∈ sphere (c • x) (‖c‖ * r)\n[PROOFSTEP]\nsimp only [mem_sphere, dist_smul₀, norm_inv, ← div_eq_inv_mul, div_eq_iff (norm_pos_iff.2 hc).ne', mul_comm r]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\n⊢ c • closedBall x r = closedBall (c • x) (‖c‖ * r)\n[PROOFSTEP]\nsimp only [← ball_union_sphere, Set.smul_set_union, _root_.smul_ball hc, smul_sphere' hc]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nx : E\ns : Set E\nhs : Metric.Bounded s\nu : Set E\nhu : u ∈ 𝓝 x\n⊢ ∀ᶠ (r : 𝕜) in 𝓝 0, {x} + r • s ⊆ u\n[PROOFSTEP]\nobtain ⟨ε, εpos, hε⟩ : ∃ ε : ℝ, 0 < ε ∧ closedBall x ε ⊆ u := nhds_basis_closedBall.mem_iff.1 hu\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nx : E\ns : Set E\nhs : Metric.Bounded s\nu : Set E\nhu : u ∈ 𝓝 x\nε : ℝ\nεpos : 0 < ε\nhε : closedBall x ε ⊆ u\n⊢ ∀ᶠ (r : 𝕜) in 𝓝 0, {x} + r • s ⊆ u\n[PROOFSTEP]\nobtain ⟨R, Rpos, hR⟩ : ∃ R : ℝ, 0 < R ∧ s ⊆ closedBall 0 R := hs.subset_ball_lt 0 0\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nx : E\ns : Set E\nhs : Metric.Bounded s\nu : Set E\nhu : u ∈ 𝓝 x\nε : ℝ\nεpos : 0 < ε\nhε : closedBall x ε ⊆ u\nR : ℝ\nRpos : 0 < R\nhR : s ⊆ closedBall 0 R\n⊢ ∀ᶠ (r : 𝕜) in 𝓝 0, {x} + r • s ⊆ u\n[PROOFSTEP]\nhave : Metric.closedBall (0 : 𝕜) (ε / R) ∈ 𝓝 (0 : 𝕜) := closedBall_mem_nhds _ (div_pos εpos Rpos)\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nx : E\ns : Set E\nhs : Metric.Bounded s\nu : Set E\nhu : u ∈ 𝓝 x\nε : ℝ\nεpos : 0 < ε\nhε : closedBall x ε ⊆ u\nR : ℝ\nRpos : 0 < R\nhR : s ⊆ closedBall 0 R\nthis : closedBall 0 (ε / R) ∈ 𝓝 0\n⊢ ∀ᶠ (r : 𝕜) in 𝓝 0, {x} + r • s ⊆ u\n[PROOFSTEP]\nfilter_upwards [this] with r hr\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nx : E\ns : Set E\nhs : Metric.Bounded s\nu : Set E\nhu : u ∈ 𝓝 x\nε : ℝ\nεpos : 0 < ε\nhε : closedBall x ε ⊆ u\nR : ℝ\nRpos : 0 < R\nhR : s ⊆ closedBall 0 R\nthis : closedBall 0 (ε / R) ∈ 𝓝 0\nr : 𝕜\nhr : r ∈ closedBall 0 (ε / R)\n⊢ {x} + r • s ⊆ u\n[PROOFSTEP]\nsimp only [image_add_left, singleton_add]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nx : E\ns : Set E\nhs : Metric.Bounded s\nu : Set E\nhu : u ∈ 𝓝 x\nε : ℝ\nεpos : 0 < ε\nhε : closedBall x ε ⊆ u\nR : ℝ\nRpos : 0 < R\nhR : s ⊆ closedBall 0 R\nthis : closedBall 0 (ε / R) ∈ 𝓝 0\nr : 𝕜\nhr : r ∈ closedBall 0 (ε / R)\n⊢ (fun x_1 => -x + x_1) ⁻¹' (r • s) ⊆ u\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nx : E\ns : Set E\nhs : Metric.Bounded s\nu : Set E\nhu : u ∈ 𝓝 x\nε : ℝ\nεpos : 0 < ε\nhε : closedBall x ε ⊆ u\nR : ℝ\nRpos : 0 < R\nhR : s ⊆ closedBall 0 R\nthis : closedBall 0 (ε / R) ∈ 𝓝 0\nr : 𝕜\nhr : r ∈ closedBall 0 (ε / R)\ny : E\nhy : y ∈ (fun x_1 => -x + x_1) ⁻¹' (r • s)\n⊢ y ∈ u\n[PROOFSTEP]\nobtain ⟨z, zs, hz⟩ : ∃ z : E, z ∈ s ∧ r • z = -x + y := by simpa [mem_smul_set] using hy\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nx : E\ns : Set E\nhs : Metric.Bounded s\nu : Set E\nhu : u ∈ 𝓝 x\nε : ℝ\nεpos : 0 < ε\nhε : closedBall x ε ⊆ u\nR : ℝ\nRpos : 0 < R\nhR : s ⊆ closedBall 0 R\nthis : closedBall 0 (ε / R) ∈ 𝓝 0\nr : 𝕜\nhr : r ∈ closedBall 0 (ε / R)\ny : E\nhy : y ∈ (fun x_1 => -x + x_1) ⁻¹' (r • s)\n⊢ ∃ z, z ∈ s ∧ r • z = -x + y\n[PROOFSTEP]\nsimpa [mem_smul_set] using hy\n[GOAL]\ncase h.intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nx : E\ns : Set E\nhs : Metric.Bounded s\nu : Set E\nhu : u ∈ 𝓝 x\nε : ℝ\nεpos : 0 < ε\nhε : closedBall x ε ⊆ u\nR : ℝ\nRpos : 0 < R\nhR : s ⊆ closedBall 0 R\nthis : closedBall 0 (ε / R) ∈ 𝓝 0\nr : 𝕜\nhr : r ∈ closedBall 0 (ε / R)\ny : E\nhy : y ∈ (fun x_1 => -x + x_1) ⁻¹' (r • s)\nz : E\nzs : z ∈ s\nhz : r • z = -x + y\n⊢ y ∈ u\n[PROOFSTEP]\nhave I : ‖r • z‖ ≤ ε :=\n calc\n ‖r • z‖ = ‖r‖ * ‖z‖ := norm_smul _ _\n _ ≤ ε / R * R :=\n (mul_le_mul (mem_closedBall_zero_iff.1 hr) (mem_closedBall_zero_iff.1 (hR zs)) (norm_nonneg _)\n (div_pos εpos Rpos).le)\n _ = ε := by field_simp [Rpos.ne']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nx : E\ns : Set E\nhs : Metric.Bounded s\nu : Set E\nhu : u ∈ 𝓝 x\nε : ℝ\nεpos : 0 < ε\nhε : closedBall x ε ⊆ u\nR : ℝ\nRpos : 0 < R\nhR : s ⊆ closedBall 0 R\nthis : closedBall 0 (ε / R) ∈ 𝓝 0\nr : 𝕜\nhr : r ∈ closedBall 0 (ε / R)\ny : E\nhy : y ∈ (fun x_1 => -x + x_1) ⁻¹' (r • s)\nz : E\nzs : z ∈ s\nhz : r • z = -x + y\n⊢ ε / R * R = ε\n[PROOFSTEP]\nfield_simp [Rpos.ne']\n[GOAL]\ncase h.intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nx : E\ns : Set E\nhs : Metric.Bounded s\nu : Set E\nhu : u ∈ 𝓝 x\nε : ℝ\nεpos : 0 < ε\nhε : closedBall x ε ⊆ u\nR : ℝ\nRpos : 0 < R\nhR : s ⊆ closedBall 0 R\nthis : closedBall 0 (ε / R) ∈ 𝓝 0\nr : 𝕜\nhr : r ∈ closedBall 0 (ε / R)\ny : E\nhy : y ∈ (fun x_1 => -x + x_1) ⁻¹' (r • s)\nz : E\nzs : z ∈ s\nhz : r • z = -x + y\nI : ‖r • z‖ ≤ ε\n⊢ y ∈ u\n[PROOFSTEP]\nhave : y = x + r • z := by simp only [hz, add_neg_cancel_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nx : E\ns : Set E\nhs : Metric.Bounded s\nu : Set E\nhu : u ∈ 𝓝 x\nε : ℝ\nεpos : 0 < ε\nhε : closedBall x ε ⊆ u\nR : ℝ\nRpos : 0 < R\nhR : s ⊆ closedBall 0 R\nthis : closedBall 0 (ε / R) ∈ 𝓝 0\nr : 𝕜\nhr : r ∈ closedBall 0 (ε / R)\ny : E\nhy : y ∈ (fun x_1 => -x + x_1) ⁻¹' (r • s)\nz : E\nzs : z ∈ s\nhz : r • z = -x + y\nI : ‖r • z‖ ≤ ε\n⊢ y = x + r • z\n[PROOFSTEP]\nsimp only [hz, add_neg_cancel_left]\n[GOAL]\ncase h.intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nx : E\ns : Set E\nhs : Metric.Bounded s\nu : Set E\nhu : u ∈ 𝓝 x\nε : ℝ\nεpos : 0 < ε\nhε : closedBall x ε ⊆ u\nR : ℝ\nRpos : 0 < R\nhR : s ⊆ closedBall 0 R\nthis✝ : closedBall 0 (ε / R) ∈ 𝓝 0\nr : 𝕜\nhr : r ∈ closedBall 0 (ε / R)\ny : E\nhy : y ∈ (fun x_1 => -x + x_1) ⁻¹' (r • s)\nz : E\nzs : z ∈ s\nhz : r • z = -x + y\nI : ‖r • z‖ ≤ ε\nthis : y = x + r • z\n⊢ y ∈ u\n[PROOFSTEP]\napply hε\n[GOAL]\ncase h.intro.intro.a\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nx : E\ns : Set E\nhs : Metric.Bounded s\nu : Set E\nhu : u ∈ 𝓝 x\nε : ℝ\nεpos : 0 < ε\nhε : closedBall x ε ⊆ u\nR : ℝ\nRpos : 0 < R\nhR : s ⊆ closedBall 0 R\nthis✝ : closedBall 0 (ε / R) ∈ 𝓝 0\nr : 𝕜\nhr : r ∈ closedBall 0 (ε / R)\ny : E\nhy : y ∈ (fun x_1 => -x + x_1) ⁻¹' (r • s)\nz : E\nzs : z ∈ s\nhz : r • z = -x + y\nI : ‖r • z‖ ≤ ε\nthis : y = x + r • z\n⊢ y ∈ closedBall x ε\n[PROOFSTEP]\nsimpa only [this, dist_eq_norm, add_sub_cancel', mem_closedBall] using I\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε r : ℝ\nhr : 0 < r\n⊢ r • ball 0 1 = ball 0 r\n[PROOFSTEP]\nrw [smul_unitBall hr.ne', Real.norm_of_nonneg hr.le]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z✝ : E\nδ ε : ℝ\nx z : E\na b : ℝ\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ ∃ y, dist x y = b * dist x z ∧ dist y z = a * dist x z\n[PROOFSTEP]\nuse a • x + b • z\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z✝ : E\nδ ε : ℝ\nx z : E\na b : ℝ\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ dist x (a • x + b • z) = b * dist x z ∧ dist (a • x + b • z) z = a * dist x z\n[PROOFSTEP]\nnth_rw 1 [← one_smul ℝ x]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z✝ : E\nδ ε : ℝ\nx z : E\na b : ℝ\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ dist (1 • x) (a • x + b • z) = b * dist x z ∧ dist (a • x + b • z) z = a * dist x z\n[PROOFSTEP]\nnth_rw 4 [← one_smul ℝ z]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z✝ : E\nδ ε : ℝ\nx z : E\na b : ℝ\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ dist (1 • x) (a • x + b • z) = b * dist x z ∧ dist (a • x + b • z) (1 • z) = a * dist x z\n[PROOFSTEP]\nsimp [dist_eq_norm, ← hab, add_smul, ← smul_sub, norm_smul_of_nonneg, ha, hb]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 ≤ δ\nhε : 0 ≤ ε\nh : dist x z ≤ ε + δ\n⊢ ∃ y, dist x y ≤ δ ∧ dist y z ≤ ε\n[PROOFSTEP]\nobtain rfl | hε' := hε.eq_or_lt\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ : ℝ\nhδ : 0 ≤ δ\nhε : 0 ≤ 0\nh : dist x z ≤ 0 + δ\n⊢ ∃ y, dist x y ≤ δ ∧ dist y z ≤ 0\n[PROOFSTEP]\nexact ⟨z, by rwa [zero_add] at h , (dist_self _).le⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ : ℝ\nhδ : 0 ≤ δ\nhε : 0 ≤ 0\nh : dist x z ≤ 0 + δ\n⊢ dist x z ≤ δ\n[PROOFSTEP]\nrwa [zero_add] at h \n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 ≤ δ\nhε : 0 ≤ ε\nh : dist x z ≤ ε + δ\nhε' : 0 < ε\n⊢ ∃ y, dist x y ≤ δ ∧ dist y z ≤ ε\n[PROOFSTEP]\nhave hεδ := add_pos_of_pos_of_nonneg hε' hδ\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 ≤ δ\nhε : 0 ≤ ε\nh : dist x z ≤ ε + δ\nhε' : 0 < ε\nhεδ : 0 < ε + δ\n⊢ ∃ y, dist x y ≤ δ ∧ dist y z ≤ ε\n[PROOFSTEP]\nrefine'\n (exists_dist_eq x z (div_nonneg hε <| add_nonneg hε hδ) (div_nonneg hδ <| add_nonneg hε hδ) <| by\n rw [← add_div, div_self hεδ.ne']).imp\n fun y hy => _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 ≤ δ\nhε : 0 ≤ ε\nh : dist x z ≤ ε + δ\nhε' : 0 < ε\nhεδ : 0 < ε + δ\n⊢ ε / (ε + δ) + δ / (ε + δ) = 1\n[PROOFSTEP]\nrw [← add_div, div_self hεδ.ne']\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y✝ z : E\nδ ε : ℝ\nhδ : 0 ≤ δ\nhε : 0 ≤ ε\nh : dist x z ≤ ε + δ\nhε' : 0 < ε\nhεδ : 0 < ε + δ\ny : E\nhy : dist x y = δ / (ε + δ) * dist x z ∧ dist y z = ε / (ε + δ) * dist x z\n⊢ dist x y ≤ δ ∧ dist y z ≤ ε\n[PROOFSTEP]\nrw [hy.1, hy.2, div_mul_comm, div_mul_comm ε]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y✝ z : E\nδ ε : ℝ\nhδ : 0 ≤ δ\nhε : 0 ≤ ε\nh : dist x z ≤ ε + δ\nhε' : 0 < ε\nhεδ : 0 < ε + δ\ny : E\nhy : dist x y = δ / (ε + δ) * dist x z ∧ dist y z = ε / (ε + δ) * dist x z\n⊢ dist x z / (ε + δ) * δ ≤ δ ∧ dist x z / (ε + δ) * ε ≤ ε\n[PROOFSTEP]\nrw [← div_le_one hεδ] at h \n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y✝ z : E\nδ ε : ℝ\nhδ : 0 ≤ δ\nhε : 0 ≤ ε\nh : dist x z / (ε + δ) ≤ 1\nhε' : 0 < ε\nhεδ : 0 < ε + δ\ny : E\nhy : dist x y = δ / (ε + δ) * dist x z ∧ dist y z = ε / (ε + δ) * dist x z\n⊢ dist x z / (ε + δ) * δ ≤ δ ∧ dist x z / (ε + δ) * ε ≤ ε\n[PROOFSTEP]\nexact ⟨mul_le_of_le_one_left hδ h, mul_le_of_le_one_left hε h⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 ≤ δ\nhε : 0 < ε\nh : dist x z < ε + δ\n⊢ ∃ y, dist x y ≤ δ ∧ dist y z < ε\n[PROOFSTEP]\nrefine'\n (exists_dist_eq x z (div_nonneg hε.le <| add_nonneg hε.le hδ) (div_nonneg hδ <| add_nonneg hε.le hδ) <| by\n rw [← add_div, div_self (add_pos_of_pos_of_nonneg hε hδ).ne']).imp\n fun y hy => _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 ≤ δ\nhε : 0 < ε\nh : dist x z < ε + δ\n⊢ ε / (ε + δ) + δ / (ε + δ) = 1\n[PROOFSTEP]\nrw [← add_div, div_self (add_pos_of_pos_of_nonneg hε hδ).ne']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y✝ z : E\nδ ε : ℝ\nhδ : 0 ≤ δ\nhε : 0 < ε\nh : dist x z < ε + δ\ny : E\nhy : dist x y = δ / (ε + δ) * dist x z ∧ dist y z = ε / (ε + δ) * dist x z\n⊢ dist x y ≤ δ ∧ dist y z < ε\n[PROOFSTEP]\nrw [hy.1, hy.2, div_mul_comm, div_mul_comm ε]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y✝ z : E\nδ ε : ℝ\nhδ : 0 ≤ δ\nhε : 0 < ε\nh : dist x z < ε + δ\ny : E\nhy : dist x y = δ / (ε + δ) * dist x z ∧ dist y z = ε / (ε + δ) * dist x z\n⊢ dist x z / (ε + δ) * δ ≤ δ ∧ dist x z / (ε + δ) * ε < ε\n[PROOFSTEP]\nrw [← div_lt_one (add_pos_of_pos_of_nonneg hε hδ)] at h \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y✝ z : E\nδ ε : ℝ\nhδ : 0 ≤ δ\nhε : 0 < ε\nh : dist x z / (ε + δ) < 1\ny : E\nhy : dist x y = δ / (ε + δ) * dist x z ∧ dist y z = ε / (ε + δ) * dist x z\n⊢ dist x z / (ε + δ) * δ ≤ δ ∧ dist x z / (ε + δ) * ε < ε\n[PROOFSTEP]\nexact ⟨mul_le_of_le_one_left hδ h.le, mul_lt_of_lt_one_left hε h⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 ≤ ε\nh : dist x z < ε + δ\n⊢ ∃ y, dist x y < δ ∧ dist y z ≤ ε\n[PROOFSTEP]\nobtain ⟨y, yz, xy⟩ := exists_dist_le_lt hε hδ (show dist z x < δ + ε by simpa only [dist_comm, add_comm] using h)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 ≤ ε\nh : dist x z < ε + δ\n⊢ dist z x < δ + ε\n[PROOFSTEP]\nsimpa only [dist_comm, add_comm] using h\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y✝ z : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 ≤ ε\nh : dist x z < ε + δ\ny : E\nyz : dist z y ≤ ε\nxy : dist y x < δ\n⊢ ∃ y, dist x y < δ ∧ dist y z ≤ ε\n[PROOFSTEP]\nexact ⟨y, by simp [dist_comm x y, dist_comm y z, *]⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y✝ z : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 ≤ ε\nh : dist x z < ε + δ\ny : E\nyz : dist z y ≤ ε\nxy : dist y x < δ\n⊢ dist x y < δ ∧ dist y z ≤ ε\n[PROOFSTEP]\nsimp [dist_comm x y, dist_comm y z, *]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 < ε\nh : dist x z < ε + δ\n⊢ ∃ y, dist x y < δ ∧ dist y z < ε\n[PROOFSTEP]\nrefine'\n (exists_dist_eq x z (div_nonneg hε.le <| add_nonneg hε.le hδ.le) (div_nonneg hδ.le <| add_nonneg hε.le hδ.le) <| by\n rw [← add_div, div_self (add_pos hε hδ).ne']).imp\n fun y hy => _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 < ε\nh : dist x z < ε + δ\n⊢ ε / (ε + δ) + δ / (ε + δ) = 1\n[PROOFSTEP]\nrw [← add_div, div_self (add_pos hε hδ).ne']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y✝ z : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 < ε\nh : dist x z < ε + δ\ny : E\nhy : dist x y = δ / (ε + δ) * dist x z ∧ dist y z = ε / (ε + δ) * dist x z\n⊢ dist x y < δ ∧ dist y z < ε\n[PROOFSTEP]\nrw [hy.1, hy.2, div_mul_comm, div_mul_comm ε]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y✝ z : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 < ε\nh : dist x z < ε + δ\ny : E\nhy : dist x y = δ / (ε + δ) * dist x z ∧ dist y z = ε / (ε + δ) * dist x z\n⊢ dist x z / (ε + δ) * δ < δ ∧ dist x z / (ε + δ) * ε < ε\n[PROOFSTEP]\nrw [← div_lt_one (add_pos hε hδ)] at h \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y✝ z : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 < ε\nh : dist x z / (ε + δ) < 1\ny : E\nhy : dist x y = δ / (ε + δ) * dist x z ∧ dist y z = ε / (ε + δ) * dist x z\n⊢ dist x z / (ε + δ) * δ < δ ∧ dist x z / (ε + δ) * ε < ε\n[PROOFSTEP]\nexact ⟨mul_lt_of_lt_one_left hδ h, mul_lt_of_lt_one_left hε h⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 < ε\n⊢ Disjoint (ball x δ) (ball y ε) ↔ δ + ε ≤ dist x y\n[PROOFSTEP]\nrefine' ⟨fun h => le_of_not_lt fun hxy => _, ball_disjoint_ball⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 < ε\nh : Disjoint (ball x δ) (ball y ε)\nhxy : dist x y < δ + ε\n⊢ False\n[PROOFSTEP]\nrw [add_comm] at hxy \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 < ε\nh : Disjoint (ball x δ) (ball y ε)\nhxy : dist x y < ε + δ\n⊢ False\n[PROOFSTEP]\nobtain ⟨z, hxz, hzy⟩ := exists_dist_lt_lt hδ hε hxy\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z✝ : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 < ε\nh : Disjoint (ball x δ) (ball y ε)\nhxy : dist x y < ε + δ\nz : E\nhxz : dist x z < δ\nhzy : dist z y < ε\n⊢ False\n[PROOFSTEP]\nrw [dist_comm] at hxz \n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z✝ : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 < ε\nh : Disjoint (ball x δ) (ball y ε)\nhxy : dist x y < ε + δ\nz : E\nhxz : dist z x < δ\nhzy : dist z y < ε\n⊢ False\n[PROOFSTEP]\nexact h.le_bot ⟨hxz, hzy⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 ≤ ε\n⊢ Disjoint (ball x δ) (closedBall y ε) ↔ δ + ε ≤ dist x y\n[PROOFSTEP]\nrefine' ⟨fun h => le_of_not_lt fun hxy => _, ball_disjoint_closedBall⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 ≤ ε\nh : Disjoint (ball x δ) (closedBall y ε)\nhxy : dist x y < δ + ε\n⊢ False\n[PROOFSTEP]\nrw [add_comm] at hxy \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 ≤ ε\nh : Disjoint (ball x δ) (closedBall y ε)\nhxy : dist x y < ε + δ\n⊢ False\n[PROOFSTEP]\nobtain ⟨z, hxz, hzy⟩ := exists_dist_lt_le hδ hε hxy\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z✝ : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 ≤ ε\nh : Disjoint (ball x δ) (closedBall y ε)\nhxy : dist x y < ε + δ\nz : E\nhxz : dist x z < δ\nhzy : dist z y ≤ ε\n⊢ False\n[PROOFSTEP]\nrw [dist_comm] at hxz \n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z✝ : E\nδ ε : ℝ\nhδ : 0 < δ\nhε : 0 ≤ ε\nh : Disjoint (ball x δ) (closedBall y ε)\nhxy : dist x y < ε + δ\nz : E\nhxz : dist z x < δ\nhzy : dist z y ≤ ε\n⊢ False\n[PROOFSTEP]\nexact h.le_bot ⟨hxz, hzy⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 ≤ δ\nhε : 0 < ε\n⊢ Disjoint (closedBall x δ) (ball y ε) ↔ δ + ε ≤ dist x y\n[PROOFSTEP]\nrw [disjoint_comm, disjoint_ball_closedBall_iff hε hδ, add_comm, dist_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 ≤ δ\nhε : 0 ≤ ε\n⊢ Disjoint (closedBall x δ) (closedBall y ε) ↔ δ + ε < dist x y\n[PROOFSTEP]\nrefine' ⟨fun h => lt_of_not_ge fun hxy => _, closedBall_disjoint_closedBall⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 ≤ δ\nhε : 0 ≤ ε\nh : Disjoint (closedBall x δ) (closedBall y ε)\nhxy : δ + ε ≥ dist x y\n⊢ False\n[PROOFSTEP]\nrw [add_comm] at hxy \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 ≤ δ\nhε : 0 ≤ ε\nh : Disjoint (closedBall x δ) (closedBall y ε)\nhxy : ε + δ ≥ dist x y\n⊢ False\n[PROOFSTEP]\nobtain ⟨z, hxz, hzy⟩ := exists_dist_le_le hδ hε hxy\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z✝ : E\nδ ε : ℝ\nhδ : 0 ≤ δ\nhε : 0 ≤ ε\nh : Disjoint (closedBall x δ) (closedBall y ε)\nhxy : ε + δ ≥ dist x y\nz : E\nhxz : dist x z ≤ δ\nhzy : dist z y ≤ ε\n⊢ False\n[PROOFSTEP]\nrw [dist_comm] at hxz \n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z✝ : E\nδ ε : ℝ\nhδ : 0 ≤ δ\nhε : 0 ≤ ε\nh : Disjoint (closedBall x δ) (closedBall y ε)\nhxy : ε + δ ≥ dist x y\nz : E\nhxz : dist z x ≤ δ\nhzy : dist z y ≤ ε\n⊢ False\n[PROOFSTEP]\nexact h.le_bot ⟨hxz, hzy⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\nx : E\n⊢ infEdist x (thickening δ s) = infEdist x s - ENNReal.ofReal δ\n[PROOFSTEP]\nobtain hs | hs := lt_or_le (infEdist x s) (ENNReal.ofReal δ)\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\nx : E\nhs : infEdist x s < ENNReal.ofReal δ\n⊢ infEdist x (thickening δ s) = infEdist x s - ENNReal.ofReal δ\n[PROOFSTEP]\nrw [infEdist_zero_of_mem, tsub_eq_zero_of_le hs.le]\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\nx : E\nhs : infEdist x s < ENNReal.ofReal δ\n⊢ x ∈ thickening δ s\n[PROOFSTEP]\nexact hs\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\nx : E\nhs : ENNReal.ofReal δ ≤ infEdist x s\n⊢ infEdist x (thickening δ s) = infEdist x s - ENNReal.ofReal δ\n[PROOFSTEP]\nrefine' (tsub_le_iff_right.2 infEdist_le_infEdist_thickening_add).antisymm' _\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\nx : E\nhs : ENNReal.ofReal δ ≤ infEdist x s\n⊢ infEdist x (thickening δ s) ≤ infEdist x s - ENNReal.ofReal δ\n[PROOFSTEP]\nrefine' le_sub_of_add_le_right ofReal_ne_top _\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\nx : E\nhs : ENNReal.ofReal δ ≤ infEdist x s\n⊢ infEdist x (thickening δ s) + ENNReal.ofReal δ ≤ infEdist x s\n[PROOFSTEP]\nrefine' le_infEdist.2 fun z hz => le_of_forall_lt' fun r h => _\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z✝ : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\nx : E\nhs : ENNReal.ofReal δ ≤ infEdist x s\nz : E\nhz : z ∈ s\nr : ℝ≥0∞\nh : edist x z < r\n⊢ infEdist x (thickening δ s) + ENNReal.ofReal δ < r\n[PROOFSTEP]\ncases' r with r\n[GOAL]\ncase inr.none\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z✝ : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\nx : E\nhs : ENNReal.ofReal δ ≤ infEdist x s\nz : E\nhz : z ∈ s\nh : edist x z < none\n⊢ infEdist x (thickening δ s) + ENNReal.ofReal δ < none\n[PROOFSTEP]\nexact add_lt_top.2 ⟨lt_top_iff_ne_top.2 <| infEdist_ne_top ⟨z, self_subset_thickening hδ _ hz⟩, ofReal_lt_top⟩\n[GOAL]\ncase inr.some\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z✝ : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\nx : E\nhs : ENNReal.ofReal δ ≤ infEdist x s\nz : E\nhz : z ∈ s\nr : NNReal\nh : edist x z < Option.some r\n⊢ infEdist x (thickening δ s) + ENNReal.ofReal δ < Option.some r\n[PROOFSTEP]\nhave hr : 0 < ↑r - δ := by\n refine' sub_pos_of_lt _\n have := hs.trans_lt ((infEdist_le_edist_of_mem hz).trans_lt h)\n rw [ofReal_eq_coe_nnreal hδ.le, some_eq_coe] at this \n exact_mod_cast this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z✝ : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\nx : E\nhs : ENNReal.ofReal δ ≤ infEdist x s\nz : E\nhz : z ∈ s\nr : NNReal\nh : edist x z < Option.some r\n⊢ 0 < ↑r - δ\n[PROOFSTEP]\nrefine' sub_pos_of_lt _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z✝ : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\nx : E\nhs : ENNReal.ofReal δ ≤ infEdist x s\nz : E\nhz : z ∈ s\nr : NNReal\nh : edist x z < Option.some r\n⊢ δ < ↑r\n[PROOFSTEP]\nhave := hs.trans_lt ((infEdist_le_edist_of_mem hz).trans_lt h)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z✝ : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\nx : E\nhs : ENNReal.ofReal δ ≤ infEdist x s\nz : E\nhz : z ∈ s\nr : NNReal\nh : edist x z < Option.some r\nthis : ENNReal.ofReal δ < Option.some r\n⊢ δ < ↑r\n[PROOFSTEP]\nrw [ofReal_eq_coe_nnreal hδ.le, some_eq_coe] at this \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z✝ : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\nx : E\nhs : ENNReal.ofReal δ ≤ infEdist x s\nz : E\nhz : z ∈ s\nr : NNReal\nh : edist x z < Option.some r\nthis : ↑{ val := δ, property := (_ : 0 ≤ δ) } < ↑r\n⊢ δ < ↑r\n[PROOFSTEP]\nexact_mod_cast this\n[GOAL]\ncase inr.some\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z✝ : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\nx : E\nhs : ENNReal.ofReal δ ≤ infEdist x s\nz : E\nhz : z ∈ s\nr : NNReal\nh : edist x z < Option.some r\nhr : 0 < ↑r - δ\n⊢ infEdist x (thickening δ s) + ENNReal.ofReal δ < Option.some r\n[PROOFSTEP]\nrw [some_eq_coe, edist_lt_coe, ← dist_lt_coe, ← add_sub_cancel'_right δ ↑r] at h \n[GOAL]\ncase inr.some\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z✝ : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\nx : E\nhs : ENNReal.ofReal δ ≤ infEdist x s\nz : E\nhz : z ∈ s\nr : NNReal\nh : dist x z < δ + (↑r - δ)\nhr : 0 < ↑r - δ\n⊢ infEdist x (thickening δ s) + ENNReal.ofReal δ < Option.some r\n[PROOFSTEP]\nobtain ⟨y, hxy, hyz⟩ := exists_dist_lt_lt hr hδ h\n[GOAL]\ncase inr.some.intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y✝ z✝ : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\nx : E\nhs : ENNReal.ofReal δ ≤ infEdist x s\nz : E\nhz : z ∈ s\nr : NNReal\nh : dist x z < δ + (↑r - δ)\nhr : 0 < ↑r - δ\ny : E\nhxy : dist x y < ↑r - δ\nhyz : dist y z < δ\n⊢ infEdist x (thickening δ s) + ENNReal.ofReal δ < Option.some r\n[PROOFSTEP]\nrefine'\n (ENNReal.add_lt_add_right ofReal_ne_top <|\n infEdist_lt_iff.2 ⟨_, mem_thickening_iff.2 ⟨_, hz, hyz⟩, edist_lt_ofReal.2 hxy⟩).trans_le\n _\n[GOAL]\ncase inr.some.intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y✝ z✝ : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\nx : E\nhs : ENNReal.ofReal δ ≤ infEdist x s\nz : E\nhz : z ∈ s\nr : NNReal\nh : dist x z < δ + (↑r - δ)\nhr : 0 < ↑r - δ\ny : E\nhxy : dist x y < ↑r - δ\nhyz : dist y z < δ\n⊢ ENNReal.ofReal (↑r - δ) + ENNReal.ofReal δ ≤ Option.some r\n[PROOFSTEP]\nrw [← ofReal_add hr.le hδ.le, sub_add_cancel, ofReal_coe_nnreal]\n[GOAL]\ncase inr.some.intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y✝ z✝ : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\nx : E\nhs : ENNReal.ofReal δ ≤ infEdist x s\nz : E\nhz : z ∈ s\nr : NNReal\nh : dist x z < δ + (↑r - δ)\nhr : 0 < ↑r - δ\ny : E\nhxy : dist x y < ↑r - δ\nhyz : dist y z < δ\n⊢ ↑r ≤ Option.some r\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ ε : ℝ\nhε : 0 < ε\nhδ : 0 < δ\ns : Set E\nx : E\n⊢ x ∈ thickening (ε + δ) s → x ∈ thickening ε (thickening δ s)\n[PROOFSTEP]\nsimp_rw [mem_thickening_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ ε : ℝ\nhε : 0 < ε\nhδ : 0 < δ\ns : Set E\nx : E\n⊢ (∃ z, z ∈ s ∧ dist x z < ε + δ) → ∃ z, (∃ z_1, z_1 ∈ s ∧ dist z z_1 < δ) ∧ dist x z < ε\n[PROOFSTEP]\nrintro ⟨z, hz, hxz⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z✝ : E\nδ ε : ℝ\nhε : 0 < ε\nhδ : 0 < δ\ns : Set E\nx z : E\nhz : z ∈ s\nhxz : dist x z < ε + δ\n⊢ ∃ z, (∃ z_1, z_1 ∈ s ∧ dist z z_1 < δ) ∧ dist x z < ε\n[PROOFSTEP]\nrw [add_comm] at hxz \n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z✝ : E\nδ ε : ℝ\nhε : 0 < ε\nhδ : 0 < δ\ns : Set E\nx z : E\nhz : z ∈ s\nhxz : dist x z < δ + ε\n⊢ ∃ z, (∃ z_1, z_1 ∈ s ∧ dist z z_1 < δ) ∧ dist x z < ε\n[PROOFSTEP]\nobtain ⟨y, hxy, hyz⟩ := exists_dist_lt_lt hε hδ hxz\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y✝ z✝ : E\nδ ε : ℝ\nhε : 0 < ε\nhδ : 0 < δ\ns : Set E\nx z : E\nhz : z ∈ s\nhxz : dist x z < δ + ε\ny : E\nhxy : dist x y < ε\nhyz : dist y z < δ\n⊢ ∃ z, (∃ z_1, z_1 ∈ s ∧ dist z z_1 < δ) ∧ dist x z < ε\n[PROOFSTEP]\nexact ⟨y, ⟨_, hz, hyz⟩, hxy⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ ε : ℝ\nhε : 0 ≤ ε\nhδ : 0 < δ\ns : Set E\nx : E\n⊢ x ∈ cthickening (ε + δ) s → x ∈ cthickening ε (thickening δ s)\n[PROOFSTEP]\nsimp_rw [mem_cthickening_iff, ENNReal.ofReal_add hε hδ.le, infEdist_thickening hδ]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ ε : ℝ\nhε : 0 ≤ ε\nhδ : 0 < δ\ns : Set E\nx : E\n⊢ infEdist x s ≤ ENNReal.ofReal ε + ENNReal.ofReal δ → infEdist x s - ENNReal.ofReal δ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nexact tsub_le_iff_right.2\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhδ : 0 < δ\ns : Set E\n⊢ closure (thickening δ s) = cthickening δ s\n[PROOFSTEP]\nrw [← cthickening_zero, cthickening_thickening le_rfl hδ, zero_add]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ✝ ε δ : ℝ\ns : Set E\nx : E\n⊢ infEdist x (cthickening δ s) = infEdist x s - ENNReal.ofReal δ\n[PROOFSTEP]\nobtain hδ | hδ := le_or_lt δ 0\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ✝ ε δ : ℝ\ns : Set E\nx : E\nhδ : δ ≤ 0\n⊢ infEdist x (cthickening δ s) = infEdist x s - ENNReal.ofReal δ\n[PROOFSTEP]\nrw [cthickening_of_nonpos hδ, infEdist_closure, ofReal_of_nonpos hδ, tsub_zero]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ✝ ε δ : ℝ\ns : Set E\nx : E\nhδ : 0 < δ\n⊢ infEdist x (cthickening δ s) = infEdist x s - ENNReal.ofReal δ\n[PROOFSTEP]\nrw [← closure_thickening hδ, infEdist_closure, infEdist_thickening hδ]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhε : 0 < ε\nhδ : 0 ≤ δ\ns : Set E\n⊢ thickening ε (cthickening δ s) = thickening (ε + δ) s\n[PROOFSTEP]\nobtain rfl | hδ := hδ.eq_or_lt\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nε : ℝ\nhε : 0 < ε\ns : Set E\nhδ : 0 ≤ 0\n⊢ thickening ε (cthickening 0 s) = thickening (ε + 0) s\n[PROOFSTEP]\nrw [cthickening_zero, thickening_closure, add_zero]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhε : 0 < ε\nhδ✝ : 0 ≤ δ\ns : Set E\nhδ : 0 < δ\n⊢ thickening ε (cthickening δ s) = thickening (ε + δ) s\n[PROOFSTEP]\nrw [← closure_thickening hδ, thickening_closure, thickening_thickening hε hδ]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ ε : ℝ\nhε : 0 ≤ ε\nhδ : 0 ≤ δ\ns : Set E\nx : E\n⊢ x ∈ cthickening (ε + δ) s → x ∈ cthickening ε (cthickening δ s)\n[PROOFSTEP]\nsimp_rw [mem_cthickening_iff, ENNReal.ofReal_add hε hδ, infEdist_cthickening]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ ε : ℝ\nhε : 0 ≤ ε\nhδ : 0 ≤ δ\ns : Set E\nx : E\n⊢ infEdist x s ≤ ENNReal.ofReal ε + ENNReal.ofReal δ → infEdist x s - ENNReal.ofReal δ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nexact tsub_le_iff_right.2\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ ε : ℝ\nhε : 0 < ε\nhδ : 0 < δ\nx : E\n⊢ thickening ε (Metric.ball x δ) = Metric.ball x (ε + δ)\n[PROOFSTEP]\nrw [← thickening_singleton, thickening_thickening hε hδ, thickening_singleton]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ ε : ℝ\nhε : 0 < ε\nhδ : 0 ≤ δ\nx : E\n⊢ thickening ε (Metric.closedBall x δ) = Metric.ball x (ε + δ)\n[PROOFSTEP]\nrw [← cthickening_singleton _ hδ, thickening_cthickening hε hδ, thickening_singleton]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ ε : ℝ\nhε : 0 ≤ ε\nhδ : 0 < δ\nx : E\n⊢ cthickening ε (Metric.ball x δ) = Metric.closedBall x (ε + δ)\n[PROOFSTEP]\nrw [← thickening_singleton, cthickening_thickening hε hδ, cthickening_singleton _ (add_nonneg hε hδ.le)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx✝ y z : E\nδ ε : ℝ\nhε : 0 ≤ ε\nhδ : 0 ≤ δ\nx : E\n⊢ cthickening ε (Metric.closedBall x δ) = Metric.closedBall x (ε + δ)\n[PROOFSTEP]\nrw [← cthickening_singleton _ hδ, cthickening_cthickening hε hδ, cthickening_singleton _ (add_nonneg hε hδ)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhε : 0 < ε\nhδ : 0 < δ\na b : E\n⊢ Metric.ball a ε + Metric.ball b δ = Metric.ball (a + b) (ε + δ)\n[PROOFSTEP]\nrw [ball_add, thickening_ball hε hδ b, Metric.vadd_ball, vadd_eq_add]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhε : 0 < ε\nhδ : 0 < δ\na b : E\n⊢ Metric.ball a ε - Metric.ball b δ = Metric.ball (a - b) (ε + δ)\n[PROOFSTEP]\nsimp_rw [sub_eq_add_neg, neg_ball, ball_add_ball hε hδ]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhε : 0 < ε\nhδ : 0 ≤ δ\na b : E\n⊢ Metric.ball a ε + Metric.closedBall b δ = Metric.ball (a + b) (ε + δ)\n[PROOFSTEP]\nrw [ball_add, thickening_closedBall hε hδ b, Metric.vadd_ball, vadd_eq_add]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhε : 0 < ε\nhδ : 0 ≤ δ\na b : E\n⊢ Metric.ball a ε - Metric.closedBall b δ = Metric.ball (a - b) (ε + δ)\n[PROOFSTEP]\nsimp_rw [sub_eq_add_neg, neg_closedBall, ball_add_closedBall hε hδ]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhε : 0 ≤ ε\nhδ : 0 < δ\na b : E\n⊢ Metric.closedBall a ε + Metric.ball b δ = Metric.ball (a + b) (ε + δ)\n[PROOFSTEP]\nrw [add_comm, ball_add_closedBall hδ hε b, add_comm, add_comm δ]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\nhε : 0 ≤ ε\nhδ : 0 < δ\na b : E\n⊢ Metric.closedBall a ε - Metric.ball b δ = Metric.ball (a - b) (ε + δ)\n[PROOFSTEP]\nsimp_rw [sub_eq_add_neg, neg_ball, closedBall_add_ball hε hδ]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\ninst✝ : ProperSpace E\nhε : 0 ≤ ε\nhδ : 0 ≤ δ\na b : E\n⊢ Metric.closedBall a ε + Metric.closedBall b δ = Metric.closedBall (a + b) (ε + δ)\n[PROOFSTEP]\nrw [(isCompact_closedBall _ _).add_closedBall hδ b, cthickening_closedBall hδ hε a, Metric.vadd_closedBall, vadd_eq_add,\n add_comm, add_comm δ]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : SeminormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace ℝ E\nx y z : E\nδ ε : ℝ\ninst✝ : ProperSpace E\nhε : 0 ≤ ε\nhδ : 0 ≤ δ\na b : E\n⊢ Metric.closedBall a ε - Metric.closedBall b δ = Metric.closedBall (a - b) (ε + δ)\n[PROOFSTEP]\nrw [sub_eq_add_neg, neg_closedBall, closedBall_add_closedBall hε hδ, sub_eq_add_neg]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nx : E\nr : ℝ\nhr : 0 ≤ r\n⊢ c • closedBall x r = closedBall (c • x) (‖c‖ * r)\n[PROOFSTEP]\nrcases eq_or_ne c 0 with (rfl | hc)\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nx : E\nr : ℝ\nhr : 0 ≤ r\n⊢ 0 • closedBall x r = closedBall (0 • x) (‖0‖ * r)\n[PROOFSTEP]\nsimp [hr, zero_smul_set, Set.singleton_zero, ← nonempty_closedBall]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nx : E\nr : ℝ\nhr : 0 ≤ r\nhc : c ≠ 0\n⊢ c • closedBall x r = closedBall (c • x) (‖c‖ * r)\n[PROOFSTEP]\nexact smul_closedBall' hc x r\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\n⊢ c • closedBall 0 1 = closedBall 0 ‖c‖\n[PROOFSTEP]\nrw [smul_closedBall _ _ zero_le_one, smul_zero, mul_one]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nr : ℝ\nhr : 0 ≤ r\n⊢ r • closedBall 0 1 = closedBall 0 r\n[PROOFSTEP]\nrw [smul_closedUnitBall, Real.norm_of_nonneg hr]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nx : E\nr : ℝ\n⊢ Set.Nonempty (sphere x r) ↔ 0 ≤ r\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := exists_ne x\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nx : E\nr : ℝ\ny : E\nhy : y ≠ x\n⊢ Set.Nonempty (sphere x r) ↔ 0 ≤ r\n[PROOFSTEP]\nrefine' ⟨fun h => nonempty_closedBall.1 (h.mono sphere_subset_closedBall), fun hr => ⟨r • ‖y - x‖⁻¹ • (y - x) + x, _⟩⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nx : E\nr : ℝ\ny : E\nhy : y ≠ x\nhr : 0 ≤ r\n⊢ r • ‖y - x‖⁻¹ • (y - x) + x ∈ sphere x r\n[PROOFSTEP]\nhave : ‖y - x‖ ≠ 0 := by simpa [sub_eq_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nx : E\nr : ℝ\ny : E\nhy : y ≠ x\nhr : 0 ≤ r\n⊢ ‖y - x‖ ≠ 0\n[PROOFSTEP]\nsimpa [sub_eq_zero]\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nx : E\nr : ℝ\ny : E\nhy : y ≠ x\nhr : 0 ≤ r\nthis : ‖y - x‖ ≠ 0\n⊢ r • ‖y - x‖⁻¹ • (y - x) + x ∈ sphere x r\n[PROOFSTEP]\nsimp [norm_smul, this, Real.norm_of_nonneg hr]\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nx : E\nr : ℝ\ny : E\nhy : y ≠ x\nhr : 0 ≤ r\nthis : ‖y - x‖ ≠ 0\n⊢ |r| * (‖y - x‖⁻¹ * ‖y - x‖) = r\n[PROOFSTEP]\nrw [inv_mul_cancel this, mul_one, abs_eq_self.mpr hr]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nc : 𝕜\nx : E\nr : ℝ\nhr : 0 ≤ r\n⊢ c • sphere x r = sphere (c • x) (‖c‖ * r)\n[PROOFSTEP]\nrcases eq_or_ne c 0 with (rfl | hc)\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nx : E\nr : ℝ\nhr : 0 ≤ r\n⊢ 0 • sphere x r = sphere (0 • x) (‖0‖ * r)\n[PROOFSTEP]\nsimp [zero_smul_set, Set.singleton_zero, hr]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nc : 𝕜\nx : E\nr : ℝ\nhr : 0 ≤ r\nhc : c ≠ 0\n⊢ c • sphere x r = sphere (c • x) (‖c‖ * r)\n[PROOFSTEP]\nexact smul_sphere' hc x r\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nr : ℝ\nhr : 0 < r\nx : E\n⊢ x +ᵥ r • ball 0 1 = ball x r\n[PROOFSTEP]\nrw [smul_unitBall_of_pos hr, vadd_ball_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace ℝ E\nr : ℝ\nhr : 0 ≤ r\nx : E\n⊢ x +ᵥ r • closedBall 0 1 = closedBall x r\n[PROOFSTEP]\nrw [smul_closedUnitBall, Real.norm_of_nonneg hr, vadd_closedBall_zero]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.Pointwise", "llama_tokens": 28838, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8438950868503681, "lm_q2_score": 0.6548947290421275, "lm_q1q2_score": 0.5526624442428545}} {"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : CommMonoid α\ninst✝ : CommMonoid β\ns : Finset γ\nf : γ → α\ng : γ → β\nthis : DecidableEq γ\n⊢ ∀ ⦃a : γ⦄ {s : Finset γ},\n ¬a ∈ s →\n (∏ x in s, f x, ∏ x in s, g x) = ∏ x in s, (f x, g x) →\n (∏ x in insert a s, f x, ∏ x in insert a s, g x) = ∏ x in insert a s, (f x, g x)\n[PROOFSTEP]\nsimp (config := { contextual := true }) [Prod.ext_iff]\n[GOAL]\nI : Type u_1\ninst✝² : DecidableEq I\nZ : I → Type u_2\ninst✝¹ : (i : I) → CommMonoid (Z i)\ninst✝ : Fintype I\nf : (i : I) → Z i\n⊢ ∏ i : I, Pi.mulSingle i (f i) = f\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nI : Type u_1\ninst✝² : DecidableEq I\nZ : I → Type u_2\ninst✝¹ : (i : I) → CommMonoid (Z i)\ninst✝ : Fintype I\nf : (i : I) → Z i\na : I\n⊢ Finset.prod univ (fun i => Pi.mulSingle i (f i)) a = f a\n[PROOFSTEP]\nsimp\n[GOAL]\nI : Type u_1\ninst✝³ : DecidableEq I\nZ : I → Type u_2\ninst✝² : (i : I) → CommMonoid (Z i)\ninst✝¹ : Finite I\nG : Type u_3\ninst✝ : CommMonoid G\ng h : ((i : I) → Z i) →* G\nH : ∀ (i : I) (x : Z i), ↑g (Pi.mulSingle i x) = ↑h (Pi.mulSingle i x)\n⊢ g = h\n[PROOFSTEP]\ncases nonempty_fintype I\n[GOAL]\ncase intro\nI : Type u_1\ninst✝³ : DecidableEq I\nZ : I → Type u_2\ninst✝² : (i : I) → CommMonoid (Z i)\ninst✝¹ : Finite I\nG : Type u_3\ninst✝ : CommMonoid G\ng h : ((i : I) → Z i) →* G\nH : ∀ (i : I) (x : Z i), ↑g (Pi.mulSingle i x) = ↑h (Pi.mulSingle i x)\nval✝ : Fintype I\n⊢ g = h\n[PROOFSTEP]\next k\n[GOAL]\ncase intro.h\nI : Type u_1\ninst✝³ : DecidableEq I\nZ : I → Type u_2\ninst✝² : (i : I) → CommMonoid (Z i)\ninst✝¹ : Finite I\nG : Type u_3\ninst✝ : CommMonoid G\ng h : ((i : I) → Z i) →* G\nH : ∀ (i : I) (x : Z i), ↑g (Pi.mulSingle i x) = ↑h (Pi.mulSingle i x)\nval✝ : Fintype I\nk : (i : I) → Z i\n⊢ ↑g k = ↑h k\n[PROOFSTEP]\nrw [← Finset.univ_prod_mulSingle k, g.map_prod, h.map_prod]\n[GOAL]\ncase intro.h\nI : Type u_1\ninst✝³ : DecidableEq I\nZ : I → Type u_2\ninst✝² : (i : I) → CommMonoid (Z i)\ninst✝¹ : Finite I\nG : Type u_3\ninst✝ : CommMonoid G\ng h : ((i : I) → Z i) →* G\nH : ∀ (i : I) (x : Z i), ↑g (Pi.mulSingle i x) = ↑h (Pi.mulSingle i x)\nval✝ : Fintype I\nk : (i : I) → Z i\n⊢ ∏ x : I, ↑g (Pi.mulSingle x (k x)) = ∏ x : I, ↑h (Pi.mulSingle x (k x))\n[PROOFSTEP]\nsimp only [H]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.BigOperators.Pi", "llama_tokens": 1200, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7826624688140726, "lm_q2_score": 0.7057850278370112, "lm_q1q2_score": 0.5523914523389242}} {"text": "[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx : (ZMod p)ˣ\n⊢ (∃ y, y ^ 2 = x) ↔ x ^ (p / 2) = 1\n[PROOFSTEP]\nby_cases hc : p = 2\n[GOAL]\ncase pos\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx : (ZMod p)ˣ\nhc : p = 2\n⊢ (∃ y, y ^ 2 = x) ↔ x ^ (p / 2) = 1\n[PROOFSTEP]\nsubst hc\n[GOAL]\ncase pos\ninst✝ : Fact (Nat.Prime 2)\nx : (ZMod 2)ˣ\n⊢ (∃ y, y ^ 2 = x) ↔ x ^ (2 / 2) = 1\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton, exists_const]\n[GOAL]\ncase neg\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx : (ZMod p)ˣ\nhc : ¬p = 2\n⊢ (∃ y, y ^ 2 = x) ↔ x ^ (p / 2) = 1\n[PROOFSTEP]\nhave h₀ := FiniteField.unit_isSquare_iff (by rwa [ringChar_zmod_n]) x\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx : (ZMod p)ˣ\nhc : ¬p = 2\n⊢ ringChar (ZMod p) ≠ 2\n[PROOFSTEP]\nrwa [ringChar_zmod_n]\n[GOAL]\ncase neg\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx : (ZMod p)ˣ\nhc : ¬p = 2\nh₀ : IsSquare x ↔ x ^ (Fintype.card (ZMod p) / 2) = 1\n⊢ (∃ y, y ^ 2 = x) ↔ x ^ (p / 2) = 1\n[PROOFSTEP]\nhave hs : (∃ y : (ZMod p)ˣ, y ^ 2 = x) ↔ IsSquare x :=\n by\n rw [isSquare_iff_exists_sq x]\n simp_rw [eq_comm]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx : (ZMod p)ˣ\nhc : ¬p = 2\nh₀ : IsSquare x ↔ x ^ (Fintype.card (ZMod p) / 2) = 1\n⊢ (∃ y, y ^ 2 = x) ↔ IsSquare x\n[PROOFSTEP]\nrw [isSquare_iff_exists_sq x]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx : (ZMod p)ˣ\nhc : ¬p = 2\nh₀ : IsSquare x ↔ x ^ (Fintype.card (ZMod p) / 2) = 1\n⊢ (∃ y, y ^ 2 = x) ↔ ∃ c, x = c ^ 2\n[PROOFSTEP]\nsimp_rw [eq_comm]\n[GOAL]\ncase neg\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx : (ZMod p)ˣ\nhc : ¬p = 2\nh₀ : IsSquare x ↔ x ^ (Fintype.card (ZMod p) / 2) = 1\nhs : (∃ y, y ^ 2 = x) ↔ IsSquare x\n⊢ (∃ y, y ^ 2 = x) ↔ x ^ (p / 2) = 1\n[PROOFSTEP]\nrw [hs]\n[GOAL]\ncase neg\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx : (ZMod p)ˣ\nhc : ¬p = 2\nh₀ : IsSquare x ↔ x ^ (Fintype.card (ZMod p) / 2) = 1\nhs : (∃ y, y ^ 2 = x) ↔ IsSquare x\n⊢ IsSquare x ↔ x ^ (p / 2) = 1\n[PROOFSTEP]\nrwa [card p] at h₀ \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ZMod p\nha : a ≠ 0\n⊢ IsSquare a ↔ a ^ (p / 2) = 1\n[PROOFSTEP]\napply (iff_congr _ (by simp [Units.ext_iff])).mp (euler_criterion_units p (Units.mk0 a ha))\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ZMod p\nha : a ≠ 0\n⊢ Units.mk0 a ha ^ (p / 2) = 1 ↔ a ^ (p / 2) = 1\n[PROOFSTEP]\nsimp [Units.ext_iff]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ZMod p\nha : a ≠ 0\n⊢ (∃ y, y ^ 2 = Units.mk0 a ha) ↔ IsSquare a\n[PROOFSTEP]\nsimp only [Units.ext_iff, sq, Units.val_mk0, Units.val_mul]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ZMod p\nha : a ≠ 0\n⊢ (∃ y, ↑y * ↑y = a) ↔ IsSquare a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ZMod p\nha : a ≠ 0\n⊢ (∃ y, ↑y * ↑y = a) → IsSquare a\n[PROOFSTEP]\nrintro ⟨y, hy⟩\n[GOAL]\ncase mp.intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ZMod p\nha : a ≠ 0\ny : (ZMod p)ˣ\nhy : ↑y * ↑y = a\n⊢ IsSquare a\n[PROOFSTEP]\nexact ⟨y, hy.symm⟩\n[GOAL]\ncase mpr\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ZMod p\nha : a ≠ 0\n⊢ IsSquare a → ∃ y, ↑y * ↑y = a\n[PROOFSTEP]\nrintro ⟨y, rfl⟩\n[GOAL]\ncase mpr.intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\ny : ZMod p\nha : y * y ≠ 0\n⊢ ∃ y_1, ↑y_1 * ↑y_1 = y * y\n[PROOFSTEP]\nhave hy : y ≠ 0 := by\n rintro rfl\n simp [zero_pow, mul_zero, ne_eq, not_true] at ha \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\ny : ZMod p\nha : y * y ≠ 0\n⊢ y ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nha : 0 * 0 ≠ 0\n⊢ False\n[PROOFSTEP]\nsimp [zero_pow, mul_zero, ne_eq, not_true] at ha \n[GOAL]\ncase mpr.intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\ny : ZMod p\nha : y * y ≠ 0\nhy : y ≠ 0\n⊢ ∃ y_1, ↑y_1 * ↑y_1 = y * y\n[PROOFSTEP]\nrefine' ⟨Units.mk0 y hy, _⟩\n[GOAL]\ncase mpr.intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\ny : ZMod p\nha : y * y ≠ 0\nhy : y ≠ 0\n⊢ ↑(Units.mk0 y hy) * ↑(Units.mk0 y hy) = y * y\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ZMod p\nha : a ≠ 0\n⊢ a ^ (p / 2) = 1 ∨ a ^ (p / 2) = -1\n[PROOFSTEP]\ncases' Prime.eq_two_or_odd (@Fact.out p.Prime _) with hp2 hp_odd\n[GOAL]\ncase inl\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ZMod p\nha : a ≠ 0\nhp2 : p = 2\n⊢ a ^ (p / 2) = 1 ∨ a ^ (p / 2) = -1\n[PROOFSTEP]\nsubst p\n[GOAL]\ncase inl\ninst✝ : Fact (Nat.Prime 2)\na : ZMod 2\nha : a ≠ 0\n⊢ a ^ (2 / 2) = 1 ∨ a ^ (2 / 2) = -1\n[PROOFSTEP]\nrevert a ha\n[GOAL]\ncase inl\ninst✝ : Fact (Nat.Prime 2)\n⊢ ∀ {a : ZMod 2}, a ≠ 0 → a ^ (2 / 2) = 1 ∨ a ^ (2 / 2) = -1\n[PROOFSTEP]\nintro a\n[GOAL]\ncase inl\ninst✝ : Fact (Nat.Prime 2)\na : ZMod 2\n⊢ a ≠ 0 → a ^ (2 / 2) = 1 ∨ a ^ (2 / 2) = -1\n[PROOFSTEP]\nfin_cases a\n[GOAL]\ncase inl.head\ninst✝ : Fact (Nat.Prime 2)\n⊢ { val := 0, isLt := (_ : 0 < 1 + 1) } ≠ 0 →\n { val := 0, isLt := (_ : 0 < 1 + 1) } ^ (2 / 2) = 1 ∨ { val := 0, isLt := (_ : 0 < 1 + 1) } ^ (2 / 2) = -1\ncase inl.tail.head\ninst✝ : Fact (Nat.Prime 2)\n⊢ { val := 1, isLt := (_ : (fun a => a < 1 + 1) 1) } ≠ 0 →\n { val := 1, isLt := (_ : (fun a => a < 1 + 1) 1) } ^ (2 / 2) = 1 ∨\n { val := 1, isLt := (_ : (fun a => a < 1 + 1) 1) } ^ (2 / 2) = -1\n[PROOFSTEP]\ntauto\n[GOAL]\ncase inl.tail.head\ninst✝ : Fact (Nat.Prime 2)\n⊢ { val := 1, isLt := (_ : (fun a => a < 1 + 1) 1) } ≠ 0 →\n { val := 1, isLt := (_ : (fun a => a < 1 + 1) 1) } ^ (2 / 2) = 1 ∨\n { val := 1, isLt := (_ : (fun a => a < 1 + 1) 1) } ^ (2 / 2) = -1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ZMod p\nha : a ≠ 0\nhp_odd : p % 2 = 1\n⊢ a ^ (p / 2) = 1 ∨ a ^ (p / 2) = -1\n[PROOFSTEP]\nrw [← mul_self_eq_one_iff, ← pow_add, ← two_mul, two_mul_odd_div_two hp_odd]\n[GOAL]\ncase inr\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ZMod p\nha : a ≠ 0\nhp_odd : p % 2 = 1\n⊢ a ^ (p - 1) = 1\n[PROOFSTEP]\nexact pow_card_sub_one_eq_one ha\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\n⊢ ↑(legendreSym p a) = ↑a ^ (p / 2)\n[PROOFSTEP]\ncases' eq_or_ne (ringChar (ZMod p)) 2 with hc hc\n[GOAL]\ncase inl\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nhc : ringChar (ZMod p) = 2\n⊢ ↑(legendreSym p a) = ↑a ^ (p / 2)\n[PROOFSTEP]\nby_cases ha : (a : ZMod p) = 0\n[GOAL]\ncase pos\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nhc : ringChar (ZMod p) = 2\nha : ↑a = 0\n⊢ ↑(legendreSym p a) = ↑a ^ (p / 2)\n[PROOFSTEP]\nrw [legendreSym, ha, quadraticChar_zero, zero_pow (Nat.div_pos (@Fact.out p.Prime).two_le (succ_pos 1))]\n[GOAL]\ncase pos\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nhc : ringChar (ZMod p) = 2\nha : ↑a = 0\n⊢ ↑0 = 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase neg\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nhc : ringChar (ZMod p) = 2\nha : ¬↑a = 0\n⊢ ↑(legendreSym p a) = ↑a ^ (p / 2)\n[PROOFSTEP]\nhave := (ringChar_zmod_n p).symm.trans hc\n[GOAL]\ncase neg\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nhc : ringChar (ZMod p) = 2\nha : ¬↑a = 0\nthis : p = 2\n⊢ ↑(legendreSym p a) = ↑a ^ (p / 2)\n[PROOFSTEP]\nsubst p\n[GOAL]\ncase neg\na : ℤ\ninst✝ : Fact (Nat.Prime 2)\nhc : ringChar (ZMod 2) = 2\nha : ¬↑a = 0\n⊢ ↑(legendreSym 2 a) = ↑a ^ (2 / 2)\n[PROOFSTEP]\nrw [legendreSym, quadraticChar_eq_one_of_char_two hc ha]\n[GOAL]\ncase neg\na : ℤ\ninst✝ : Fact (Nat.Prime 2)\nhc : ringChar (ZMod 2) = 2\nha : ¬↑a = 0\n⊢ ↑1 = ↑a ^ (2 / 2)\n[PROOFSTEP]\nrevert ha\n[GOAL]\ncase neg\na : ℤ\ninst✝ : Fact (Nat.Prime 2)\nhc : ringChar (ZMod 2) = 2\n⊢ ¬↑a = 0 → ↑1 = ↑a ^ (2 / 2)\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase neg\na : ℤ\ninst✝ : Fact (Nat.Prime 2)\nhc : ringChar (ZMod 2) = 2\n⊢ ¬↑a = 0 → 1 = ↑a ^ (2 / 2)\n[PROOFSTEP]\ngeneralize (a : ZMod 2) = b\n[GOAL]\ncase neg\na : ℤ\ninst✝ : Fact (Nat.Prime 2)\nhc : ringChar (ZMod 2) = 2\nb : ZMod 2\n⊢ ¬b = 0 → 1 = b ^ (2 / 2)\n[PROOFSTEP]\nfin_cases b\n[GOAL]\ncase neg.head\na : ℤ\ninst✝ : Fact (Nat.Prime 2)\nhc : ringChar (ZMod 2) = 2\n⊢ ¬{ val := 0, isLt := (_ : 0 < 1 + 1) } = 0 → 1 = { val := 0, isLt := (_ : 0 < 1 + 1) } ^ (2 / 2)\n[PROOFSTEP]\ntauto\n[GOAL]\ncase neg.tail.head\na : ℤ\ninst✝ : Fact (Nat.Prime 2)\nhc : ringChar (ZMod 2) = 2\n⊢ ¬{ val := 1, isLt := (_ : (fun a => a < 1 + 1) 1) } = 0 →\n 1 = { val := 1, isLt := (_ : (fun a => a < 1 + 1) 1) } ^ (2 / 2)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nhc : ringChar (ZMod p) ≠ 2\n⊢ ↑(legendreSym p a) = ↑a ^ (p / 2)\n[PROOFSTEP]\nconvert quadraticChar_eq_pow_of_char_ne_two' hc (a : ZMod p)\n[GOAL]\ncase h.e'_3.h.e'_6.h.e'_5\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nhc : ringChar (ZMod p) ≠ 2\n⊢ p = Fintype.card (ZMod p)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h.e'_3.h.e'_6.h.e'_5\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nhc : ringChar (ZMod p) ≠ 2\n⊢ p = Fintype.card (ZMod p)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e'_3.h.e'_6.h.e'_5\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nhc : ringChar (ZMod p) ≠ 2\n⊢ p = Fintype.card (ZMod p)\n[PROOFSTEP]\nexact (card p).symm\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ legendreSym p 0 = 0\n[PROOFSTEP]\nrw [legendreSym, Int.cast_zero, MulChar.map_zero]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ legendreSym p 1 = 1\n[PROOFSTEP]\nrw [legendreSym, Int.cast_one, MulChar.map_one]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na b : ℤ\n⊢ legendreSym p (a * b) = legendreSym p a * legendreSym p b\n[PROOFSTEP]\nsimp [legendreSym, Int.cast_mul, map_mul, quadraticCharFun_mul]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nha : ↑a ≠ 0\n⊢ legendreSym p (a ^ 2) = 1\n[PROOFSTEP]\ndsimp only [legendreSym]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nha : ↑a ≠ 0\n⊢ ↑(quadraticChar (ZMod p)) ↑(a ^ 2) = 1\n[PROOFSTEP]\nrw [Int.cast_pow]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nha : ↑a ≠ 0\n⊢ ↑(quadraticChar (ZMod p)) (↑a ^ 2) = 1\n[PROOFSTEP]\nexact quadraticChar_sq_one' ha\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\n⊢ legendreSym p a = legendreSym p (a % ↑p)\n[PROOFSTEP]\nsimp only [legendreSym, int_cast_mod]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℕ\nha0 : ↑a ≠ 0\n⊢ legendreSym p ↑a = 1 ↔ IsSquare ↑a\n[PROOFSTEP]\nrw [eq_one_iff]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℕ\nha0 : ↑a ≠ 0\n⊢ IsSquare ↑↑a ↔ IsSquare ↑a\ncase ha0 p : ℕ inst✝ : Fact (Nat.Prime p) a : ℕ ha0 : ↑a ≠ 0 ⊢ ↑↑a ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase ha0\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℕ\nha0 : ↑a ≠ 0\n⊢ ↑↑a ≠ 0\n[PROOFSTEP]\nexact_mod_cast ha0\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℕ\n⊢ legendreSym p ↑a = -1 ↔ ¬IsSquare ↑a\n[PROOFSTEP]\nrw [eq_neg_one_iff]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℕ\n⊢ ¬IsSquare ↑↑a ↔ ¬IsSquare ↑a\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nha : ↑a ≠ 0\nx y : ZMod p\nhy : y ≠ 0\nhxy : x ^ 2 - ↑a * y ^ 2 = 0\n⊢ legendreSym p a = 1\n[PROOFSTEP]\napply_fun (· * y⁻¹ ^ 2) at hxy \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nha : ↑a ≠ 0\nx y : ZMod p\nhy : y ≠ 0\nhxy : (x ^ 2 - ↑a * y ^ 2) * y⁻¹ ^ 2 = 0 * y⁻¹ ^ 2\n⊢ legendreSym p a = 1\n[PROOFSTEP]\nsimp only [zero_mul] at hxy \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nha : ↑a ≠ 0\nx y : ZMod p\nhy : y ≠ 0\nhxy : (x ^ 2 - ↑a * y ^ 2) * y⁻¹ ^ 2 = 0\n⊢ legendreSym p a = 1\n[PROOFSTEP]\nrw [(by ring : (x ^ 2 - ↑a * y ^ 2) * y⁻¹ ^ 2 = (x * y⁻¹) ^ 2 - a * (y * y⁻¹) ^ 2), mul_inv_cancel hy, one_pow, mul_one,\n sub_eq_zero, pow_two] at hxy \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nha : ↑a ≠ 0\nx y : ZMod p\nhy : y ≠ 0\nhxy : (x ^ 2 - ↑a * y ^ 2) * y⁻¹ ^ 2 = 0\n⊢ (x ^ 2 - ↑a * y ^ 2) * y⁻¹ ^ 2 = (x * y⁻¹) ^ 2 - ↑a * (y * y⁻¹) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nha : ↑a ≠ 0\nx y : ZMod p\nhy : y ≠ 0\nhxy : x * y⁻¹ * (x * y⁻¹) = ↑a\n⊢ legendreSym p a = 1\n[PROOFSTEP]\nexact (eq_one_iff p ha).mpr ⟨x * y⁻¹, hxy.symm⟩\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nha : ↑a ≠ 0\nx y : ZMod p\nhx : x ≠ 0\nhxy : x ^ 2 - ↑a * y ^ 2 = 0\n⊢ legendreSym p a = 1\n[PROOFSTEP]\nhaveI hy : y ≠ 0 := by\n rintro rfl\n rw [zero_pow' 2 (by norm_num), mul_zero, sub_zero, pow_eq_zero_iff (by norm_num : 0 < 2)] at hxy \n exact hx hxy\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nha : ↑a ≠ 0\nx y : ZMod p\nhx : x ≠ 0\nhxy : x ^ 2 - ↑a * y ^ 2 = 0\n⊢ y ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nha : ↑a ≠ 0\nx : ZMod p\nhx : x ≠ 0\nhxy : x ^ 2 - ↑a * 0 ^ 2 = 0\n⊢ False\n[PROOFSTEP]\nrw [zero_pow' 2 (by norm_num), mul_zero, sub_zero, pow_eq_zero_iff (by norm_num : 0 < 2)] at hxy \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nha : ↑a ≠ 0\nx : ZMod p\nhx : x ≠ 0\nhxy : x ^ 2 - ↑a * 0 ^ 2 = 0\n⊢ 2 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nha : ↑a ≠ 0\nx : ZMod p\nhx : x ≠ 0\nhxy : x ^ 2 = 0\n⊢ 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nha : ↑a ≠ 0\nx : ZMod p\nhx : x ≠ 0\nhxy : x = 0\n⊢ False\n[PROOFSTEP]\nexact hx hxy\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nha : ↑a ≠ 0\nx y : ZMod p\nhx : x ≠ 0\nhxy : x ^ 2 - ↑a * y ^ 2 = 0\nhy : y ≠ 0\n⊢ legendreSym p a = 1\n[PROOFSTEP]\nexact eq_one_of_sq_sub_mul_sq_eq_zero ha hy hxy\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nh : legendreSym p a = -1\nx y : ZMod p\nhxy : x ^ 2 - ↑a * y ^ 2 = 0\n⊢ x = 0 ∧ y = 0\n[PROOFSTEP]\nhave ha : (a : ZMod p) ≠ 0 := by\n intro hf\n rw [(eq_zero_iff p a).mpr hf] at h \n exact Int.zero_ne_neg_of_ne zero_ne_one h\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nh : legendreSym p a = -1\nx y : ZMod p\nhxy : x ^ 2 - ↑a * y ^ 2 = 0\n⊢ ↑a ≠ 0\n[PROOFSTEP]\nintro hf\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nh : legendreSym p a = -1\nx y : ZMod p\nhxy : x ^ 2 - ↑a * y ^ 2 = 0\nhf : ↑a = 0\n⊢ False\n[PROOFSTEP]\nrw [(eq_zero_iff p a).mpr hf] at h \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nh : 0 = -1\nx y : ZMod p\nhxy : x ^ 2 - ↑a * y ^ 2 = 0\nhf : ↑a = 0\n⊢ False\n[PROOFSTEP]\nexact Int.zero_ne_neg_of_ne zero_ne_one h\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nh : legendreSym p a = -1\nx y : ZMod p\nhxy : x ^ 2 - ↑a * y ^ 2 = 0\nha : ↑a ≠ 0\n⊢ x = 0 ∧ y = 0\n[PROOFSTEP]\nby_contra hf\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nh : legendreSym p a = -1\nx y : ZMod p\nhxy : x ^ 2 - ↑a * y ^ 2 = 0\nha : ↑a ≠ 0\nhf : ¬(x = 0 ∧ y = 0)\n⊢ False\n[PROOFSTEP]\ncases' imp_iff_or_not.mp (not_and'.mp hf) with hx hy\n[GOAL]\ncase inl\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nh : legendreSym p a = -1\nx y : ZMod p\nhxy : x ^ 2 - ↑a * y ^ 2 = 0\nha : ↑a ≠ 0\nhf : ¬(x = 0 ∧ y = 0)\nhx : ¬x = 0\n⊢ False\n[PROOFSTEP]\nrw [eq_one_of_sq_sub_mul_sq_eq_zero' ha hx hxy, eq_neg_self_iff] at h \n[GOAL]\ncase inl\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nh : 1 = 0\nx y : ZMod p\nhxy : x ^ 2 - ↑a * y ^ 2 = 0\nha : ↑a ≠ 0\nhf : ¬(x = 0 ∧ y = 0)\nhx : ¬x = 0\n⊢ False\n[PROOFSTEP]\nexact one_ne_zero h\n[GOAL]\ncase inr\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nh : legendreSym p a = -1\nx y : ZMod p\nhxy : x ^ 2 - ↑a * y ^ 2 = 0\nha : ↑a ≠ 0\nhf : ¬(x = 0 ∧ y = 0)\nhy : ¬y = 0\n⊢ False\n[PROOFSTEP]\nrw [eq_one_of_sq_sub_mul_sq_eq_zero ha hy hxy, eq_neg_self_iff] at h \n[GOAL]\ncase inr\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nh : 1 = 0\nx y : ZMod p\nhxy : x ^ 2 - ↑a * y ^ 2 = 0\nha : ↑a ≠ 0\nhf : ¬(x = 0 ∧ y = 0)\nhy : ¬y = 0\n⊢ False\n[PROOFSTEP]\nexact one_ne_zero h\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nh : legendreSym p a = -1\nx y : ℤ\nhxy : ↑p ∣ x ^ 2 - a * y ^ 2\n⊢ ↑p ∣ x ∧ ↑p ∣ y\n[PROOFSTEP]\nsimp_rw [← ZMod.int_cast_zmod_eq_zero_iff_dvd] at hxy ⊢\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nh : legendreSym p a = -1\nx y : ℤ\nhxy : ↑(x ^ 2 - a * y ^ 2) = 0\n⊢ ↑x = 0 ∧ ↑y = 0\n[PROOFSTEP]\npush_cast at hxy \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nh : legendreSym p a = -1\nx y : ℤ\nhxy : ↑x ^ 2 - ↑a * ↑y ^ 2 = 0\n⊢ ↑x = 0 ∧ ↑y = 0\n[PROOFSTEP]\nexact eq_zero_mod_of_eq_neg_one h hxy\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\n⊢ legendreSym p (-1) = ↑χ₄ ↑p\n[PROOFSTEP]\nsimp only [legendreSym, card p, quadraticChar_neg_one ((ringChar_zmod_n p).substr hp), Int.cast_neg, Int.cast_one]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ IsSquare (-1) ↔ p % 4 ≠ 3\n[PROOFSTEP]\nrw [FiniteField.isSquare_neg_one_iff, card p]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx y : ZMod p\nhy : y ≠ 0\nhxy : x ^ 2 = -y ^ 2\n⊢ (x / y) ^ 2 = -1\n[PROOFSTEP]\napply_fun fun z => z / y ^ 2 at hxy \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx y : ZMod p\nhy : y ≠ 0\nhxy : x ^ 2 / y ^ 2 = -y ^ 2 / y ^ 2\n⊢ (x / y) ^ 2 = -1\n[PROOFSTEP]\nrwa [neg_div, ← div_pow, ← div_pow, div_self hy, one_pow] at hxy \n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.LegendreSymbol.Basic", "llama_tokens": 9193, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8479677506936878, "lm_q2_score": 0.651354857898194, "lm_q1q2_score": 0.5523279137553382}} {"text": "[GOAL]\nn : ℕ\n⊢ choose n 0 = 1\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\n⊢ choose zero 0 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nn✝ : ℕ\n⊢ choose (succ n✝) 0 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nn k : ℕ\nhk : n + 1 < k + 1\n⊢ choose (n + 1) (k + 1) = 0\n[PROOFSTEP]\nhave hnk : n < k := lt_of_succ_lt_succ hk\n[GOAL]\nn k : ℕ\nhk : n + 1 < k + 1\nhnk : n < k\n⊢ choose (n + 1) (k + 1) = 0\n[PROOFSTEP]\nhave hnk1 : n < k + 1 := lt_of_succ_lt hk\n[GOAL]\nn k : ℕ\nhk : n + 1 < k + 1\nhnk : n < k\nhnk1 : n < k + 1\n⊢ choose (n + 1) (k + 1) = 0\n[PROOFSTEP]\nrw [choose_succ_succ, choose_eq_zero_of_lt hnk, choose_eq_zero_of_lt hnk1]\n[GOAL]\nn : ℕ\n⊢ choose n n = 1\n[PROOFSTEP]\ninduction n\n[GOAL]\ncase zero\n⊢ choose zero zero = 1\n[PROOFSTEP]\nsimp [*, choose, choose_eq_zero_of_lt (lt_succ_self _)]\n[GOAL]\ncase succ\nn✝ : ℕ\nn_ih✝ : choose n✝ n✝ = 1\n⊢ choose (succ n✝) (succ n✝) = 1\n[PROOFSTEP]\nsimp [*, choose, choose_eq_zero_of_lt (lt_succ_self _)]\n[GOAL]\nn : ℕ\n⊢ choose n 1 = n\n[PROOFSTEP]\ninduction n\n[GOAL]\ncase zero\n⊢ choose zero 1 = zero\n[PROOFSTEP]\nsimp [*, choose, add_comm]\n[GOAL]\ncase succ\nn✝ : ℕ\nn_ih✝ : choose n✝ 1 = n✝\n⊢ choose (succ n✝) 1 = succ n✝\n[PROOFSTEP]\nsimp [*, choose, add_comm]\n[GOAL]\nn : ℕ\n⊢ (n + 1) * (n + 1 - 1) / 2 = n * (n - 1) / 2 + n\n[PROOFSTEP]\nrw [← add_mul_div_left, mul_comm 2 n, ← mul_add, add_tsub_cancel_right, mul_comm]\n[GOAL]\nn : ℕ\n⊢ n * (n + 1) / 2 = n * (n - 1 + 2) / 2\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\n⊢ zero * (zero + 1) / 2 = zero * (zero - 1 + 2) / 2\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nn✝ : ℕ\n⊢ succ n✝ * (succ n✝ + 1) / 2 = succ n✝ * (succ n✝ - 1 + 2) / 2\n[PROOFSTEP]\nrfl\n[GOAL]\ncase H\nn : ℕ\n⊢ 0 < 2\n[PROOFSTEP]\napply zero_lt_succ\n[GOAL]\nn : ℕ\n⊢ choose n 2 = n * (n - 1) / 2\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\n⊢ choose zero 2 = zero * (zero - 1) / 2\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nn : ℕ\nih : choose n 2 = n * (n - 1) / 2\n⊢ choose (succ n) 2 = succ n * (succ n - 1) / 2\n[PROOFSTEP]\nrw [triangle_succ n, choose, ih]\n[GOAL]\ncase succ\nn : ℕ\nih : choose n 2 = n * (n - 1) / 2\n⊢ choose n 1 + n * (n - 1) / 2 = n * (n - 1) / 2 + n\n[PROOFSTEP]\nsimp [add_comm]\n[GOAL]\nx✝ : ℕ\nhk : x✝ ≤ 0\n⊢ 0 < choose 0 x✝\n[PROOFSTEP]\nrw [Nat.eq_zero_of_le_zero hk]\n[GOAL]\nx✝ : ℕ\nhk : x✝ ≤ 0\n⊢ 0 < choose 0 0\n[PROOFSTEP]\ndecide\n[GOAL]\nn : ℕ\nx✝ : 0 ≤ n + 1\n⊢ 0 < choose (n + 1) 0\n[PROOFSTEP]\nsimp\n[GOAL]\nn k : ℕ\nhk : k + 1 ≤ n + 1\n⊢ 0 < choose (n + 1) (k + 1)\n[PROOFSTEP]\nrw [choose_succ_succ]\n[GOAL]\nn k : ℕ\nhk : k + 1 ≤ n + 1\n⊢ 0 < choose n k + choose n (succ k)\n[PROOFSTEP]\nexact add_pos_of_pos_of_nonneg (choose_pos (le_of_succ_le_succ hk)) (Nat.zero_le _)\n[GOAL]\n⊢ succ 0 * choose 0 0 = choose (succ 0) (succ 0) * succ 0\n[PROOFSTEP]\ndecide\n[GOAL]\nk : ℕ\n⊢ succ 0 * choose 0 (k + 1) = choose (succ 0) (succ (k + 1)) * succ (k + 1)\n[PROOFSTEP]\nsimp [choose]\n[GOAL]\nn : ℕ\n⊢ succ (n + 1) * choose (n + 1) 0 = choose (succ (n + 1)) (succ 0) * succ 0\n[PROOFSTEP]\nsimp [choose, mul_succ, succ_eq_add_one, add_comm]\n[GOAL]\nn k : ℕ\n⊢ succ (n + 1) * choose (n + 1) (k + 1) = choose (succ (n + 1)) (succ (k + 1)) * succ (k + 1)\n[PROOFSTEP]\nrw [choose_succ_succ (succ n) (succ k), add_mul, ← succ_mul_choose_eq n, mul_succ, ← succ_mul_choose_eq n,\n add_right_comm, ← mul_add, ← choose_succ_succ, ← succ_mul]\n[GOAL]\nx✝ : ℕ\nhk : x✝ ≤ 0\n⊢ choose 0 x✝ * x✝! * (0 - x✝)! = 0!\n[PROOFSTEP]\nsimp [Nat.eq_zero_of_le_zero hk]\n[GOAL]\nn : ℕ\nx✝ : 0 ≤ n + 1\n⊢ choose (n + 1) 0 * 0! * (n + 1 - 0)! = (n + 1)!\n[PROOFSTEP]\nsimp\n[GOAL]\nn k : ℕ\nhk : succ k ≤ n + 1\n⊢ choose (n + 1) (succ k) * (succ k)! * (n + 1 - succ k)! = (n + 1)!\n[PROOFSTEP]\ncases' lt_or_eq_of_le hk with hk₁ hk₁\n[GOAL]\ncase inl\nn k : ℕ\nhk : succ k ≤ n + 1\nhk₁ : succ k < n + 1\n⊢ choose (n + 1) (succ k) * (succ k)! * (n + 1 - succ k)! = (n + 1)!\n[PROOFSTEP]\nhave h : choose n k * k.succ ! * (n - k)! = (k + 1) * n ! :=\n by\n rw [← choose_mul_factorial_mul_factorial (le_of_succ_le_succ hk)]\n simp [factorial_succ, mul_comm, mul_left_comm, mul_assoc]\n[GOAL]\nn k : ℕ\nhk : succ k ≤ n + 1\nhk₁ : succ k < n + 1\n⊢ choose n k * (succ k)! * (n - k)! = (k + 1) * n !\n[PROOFSTEP]\nrw [← choose_mul_factorial_mul_factorial (le_of_succ_le_succ hk)]\n[GOAL]\nn k : ℕ\nhk : succ k ≤ n + 1\nhk₁ : succ k < n + 1\n⊢ choose n k * (succ k)! * (n - k)! = (k + 1) * (choose n k * k ! * (n - k)!)\n[PROOFSTEP]\nsimp [factorial_succ, mul_comm, mul_left_comm, mul_assoc]\n[GOAL]\ncase inl\nn k : ℕ\nhk : succ k ≤ n + 1\nhk₁ : succ k < n + 1\nh : choose n k * (succ k)! * (n - k)! = (k + 1) * n !\n⊢ choose (n + 1) (succ k) * (succ k)! * (n + 1 - succ k)! = (n + 1)!\n[PROOFSTEP]\nhave h₁ : (n - k)! = (n - k) * (n - k.succ)! := by rw [← succ_sub_succ, succ_sub (le_of_lt_succ hk₁), factorial_succ]\n[GOAL]\nn k : ℕ\nhk : succ k ≤ n + 1\nhk₁ : succ k < n + 1\nh : choose n k * (succ k)! * (n - k)! = (k + 1) * n !\n⊢ (n - k)! = (n - k) * (n - succ k)!\n[PROOFSTEP]\nrw [← succ_sub_succ, succ_sub (le_of_lt_succ hk₁), factorial_succ]\n[GOAL]\ncase inl\nn k : ℕ\nhk : succ k ≤ n + 1\nhk₁ : succ k < n + 1\nh : choose n k * (succ k)! * (n - k)! = (k + 1) * n !\nh₁ : (n - k)! = (n - k) * (n - succ k)!\n⊢ choose (n + 1) (succ k) * (succ k)! * (n + 1 - succ k)! = (n + 1)!\n[PROOFSTEP]\nhave h₂ : choose n (succ k) * k.succ ! * ((n - k) * (n - k.succ)!) = (n - k) * n ! :=\n by\n rw [← choose_mul_factorial_mul_factorial (le_of_lt_succ hk₁)]\n simp [factorial_succ, mul_comm, mul_left_comm, mul_assoc]\n[GOAL]\nn k : ℕ\nhk : succ k ≤ n + 1\nhk₁ : succ k < n + 1\nh : choose n k * (succ k)! * (n - k)! = (k + 1) * n !\nh₁ : (n - k)! = (n - k) * (n - succ k)!\n⊢ choose n (succ k) * (succ k)! * ((n - k) * (n - succ k)!) = (n - k) * n !\n[PROOFSTEP]\nrw [← choose_mul_factorial_mul_factorial (le_of_lt_succ hk₁)]\n[GOAL]\nn k : ℕ\nhk : succ k ≤ n + 1\nhk₁ : succ k < n + 1\nh : choose n k * (succ k)! * (n - k)! = (k + 1) * n !\nh₁ : (n - k)! = (n - k) * (n - succ k)!\n⊢ choose n (succ k) * (succ k)! * ((n - k) * (n - succ k)!) = (n - k) * (choose n (succ k) * (succ k)! * (n - succ k)!)\n[PROOFSTEP]\nsimp [factorial_succ, mul_comm, mul_left_comm, mul_assoc]\n[GOAL]\ncase inl\nn k : ℕ\nhk : succ k ≤ n + 1\nhk₁ : succ k < n + 1\nh : choose n k * (succ k)! * (n - k)! = (k + 1) * n !\nh₁ : (n - k)! = (n - k) * (n - succ k)!\nh₂ : choose n (succ k) * (succ k)! * ((n - k) * (n - succ k)!) = (n - k) * n !\n⊢ choose (n + 1) (succ k) * (succ k)! * (n + 1 - succ k)! = (n + 1)!\n[PROOFSTEP]\nhave h₃ : k * n ! ≤ n * n ! := Nat.mul_le_mul_right _ (le_of_succ_le_succ hk)\n[GOAL]\ncase inl\nn k : ℕ\nhk : succ k ≤ n + 1\nhk₁ : succ k < n + 1\nh : choose n k * (succ k)! * (n - k)! = (k + 1) * n !\nh₁ : (n - k)! = (n - k) * (n - succ k)!\nh₂ : choose n (succ k) * (succ k)! * ((n - k) * (n - succ k)!) = (n - k) * n !\nh₃ : k * n ! ≤ n * n !\n⊢ choose (n + 1) (succ k) * (succ k)! * (n + 1 - succ k)! = (n + 1)!\n[PROOFSTEP]\nrw [choose_succ_succ, add_mul, add_mul, succ_sub_succ, h, h₁, h₂, add_mul, tsub_mul, factorial_succ, ←\n add_tsub_assoc_of_le h₃, add_assoc, ← add_mul, add_tsub_cancel_left, add_comm]\n[GOAL]\ncase inr\nn k : ℕ\nhk : succ k ≤ n + 1\nhk₁ : succ k = n + 1\n⊢ choose (n + 1) (succ k) * (succ k)! * (n + 1 - succ k)! = (n + 1)!\n[PROOFSTEP]\nrw [hk₁]\n[GOAL]\ncase inr\nn k : ℕ\nhk : succ k ≤ n + 1\nhk₁ : succ k = n + 1\n⊢ choose (n + 1) (n + 1) * (n + 1)! * (n + 1 - (n + 1))! = (n + 1)!\n[PROOFSTEP]\nsimp [hk₁, mul_comm, choose, tsub_self]\n[GOAL]\nn k s : ℕ\nhkn : k ≤ n\nhsk : s ≤ k\n⊢ (n - k)! * (k - s)! * s ! ≠ 0\n[PROOFSTEP]\napply_rules [factorial_ne_zero, mul_ne_zero]\n[GOAL]\nn k s : ℕ\nhkn : k ≤ n\nhsk : s ≤ k\nh : (n - k)! * (k - s)! * s ! ≠ 0\n⊢ choose n k * choose k s * ((n - k)! * (k - s)! * s !) = choose n k * (choose k s * s ! * (k - s)!) * (n - k)!\n[PROOFSTEP]\nrw [mul_assoc, mul_assoc, mul_assoc, mul_assoc _ s !, mul_assoc, mul_comm (n - k)!, mul_comm s !]\n[GOAL]\nn k s : ℕ\nhkn : k ≤ n\nhsk : s ≤ k\nh : (n - k)! * (k - s)! * s ! ≠ 0\n⊢ choose n k * (choose k s * s ! * (k - s)!) * (n - k)! = n !\n[PROOFSTEP]\nrw [choose_mul_factorial_mul_factorial hsk, choose_mul_factorial_mul_factorial hkn]\n[GOAL]\nn k s : ℕ\nhkn : k ≤ n\nhsk : s ≤ k\nh : (n - k)! * (k - s)! * s ! ≠ 0\n⊢ n ! = choose n s * s ! * (choose (n - s) (k - s) * (k - s)! * (n - s - (k - s))!)\n[PROOFSTEP]\nrw [choose_mul_factorial_mul_factorial (tsub_le_tsub_right hkn _), choose_mul_factorial_mul_factorial (hsk.trans hkn)]\n[GOAL]\nn k s : ℕ\nhkn : k ≤ n\nhsk : s ≤ k\nh : (n - k)! * (k - s)! * s ! ≠ 0\n⊢ choose n s * s ! * (choose (n - s) (k - s) * (k - s)! * (n - s - (k - s))!) =\n choose n s * choose (n - s) (k - s) * ((n - k)! * (k - s)! * s !)\n[PROOFSTEP]\nrw [tsub_tsub_tsub_cancel_right hsk, mul_assoc, mul_left_comm s !, mul_assoc, mul_comm (k - s)!, mul_comm s !,\n mul_right_comm, ← mul_assoc]\n[GOAL]\nn k : ℕ\nhk : k ≤ n\n⊢ choose n k = n ! / (k ! * (n - k)!)\n[PROOFSTEP]\nrw [← choose_mul_factorial_mul_factorial hk, mul_assoc]\n[GOAL]\nn k : ℕ\nhk : k ≤ n\n⊢ choose n k = choose n k * (k ! * (n - k)!) / (k ! * (n - k)!)\n[PROOFSTEP]\nexact (mul_div_left _ (mul_pos (factorial_pos _) (factorial_pos _))).symm\n[GOAL]\ni j : ℕ\n⊢ choose (i + j) j = (i + j)! / (i ! * j !)\n[PROOFSTEP]\nrw [choose_eq_factorial_div_factorial (Nat.le_add_left j i), add_tsub_cancel_right, mul_comm]\n[GOAL]\ni j : ℕ\n⊢ choose (i + j) j * i ! * j ! = (i + j)!\n[PROOFSTEP]\nrw [← choose_mul_factorial_mul_factorial (Nat.le_add_left _ _), add_tsub_cancel_right, mul_right_comm]\n[GOAL]\nn k : ℕ\nhk : k ≤ n\n⊢ k ! * (n - k)! ∣ n !\n[PROOFSTEP]\nrw [← choose_mul_factorial_mul_factorial hk, mul_assoc]\n[GOAL]\nn k : ℕ\nhk : k ≤ n\n⊢ k ! * (n - k)! ∣ choose n k * (k ! * (n - k)!)\n[PROOFSTEP]\nexact dvd_mul_left _ _\n[GOAL]\ni j : ℕ\n⊢ i ! * j ! ∣ (i + j)!\n[PROOFSTEP]\nsuffices : i ! * (i + j - i)! ∣ (i + j)!\n[GOAL]\ni j : ℕ\nthis : i ! * (i + j - i)! ∣ (i + j)!\n⊢ i ! * j ! ∣ (i + j)!\n[PROOFSTEP]\nrwa [add_tsub_cancel_left i j] at this \n[GOAL]\ncase this\ni j : ℕ\n⊢ i ! * (i + j - i)! ∣ (i + j)!\n[PROOFSTEP]\nexact factorial_mul_factorial_dvd_factorial (Nat.le_add_right _ _)\n[GOAL]\nn k : ℕ\nhk : k ≤ n\n⊢ choose n (n - k) = choose n k\n[PROOFSTEP]\nrw [choose_eq_factorial_div_factorial hk, choose_eq_factorial_div_factorial (Nat.sub_le _ _), tsub_tsub_cancel_of_le hk,\n mul_comm]\n[GOAL]\nn a b : ℕ\nh : n = a + b\n⊢ choose n a = choose n b\n[PROOFSTEP]\nsuffices : choose n (n - b) = choose n b\n[GOAL]\nn a b : ℕ\nh : n = a + b\nthis : choose n (n - b) = choose n b\n⊢ choose n a = choose n b\n[PROOFSTEP]\nrw [h, add_tsub_cancel_right] at this \n[GOAL]\nn a b : ℕ\nh : n = a + b\nthis : choose (a + b) a = choose (a + b) b\n⊢ choose n a = choose n b\n[PROOFSTEP]\nrwa [h]\n[GOAL]\ncase this\nn a b : ℕ\nh : n = a + b\n⊢ choose n (n - b) = choose n b\n[PROOFSTEP]\nexact choose_symm (h ▸ le_add_left _ _)\n[GOAL]\nm : ℕ\n⊢ choose (2 * m + 1) (m + 1) = choose (2 * m + 1) m\n[PROOFSTEP]\napply choose_symm_of_eq_add\n[GOAL]\ncase h\nm : ℕ\n⊢ 2 * m + 1 = m + 1 + m\n[PROOFSTEP]\nrw [add_comm m 1, add_assoc 1 m m, add_comm (2 * m) 1, two_mul m]\n[GOAL]\nn k : ℕ\n⊢ choose n (k + 1) * (k + 1) = choose n k * (n - k)\n[PROOFSTEP]\nhave e : (n + 1) * choose n k = choose n k * (k + 1) + choose n (k + 1) * (k + 1)\n[GOAL]\ncase e\nn k : ℕ\n⊢ (n + 1) * choose n k = choose n k * (k + 1) + choose n (k + 1) * (k + 1)\nn k : ℕ\ne : (n + 1) * choose n k = choose n k * (k + 1) + choose n (k + 1) * (k + 1)\n⊢ choose n (k + 1) * (k + 1) = choose n k * (n - k)\n[PROOFSTEP]\nrw [← right_distrib, ← choose_succ_succ, succ_mul_choose_eq]\n[GOAL]\nn k : ℕ\ne : (n + 1) * choose n k = choose n k * (k + 1) + choose n (k + 1) * (k + 1)\n⊢ choose n (k + 1) * (k + 1) = choose n k * (n - k)\n[PROOFSTEP]\nrw [← tsub_eq_of_eq_add_rev e, mul_comm, ← mul_tsub, add_tsub_add_eq_tsub_right]\n[GOAL]\nn : ℕ\n⊢ choose (n + 1 + 1) (n + 1) = n + 1 + 1\n[PROOFSTEP]\nrw [choose_succ_succ, choose_succ_self_right n, choose_self]\n[GOAL]\nn k : ℕ\n⊢ choose n k * (n + 1) = choose (n + 1) k * (n + 1 - k)\n[PROOFSTEP]\ncases k with\n| zero => simp\n| succ k =>\n obtain hk | hk := le_or_lt (k + 1) (n + 1)\n ·\n rw [choose_succ_succ, add_mul, succ_sub_succ, ← choose_succ_right_eq, ← succ_sub_succ, mul_tsub,\n add_tsub_cancel_of_le (Nat.mul_le_mul_left _ hk)]\n · rw [choose_eq_zero_of_lt hk, choose_eq_zero_of_lt (n.lt_succ_self.trans hk), zero_mul, zero_mul]\n[GOAL]\nn k : ℕ\n⊢ choose n k * (n + 1) = choose (n + 1) k * (n + 1 - k)\n[PROOFSTEP]\ncases k with\n| zero => simp\n| succ k =>\n obtain hk | hk := le_or_lt (k + 1) (n + 1)\n ·\n rw [choose_succ_succ, add_mul, succ_sub_succ, ← choose_succ_right_eq, ← succ_sub_succ, mul_tsub,\n add_tsub_cancel_of_le (Nat.mul_le_mul_left _ hk)]\n · rw [choose_eq_zero_of_lt hk, choose_eq_zero_of_lt (n.lt_succ_self.trans hk), zero_mul, zero_mul]\n[GOAL]\ncase zero\nn : ℕ\n⊢ choose n zero * (n + 1) = choose (n + 1) zero * (n + 1 - zero)\n[PROOFSTEP]\n\n| zero => simp\n[GOAL]\ncase zero\nn : ℕ\n⊢ choose n zero * (n + 1) = choose (n + 1) zero * (n + 1 - zero)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nn k : ℕ\n⊢ choose n (succ k) * (n + 1) = choose (n + 1) (succ k) * (n + 1 - succ k)\n[PROOFSTEP]\n\n| succ k =>\n obtain hk | hk := le_or_lt (k + 1) (n + 1)\n ·\n rw [choose_succ_succ, add_mul, succ_sub_succ, ← choose_succ_right_eq, ← succ_sub_succ, mul_tsub,\n add_tsub_cancel_of_le (Nat.mul_le_mul_left _ hk)]\n · rw [choose_eq_zero_of_lt hk, choose_eq_zero_of_lt (n.lt_succ_self.trans hk), zero_mul, zero_mul]\n[GOAL]\ncase succ\nn k : ℕ\n⊢ choose n (succ k) * (n + 1) = choose (n + 1) (succ k) * (n + 1 - succ k)\n[PROOFSTEP]\nobtain hk | hk := le_or_lt (k + 1) (n + 1)\n[GOAL]\ncase succ.inl\nn k : ℕ\nhk : k + 1 ≤ n + 1\n⊢ choose n (succ k) * (n + 1) = choose (n + 1) (succ k) * (n + 1 - succ k)\n[PROOFSTEP]\nrw [choose_succ_succ, add_mul, succ_sub_succ, ← choose_succ_right_eq, ← succ_sub_succ, mul_tsub,\n add_tsub_cancel_of_le (Nat.mul_le_mul_left _ hk)]\n[GOAL]\ncase succ.inr\nn k : ℕ\nhk : n + 1 < k + 1\n⊢ choose n (succ k) * (n + 1) = choose (n + 1) (succ k) * (n + 1 - succ k)\n[PROOFSTEP]\nrw [choose_eq_zero_of_lt hk, choose_eq_zero_of_lt (n.lt_succ_self.trans hk), zero_mul, zero_mul]\n[GOAL]\nn k : ℕ\n⊢ ascFactorial n k = k ! * choose (n + k) k\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nn k : ℕ\n⊢ ascFactorial n k = choose (n + k) k * k !\n[PROOFSTEP]\napply mul_right_cancel₀ (factorial_ne_zero (n + k - k))\n[GOAL]\nn k : ℕ\n⊢ ascFactorial n k * (n + k - k)! = choose (n + k) k * k ! * (n + k - k)!\n[PROOFSTEP]\nrw [choose_mul_factorial_mul_factorial, add_tsub_cancel_right, ← factorial_mul_ascFactorial, mul_comm]\n[GOAL]\nn k : ℕ\n⊢ k ≤ n + k\n[PROOFSTEP]\nexact Nat.le_add_left k n\n[GOAL]\nn k : ℕ\n⊢ choose (n + k) k = ascFactorial n k / k !\n[PROOFSTEP]\napply mul_left_cancel₀ (factorial_ne_zero k)\n[GOAL]\nn k : ℕ\n⊢ k ! * choose (n + k) k = k ! * (ascFactorial n k / k !)\n[PROOFSTEP]\nrw [← ascFactorial_eq_factorial_mul_choose]\n[GOAL]\nn k : ℕ\n⊢ ascFactorial n k = k ! * (ascFactorial n k / k !)\n[PROOFSTEP]\nexact (Nat.mul_div_cancel' <| factorial_dvd_ascFactorial _ _).symm\n[GOAL]\nn k : ℕ\n⊢ descFactorial n k = k ! * choose n k\n[PROOFSTEP]\nobtain h | h := Nat.lt_or_ge n k\n[GOAL]\ncase inl\nn k : ℕ\nh : n < k\n⊢ descFactorial n k = k ! * choose n k\n[PROOFSTEP]\nrw [descFactorial_eq_zero_iff_lt.2 h, choose_eq_zero_of_lt h, mul_zero]\n[GOAL]\ncase inr\nn k : ℕ\nh : n ≥ k\n⊢ descFactorial n k = k ! * choose n k\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase inr\nn k : ℕ\nh : n ≥ k\n⊢ descFactorial n k = choose n k * k !\n[PROOFSTEP]\napply mul_right_cancel₀ (factorial_ne_zero (n - k))\n[GOAL]\ncase inr\nn k : ℕ\nh : n ≥ k\n⊢ descFactorial n k * (n - k)! = choose n k * k ! * (n - k)!\n[PROOFSTEP]\nrw [choose_mul_factorial_mul_factorial h, ← factorial_mul_descFactorial h, mul_comm]\n[GOAL]\nn k : ℕ\n⊢ choose n k = descFactorial n k / k !\n[PROOFSTEP]\napply mul_left_cancel₀ (factorial_ne_zero k)\n[GOAL]\nn k : ℕ\n⊢ k ! * choose n k = k ! * (descFactorial n k / k !)\n[PROOFSTEP]\nrw [← descFactorial_eq_factorial_mul_choose]\n[GOAL]\nn k : ℕ\n⊢ descFactorial n k = k ! * (descFactorial n k / k !)\n[PROOFSTEP]\nexact (Nat.mul_div_cancel' <| factorial_dvd_descFactorial _ _).symm\n[GOAL]\nr n : ℕ\nh : r < n / 2\n⊢ choose n r ≤ choose n (r + 1)\n[PROOFSTEP]\nrefine' le_of_mul_le_mul_right _ (lt_tsub_iff_left.mpr (lt_of_lt_of_le h (n.div_le_self 2)))\n[GOAL]\nr n : ℕ\nh : r < n / 2\n⊢ choose n r * (n - r) ≤ choose n (r + 1) * (n - r)\n[PROOFSTEP]\nrw [← choose_succ_right_eq]\n[GOAL]\nr n : ℕ\nh : r < n / 2\n⊢ choose n (r + 1) * (r + 1) ≤ choose n (r + 1) * (n - r)\n[PROOFSTEP]\napply Nat.mul_le_mul_left\n[GOAL]\ncase h\nr n : ℕ\nh : r < n / 2\n⊢ r + 1 ≤ n - r\n[PROOFSTEP]\nrw [← Nat.lt_iff_add_one_le, lt_tsub_iff_left, ← mul_two]\n[GOAL]\ncase h\nr n : ℕ\nh : r < n / 2\n⊢ r * 2 < n\n[PROOFSTEP]\nexact lt_of_lt_of_le (mul_lt_mul_of_pos_right h zero_lt_two) (n.div_mul_le_self 2)\n[GOAL]\nr n : ℕ\n⊢ choose n r ≤ choose n (n / 2)\n[PROOFSTEP]\ncases' le_or_gt r n with b b\n[GOAL]\ncase inl\nr n : ℕ\nb : r ≤ n\n⊢ choose n r ≤ choose n (n / 2)\n[PROOFSTEP]\ncases' le_or_lt r (n / 2) with a h\n[GOAL]\ncase inl.inl\nr n : ℕ\nb : r ≤ n\na : r ≤ n / 2\n⊢ choose n r ≤ choose n (n / 2)\n[PROOFSTEP]\napply choose_le_middle_of_le_half_left a\n[GOAL]\ncase inl.inr\nr n : ℕ\nb : r ≤ n\nh : n / 2 < r\n⊢ choose n r ≤ choose n (n / 2)\n[PROOFSTEP]\nrw [← choose_symm b]\n[GOAL]\ncase inl.inr\nr n : ℕ\nb : r ≤ n\nh : n / 2 < r\n⊢ choose n (n - r) ≤ choose n (n / 2)\n[PROOFSTEP]\napply choose_le_middle_of_le_half_left\n[GOAL]\ncase inl.inr.hr\nr n : ℕ\nb : r ≤ n\nh : n / 2 < r\n⊢ n - r ≤ n / 2\n[PROOFSTEP]\nrw [div_lt_iff_lt_mul' zero_lt_two] at h \n[GOAL]\ncase inl.inr.hr\nr n : ℕ\nb : r ≤ n\nh : n < r * 2\n⊢ n - r ≤ n / 2\n[PROOFSTEP]\nrw [le_div_iff_mul_le' zero_lt_two, tsub_mul, tsub_le_iff_tsub_le, mul_two, add_tsub_cancel_right]\n[GOAL]\ncase inl.inr.hr\nr n : ℕ\nb : r ≤ n\nh : n < r * 2\n⊢ n ≤ r * 2\n[PROOFSTEP]\nexact le_of_lt h\n[GOAL]\ncase inr\nr n : ℕ\nb : r > n\n⊢ choose n r ≤ choose n (n / 2)\n[PROOFSTEP]\nrw [choose_eq_zero_of_lt b]\n[GOAL]\ncase inr\nr n : ℕ\nb : r > n\n⊢ 0 ≤ choose n (n / 2)\n[PROOFSTEP]\napply zero_le\n[GOAL]\na c : ℕ\n⊢ choose a c ≤ choose (succ a) c\n[PROOFSTEP]\ncases c\n[GOAL]\ncase zero\na : ℕ\n⊢ choose a zero ≤ choose (succ a) zero\n[PROOFSTEP]\nsimp [Nat.choose_succ_succ]\n[GOAL]\ncase succ\na n✝ : ℕ\n⊢ choose a (succ n✝) ≤ choose (succ a) (succ n✝)\n[PROOFSTEP]\nsimp [Nat.choose_succ_succ]\n[GOAL]\na b c : ℕ\n⊢ choose a c ≤ choose (a + b) c\n[PROOFSTEP]\ninduction' b with b_n b_ih\n[GOAL]\ncase zero\na c : ℕ\n⊢ choose a c ≤ choose (a + zero) c\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\na c b_n : ℕ\nb_ih : choose a c ≤ choose (a + b_n) c\n⊢ choose a c ≤ choose (a + succ b_n) c\n[PROOFSTEP]\nexact le_trans b_ih (choose_le_succ (a + b_n) c)\n[GOAL]\nn : ℕ\n⊢ multichoose n 0 = 1\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\n⊢ multichoose zero 0 = 1\n[PROOFSTEP]\nsimp [multichoose]\n[GOAL]\ncase succ\nn✝ : ℕ\n⊢ multichoose (succ n✝) 0 = 1\n[PROOFSTEP]\nsimp [multichoose]\n[GOAL]\nk : ℕ\n⊢ multichoose 0 (k + 1) = 0\n[PROOFSTEP]\nsimp [multichoose]\n[GOAL]\nn k : ℕ\n⊢ multichoose (n + 1) (k + 1) = multichoose n (k + 1) + multichoose (n + 1) k\n[PROOFSTEP]\nsimp [multichoose]\n[GOAL]\nk : ℕ\n⊢ multichoose 1 k = 1\n[PROOFSTEP]\ninduction' k with k IH\n[GOAL]\ncase zero\n⊢ multichoose 1 zero = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nk : ℕ\nIH : multichoose 1 k = 1\n⊢ multichoose 1 (succ k) = 1\n[PROOFSTEP]\nsimp [multichoose_succ_succ 0 k, IH]\n[GOAL]\nk : ℕ\n⊢ multichoose 2 k = k + 1\n[PROOFSTEP]\ninduction' k with k IH\n[GOAL]\ncase zero\n⊢ multichoose 2 zero = zero + 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nk : ℕ\nIH : multichoose 2 k = k + 1\n⊢ multichoose 2 (succ k) = succ k + 1\n[PROOFSTEP]\nrw [multichoose, IH]\n[GOAL]\ncase succ\nk : ℕ\nIH : multichoose 2 k = k + 1\n⊢ multichoose 1 (k + 1) + (k + 1) = succ k + 1\n[PROOFSTEP]\nsimp [add_comm, succ_eq_add_one]\n[GOAL]\nn : ℕ\n⊢ multichoose n 1 = n\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\n⊢ multichoose zero 1 = zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nn : ℕ\nIH : multichoose n 1 = n\n⊢ multichoose (succ n) 1 = succ n\n[PROOFSTEP]\nsimp [multichoose_succ_succ n 0, IH]\n[GOAL]\nx✝ : ℕ\n⊢ multichoose x✝ 0 = choose (x✝ + 0 - 1) 0\n[PROOFSTEP]\nsimp\n[GOAL]\nk : ℕ\n⊢ multichoose 0 (k + 1) = choose (0 + (k + 1) - 1) (k + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\nn k : ℕ\n⊢ multichoose (n + 1) (k + 1) = choose (n + 1 + (k + 1) - 1) (k + 1)\n[PROOFSTEP]\nhave : n + (k + 1) < (n + 1) + (k + 1) := add_lt_add_right (Nat.lt_succ_self _) _\n[GOAL]\nn k : ℕ\nthis : n + (k + 1) < n + 1 + (k + 1)\n⊢ multichoose (n + 1) (k + 1) = choose (n + 1 + (k + 1) - 1) (k + 1)\n[PROOFSTEP]\nhave : (n + 1) + k < (n + 1) + (k + 1) := add_lt_add_left (Nat.lt_succ_self _) _\n[GOAL]\nn k : ℕ\nthis✝ : n + (k + 1) < n + 1 + (k + 1)\nthis : n + 1 + k < n + 1 + (k + 1)\n⊢ multichoose (n + 1) (k + 1) = choose (n + 1 + (k + 1) - 1) (k + 1)\n[PROOFSTEP]\nerw [multichoose_succ_succ, add_comm, Nat.succ_add_sub_one, ← add_assoc, Nat.choose_succ_succ]\n[GOAL]\nn k : ℕ\nthis✝ : n + (k + 1) < n + 1 + (k + 1)\nthis : n + 1 + k < n + 1 + (k + 1)\n⊢ multichoose (n + 1) k + multichoose n (k + 1) = choose (n + k) k + choose (n + k) (succ k)\n[PROOFSTEP]\nsimp [multichoose_eq n (k + 1), multichoose_eq (n + 1) k]\n[GOAL]\nn k : ℕ\nx✝ :\n ∀ (y : (_ : ℕ) ×' ℕ),\n (invImage (fun a => PSigma.casesOn a fun a snd => a + snd) instWellFoundedRelation).1 y\n { fst := succ n, snd := succ k } →\n multichoose y.1 y.2 = choose (y.1 + y.2 - 1) y.2\nthis✝ : n + (k + 1) < n + 1 + (k + 1)\nthis : n + 1 + k < n + 1 + (k + 1)\n⊢ (invImage (fun a => PSigma.casesOn a fun a snd => a + snd) instWellFoundedRelation).1 { fst := n + 1, snd := k }\n { fst := succ n, snd := succ k }\n[PROOFSTEP]\n{assumption\n}\n[GOAL]\nn k : ℕ\nx✝ :\n ∀ (y : (_ : ℕ) ×' ℕ),\n (invImage (fun a => PSigma.casesOn a fun a snd => a + snd) instWellFoundedRelation).1 y\n { fst := succ n, snd := succ k } →\n multichoose y.1 y.2 = choose (y.1 + y.2 - 1) y.2\nthis✝ : n + (k + 1) < n + 1 + (k + 1)\nthis : n + 1 + k < n + 1 + (k + 1)\n⊢ (invImage (fun a => PSigma.casesOn a fun a snd => a + snd) instWellFoundedRelation).1 { fst := n + 1, snd := k }\n { fst := succ n, snd := succ k }\n[PROOFSTEP]\nassumption\n[GOAL]\nn k : ℕ\nx✝ :\n ∀ (y : (_ : ℕ) ×' ℕ),\n (invImage (fun a => PSigma.casesOn a fun a snd => a + snd) instWellFoundedRelation).1 y\n { fst := succ n, snd := succ k } →\n multichoose y.1 y.2 = choose (y.1 + y.2 - 1) y.2\nthis✝ : n + (k + 1) < n + 1 + (k + 1)\nthis : n + 1 + k < n + 1 + (k + 1)\n⊢ (invImage (fun a => PSigma.casesOn a fun a snd => a + snd) instWellFoundedRelation).1 { fst := n, snd := k + 1 }\n { fst := succ n, snd := succ k }\n[PROOFSTEP]\n{assumption\n}\n[GOAL]\nn k : ℕ\nx✝ :\n ∀ (y : (_ : ℕ) ×' ℕ),\n (invImage (fun a => PSigma.casesOn a fun a snd => a + snd) instWellFoundedRelation).1 y\n { fst := succ n, snd := succ k } →\n multichoose y.1 y.2 = choose (y.1 + y.2 - 1) y.2\nthis✝ : n + (k + 1) < n + 1 + (k + 1)\nthis : n + 1 + k < n + 1 + (k + 1)\n⊢ (invImage (fun a => PSigma.casesOn a fun a snd => a + snd) instWellFoundedRelation).1 { fst := n, snd := k + 1 }\n { fst := succ n, snd := succ k }\n[PROOFSTEP]\nassumption\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Choose.Basic", "llama_tokens": 11876, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8333245870332531, "lm_q2_score": 0.6619228825191871, "lm_q1q2_score": 0.5515966127231621}} {"text": "[GOAL]\nk : ℕ\n⊢ bernoulliFun k 0 = ↑(bernoulli k)\n[PROOFSTEP]\nrw [bernoulliFun, Polynomial.eval_zero_map, Polynomial.bernoulli_eval_zero, eq_ratCast]\n[GOAL]\nk : ℕ\nhk : k ≠ 1\n⊢ bernoulliFun k 1 = bernoulliFun k 0\n[PROOFSTEP]\nrw [bernoulliFun_eval_zero, bernoulliFun, Polynomial.eval_one_map, Polynomial.bernoulli_eval_one,\n bernoulli_eq_bernoulli'_of_ne_one hk, eq_ratCast]\n[GOAL]\nk : ℕ\n⊢ bernoulliFun k 1 = bernoulliFun k 0 + if k = 1 then 1 else 0\n[PROOFSTEP]\nrw [bernoulliFun, bernoulliFun_eval_zero, Polynomial.eval_one_map, Polynomial.bernoulli_eval_one]\n[GOAL]\nk : ℕ\n⊢ ↑(algebraMap ℚ ℝ) (bernoulli' k) = ↑(bernoulli k) + if k = 1 then 1 else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nk : ℕ\nh : k = 1\n⊢ ↑(algebraMap ℚ ℝ) (bernoulli' k) = ↑(bernoulli k) + 1\n[PROOFSTEP]\nrw [h, bernoulli_one, bernoulli'_one, eq_ratCast]\n[GOAL]\ncase pos\nk : ℕ\nh : k = 1\n⊢ ↑(1 / 2) = ↑(-1 / 2) + 1\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase pos\nk : ℕ\nh : k = 1\n⊢ 1 / ↑2 = -1 / ↑2 + 1\n[PROOFSTEP]\nring\n[GOAL]\ncase neg\nk : ℕ\nh : ¬k = 1\n⊢ ↑(algebraMap ℚ ℝ) (bernoulli' k) = ↑(bernoulli k) + 0\n[PROOFSTEP]\nrw [bernoulli_eq_bernoulli'_of_ne_one h, add_zero, eq_ratCast]\n[GOAL]\nk : ℕ\nx : ℝ\n⊢ HasDerivAt (bernoulliFun k) (↑k * bernoulliFun (k - 1) x) x\n[PROOFSTEP]\nconvert ((Polynomial.bernoulli k).map <| algebraMap ℚ ℝ).hasDerivAt x using 1\n[GOAL]\ncase h.e'_7\nk : ℕ\nx : ℝ\n⊢ ↑k * bernoulliFun (k - 1) x =\n Polynomial.eval x (↑Polynomial.derivative (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli k)))\n[PROOFSTEP]\nsimp only [bernoulliFun, Polynomial.derivative_map, Polynomial.derivative_bernoulli k, Polynomial.map_mul,\n Polynomial.map_nat_cast, Polynomial.eval_mul, Polynomial.eval_nat_cast]\n[GOAL]\nk : ℕ\nx : ℝ\n⊢ HasDerivAt (fun x => bernoulliFun (k + 1) x / (↑k + 1)) (bernoulliFun k x) x\n[PROOFSTEP]\nconvert (hasDerivAt_bernoulliFun (k + 1) x).div_const _ using 1\n[GOAL]\ncase h.e'_7\nk : ℕ\nx : ℝ\n⊢ bernoulliFun k x = ↑(k + 1) * bernoulliFun (k + 1 - 1) x / (↑k + 1)\n[PROOFSTEP]\nfield_simp [Nat.cast_add_one_ne_zero k]\n[GOAL]\ncase h.e'_7\nk : ℕ\nx : ℝ\n⊢ bernoulliFun k x * (↑k + 1) = (↑k + 1) * bernoulliFun k x\n[PROOFSTEP]\nring\n[GOAL]\nk : ℕ\nhk : k ≠ 0\n⊢ ∫ (x : ℝ) in 0 ..1, bernoulliFun k x = 0\n[PROOFSTEP]\nrw [integral_eq_sub_of_hasDerivAt (fun x _ => antideriv_bernoulliFun k x)\n ((Polynomial.continuous _).intervalIntegrable _ _)]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\n⊢ bernoulliFun (k + 1) 1 / (↑k + 1) - bernoulliFun (k + 1) 0 / (↑k + 1) = 0\n[PROOFSTEP]\nrw [bernoulliFun_eval_one]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\n⊢ (bernoulliFun (k + 1) 0 + if k + 1 = 1 then 1 else 0) / (↑k + 1) - bernoulliFun (k + 1) 0 / (↑k + 1) = 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nk : ℕ\nhk : k ≠ 0\nh : k + 1 = 1\n⊢ (bernoulliFun (k + 1) 0 + 1) / (↑k + 1) - bernoulliFun (k + 1) 0 / (↑k + 1) = 0\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase pos.h\nk : ℕ\nhk : k ≠ 0\nh : k + 1 = 1\n⊢ False\n[PROOFSTEP]\nexact hk (Nat.succ_inj'.mp h)\n[GOAL]\ncase neg\nk : ℕ\nhk : k ≠ 0\nh : ¬k + 1 = 1\n⊢ (bernoulliFun (k + 1) 0 + 0) / (↑k + 1) - bernoulliFun (k + 1) 0 / (↑k + 1) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nk : ℕ\nn : ℤ\nhn : n ≠ 0\n⊢ bernoulliFourierCoeff k n = 1 / (-2 * ↑π * I * ↑n) * ((if k = 1 then 1 else 0) - ↑k * bernoulliFourierCoeff (k - 1) n)\n[PROOFSTEP]\nunfold bernoulliFourierCoeff\n[GOAL]\nk : ℕ\nn : ℤ\nhn : n ≠ 0\n⊢ fourierCoeffOn bernoulliFourierCoeff.proof_1 (fun x => ↑(bernoulliFun k x)) n =\n 1 / (-2 * ↑π * I * ↑n) *\n ((if k = 1 then 1 else 0) -\n ↑k * fourierCoeffOn bernoulliFourierCoeff.proof_1 (fun x => ↑(bernoulliFun (k - 1) x)) n)\n[PROOFSTEP]\nrw [fourierCoeffOn_of_hasDerivAt zero_lt_one hn (fun x _ => (hasDerivAt_bernoulliFun k x).ofReal_comp)\n ((continuous_ofReal.comp <| continuous_const.mul <| Polynomial.continuous _).intervalIntegrable _ _)]\n[GOAL]\nk : ℕ\nn : ℤ\nhn : n ≠ 0\n⊢ 1 / (-2 * ↑π * I * ↑n) *\n (↑(fourier (-n)) ↑0 * (↑(bernoulliFun k 1) - ↑(bernoulliFun k 0)) -\n (↑1 - ↑0) * fourierCoeffOn (_ : 0 < 1) (fun x => ↑(↑k * bernoulliFun (k - 1) x)) n) =\n 1 / (-2 * ↑π * I * ↑n) *\n ((if k = 1 then 1 else 0) -\n ↑k * fourierCoeffOn bernoulliFourierCoeff.proof_1 (fun x => ↑(bernoulliFun (k - 1) x)) n)\n[PROOFSTEP]\nsimp_rw [ofReal_one, ofReal_zero, sub_zero, one_mul]\n[GOAL]\nk : ℕ\nn : ℤ\nhn : n ≠ 0\n⊢ 1 / (-2 * ↑π * I * ↑n) *\n (↑(fourier (-n)) ↑0 * (↑(bernoulliFun k 1) - ↑(bernoulliFun k 0)) -\n fourierCoeffOn (_ : 0 < 1) (fun x => ↑(↑k * bernoulliFun (k - 1) x)) n) =\n 1 / (-2 * ↑π * I * ↑n) *\n ((if k = 1 then 1 else 0) -\n ↑k * fourierCoeffOn bernoulliFourierCoeff.proof_1 (fun x => ↑(bernoulliFun (k - 1) x)) n)\n[PROOFSTEP]\nrw [QuotientAddGroup.mk_zero, fourier_eval_zero, one_mul, ← ofReal_sub, bernoulliFun_eval_one, add_sub_cancel']\n[GOAL]\nk : ℕ\nn : ℤ\nhn : n ≠ 0\n⊢ 1 / (-2 * ↑π * I * ↑n) *\n (↑(if k = 1 then 1 else 0) - fourierCoeffOn (_ : 0 < 1) (fun x => ↑(↑k * bernoulliFun (k - 1) x)) n) =\n 1 / (-2 * ↑π * I * ↑n) *\n ((if k = 1 then 1 else 0) -\n ↑k * fourierCoeffOn bernoulliFourierCoeff.proof_1 (fun x => ↑(bernoulliFun (k - 1) x)) n)\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase e_a.e_a\nk : ℕ\nn : ℤ\nhn : n ≠ 0\n⊢ ↑(if k = 1 then 1 else 0) = if k = 1 then 1 else 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nk : ℕ\nn : ℤ\nhn : n ≠ 0\nh✝ : k = 1\n⊢ ↑1 = 1\n[PROOFSTEP]\nsimp only [ofReal_one, ofReal_zero, one_mul]\n[GOAL]\ncase neg\nk : ℕ\nn : ℤ\nhn : n ≠ 0\nh✝ : ¬k = 1\n⊢ ↑0 = 0\n[PROOFSTEP]\nsimp only [ofReal_one, ofReal_zero, one_mul]\n[GOAL]\ncase e_a.e_a\nk : ℕ\nn : ℤ\nhn : n ≠ 0\n⊢ fourierCoeffOn (_ : 0 < 1) (fun x => ↑(↑k * bernoulliFun (k - 1) x)) n =\n ↑k * fourierCoeffOn bernoulliFourierCoeff.proof_1 (fun x => ↑(bernoulliFun (k - 1) x)) n\n[PROOFSTEP]\nsimp_rw [ofReal_mul, ofReal_nat_cast, fourierCoeffOn.const_mul]\n[GOAL]\nn : ℤ\nhn : n ≠ 0\n⊢ bernoulliFourierCoeff 0 n = 0\n[PROOFSTEP]\nsimpa using bernoulliFourierCoeff_recurrence 0 hn\n[GOAL]\nk : ℕ\nhk : k ≠ 0\n⊢ bernoulliFourierCoeff k 0 = 0\n[PROOFSTEP]\nsimp_rw [bernoulliFourierCoeff, fourierCoeffOn_eq_integral, neg_zero, fourier_zero, sub_zero, div_one, one_smul,\n intervalIntegral.integral_ofReal, integral_bernoulliFun_eq_zero hk, ofReal_zero]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nn : ℤ\n⊢ bernoulliFourierCoeff k n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase inl\nk : ℕ\nhk : k ≠ 0\n⊢ bernoulliFourierCoeff k 0 = -↑k ! / (2 * ↑π * I * ↑0) ^ k\n[PROOFSTEP]\nrw [bernoulliFourierCoeff_zero hk, Int.cast_zero, mul_zero, zero_pow' _ hk, div_zero]\n[GOAL]\ncase inr\nk : ℕ\nhk : k ≠ 0\nn : ℤ\nhn : n ≠ 0\n⊢ bernoulliFourierCoeff k n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\n[PROOFSTEP]\nrefine' Nat.le_induction _ (fun k hk h'k => _) k (Nat.one_le_iff_ne_zero.mpr hk)\n[GOAL]\ncase inr.refine'_1\nk : ℕ\nhk : k ≠ 0\nn : ℤ\nhn : n ≠ 0\n⊢ bernoulliFourierCoeff 1 n = -↑1! / (2 * ↑π * I * ↑n) ^ 1\n[PROOFSTEP]\nrw [bernoulliFourierCoeff_recurrence 1 hn]\n[GOAL]\ncase inr.refine'_1\nk : ℕ\nhk : k ≠ 0\nn : ℤ\nhn : n ≠ 0\n⊢ 1 / (-2 * ↑π * I * ↑n) * ((if 1 = 1 then 1 else 0) - ↑1 * bernoulliFourierCoeff (1 - 1) n) =\n -↑1! / (2 * ↑π * I * ↑n) ^ 1\n[PROOFSTEP]\nsimp only [Nat.cast_one, tsub_self, neg_mul, one_mul, eq_self_iff_true, if_true, Nat.factorial_one, pow_one, inv_I,\n mul_neg]\n[GOAL]\ncase inr.refine'_1\nk : ℕ\nhk : k ≠ 0\nn : ℤ\nhn : n ≠ 0\n⊢ 1 / -(2 * ↑π * I * ↑n) * (1 - bernoulliFourierCoeff 0 n) = -1 / (2 * ↑π * I * ↑n)\n[PROOFSTEP]\nrw [bernoulli_zero_fourier_coeff hn, sub_zero, mul_one, div_neg, neg_div]\n[GOAL]\ncase inr.refine'_2\nk✝ : ℕ\nhk✝ : k✝ ≠ 0\nn : ℤ\nhn : n ≠ 0\nk : ℕ\nhk : 1 ≤ k\nh'k : bernoulliFourierCoeff k n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\n⊢ bernoulliFourierCoeff (k + 1) n = -↑(k + 1)! / (2 * ↑π * I * ↑n) ^ (k + 1)\n[PROOFSTEP]\nrw [bernoulliFourierCoeff_recurrence (k + 1) hn, Nat.add_sub_cancel k 1]\n[GOAL]\ncase inr.refine'_2\nk✝ : ℕ\nhk✝ : k✝ ≠ 0\nn : ℤ\nhn : n ≠ 0\nk : ℕ\nhk : 1 ≤ k\nh'k : bernoulliFourierCoeff k n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\n⊢ 1 / (-2 * ↑π * I * ↑n) * ((if k + 1 = 1 then 1 else 0) - ↑(k + 1) * bernoulliFourierCoeff k n) =\n -↑(k + 1)! / (2 * ↑π * I * ↑n) ^ (k + 1)\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nk✝ : ℕ\nhk✝ : k✝ ≠ 0\nn : ℤ\nhn : n ≠ 0\nk : ℕ\nhk : 1 ≤ k\nh'k : bernoulliFourierCoeff k n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\nh : k + 1 = 1\n⊢ 1 / (-2 * ↑π * I * ↑n) * (1 - ↑(k + 1) * bernoulliFourierCoeff k n) = -↑(k + 1)! / (2 * ↑π * I * ↑n) ^ (k + 1)\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase pos.h\nk✝ : ℕ\nhk✝ : k✝ ≠ 0\nn : ℤ\nhn : n ≠ 0\nk : ℕ\nhk : 1 ≤ k\nh'k : bernoulliFourierCoeff k n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\nh : k + 1 = 1\n⊢ False\n[PROOFSTEP]\nexact (ne_of_gt (Nat.lt_succ_iff.mpr hk)) h\n[GOAL]\ncase neg\nk✝ : ℕ\nhk✝ : k✝ ≠ 0\nn : ℤ\nhn : n ≠ 0\nk : ℕ\nhk : 1 ≤ k\nh'k : bernoulliFourierCoeff k n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\nh : ¬k + 1 = 1\n⊢ 1 / (-2 * ↑π * I * ↑n) * (0 - ↑(k + 1) * bernoulliFourierCoeff k n) = -↑(k + 1)! / (2 * ↑π * I * ↑n) ^ (k + 1)\n[PROOFSTEP]\nrw [h'k, Nat.factorial_succ, zero_sub, Nat.cast_mul, pow_add, pow_one, neg_div, mul_neg, mul_neg, mul_neg, neg_neg,\n neg_mul, neg_mul, neg_mul, div_neg]\n[GOAL]\ncase neg\nk✝ : ℕ\nhk✝ : k✝ ≠ 0\nn : ℤ\nhn : n ≠ 0\nk : ℕ\nhk : 1 ≤ k\nh'k : bernoulliFourierCoeff k n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\nh : ¬k + 1 = 1\n⊢ -(1 / (2 * ↑π * I * ↑n)) * (↑(k + 1) * (↑k ! / (2 * ↑π * I * ↑n) ^ k)) =\n -(↑(k + 1) * ↑k !) / ((2 * ↑π * I * ↑n) ^ k * (2 * ↑π * I * ↑n))\n[PROOFSTEP]\nfield_simp [Int.cast_ne_zero.mpr hn, I_ne_zero]\n[GOAL]\ncase neg\nk✝ : ℕ\nhk✝ : k✝ ≠ 0\nn : ℤ\nhn : n ≠ 0\nk : ℕ\nhk : 1 ≤ k\nh'k : bernoulliFourierCoeff k n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\nh : ¬k + 1 = 1\n⊢ -((↑k + 1) * ↑k !) / (2 * ↑π * I * ↑n * (2 * ↑π * I * ↑n) ^ k) =\n -((↑k + 1) * ↑k !) / ((2 * ↑π * I * ↑n) ^ k * (2 * ↑π * I * ↑n))\n[PROOFSTEP]\nring_nf\n[GOAL]\nk : ℕ\nhk : k ≠ 1\n⊢ bernoulliFun k 0 = bernoulliFun k 1\n[PROOFSTEP]\nexact_mod_cast (bernoulliFun_endpoints_eq_of_ne_one hk).symm\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nn : ℤ\n⊢ fourierCoeff (ofReal' ∘ periodizedBernoulli k) n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\n[PROOFSTEP]\nhave : ((↑) ∘ periodizedBernoulli k : 𝕌 → ℂ) = AddCircle.liftIco 1 0 ((↑) ∘ bernoulliFun k) := by ext1 x; rfl\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nn : ℤ\n⊢ ofReal' ∘ periodizedBernoulli k = AddCircle.liftIco 1 0 (ofReal' ∘ bernoulliFun k)\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nk : ℕ\nhk : k ≠ 0\nn : ℤ\nx : 𝕌\n⊢ (ofReal' ∘ periodizedBernoulli k) x = AddCircle.liftIco 1 0 (ofReal' ∘ bernoulliFun k) x\n[PROOFSTEP]\nrfl\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nn : ℤ\nthis : ofReal' ∘ periodizedBernoulli k = AddCircle.liftIco 1 0 (ofReal' ∘ bernoulliFun k)\n⊢ fourierCoeff (ofReal' ∘ periodizedBernoulli k) n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\n[PROOFSTEP]\nrw [this, fourierCoeff_liftIco_eq]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nn : ℤ\nthis : ofReal' ∘ periodizedBernoulli k = AddCircle.liftIco 1 0 (ofReal' ∘ bernoulliFun k)\n⊢ fourierCoeffOn (_ : 0 < 0 + 1) (ofReal' ∘ bernoulliFun k) n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\n[PROOFSTEP]\nsimpa only [zero_add] using bernoulliFourierCoeff_eq hk n\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\n⊢ Summable fun n => -↑k ! / (2 * ↑π * I * ↑n) ^ k\n[PROOFSTEP]\nhave : ∀ n : ℤ, -(k ! : ℂ) / (2 * π * I * n) ^ k = -k ! / (2 * π * I) ^ k * (1 / (n : ℂ) ^ k) := by intro n;\n rw [mul_one_div, div_div, ← mul_pow]\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\n⊢ ∀ (n : ℤ), -↑k ! / (2 * ↑π * I * ↑n) ^ k = -↑k ! / (2 * ↑π * I) ^ k * (1 / ↑n ^ k)\n[PROOFSTEP]\nintro n\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nn : ℤ\n⊢ -↑k ! / (2 * ↑π * I * ↑n) ^ k = -↑k ! / (2 * ↑π * I) ^ k * (1 / ↑n ^ k)\n[PROOFSTEP]\nrw [mul_one_div, div_div, ← mul_pow]\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nthis : ∀ (n : ℤ), -↑k ! / (2 * ↑π * I * ↑n) ^ k = -↑k ! / (2 * ↑π * I) ^ k * (1 / ↑n ^ k)\n⊢ Summable fun n => -↑k ! / (2 * ↑π * I * ↑n) ^ k\n[PROOFSTEP]\nsimp_rw [this]\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nthis : ∀ (n : ℤ), -↑k ! / (2 * ↑π * I * ↑n) ^ k = -↑k ! / (2 * ↑π * I) ^ k * (1 / ↑n ^ k)\n⊢ Summable fun n => -↑k ! / (2 * ↑π * I) ^ k * (1 / ↑n ^ k)\n[PROOFSTEP]\napply Summable.mul_left\n[GOAL]\ncase hf\nk : ℕ\nhk : 2 ≤ k\nthis : ∀ (n : ℤ), -↑k ! / (2 * ↑π * I * ↑n) ^ k = -↑k ! / (2 * ↑π * I) ^ k * (1 / ↑n ^ k)\n⊢ Summable fun i => 1 / ↑i ^ k\n[PROOFSTEP]\nrw [← summable_norm_iff]\n[GOAL]\ncase hf\nk : ℕ\nhk : 2 ≤ k\nthis : ∀ (n : ℤ), -↑k ! / (2 * ↑π * I * ↑n) ^ k = -↑k ! / (2 * ↑π * I) ^ k * (1 / ↑n ^ k)\n⊢ Summable fun x => ‖1 / ↑x ^ k‖\n[PROOFSTEP]\nhave : (fun x : ℤ => ‖1 / (x : ℂ) ^ k‖) = fun x : ℤ => |1 / (x : ℝ) ^ k| :=\n by\n ext1 x\n rw [norm_eq_abs, ← Complex.abs_ofReal]\n congr 1\n norm_cast\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nthis : ∀ (n : ℤ), -↑k ! / (2 * ↑π * I * ↑n) ^ k = -↑k ! / (2 * ↑π * I) ^ k * (1 / ↑n ^ k)\n⊢ (fun x => ‖1 / ↑x ^ k‖) = fun x => |1 / ↑x ^ k|\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nk : ℕ\nhk : 2 ≤ k\nthis : ∀ (n : ℤ), -↑k ! / (2 * ↑π * I * ↑n) ^ k = -↑k ! / (2 * ↑π * I) ^ k * (1 / ↑n ^ k)\nx : ℤ\n⊢ ‖1 / ↑x ^ k‖ = |1 / ↑x ^ k|\n[PROOFSTEP]\nrw [norm_eq_abs, ← Complex.abs_ofReal]\n[GOAL]\ncase h\nk : ℕ\nhk : 2 ≤ k\nthis : ∀ (n : ℤ), -↑k ! / (2 * ↑π * I * ↑n) ^ k = -↑k ! / (2 * ↑π * I) ^ k * (1 / ↑n ^ k)\nx : ℤ\n⊢ ↑Complex.abs (1 / ↑x ^ k) = ↑Complex.abs ↑(1 / ↑x ^ k)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.h.e_6.h\nk : ℕ\nhk : 2 ≤ k\nthis : ∀ (n : ℤ), -↑k ! / (2 * ↑π * I * ↑n) ^ k = -↑k ! / (2 * ↑π * I) ^ k * (1 / ↑n ^ k)\nx : ℤ\n⊢ 1 / ↑x ^ k = ↑(1 / ↑x ^ k)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase hf\nk : ℕ\nhk : 2 ≤ k\nthis✝ : ∀ (n : ℤ), -↑k ! / (2 * ↑π * I * ↑n) ^ k = -↑k ! / (2 * ↑π * I) ^ k * (1 / ↑n ^ k)\nthis : (fun x => ‖1 / ↑x ^ k‖) = fun x => |1 / ↑x ^ k|\n⊢ Summable fun x => ‖1 / ↑x ^ k‖\n[PROOFSTEP]\nsimp_rw [this]\n[GOAL]\ncase hf\nk : ℕ\nhk : 2 ≤ k\nthis✝ : ∀ (n : ℤ), -↑k ! / (2 * ↑π * I * ↑n) ^ k = -↑k ! / (2 * ↑π * I) ^ k * (1 / ↑n ^ k)\nthis : (fun x => ‖1 / ↑x ^ k‖) = fun x => |1 / ↑x ^ k|\n⊢ Summable fun x => |1 / ↑x ^ k|\n[PROOFSTEP]\nrw [summable_abs_iff]\n[GOAL]\ncase hf\nk : ℕ\nhk : 2 ≤ k\nthis✝ : ∀ (n : ℤ), -↑k ! / (2 * ↑π * I * ↑n) ^ k = -↑k ! / (2 * ↑π * I) ^ k * (1 / ↑n ^ k)\nthis : (fun x => ‖1 / ↑x ^ k‖) = fun x => |1 / ↑x ^ k|\n⊢ Summable fun x => 1 / ↑x ^ k\n[PROOFSTEP]\nexact Real.summable_one_div_int_pow.mpr (one_lt_two.trans_le hk)\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ HasSum (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑x) (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k x))\n[PROOFSTEP]\nsuffices\n ∀ {y : ℝ},\n y ∈ Ico (0 : ℝ) 1 →\n HasSum (λ (n : ℤ) => 1 / (n : ℂ) ^ k * fourier n y) (-(2 * (π : ℂ) * I) ^ k / k ! * bernoulliFun k y)\n by\n rw [← Ico_insert_right (zero_le_one' ℝ), mem_insert_iff, or_comm] at hx \n rcases hx with (hx | rfl)\n · exact this hx\n · convert this (left_mem_Ico.mpr zero_lt_one) using 1\n · rw [AddCircle.coe_period, QuotientAddGroup.mk_zero]\n · rw [bernoulliFun_endpoints_eq_of_ne_one (by linarith : k ≠ 1)]\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n ∀ {y : ℝ},\n y ∈ Ico 0 1 → HasSum (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑y) (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k y))\n⊢ HasSum (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑x) (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k x))\n[PROOFSTEP]\nrw [← Ico_insert_right (zero_le_one' ℝ), mem_insert_iff, or_comm] at hx \n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx✝ : x ∈ Icc 0 1\nhx : x ∈ Ico 0 1 ∨ x = 1\nthis :\n ∀ {y : ℝ},\n y ∈ Ico 0 1 → HasSum (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑y) (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k y))\n⊢ HasSum (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑x) (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k x))\n[PROOFSTEP]\nrcases hx with (hx | rfl)\n[GOAL]\ncase inl\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx✝ : x ∈ Icc 0 1\nthis :\n ∀ {y : ℝ},\n y ∈ Ico 0 1 → HasSum (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑y) (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k y))\nhx : x ∈ Ico 0 1\n⊢ HasSum (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑x) (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k x))\n[PROOFSTEP]\nexact this hx\n[GOAL]\ncase inr\nk : ℕ\nhk : 2 ≤ k\nhx : 1 ∈ Icc 0 1\nthis :\n ∀ {y : ℝ},\n y ∈ Ico 0 1 → HasSum (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑y) (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k y))\n⊢ HasSum (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑1) (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k 1))\n[PROOFSTEP]\nconvert this (left_mem_Ico.mpr zero_lt_one) using 1\n[GOAL]\ncase h.e'_5\nk : ℕ\nhk : 2 ≤ k\nhx : 1 ∈ Icc 0 1\nthis :\n ∀ {y : ℝ},\n y ∈ Ico 0 1 → HasSum (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑y) (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k y))\n⊢ (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑1) = fun n => 1 / ↑n ^ k * ↑(fourier n) ↑0\n[PROOFSTEP]\nrw [AddCircle.coe_period, QuotientAddGroup.mk_zero]\n[GOAL]\ncase h.e'_6\nk : ℕ\nhk : 2 ≤ k\nhx : 1 ∈ Icc 0 1\nthis :\n ∀ {y : ℝ},\n y ∈ Ico 0 1 → HasSum (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑y) (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k y))\n⊢ -(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k 1) = -(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k 0)\n[PROOFSTEP]\nrw [bernoulliFun_endpoints_eq_of_ne_one (by linarith : k ≠ 1)]\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nhx : 1 ∈ Icc 0 1\nthis :\n ∀ {y : ℝ},\n y ∈ Ico 0 1 → HasSum (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑y) (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k y))\n⊢ k ≠ 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ ∀ {y : ℝ},\n y ∈ Ico 0 1 → HasSum (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑y) (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k y))\n[PROOFSTEP]\nintro y hy\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\ny : ℝ\nhy : y ∈ Ico 0 1\n⊢ HasSum (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑y) (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k y))\n[PROOFSTEP]\nlet B : C(𝕌, ℂ) :=\n ContinuousMap.mk ((↑) ∘ periodizedBernoulli k) (continuous_ofReal.comp (periodizedBernoulli.continuous (by linarith)))\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\ny : ℝ\nhy : y ∈ Ico 0 1\n⊢ k ≠ 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\ny : ℝ\nhy : y ∈ Ico 0 1\nB : C(𝕌, ℂ) := ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)\n⊢ HasSum (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑y) (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k y))\n[PROOFSTEP]\nhave step1 : ∀ n : ℤ, fourierCoeff B n = -k ! / (2 * π * I * n) ^ k := by rw [ContinuousMap.coe_mk];\n exact fourierCoeff_bernoulli_eq (by linarith : k ≠ 0)\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\ny : ℝ\nhy : y ∈ Ico 0 1\nB : C(𝕌, ℂ) := ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)\n⊢ ∀ (n : ℤ), fourierCoeff (↑B) n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\n[PROOFSTEP]\nrw [ContinuousMap.coe_mk]\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\ny : ℝ\nhy : y ∈ Ico 0 1\nB : C(𝕌, ℂ) := ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)\n⊢ ∀ (n : ℤ), fourierCoeff (ofReal' ∘ periodizedBernoulli k) n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\n[PROOFSTEP]\nexact fourierCoeff_bernoulli_eq (by linarith : k ≠ 0)\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\ny : ℝ\nhy : y ∈ Ico 0 1\nB : C(𝕌, ℂ) := ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)\n⊢ k ≠ 0\n[PROOFSTEP]\nlinarith\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\ny : ℝ\nhy : y ∈ Ico 0 1\nB : C(𝕌, ℂ) := ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)\nstep1 : ∀ (n : ℤ), fourierCoeff (↑B) n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\n⊢ HasSum (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑y) (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k y))\n[PROOFSTEP]\nhave step2 :=\n has_pointwise_sum_fourier_series_of_summable ((summable_bernoulli_fourier hk).congr fun n => (step1 n).symm) y\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\ny : ℝ\nhy : y ∈ Ico 0 1\nB : C(𝕌, ℂ) := ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)\nstep1 : ∀ (n : ℤ), fourierCoeff (↑B) n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\nstep2 : HasSum (fun i => fourierCoeff (↑B) i • ↑(fourier i) ↑y) (↑B ↑y)\n⊢ HasSum (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑y) (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k y))\n[PROOFSTEP]\nsimp_rw [step1] at step2 \n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\ny : ℝ\nhy : y ∈ Ico 0 1\nB : C(𝕌, ℂ) := ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)\nstep1 : ∀ (n : ℤ), fourierCoeff (↑B) n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\nstep2 :\n HasSum (fun i => (-↑k ! / (2 * ↑π * I * ↑i) ^ k) • ↑(fourier i) ↑y)\n (↑(ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)) ↑y)\n⊢ HasSum (fun n => 1 / ↑n ^ k * ↑(fourier n) ↑y) (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k y))\n[PROOFSTEP]\nconvert step2.mul_left (-(2 * ↑π * I) ^ k / (k ! : ℂ)) using 2 with n\n[GOAL]\ncase h.e'_5.h\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\ny : ℝ\nhy : y ∈ Ico 0 1\nB : C(𝕌, ℂ) := ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)\nstep1 : ∀ (n : ℤ), fourierCoeff (↑B) n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\nstep2 :\n HasSum (fun i => (-↑k ! / (2 * ↑π * I * ↑i) ^ k) • ↑(fourier i) ↑y)\n (↑(ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)) ↑y)\nn : ℤ\n⊢ 1 / ↑n ^ k * ↑(fourier n) ↑y = -(2 * ↑π * I) ^ k / ↑k ! * (-↑k ! / (2 * ↑π * I * ↑n) ^ k) • ↑(fourier n) ↑y\ncase h.e'_6.h.e'_6\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\ny : ℝ\nhy : y ∈ Ico 0 1\nB : C(𝕌, ℂ) := ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)\nstep1 : ∀ (n : ℤ), fourierCoeff (↑B) n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\nstep2 :\n HasSum (fun i => (-↑k ! / (2 * ↑π * I * ↑i) ^ k) • ↑(fourier i) ↑y)\n (↑(ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)) ↑y)\n⊢ ↑(bernoulliFun k y) = ↑(ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)) ↑y\n[PROOFSTEP]\nrw [smul_eq_mul, ← mul_assoc, mul_div, mul_neg, div_mul_cancel, neg_neg, mul_pow _ (n : ℂ), ← div_div, div_self]\n[GOAL]\ncase h.e'_5.h\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\ny : ℝ\nhy : y ∈ Ico 0 1\nB : C(𝕌, ℂ) := ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)\nstep1 : ∀ (n : ℤ), fourierCoeff (↑B) n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\nstep2 :\n HasSum (fun i => (-↑k ! / (2 * ↑π * I * ↑i) ^ k) • ↑(fourier i) ↑y)\n (↑(ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)) ↑y)\nn : ℤ\n⊢ (2 * ↑π * I) ^ k ≠ 0\n[PROOFSTEP]\nrw [Ne.def, pow_eq_zero_iff', not_and_or]\n[GOAL]\ncase h.e'_5.h\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\ny : ℝ\nhy : y ∈ Ico 0 1\nB : C(𝕌, ℂ) := ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)\nstep1 : ∀ (n : ℤ), fourierCoeff (↑B) n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\nstep2 :\n HasSum (fun i => (-↑k ! / (2 * ↑π * I * ↑i) ^ k) • ↑(fourier i) ↑y)\n (↑(ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)) ↑y)\nn : ℤ\n⊢ ¬2 * ↑π * I = 0 ∨ ¬k ≠ 0\n[PROOFSTEP]\nexact Or.inl two_pi_I_ne_zero\n[GOAL]\ncase h.e'_5.h.h\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\ny : ℝ\nhy : y ∈ Ico 0 1\nB : C(𝕌, ℂ) := ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)\nstep1 : ∀ (n : ℤ), fourierCoeff (↑B) n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\nstep2 :\n HasSum (fun i => (-↑k ! / (2 * ↑π * I * ↑i) ^ k) • ↑(fourier i) ↑y)\n (↑(ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)) ↑y)\nn : ℤ\n⊢ ↑k ! ≠ 0\n[PROOFSTEP]\nexact Nat.cast_ne_zero.mpr (Nat.factorial_ne_zero _)\n[GOAL]\ncase h.e'_6.h.e'_6\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\ny : ℝ\nhy : y ∈ Ico 0 1\nB : C(𝕌, ℂ) := ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)\nstep1 : ∀ (n : ℤ), fourierCoeff (↑B) n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\nstep2 :\n HasSum (fun i => (-↑k ! / (2 * ↑π * I * ↑i) ^ k) • ↑(fourier i) ↑y)\n (↑(ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)) ↑y)\n⊢ ↑(bernoulliFun k y) = ↑(ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)) ↑y\n[PROOFSTEP]\nrw [ContinuousMap.coe_mk, Function.comp_apply, ofReal_inj, periodizedBernoulli,\n AddCircle.liftIco_coe_apply (by rwa [zero_add])]\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\ny : ℝ\nhy : y ∈ Ico 0 1\nB : C(𝕌, ℂ) := ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)\nstep1 : ∀ (n : ℤ), fourierCoeff (↑B) n = -↑k ! / (2 * ↑π * I * ↑n) ^ k\nstep2 :\n HasSum (fun i => (-↑k ! / (2 * ↑π * I * ↑i) ^ k) • ↑(fourier i) ↑y)\n (↑(ContinuousMap.mk (ofReal' ∘ periodizedBernoulli k)) ↑y)\n⊢ y ∈ Ico 0 (0 + 1)\n[PROOFSTEP]\nrwa [zero_add]\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ HasSum (fun n => 1 / ↑n ^ k * (↑(fourier ↑n) ↑x + (-1) ^ k * ↑(fourier (-↑n)) ↑x))\n (-(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k x))\n[PROOFSTEP]\nconvert (hasSum_one_div_pow_mul_fourier_mul_bernoulliFun hk hx).sum_nat_of_sum_int using 1\n[GOAL]\ncase h.e'_5\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ (fun n => 1 / ↑n ^ k * (↑(fourier ↑n) ↑x + (-1) ^ k * ↑(fourier (-↑n)) ↑x)) = fun n =>\n 1 / ↑↑n ^ k * ↑(fourier ↑n) ↑x + 1 / ↑(-↑n) ^ k * ↑(fourier (-↑n)) ↑x\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h.e'_5.h\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\nn : ℕ\n⊢ 1 / ↑n ^ k * (↑(fourier ↑n) ↑x + (-1) ^ k * ↑(fourier (-↑n)) ↑x) =\n 1 / ↑↑n ^ k * ↑(fourier ↑n) ↑x + 1 / ↑(-↑n) ^ k * ↑(fourier (-↑n)) ↑x\n[PROOFSTEP]\nrw [Int.cast_neg, mul_add, ← mul_assoc]\n[GOAL]\ncase h.e'_5.h\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\nn : ℕ\n⊢ 1 / ↑n ^ k * ↑(fourier ↑n) ↑x + 1 / ↑n ^ k * (-1) ^ k * ↑(fourier (-↑n)) ↑x =\n 1 / ↑↑n ^ k * ↑(fourier ↑n) ↑x + 1 / (-↑↑n) ^ k * ↑(fourier (-↑n)) ↑x\n[PROOFSTEP]\nconv_rhs => rw [neg_eq_neg_one_mul, mul_pow, ← div_div]\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\nn : ℕ\n| 1 / ↑↑n ^ k * ↑(fourier ↑n) ↑x + 1 / (-↑↑n) ^ k * ↑(fourier (-↑n)) ↑x\n[PROOFSTEP]\nrw [neg_eq_neg_one_mul, mul_pow, ← div_div]\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\nn : ℕ\n| 1 / ↑↑n ^ k * ↑(fourier ↑n) ↑x + 1 / (-↑↑n) ^ k * ↑(fourier (-↑n)) ↑x\n[PROOFSTEP]\nrw [neg_eq_neg_one_mul, mul_pow, ← div_div]\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\nn : ℕ\n| 1 / ↑↑n ^ k * ↑(fourier ↑n) ↑x + 1 / (-↑↑n) ^ k * ↑(fourier (-↑n)) ↑x\n[PROOFSTEP]\nrw [neg_eq_neg_one_mul, mul_pow, ← div_div]\n[GOAL]\ncase h.e'_5.h\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\nn : ℕ\n⊢ 1 / ↑n ^ k * ↑(fourier ↑n) ↑x + 1 / ↑n ^ k * (-1) ^ k * ↑(fourier (-↑n)) ↑x =\n 1 / ↑↑n ^ k * ↑(fourier ↑n) ↑x + 1 / (-1) ^ k / ↑↑n ^ k * ↑(fourier (-↑n)) ↑x\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase h.e'_5.h.e_a.e_a\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\nn : ℕ\n⊢ 1 / ↑n ^ k * (-1) ^ k = 1 / (-1) ^ k / ↑↑n ^ k\n[PROOFSTEP]\nrw [div_mul_eq_mul_div₀, one_mul]\n[GOAL]\ncase h.e'_5.h.e_a.e_a\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\nn : ℕ\n⊢ (-1) ^ k / ↑n ^ k = 1 / (-1) ^ k / ↑↑n ^ k\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_5.h.e_a.e_a.e_a\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\nn : ℕ\n⊢ (-1) ^ k = 1 / (-1) ^ k\n[PROOFSTEP]\nrw [eq_div_iff, ← mul_pow, ← neg_eq_neg_one_mul, neg_neg, one_pow]\n[GOAL]\ncase h.e'_5.h.e_a.e_a.e_a\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\nn : ℕ\n⊢ (-1) ^ k ≠ 0\n[PROOFSTEP]\napply pow_ne_zero\n[GOAL]\ncase h.e'_5.h.e_a.e_a.e_a.h\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\nn : ℕ\n⊢ -1 ≠ 0\n[PROOFSTEP]\nrw [neg_ne_zero]\n[GOAL]\ncase h.e'_5.h.e_a.e_a.e_a.h\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\nn : ℕ\n⊢ 1 ≠ 0\n[PROOFSTEP]\nexact one_ne_zero\n[GOAL]\ncase h.e'_6\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ -(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k x) =\n -(2 * ↑π * I) ^ k / ↑k ! * ↑(bernoulliFun k x) + 1 / ↑0 ^ k * ↑(fourier 0) ↑x\n[PROOFSTEP]\nrw [Int.cast_zero, zero_pow (by linarith : 0 < k), div_zero, zero_mul, add_zero]\n[GOAL]\nk : ℕ\nhk : 2 ≤ k\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ 0 < k\n[PROOFSTEP]\nlinarith\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ HasSum (fun n => 1 / ↑n ^ (2 * k) * Real.cos (2 * π * ↑n * x))\n ((-1) ^ (k + 1) * (2 * π) ^ (2 * k) / 2 / ↑(2 * k)! *\n Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k))))\n[PROOFSTEP]\nhave :\n HasSum (fun n : ℕ => 1 / (n : ℂ) ^ (2 * k) * (fourier n (x : 𝕌) + fourier (-n) (x : 𝕌)))\n ((-1 : ℂ) ^ (k + 1) * (2 * (π : ℂ)) ^ (2 * k) / (2 * k)! * bernoulliFun (2 * k) x) :=\n by\n convert hasSum_one_div_nat_pow_mul_fourier (by linarith [Nat.one_le_iff_ne_zero.mpr hk] : 2 ≤ 2 * k) hx using 3\n · rw [pow_mul (-1 : ℂ), neg_one_sq, one_pow, one_mul]\n · rw [pow_add, pow_one]\n conv_rhs =>\n rw [mul_pow]\n congr\n congr\n ·skip\n ·rw [pow_mul, I_sq]\n ring\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ HasSum (fun n => 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x))\n[PROOFSTEP]\nconvert hasSum_one_div_nat_pow_mul_fourier (by linarith [Nat.one_le_iff_ne_zero.mpr hk] : 2 ≤ 2 * k) hx using 3\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ 2 ≤ 2 * k\n[PROOFSTEP]\nlinarith [Nat.one_le_iff_ne_zero.mpr hk]\n[GOAL]\ncase h.e'_5.h.h.e'_6\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nx✝ : ℕ\n⊢ ↑(fourier ↑x✝) ↑x + ↑(fourier (-↑x✝)) ↑x = ↑(fourier ↑x✝) ↑x + (-1) ^ (2 * k) * ↑(fourier (-↑x✝)) ↑x\n[PROOFSTEP]\nrw [pow_mul (-1 : ℂ), neg_one_sq, one_pow, one_mul]\n[GOAL]\ncase h.e'_6.h.e'_5.h.e'_5\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ (-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) = -(2 * ↑π * I) ^ (2 * k)\n[PROOFSTEP]\nrw [pow_add, pow_one]\n[GOAL]\ncase h.e'_6.h.e'_5.h.e'_5\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ (-1) ^ k * -1 * (2 * ↑π) ^ (2 * k) = -(2 * ↑π * I) ^ (2 * k)\n[PROOFSTEP]\nconv_rhs =>\n rw [mul_pow]\n congr\n congr\n ·skip\n ·rw [pow_mul, I_sq]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| -(2 * ↑π * I) ^ (2 * k)\n[PROOFSTEP]\n rw [mul_pow]\n congr\n congr\n ·skip\n ·rw [pow_mul, I_sq]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| -(2 * ↑π * I) ^ (2 * k)\n[PROOFSTEP]\n rw [mul_pow]\n congr\n congr\n ·skip\n ·rw [pow_mul, I_sq]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| -(2 * ↑π * I) ^ (2 * k)\n[PROOFSTEP]\nrw [mul_pow]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| -((2 * ↑π) ^ (2 * k) * I ^ (2 * k))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| (2 * ↑π) ^ (2 * k) * I ^ (2 * k)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a.a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| (2 * ↑π) ^ (2 * k)\ncase a.a k : ℕ hk : k ≠ 0 x : ℝ hx : x ∈ Icc 0 1 | I ^ (2 * k)\n[PROOFSTEP]\n·skip\n[GOAL]\ncase a.a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| (2 * ↑π) ^ (2 * k)\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| (2 * ↑π) ^ (2 * k)\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| (2 * ↑π) ^ (2 * k)\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| I ^ (2 * k)\n[PROOFSTEP]\n·rw [pow_mul, I_sq]\n[GOAL]\ncase a.a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| I ^ (2 * k)\n[PROOFSTEP]\nrw [pow_mul, I_sq]\n[GOAL]\ncase a.a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| I ^ (2 * k)\n[PROOFSTEP]\nrw [pow_mul, I_sq]\n[GOAL]\ncase a.a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| I ^ (2 * k)\n[PROOFSTEP]\nrw [pow_mul, I_sq]\n[GOAL]\ncase h.e'_6.h.e'_5.h.e'_5\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ (-1) ^ k * -1 * (2 * ↑π) ^ (2 * k) = -((2 * ↑π) ^ (2 * k) * (-1) ^ k)\n[PROOFSTEP]\nring\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x))\n⊢ HasSum (fun n => 1 / ↑n ^ (2 * k) * Real.cos (2 * π * ↑n * x))\n ((-1) ^ (k + 1) * (2 * π) ^ (2 * k) / 2 / ↑(2 * k)! *\n Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k))))\n[PROOFSTEP]\nhave ofReal_two : ((2 : ℝ) : ℂ) = 2 := by norm_cast\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x))\n⊢ ↑2 = 2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x))\nofReal_two : ↑2 = 2\n⊢ HasSum (fun n => 1 / ↑n ^ (2 * k) * Real.cos (2 * π * ↑n * x))\n ((-1) ^ (k + 1) * (2 * π) ^ (2 * k) / 2 / ↑(2 * k)! *\n Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k))))\n[PROOFSTEP]\nconvert ((hasSum_iff _ _).mp (this.div_const 2)).1 with n\n[GOAL]\ncase h.e'_5.h\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x))\nofReal_two : ↑2 = 2\nn : ℕ\n⊢ 1 / ↑n ^ (2 * k) * Real.cos (2 * π * ↑n * x) = (1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x) / 2).re\n[PROOFSTEP]\nconvert (ofReal_re _).symm\n[GOAL]\ncase h.e'_3.h.e'_1\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x))\nofReal_two : ↑2 = 2\nn : ℕ\n⊢ 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x) / 2 = ↑(1 / ↑n ^ (2 * k) * Real.cos (2 * π * ↑n * x))\n[PROOFSTEP]\nrw [ofReal_mul]\n[GOAL]\ncase h.e'_3.h.e'_1\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x))\nofReal_two : ↑2 = 2\nn : ℕ\n⊢ 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x) / 2 = ↑(1 / ↑n ^ (2 * k)) * ↑(Real.cos (2 * π * ↑n * x))\n[PROOFSTEP]\nrw [← mul_div]\n[GOAL]\ncase h.e'_3.h.e'_1\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x))\nofReal_two : ↑2 = 2\nn : ℕ\n⊢ 1 / ↑n ^ (2 * k) * ((↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x) / 2) = ↑(1 / ↑n ^ (2 * k)) * ↑(Real.cos (2 * π * ↑n * x))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e'_3.h.e'_1.e_a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x))\nofReal_two : ↑2 = 2\nn : ℕ\n⊢ 1 / ↑n ^ (2 * k) = ↑(1 / ↑n ^ (2 * k))\n[PROOFSTEP]\nrw [ofReal_div, ofReal_one, ofReal_pow]\n[GOAL]\ncase h.e'_3.h.e'_1.e_a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x))\nofReal_two : ↑2 = 2\nn : ℕ\n⊢ 1 / ↑n ^ (2 * k) = 1 / ↑↑n ^ (2 * k)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_3.h.e'_1.e_a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x))\nofReal_two : ↑2 = 2\nn : ℕ\n⊢ (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x) / 2 = ↑(Real.cos (2 * π * ↑n * x))\n[PROOFSTEP]\nrw [ofReal_cos, ofReal_mul, fourier_coe_apply, fourier_coe_apply, cos, ofReal_one, div_one, div_one, ofReal_mul,\n ofReal_mul, ofReal_two, Int.cast_neg, Int.cast_ofNat, ofReal_nat_cast]\n[GOAL]\ncase h.e'_3.h.e'_1.e_a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x))\nofReal_two : ↑2 = 2\nn : ℕ\n⊢ (exp (2 * ↑π * I * ↑n * ↑x) + exp (2 * ↑π * I * -↑n * ↑x)) / 2 =\n (exp (2 * ↑π * ↑n * ↑x * I) + exp (-(2 * ↑π * ↑n * ↑x) * I)) / 2\n[PROOFSTEP]\ncongr 3\n[GOAL]\ncase h.e'_3.h.e'_1.e_a.e_a.e_a.e_z\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x))\nofReal_two : ↑2 = 2\nn : ℕ\n⊢ 2 * ↑π * I * ↑n * ↑x = 2 * ↑π * ↑n * ↑x * I\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_3.h.e'_1.e_a.e_a.e_a.e_z\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x))\nofReal_two : ↑2 = 2\nn : ℕ\n⊢ 2 * ↑π * I * -↑n * ↑x = -(2 * ↑π * ↑n * ↑x) * I\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_6\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x))\nofReal_two : ↑2 = 2\n⊢ (-1) ^ (k + 1) * (2 * π) ^ (2 * k) / 2 / ↑(2 * k)! *\n Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k))) =\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x) / 2).re\n[PROOFSTEP]\nconvert (ofReal_re _).symm\n[GOAL]\ncase h.e'_3.h.e'_1\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x))\nofReal_two : ↑2 = 2\n⊢ (-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x) / 2 =\n ↑((-1) ^ (k + 1) * (2 * π) ^ (2 * k) / 2 / ↑(2 * k)! *\n Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k))))\n[PROOFSTEP]\nrw [ofReal_mul, ofReal_div, ofReal_div, ofReal_mul, ofReal_pow, ofReal_pow, ofReal_neg, ofReal_nat_cast, ofReal_mul,\n ofReal_two, ofReal_one]\n[GOAL]\ncase h.e'_3.h.e'_1\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x))\nofReal_two : ↑2 = 2\n⊢ (-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x) / 2 =\n (-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / 2 / ↑(2 * k)! *\n ↑(Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k))))\n[PROOFSTEP]\nrw [bernoulliFun]\n[GOAL]\ncase h.e'_3.h.e'_1\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k) * (↑(fourier ↑n) ↑x + ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! * ↑(bernoulliFun (2 * k) x))\nofReal_two : ↑2 = 2\n⊢ (-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / ↑(2 * k)! *\n ↑(Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k)))) /\n 2 =\n (-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / 2 / ↑(2 * k)! *\n ↑(Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k))))\n[PROOFSTEP]\nring\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * Real.sin (2 * π * ↑n * x))\n ((-1) ^ (k + 1) * (2 * π) ^ (2 * k + 1) / 2 / ↑(2 * k + 1)! *\n Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k + 1))))\n[PROOFSTEP]\nhave :\n HasSum (fun n : ℕ => 1 / (n : ℂ) ^ (2 * k + 1) * (fourier n (x : 𝕌) - fourier (-n) (x : 𝕌)))\n ((-1 : ℂ) ^ (k + 1) * I * (2 * π : ℂ) ^ (2 * k + 1) / (2 * k + 1)! * bernoulliFun (2 * k + 1) x) :=\n by\n convert hasSum_one_div_nat_pow_mul_fourier (by linarith [Nat.one_le_iff_ne_zero.mpr hk] : 2 ≤ 2 * k + 1) hx using 1\n · ext1 n\n rw [pow_add (-1 : ℂ), pow_mul (-1 : ℂ), neg_one_sq, one_pow, one_mul, pow_one, ← neg_eq_neg_one_mul, ←\n sub_eq_add_neg]\n · congr\n rw [pow_add, pow_one]\n conv_rhs =>\n rw [mul_pow]\n congr\n congr\n ·skip\n ·rw [pow_add, pow_one, pow_mul, I_sq]\n ring\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\n[PROOFSTEP]\nconvert hasSum_one_div_nat_pow_mul_fourier (by linarith [Nat.one_le_iff_ne_zero.mpr hk] : 2 ≤ 2 * k + 1) hx using 1\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ 2 ≤ 2 * k + 1\n[PROOFSTEP]\nlinarith [Nat.one_le_iff_ne_zero.mpr hk]\n[GOAL]\ncase h.e'_5\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x)) = fun n =>\n 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x + (-1) ^ (2 * k + 1) * ↑(fourier (-↑n)) ↑x)\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h.e'_5.h\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nn : ℕ\n⊢ 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x) =\n 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x + (-1) ^ (2 * k + 1) * ↑(fourier (-↑n)) ↑x)\n[PROOFSTEP]\nrw [pow_add (-1 : ℂ), pow_mul (-1 : ℂ), neg_one_sq, one_pow, one_mul, pow_one, ← neg_eq_neg_one_mul, ← sub_eq_add_neg]\n[GOAL]\ncase h.e'_6\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ (-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x) =\n -(2 * ↑π * I) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e'_6.e_a.e_a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ (-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) = -(2 * ↑π * I) ^ (2 * k + 1)\n[PROOFSTEP]\nrw [pow_add, pow_one]\n[GOAL]\ncase h.e'_6.e_a.e_a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ (-1) ^ k * -1 * I * (2 * ↑π) ^ (2 * k + 1) = -(2 * ↑π * I) ^ (2 * k + 1)\n[PROOFSTEP]\nconv_rhs =>\n rw [mul_pow]\n congr\n congr\n ·skip\n ·rw [pow_add, pow_one, pow_mul, I_sq]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| -(2 * ↑π * I) ^ (2 * k + 1)\n[PROOFSTEP]\n rw [mul_pow]\n congr\n congr\n ·skip\n ·rw [pow_add, pow_one, pow_mul, I_sq]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| -(2 * ↑π * I) ^ (2 * k + 1)\n[PROOFSTEP]\n rw [mul_pow]\n congr\n congr\n ·skip\n ·rw [pow_add, pow_one, pow_mul, I_sq]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| -(2 * ↑π * I) ^ (2 * k + 1)\n[PROOFSTEP]\nrw [mul_pow]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| -((2 * ↑π) ^ (2 * k + 1) * I ^ (2 * k + 1))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| (2 * ↑π) ^ (2 * k + 1) * I ^ (2 * k + 1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a.a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| (2 * ↑π) ^ (2 * k + 1)\ncase a.a k : ℕ hk : k ≠ 0 x : ℝ hx : x ∈ Icc 0 1 | I ^ (2 * k + 1)\n[PROOFSTEP]\n·skip\n[GOAL]\ncase a.a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| (2 * ↑π) ^ (2 * k + 1)\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| (2 * ↑π) ^ (2 * k + 1)\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| (2 * ↑π) ^ (2 * k + 1)\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| I ^ (2 * k + 1)\n[PROOFSTEP]\n·rw [pow_add, pow_one, pow_mul, I_sq]\n[GOAL]\ncase a.a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| I ^ (2 * k + 1)\n[PROOFSTEP]\nrw [pow_add, pow_one, pow_mul, I_sq]\n[GOAL]\ncase a.a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| I ^ (2 * k + 1)\n[PROOFSTEP]\nrw [pow_add, pow_one, pow_mul, I_sq]\n[GOAL]\ncase a.a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n| I ^ (2 * k + 1)\n[PROOFSTEP]\nrw [pow_add, pow_one, pow_mul, I_sq]\n[GOAL]\ncase h.e'_6.e_a.e_a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ (-1) ^ k * -1 * I * (2 * ↑π) ^ (2 * k + 1) = -((2 * ↑π) ^ (2 * k + 1) * ((-1) ^ k * I))\n[PROOFSTEP]\nring\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\n⊢ HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * Real.sin (2 * π * ↑n * x))\n ((-1) ^ (k + 1) * (2 * π) ^ (2 * k + 1) / 2 / ↑(2 * k + 1)! *\n Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k + 1))))\n[PROOFSTEP]\nhave ofReal_two : ((2 : ℝ) : ℂ) = 2 := by norm_cast\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\n⊢ ↑2 = 2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\n⊢ HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * Real.sin (2 * π * ↑n * x))\n ((-1) ^ (k + 1) * (2 * π) ^ (2 * k + 1) / 2 / ↑(2 * k + 1)! *\n Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k + 1))))\n[PROOFSTEP]\nconvert ((hasSum_iff _ _).mp (this.div_const (2 * I))).1\n[GOAL]\ncase h.e'_5.h\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\nx✝ : ℕ\n⊢ 1 / ↑x✝ ^ (2 * k + 1) * Real.sin (2 * π * ↑x✝ * x) =\n (1 / ↑x✝ ^ (2 * k + 1) * (↑(fourier ↑x✝) ↑x - ↑(fourier (-↑x✝)) ↑x) / (2 * I)).re\n[PROOFSTEP]\nconvert (ofReal_re _).symm\n[GOAL]\ncase h.e'_3.h.e'_1\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\nx✝ : ℕ\n⊢ 1 / ↑x✝ ^ (2 * k + 1) * (↑(fourier ↑x✝) ↑x - ↑(fourier (-↑x✝)) ↑x) / (2 * I) =\n ↑(1 / ↑x✝ ^ (2 * k + 1) * Real.sin (2 * π * ↑x✝ * x))\n[PROOFSTEP]\nrw [ofReal_mul]\n[GOAL]\ncase h.e'_3.h.e'_1\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\nx✝ : ℕ\n⊢ 1 / ↑x✝ ^ (2 * k + 1) * (↑(fourier ↑x✝) ↑x - ↑(fourier (-↑x✝)) ↑x) / (2 * I) =\n ↑(1 / ↑x✝ ^ (2 * k + 1)) * ↑(Real.sin (2 * π * ↑x✝ * x))\n[PROOFSTEP]\nrw [← mul_div]\n[GOAL]\ncase h.e'_3.h.e'_1\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\nx✝ : ℕ\n⊢ 1 / ↑x✝ ^ (2 * k + 1) * ((↑(fourier ↑x✝) ↑x - ↑(fourier (-↑x✝)) ↑x) / (2 * I)) =\n ↑(1 / ↑x✝ ^ (2 * k + 1)) * ↑(Real.sin (2 * π * ↑x✝ * x))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e'_3.h.e'_1.e_a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\nx✝ : ℕ\n⊢ 1 / ↑x✝ ^ (2 * k + 1) = ↑(1 / ↑x✝ ^ (2 * k + 1))\n[PROOFSTEP]\nrw [ofReal_div, ofReal_one, ofReal_pow]\n[GOAL]\ncase h.e'_3.h.e'_1.e_a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\nx✝ : ℕ\n⊢ 1 / ↑x✝ ^ (2 * k + 1) = 1 / ↑↑x✝ ^ (2 * k + 1)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_3.h.e'_1.e_a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\nx✝ : ℕ\n⊢ (↑(fourier ↑x✝) ↑x - ↑(fourier (-↑x✝)) ↑x) / (2 * I) = ↑(Real.sin (2 * π * ↑x✝ * x))\n[PROOFSTEP]\nrw [ofReal_sin, ofReal_mul, fourier_coe_apply, fourier_coe_apply, sin, ofReal_one, div_one, div_one, ofReal_mul,\n ofReal_mul, ofReal_two, Int.cast_neg, Int.cast_ofNat, ofReal_nat_cast, ← div_div, div_I, div_mul_eq_mul_div₀, ←\n neg_div, ← neg_mul, neg_sub]\n[GOAL]\ncase h.e'_3.h.e'_1.e_a\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\nx✝ : ℕ\n⊢ (exp (2 * ↑π * I * -↑x✝ * ↑x) - exp (2 * ↑π * I * ↑x✝ * ↑x)) * I / 2 =\n (exp (-(2 * ↑π * ↑x✝ * ↑x) * I) - exp (2 * ↑π * ↑x✝ * ↑x * I)) * I / 2\n[PROOFSTEP]\ncongr 4\n[GOAL]\ncase h.e'_3.h.e'_1.e_a.e_a.e_a.e_a.e_z\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\nx✝ : ℕ\n⊢ 2 * ↑π * I * -↑x✝ * ↑x = -(2 * ↑π * ↑x✝ * ↑x) * I\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_3.h.e'_1.e_a.e_a.e_a.e_a.e_z\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\nx✝ : ℕ\n⊢ 2 * ↑π * I * ↑x✝ * ↑x = 2 * ↑π * ↑x✝ * ↑x * I\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_6\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\n⊢ (-1) ^ (k + 1) * (2 * π) ^ (2 * k + 1) / 2 / ↑(2 * k + 1)! *\n Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k + 1))) =\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x) / (2 * I)).re\n[PROOFSTEP]\nconvert (ofReal_re _).symm\n[GOAL]\ncase h.e'_3.h.e'_1\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\n⊢ (-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x) / (2 * I) =\n ↑((-1) ^ (k + 1) * (2 * π) ^ (2 * k + 1) / 2 / ↑(2 * k + 1)! *\n Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k + 1))))\n[PROOFSTEP]\nrw [ofReal_mul, ofReal_div, ofReal_div, ofReal_mul, ofReal_pow, ofReal_pow, ofReal_neg, ofReal_nat_cast, ofReal_mul,\n ofReal_two, ofReal_one, ← div_div, div_I, div_mul_eq_mul_div₀]\n[GOAL]\ncase h.e'_3.h.e'_1\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\n⊢ -((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x) * I / 2) =\n (-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k + 1) / 2 / ↑(2 * k + 1)! *\n ↑(Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k + 1))))\n[PROOFSTEP]\nhave : ∀ α β γ δ : ℂ, α * I * β / γ * δ * I = I ^ 2 * α * β / γ * δ := by intros; ring\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\n⊢ ∀ (α β γ δ : ℂ), α * I * β / γ * δ * I = I ^ 2 * α * β / γ * δ\n[PROOFSTEP]\nintros\n[GOAL]\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\nα✝ β✝ γ✝ δ✝ : ℂ\n⊢ α✝ * I * β✝ / γ✝ * δ✝ * I = I ^ 2 * α✝ * β✝ / γ✝ * δ✝\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_3.h.e'_1\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis✝ :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\nthis : ∀ (α β γ δ : ℂ), α * I * β / γ * δ * I = I ^ 2 * α * β / γ * δ\n⊢ -((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x) * I / 2) =\n (-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k + 1) / 2 / ↑(2 * k + 1)! *\n ↑(Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k + 1))))\n[PROOFSTEP]\nrw [this, I_sq]\n[GOAL]\ncase h.e'_3.h.e'_1\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis✝ :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\nthis : ∀ (α β γ δ : ℂ), α * I * β / γ * δ * I = I ^ 2 * α * β / γ * δ\n⊢ -(-1 * (-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x) / 2) =\n (-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k + 1) / 2 / ↑(2 * k + 1)! *\n ↑(Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k + 1))))\n[PROOFSTEP]\nrw [bernoulliFun]\n[GOAL]\ncase h.e'_3.h.e'_1\nk : ℕ\nhk : k ≠ 0\nx : ℝ\nhx : x ∈ Icc 0 1\nthis✝ :\n HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * (↑(fourier ↑n) ↑x - ↑(fourier (-↑n)) ↑x))\n ((-1) ^ (k + 1) * I * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! * ↑(bernoulliFun (2 * k + 1) x))\nofReal_two : ↑2 = 2\nthis : ∀ (α β γ δ : ℂ), α * I * β / γ * δ * I = I ^ 2 * α * β / γ * δ\n⊢ -(-1 * (-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k + 1) / ↑(2 * k + 1)! *\n ↑(Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k + 1)))) /\n 2) =\n (-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k + 1) / 2 / ↑(2 * k + 1)! *\n ↑(Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k + 1))))\n[PROOFSTEP]\nring\n[GOAL]\nk : ℕ\nhk : k ≠ 0\n⊢ HasSum (fun n => 1 / ↑n ^ (2 * k)) ((-1) ^ (k + 1) * 2 ^ (2 * k - 1) * π ^ (2 * k) * ↑(bernoulli (2 * k)) / ↑(2 * k)!)\n[PROOFSTEP]\nconvert hasSum_one_div_nat_pow_mul_cos hk (left_mem_Icc.mpr zero_le_one) using 1\n[GOAL]\ncase h.e'_5\nk : ℕ\nhk : k ≠ 0\n⊢ (fun n => 1 / ↑n ^ (2 * k)) = fun n => 1 / ↑n ^ (2 * k) * Real.cos (2 * π * ↑n * 0)\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h.e'_5.h\nk : ℕ\nhk : k ≠ 0\nn : ℕ\n⊢ 1 / ↑n ^ (2 * k) = 1 / ↑n ^ (2 * k) * Real.cos (2 * π * ↑n * 0)\n[PROOFSTEP]\nrw [mul_zero, Real.cos_zero, mul_one]\n[GOAL]\ncase h.e'_6\nk : ℕ\nhk : k ≠ 0\n⊢ (-1) ^ (k + 1) * 2 ^ (2 * k - 1) * π ^ (2 * k) * ↑(bernoulli (2 * k)) / ↑(2 * k)! =\n (-1) ^ (k + 1) * (2 * π) ^ (2 * k) / 2 / ↑(2 * k)! *\n Polynomial.eval 0 (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k)))\n[PROOFSTEP]\nrw [Polynomial.eval_zero_map, Polynomial.bernoulli_eval_zero, eq_ratCast]\n[GOAL]\ncase h.e'_6\nk : ℕ\nhk : k ≠ 0\n⊢ (-1) ^ (k + 1) * 2 ^ (2 * k - 1) * π ^ (2 * k) * ↑(bernoulli (2 * k)) / ↑(2 * k)! =\n (-1) ^ (k + 1) * (2 * π) ^ (2 * k) / 2 / ↑(2 * k)! * ↑(bernoulli (2 * k))\n[PROOFSTEP]\nhave : (2 : ℝ) ^ (2 * k - 1) = (2 : ℝ) ^ (2 * k) / 2 :=\n by\n rw [eq_div_iff (two_ne_zero' ℝ)]\n conv_lhs =>\n congr\n ·skip\n ·rw [← pow_one (2 : ℝ)]\n rw [← pow_add, Nat.sub_add_cancel]\n linarith [Nat.one_le_iff_ne_zero.mpr hk]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\n⊢ 2 ^ (2 * k - 1) = 2 ^ (2 * k) / 2\n[PROOFSTEP]\nrw [eq_div_iff (two_ne_zero' ℝ)]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\n⊢ 2 ^ (2 * k - 1) * 2 = 2 ^ (2 * k)\n[PROOFSTEP]\nconv_lhs =>\n congr\n ·skip\n ·rw [← pow_one (2 : ℝ)]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\n| 2 ^ (2 * k - 1) * 2\n[PROOFSTEP]\n congr\n ·skip\n ·rw [← pow_one (2 : ℝ)]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\n| 2 ^ (2 * k - 1) * 2\n[PROOFSTEP]\n congr\n ·skip\n ·rw [← pow_one (2 : ℝ)]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\n| 2 ^ (2 * k - 1) * 2\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nk : ℕ\nhk : k ≠ 0\n| 2 ^ (2 * k - 1)\ncase a k : ℕ hk : k ≠ 0 | 2\n[PROOFSTEP]\n·skip\n[GOAL]\ncase a\nk : ℕ\nhk : k ≠ 0\n| 2 ^ (2 * k - 1)\n[PROOFSTEP]\nskip\n[GOAL]\ncase a\nk : ℕ\nhk : k ≠ 0\n| 2 ^ (2 * k - 1)\n[PROOFSTEP]\nskip\n[GOAL]\ncase a\nk : ℕ\nhk : k ≠ 0\n| 2 ^ (2 * k - 1)\n[PROOFSTEP]\nskip\n[GOAL]\ncase a\nk : ℕ\nhk : k ≠ 0\n| 2\n[PROOFSTEP]\n·rw [← pow_one (2 : ℝ)]\n[GOAL]\ncase a\nk : ℕ\nhk : k ≠ 0\n| 2\n[PROOFSTEP]\nrw [← pow_one (2 : ℝ)]\n[GOAL]\ncase a\nk : ℕ\nhk : k ≠ 0\n| 2\n[PROOFSTEP]\nrw [← pow_one (2 : ℝ)]\n[GOAL]\ncase a\nk : ℕ\nhk : k ≠ 0\n| 2\n[PROOFSTEP]\nrw [← pow_one (2 : ℝ)]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\n⊢ 2 ^ (2 * k - 1) * 2 ^ 1 = 2 ^ (2 * k)\n[PROOFSTEP]\nrw [← pow_add, Nat.sub_add_cancel]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\n⊢ 1 ≤ 2 * k\n[PROOFSTEP]\nlinarith [Nat.one_le_iff_ne_zero.mpr hk]\n[GOAL]\ncase h.e'_6\nk : ℕ\nhk : k ≠ 0\nthis : 2 ^ (2 * k - 1) = 2 ^ (2 * k) / 2\n⊢ (-1) ^ (k + 1) * 2 ^ (2 * k - 1) * π ^ (2 * k) * ↑(bernoulli (2 * k)) / ↑(2 * k)! =\n (-1) ^ (k + 1) * (2 * π) ^ (2 * k) / 2 / ↑(2 * k)! * ↑(bernoulli (2 * k))\n[PROOFSTEP]\nrw [this, mul_pow]\n[GOAL]\ncase h.e'_6\nk : ℕ\nhk : k ≠ 0\nthis : 2 ^ (2 * k - 1) = 2 ^ (2 * k) / 2\n⊢ (-1) ^ (k + 1) * (2 ^ (2 * k) / 2) * π ^ (2 * k) * ↑(bernoulli (2 * k)) / ↑(2 * k)! =\n (-1) ^ (k + 1) * (2 ^ (2 * k) * π ^ (2 * k)) / 2 / ↑(2 * k)! * ↑(bernoulli (2 * k))\n[PROOFSTEP]\nring\n[GOAL]\n⊢ HasSum (fun n => 1 / ↑n ^ 2) (π ^ 2 / 6)\n[PROOFSTEP]\nconvert hasSum_zeta_nat one_ne_zero using 1\n[GOAL]\ncase h.e'_6\n⊢ π ^ 2 / 6 = (-1) ^ (1 + 1) * 2 ^ (2 * 1 - 1) * π ^ (2 * 1) * ↑(bernoulli (2 * 1)) / ↑(2 * 1)!\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\ncase h.e'_6\n⊢ π ^ 2 / 6 = (-1) ^ (1 + 1) * 2 ^ (2 - 1) * π ^ 2 * ↑(bernoulli 2) / ↑2!\n[PROOFSTEP]\nrw [bernoulli_eq_bernoulli'_of_ne_one (by decide : 2 ≠ 1), bernoulli'_two]\n[GOAL]\n⊢ 2 ≠ 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase h.e'_6\n⊢ π ^ 2 / 6 = (-1) ^ (1 + 1) * 2 ^ (2 - 1) * π ^ 2 * ↑(1 / 6) / ↑2!\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h.e'_6\n⊢ π ^ 2 / 6 = 2 * π ^ 2 * (1 / 6) / 2\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase h.e'_6\n⊢ π ^ 2 * (6 * 2) = 2 * π ^ 2 * 6\n[PROOFSTEP]\nring\n[GOAL]\n⊢ HasSum (fun n => 1 / ↑n ^ 4) (π ^ 4 / 90)\n[PROOFSTEP]\nconvert hasSum_zeta_nat two_ne_zero using 1\n[GOAL]\ncase h.e'_6\n⊢ π ^ 4 / 90 = (-1) ^ (2 + 1) * 2 ^ (2 * 2 - 1) * π ^ (2 * 2) * ↑(bernoulli (2 * 2)) / ↑(2 * 2)!\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h.e'_6\n⊢ π ^ 4 / 90 = -(8 * π ^ 4 * ↑(bernoulli 4)) / 24\n[PROOFSTEP]\nrw [bernoulli_eq_bernoulli'_of_ne_one, bernoulli'_four]\n[GOAL]\ncase h.e'_6\n⊢ π ^ 4 / 90 = -(8 * π ^ 4 * ↑(-1 / 30)) / 24\ncase h.e'_6 ⊢ 4 ≠ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h.e'_6\n⊢ π ^ 4 / 90 = 8 * π ^ 4 * (1 / 30) / 24\ncase h.e'_6 ⊢ 4 ≠ 1\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase h.e'_6\n⊢ π ^ 4 * (30 * 24) = 8 * π ^ 4 * 90\ncase h.e'_6 ⊢ 4 ≠ 1\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_6\n⊢ 4 ≠ 1\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ eval (1 / 4) (bernoulli 3) = 3 / 64\n[PROOFSTEP]\nsimp_rw [Polynomial.bernoulli, Finset.sum_range_succ, Polynomial.eval_add, Polynomial.eval_monomial]\n[GOAL]\n⊢ eval (1 / 4) (Finset.sum (Finset.range 0) fun x => ↑(monomial (3 - x)) (_root_.bernoulli x * ↑(Nat.choose 3 x))) +\n _root_.bernoulli 0 * ↑(Nat.choose 3 0) * (1 / 4) ^ (3 - 0) +\n _root_.bernoulli 1 * ↑(Nat.choose 3 1) * (1 / 4) ^ (3 - 1) +\n _root_.bernoulli 2 * ↑(Nat.choose 3 2) * (1 / 4) ^ (3 - 2) +\n _root_.bernoulli 3 * ↑(Nat.choose 3 3) * (1 / 4) ^ (3 - 3) =\n 3 / 64\n[PROOFSTEP]\nrw [Finset.sum_range_zero, Polynomial.eval_zero, zero_add, bernoulli_one]\n[GOAL]\n⊢ _root_.bernoulli 0 * ↑(Nat.choose 3 0) * (1 / 4) ^ (3 - 0) + -1 / 2 * ↑(Nat.choose 3 1) * (1 / 4) ^ (3 - 1) +\n _root_.bernoulli 2 * ↑(Nat.choose 3 2) * (1 / 4) ^ (3 - 2) +\n _root_.bernoulli 3 * ↑(Nat.choose 3 3) * (1 / 4) ^ (3 - 3) =\n 3 / 64\n[PROOFSTEP]\nrw [bernoulli_eq_bernoulli'_of_ne_one zero_ne_one, bernoulli'_zero,\n bernoulli_eq_bernoulli'_of_ne_one (by decide : 2 ≠ 1), bernoulli'_two,\n bernoulli_eq_bernoulli'_of_ne_one (by decide : 3 ≠ 1), bernoulli'_three]\n[GOAL]\n⊢ 2 ≠ 1\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ 3 ≠ 1\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ 1 * ↑(Nat.choose 3 0) * (1 / 4) ^ (3 - 0) + -1 / 2 * ↑(Nat.choose 3 1) * (1 / 4) ^ (3 - 1) +\n 1 / 6 * ↑(Nat.choose 3 2) * (1 / 4) ^ (3 - 2) +\n 0 * ↑(Nat.choose 3 3) * (1 / 4) ^ (3 - 3) =\n 3 / 64\n[PROOFSTEP]\nnorm_num\n[GOAL]\n⊢ HasSum (fun n => 1 / ↑n ^ 3 * Real.sin (π * ↑n / 2)) (π ^ 3 / 32)\n[PROOFSTEP]\napply (congr_arg₂ HasSum ?_ ?_).to_iff.mp <| hasSum_one_div_nat_pow_mul_sin one_ne_zero (?_ : 1 / 4 ∈ Icc (0 : ℝ) 1)\n[GOAL]\n⊢ (fun n => 1 / ↑n ^ (2 * 1 + 1) * Real.sin (2 * π * ↑n * (1 / 4))) = fun n => 1 / ↑n ^ 3 * Real.sin (π * ↑n / 2)\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h\nn : ℕ\n⊢ 1 / ↑n ^ (2 * 1 + 1) * Real.sin (2 * π * ↑n * (1 / 4)) = 1 / ↑n ^ 3 * Real.sin (π * ↑n / 2)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h\nn : ℕ\n⊢ Real.sin (2 * π * ↑n * (1 / 4)) = Real.sin (π * ↑n / 2) ∨ n = 0\n[PROOFSTEP]\nleft\n[GOAL]\ncase h.h\nn : ℕ\n⊢ Real.sin (2 * π * ↑n * (1 / 4)) = Real.sin (π * ↑n / 2)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.h.e_x\nn : ℕ\n⊢ 2 * π * ↑n * (1 / 4) = π * ↑n / 2\n[PROOFSTEP]\nring\n[GOAL]\n⊢ (-1) ^ (1 + 1) * (2 * π) ^ (2 * 1 + 1) / 2 / ↑(2 * 1 + 1)! *\n Polynomial.eval (1 / 4) (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * 1 + 1))) =\n π ^ 3 / 32\n[PROOFSTEP]\nhave : (1 / 4 : ℝ) = (algebraMap ℚ ℝ) (1 / 4 : ℚ) := by norm_num\n[GOAL]\n⊢ 1 / 4 = ↑(algebraMap ℚ ℝ) (1 / 4)\n[PROOFSTEP]\nnorm_num\n[GOAL]\nthis : 1 / 4 = ↑(algebraMap ℚ ℝ) (1 / 4)\n⊢ (-1) ^ (1 + 1) * (2 * π) ^ (2 * 1 + 1) / 2 / ↑(2 * 1 + 1)! *\n Polynomial.eval (1 / 4) (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * 1 + 1))) =\n π ^ 3 / 32\n[PROOFSTEP]\nrw [this, mul_pow, Polynomial.eval_map, Polynomial.eval₂_at_apply, (by decide : 2 * 1 + 1 = 3),\n Polynomial.bernoulli_three_eval_one_quarter]\n[GOAL]\nthis : 1 / 4 = ↑(algebraMap ℚ ℝ) (1 / 4)\n⊢ 2 * 1 + 1 = 3\n[PROOFSTEP]\ndecide\n[GOAL]\nthis : 1 / 4 = ↑(algebraMap ℚ ℝ) (1 / 4)\n⊢ (-1) ^ (1 + 1) * (2 ^ 3 * π ^ 3) / 2 / ↑3! * ↑(algebraMap ℚ ℝ) (3 / 64) = π ^ 3 / 32\n[PROOFSTEP]\nnorm_num\n[GOAL]\nthis : 1 / 4 = ↑(algebraMap ℚ ℝ) (1 / 4)\n⊢ 8 * π ^ 3 / 2 / 6 * (3 / 64) = π ^ 3 / 32\n[PROOFSTEP]\nfield_simp\n[GOAL]\nthis : 1 / 4 = ↑(algebraMap ℚ ℝ) (1 / 4)\n⊢ 8 * π ^ 3 * 3 * 32 = π ^ 3 * (2 * 6 * 64)\n[PROOFSTEP]\nring\n[GOAL]\n⊢ 1 / 4 ∈ Icc 0 1\n[PROOFSTEP]\nrw [mem_Icc]\n[GOAL]\n⊢ 0 ≤ 1 / 4 ∧ 1 / 4 ≤ 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\n⊢ 0 ≤ 1 / 4\ncase right ⊢ 1 / 4 ≤ 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase right\n⊢ 1 / 4 ≤ 1\n[PROOFSTEP]\nlinarith\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.ZetaValues", "llama_tokens": 36407, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8080672135527632, "lm_q2_score": 0.6825737344123242, "lm_q1q2_score": 0.5515654556108707}} {"text": "[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\nh : f n = true\n⊢ cantorFunctionAux c f n = c ^ n\n[PROOFSTEP]\nsimp [cantorFunctionAux, h]\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\nh : f n = false\n⊢ cantorFunctionAux c f n = 0\n[PROOFSTEP]\nsimp [cantorFunctionAux, h]\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\nh : 0 ≤ c\n⊢ 0 ≤ cantorFunctionAux c f n\n[PROOFSTEP]\ncases h' : f n\n[GOAL]\ncase false\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\nh : 0 ≤ c\nh' : f n = false\n⊢ 0 ≤ cantorFunctionAux c f n\n[PROOFSTEP]\nsimp [h']\n[GOAL]\ncase true\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\nh : 0 ≤ c\nh' : f n = true\n⊢ 0 ≤ cantorFunctionAux c f n\n[PROOFSTEP]\nsimp [h']\n[GOAL]\ncase true\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\nh : 0 ≤ c\nh' : f n = true\n⊢ 0 ≤ c ^ n\n[PROOFSTEP]\napply pow_nonneg h\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\nh : f n = g n\n⊢ cantorFunctionAux c f n = cantorFunctionAux c g n\n[PROOFSTEP]\nsimp [cantorFunctionAux, h]\n[GOAL]\nc : ℝ\nf✝ g : ℕ → Bool\nn : ℕ\nf : ℕ → Bool\n⊢ cantorFunctionAux c f 0 = bif f 0 then 1 else 0\n[PROOFSTEP]\ncases h : f 0\n[GOAL]\ncase false\nc : ℝ\nf✝ g : ℕ → Bool\nn : ℕ\nf : ℕ → Bool\nh : f 0 = false\n⊢ cantorFunctionAux c f 0 = bif false then 1 else 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase true\nc : ℝ\nf✝ g : ℕ → Bool\nn : ℕ\nf : ℕ → Bool\nh : f 0 = true\n⊢ cantorFunctionAux c f 0 = bif true then 1 else 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nc : ℝ\nf✝ g : ℕ → Bool\nn : ℕ\nf : ℕ → Bool\n⊢ (fun n => cantorFunctionAux c f (n + 1)) = fun n => c * cantorFunctionAux c (fun n => f (n + 1)) n\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nc : ℝ\nf✝ g : ℕ → Bool\nn✝ : ℕ\nf : ℕ → Bool\nn : ℕ\n⊢ cantorFunctionAux c f (n + 1) = c * cantorFunctionAux c (fun n => f (n + 1)) n\n[PROOFSTEP]\ncases h : f (n + 1)\n[GOAL]\ncase h.false\nc : ℝ\nf✝ g : ℕ → Bool\nn✝ : ℕ\nf : ℕ → Bool\nn : ℕ\nh : f (n + 1) = false\n⊢ cantorFunctionAux c f (n + 1) = c * cantorFunctionAux c (fun n => f (n + 1)) n\n[PROOFSTEP]\nsimp [h, _root_.pow_succ]\n[GOAL]\ncase h.true\nc : ℝ\nf✝ g : ℕ → Bool\nn✝ : ℕ\nf : ℕ → Bool\nn : ℕ\nh : f (n + 1) = true\n⊢ cantorFunctionAux c f (n + 1) = c * cantorFunctionAux c (fun n => f (n + 1)) n\n[PROOFSTEP]\nsimp [h, _root_.pow_succ]\n[GOAL]\nc : ℝ\nf✝ g : ℕ → Bool\nn : ℕ\nf : ℕ → Bool\nh1 : 0 ≤ c\nh2 : c < 1\n⊢ Summable (cantorFunctionAux c f)\n[PROOFSTEP]\napply (summable_geometric_of_lt_1 h1 h2).summable_of_eq_zero_or_self\n[GOAL]\nc : ℝ\nf✝ g : ℕ → Bool\nn : ℕ\nf : ℕ → Bool\nh1 : 0 ≤ c\nh2 : c < 1\n⊢ ∀ (b : ℕ), cantorFunctionAux c f b = 0 ∨ cantorFunctionAux c f b = c ^ b\n[PROOFSTEP]\nintro n\n[GOAL]\nc : ℝ\nf✝ g : ℕ → Bool\nn✝ : ℕ\nf : ℕ → Bool\nh1 : 0 ≤ c\nh2 : c < 1\nn : ℕ\n⊢ cantorFunctionAux c f n = 0 ∨ cantorFunctionAux c f n = c ^ n\n[PROOFSTEP]\ncases h : f n\n[GOAL]\ncase false\nc : ℝ\nf✝ g : ℕ → Bool\nn✝ : ℕ\nf : ℕ → Bool\nh1 : 0 ≤ c\nh2 : c < 1\nn : ℕ\nh : f n = false\n⊢ cantorFunctionAux c f n = 0 ∨ cantorFunctionAux c f n = c ^ n\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase true\nc : ℝ\nf✝ g : ℕ → Bool\nn✝ : ℕ\nf : ℕ → Bool\nh1 : 0 ≤ c\nh2 : c < 1\nn : ℕ\nh : f n = true\n⊢ cantorFunctionAux c f n = 0 ∨ cantorFunctionAux c f n = c ^ n\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\nh1 : 0 ≤ c\nh2 : c < 1\nh3 : ∀ (n : ℕ), f n = true → g n = true\n⊢ cantorFunction c f ≤ cantorFunction c g\n[PROOFSTEP]\napply tsum_le_tsum _ (summable_cantor_function f h1 h2) (summable_cantor_function g h1 h2)\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\nh1 : 0 ≤ c\nh2 : c < 1\nh3 : ∀ (n : ℕ), f n = true → g n = true\n⊢ ∀ (i : ℕ), cantorFunctionAux c f i ≤ cantorFunctionAux c g i\n[PROOFSTEP]\nintro n\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn✝ : ℕ\nh1 : 0 ≤ c\nh2 : c < 1\nh3 : ∀ (n : ℕ), f n = true → g n = true\nn : ℕ\n⊢ cantorFunctionAux c f n ≤ cantorFunctionAux c g n\n[PROOFSTEP]\ncases h : f n\n[GOAL]\ncase false\nc : ℝ\nf g : ℕ → Bool\nn✝ : ℕ\nh1 : 0 ≤ c\nh2 : c < 1\nh3 : ∀ (n : ℕ), f n = true → g n = true\nn : ℕ\nh : f n = false\n⊢ cantorFunctionAux c f n ≤ cantorFunctionAux c g n\ncase true\nc : ℝ\nf g : ℕ → Bool\nn✝ : ℕ\nh1 : 0 ≤ c\nh2 : c < 1\nh3 : ∀ (n : ℕ), f n = true → g n = true\nn : ℕ\nh : f n = true\n⊢ cantorFunctionAux c f n ≤ cantorFunctionAux c g n\n[PROOFSTEP]\nsimp [h, cantorFunctionAux_nonneg h1]\n[GOAL]\ncase true\nc : ℝ\nf g : ℕ → Bool\nn✝ : ℕ\nh1 : 0 ≤ c\nh2 : c < 1\nh3 : ∀ (n : ℕ), f n = true → g n = true\nn : ℕ\nh : f n = true\n⊢ cantorFunctionAux c f n ≤ cantorFunctionAux c g n\n[PROOFSTEP]\nreplace h3 : g n = true := h3 n h\n[GOAL]\ncase true\nc : ℝ\nf g : ℕ → Bool\nn✝ : ℕ\nh1 : 0 ≤ c\nh2 : c < 1\nn : ℕ\nh : f n = true\nh3 : g n = true\n⊢ cantorFunctionAux c f n ≤ cantorFunctionAux c g n\n[PROOFSTEP]\nsimp [h, h3]\n[GOAL]\nc : ℝ\nf✝ g : ℕ → Bool\nn : ℕ\nf : ℕ → Bool\nh1 : 0 ≤ c\nh2 : c < 1\n⊢ cantorFunction c f = (bif f 0 then 1 else 0) + c * cantorFunction c fun n => f (n + 1)\n[PROOFSTEP]\nrw [cantorFunction, tsum_eq_zero_add (summable_cantor_function f h1 h2)]\n[GOAL]\nc : ℝ\nf✝ g : ℕ → Bool\nn : ℕ\nf : ℕ → Bool\nh1 : 0 ≤ c\nh2 : c < 1\n⊢ cantorFunctionAux c f 0 + ∑' (b : ℕ), cantorFunctionAux c f (b + 1) =\n (bif f 0 then 1 else 0) + c * cantorFunction c fun n => f (n + 1)\n[PROOFSTEP]\nrw [cantorFunctionAux_succ, tsum_mul_left, cantorFunctionAux, _root_.pow_zero]\n[GOAL]\nc : ℝ\nf✝ g : ℕ → Bool\nn : ℕ\nf : ℕ → Bool\nh1 : 0 ≤ c\nh2 : c < 1\n⊢ (bif f 0 then 1 else 0) + c * ∑' (x : ℕ), cantorFunctionAux c (fun n => f (n + 1)) x =\n (bif f 0 then 1 else 0) + c * cantorFunction c fun n => f (n + 1)\n[PROOFSTEP]\nrfl\n[GOAL]\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < n → f k = g k\nfn : f n = false\ngn : g n = true\n⊢ cantorFunction c f < cantorFunction c g\n[PROOFSTEP]\nhave h3 : c < 1 := by\n apply h2.trans\n norm_num\n[GOAL]\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < n → f k = g k\nfn : f n = false\ngn : g n = true\n⊢ c < 1\n[PROOFSTEP]\napply h2.trans\n[GOAL]\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < n → f k = g k\nfn : f n = false\ngn : g n = true\n⊢ 1 / 2 < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < n → f k = g k\nfn : f n = false\ngn : g n = true\nh3 : c < 1\n⊢ cantorFunction c f < cantorFunction c g\n[PROOFSTEP]\ninduction' n with n ih generalizing f g\n[GOAL]\ncase zero\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\n⊢ cantorFunction c f < cantorFunction c g\n[PROOFSTEP]\nlet f_max : ℕ → Bool := fun n => Nat.rec false (fun _ _ => true) n\n[GOAL]\ncase zero\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\n⊢ cantorFunction c f < cantorFunction c g\n[PROOFSTEP]\nhave hf_max : ∀ n, f n → f_max n := by\n intro n hn\n cases n\n rw [fn] at hn \n contradiction\n apply rfl\n[GOAL]\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\n⊢ ∀ (n : ℕ), f n = true → f_max n = true\n[PROOFSTEP]\nintro n hn\n[GOAL]\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝¹ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn✝ : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝¹ : ∀ (k : ℕ), k < n✝ → f✝ k = g✝ k\nfn✝ : f✝ n✝ = false\ngn✝ : g✝ n✝ = true\nh3 : c < 1\nf g : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nn : ℕ\nhn : f n = true\n⊢ f_max n = true\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝¹ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhn : f zero = true\n⊢ f_max zero = true\ncase succ\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝¹ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝¹ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nn✝ : ℕ\nhn : f (succ n✝) = true\n⊢ f_max (succ n✝) = true\n[PROOFSTEP]\nrw [fn] at hn \n[GOAL]\ncase zero\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝¹ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhn : false = true\n⊢ f_max zero = true\ncase succ\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝¹ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝¹ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nn✝ : ℕ\nhn : f (succ n✝) = true\n⊢ f_max (succ n✝) = true\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase succ\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝¹ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝¹ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nn✝ : ℕ\nhn : f (succ n✝) = true\n⊢ f_max (succ n✝) = true\n[PROOFSTEP]\napply rfl\n[GOAL]\ncase zero\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\n⊢ cantorFunction c f < cantorFunction c g\n[PROOFSTEP]\nlet g_min : ℕ → Bool := fun n => Nat.rec true (fun _ _ => false) n\n[GOAL]\ncase zero\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\n⊢ cantorFunction c f < cantorFunction c g\n[PROOFSTEP]\nhave hg_min : ∀ n, g_min n → g n := by\n intro n hn\n cases n\n rw [gn]\n simp at hn \n[GOAL]\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\n⊢ ∀ (n : ℕ), g_min n = true → g n = true\n[PROOFSTEP]\nintro n hn\n[GOAL]\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝¹ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn✝ : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝¹ : ∀ (k : ℕ), k < n✝ → f✝ k = g✝ k\nfn✝ : f✝ n✝ = false\ngn✝ : g✝ n✝ = true\nh3 : c < 1\nf g : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nn : ℕ\nhn : g_min n = true\n⊢ g n = true\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝¹ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nhn : g_min zero = true\n⊢ g zero = true\ncase succ\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝¹ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝¹ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nn✝ : ℕ\nhn : g_min (succ n✝) = true\n⊢ g (succ n✝) = true\n[PROOFSTEP]\nrw [gn]\n[GOAL]\ncase succ\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝¹ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝¹ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nn✝ : ℕ\nhn : g_min (succ n✝) = true\n⊢ g (succ n✝) = true\n[PROOFSTEP]\nsimp at hn \n[GOAL]\ncase zero\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nhg_min : ∀ (n : ℕ), g_min n = true → g n = true\n⊢ cantorFunction c f < cantorFunction c g\n[PROOFSTEP]\napply (cantorFunction_le (le_of_lt h1) h3 hf_max).trans_lt\n[GOAL]\ncase zero\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nhg_min : ∀ (n : ℕ), g_min n = true → g n = true\n⊢ (cantorFunction c fun n => f_max n) < cantorFunction c g\n[PROOFSTEP]\nrefine' lt_of_lt_of_le _ (cantorFunction_le (le_of_lt h1) h3 hg_min)\n[GOAL]\ncase zero\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nhg_min : ∀ (n : ℕ), g_min n = true → g n = true\n⊢ (cantorFunction c fun n => f_max n) < cantorFunction c fun n => g_min n\n[PROOFSTEP]\nhave : c / (1 - c) < 1 := by\n rw [div_lt_one, lt_sub_iff_add_lt]\n · convert _root_.add_lt_add h2 h2\n norm_num\n rwa [sub_pos]\n[GOAL]\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nhg_min : ∀ (n : ℕ), g_min n = true → g n = true\n⊢ c / (1 - c) < 1\n[PROOFSTEP]\nrw [div_lt_one, lt_sub_iff_add_lt]\n[GOAL]\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nhg_min : ∀ (n : ℕ), g_min n = true → g n = true\n⊢ c + c < 1\n[PROOFSTEP]\nconvert _root_.add_lt_add h2 h2\n[GOAL]\ncase h.e'_4\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nhg_min : ∀ (n : ℕ), g_min n = true → g n = true\n⊢ 1 = 1 / 2 + 1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nhg_min : ∀ (n : ℕ), g_min n = true → g n = true\n⊢ 0 < 1 - c\n[PROOFSTEP]\nrwa [sub_pos]\n[GOAL]\ncase zero\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nhg_min : ∀ (n : ℕ), g_min n = true → g n = true\nthis : c / (1 - c) < 1\n⊢ (cantorFunction c fun n => f_max n) < cantorFunction c fun n => g_min n\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_3\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nhg_min : ∀ (n : ℕ), g_min n = true → g n = true\nthis : c / (1 - c) < 1\n⊢ (cantorFunction c fun n => f_max n) = c / (1 - c)\n[PROOFSTEP]\nrw [cantorFunction_succ _ (le_of_lt h1) h3, div_eq_mul_inv, ← tsum_geometric_of_lt_1 (le_of_lt h1) h3]\n[GOAL]\ncase h.e'_3\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nhg_min : ∀ (n : ℕ), g_min n = true → g n = true\nthis : c / (1 - c) < 1\n⊢ ((bif f_max 0 then 1 else 0) + c * cantorFunction c fun n => f_max (n + 1)) = c * ∑' (n : ℕ), c ^ n\n[PROOFSTEP]\napply zero_add\n[GOAL]\ncase h.e'_4\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nhg_min : ∀ (n : ℕ), g_min n = true → g n = true\nthis : c / (1 - c) < 1\n⊢ (cantorFunction c fun n => g_min n) = 1\n[PROOFSTEP]\nrefine' (tsum_eq_single 0 _).trans _\n[GOAL]\ncase h.e'_4.refine'_1\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nhg_min : ∀ (n : ℕ), g_min n = true → g n = true\nthis : c / (1 - c) < 1\n⊢ ∀ (b' : ℕ), b' ≠ 0 → cantorFunctionAux c (fun n => g_min n) b' = 0\n[PROOFSTEP]\nintro n hn\n[GOAL]\ncase h.e'_4.refine'_1\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝¹ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn✝ : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝¹ : ∀ (k : ℕ), k < n✝ → f✝ k = g✝ k\nfn✝ : f✝ n✝ = false\ngn✝ : g✝ n✝ = true\nh3 : c < 1\nf g : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nhg_min : ∀ (n : ℕ), g_min n = true → g n = true\nthis : c / (1 - c) < 1\nn : ℕ\nhn : n ≠ 0\n⊢ cantorFunctionAux c (fun n => g_min n) n = 0\n[PROOFSTEP]\ncases n\n[GOAL]\ncase h.e'_4.refine'_1.zero\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝¹ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nhg_min : ∀ (n : ℕ), g_min n = true → g n = true\nthis : c / (1 - c) < 1\nhn : zero ≠ 0\n⊢ cantorFunctionAux c (fun n => g_min n) zero = 0\ncase h.e'_4.refine'_1.succ\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝¹ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝¹ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nhg_min : ∀ (n : ℕ), g_min n = true → g n = true\nthis : c / (1 - c) < 1\nn✝ : ℕ\nhn : succ n✝ ≠ 0\n⊢ cantorFunctionAux c (fun n => g_min n) (succ n✝) = 0\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase h.e'_4.refine'_1.succ\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝¹ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝¹ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nhg_min : ∀ (n : ℕ), g_min n = true → g n = true\nthis : c / (1 - c) < 1\nn✝ : ℕ\nhn : succ n✝ ≠ 0\n⊢ cantorFunctionAux c (fun n => g_min n) (succ n✝) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_4.refine'_2\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n → f✝ k = g✝ k\nfn✝ : f✝ n = false\ngn✝ : g✝ n = true\nh3 : c < 1\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < zero → f k = g k\nfn : f zero = false\ngn : g zero = true\nf_max : ℕ → Bool := fun n => rec false (fun x x => true) n\nhf_max : ∀ (n : ℕ), f n = true → f_max n = true\ng_min : ℕ → Bool := fun n => rec true (fun x x => false) n\nhg_min : ∀ (n : ℕ), g_min n = true → g n = true\nthis : c / (1 - c) < 1\n⊢ cantorFunctionAux c (fun n => g_min n) 0 = 1\n[PROOFSTEP]\nexact cantorFunctionAux_zero _\n[GOAL]\ncase succ\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝¹ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn✝ : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n✝ → f✝ k = g✝ k\nfn✝ : f✝ n✝ = false\ngn✝ : g✝ n✝ = true\nh3 : c < 1\nn : ℕ\nih :\n ∀ {f g : ℕ → Bool},\n (∀ (k : ℕ), k < n → f k = g k) → f n = false → g n = true → cantorFunction c f < cantorFunction c g\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < succ n → f k = g k\nfn : f (succ n) = false\ngn : g (succ n) = true\n⊢ cantorFunction c f < cantorFunction c g\n[PROOFSTEP]\nrw [cantorFunction_succ f (le_of_lt h1) h3, cantorFunction_succ g (le_of_lt h1) h3]\n[GOAL]\ncase succ\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝¹ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn✝ : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n✝ → f✝ k = g✝ k\nfn✝ : f✝ n✝ = false\ngn✝ : g✝ n✝ = true\nh3 : c < 1\nn : ℕ\nih :\n ∀ {f g : ℕ → Bool},\n (∀ (k : ℕ), k < n → f k = g k) → f n = false → g n = true → cantorFunction c f < cantorFunction c g\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < succ n → f k = g k\nfn : f (succ n) = false\ngn : g (succ n) = true\n⊢ ((bif f 0 then 1 else 0) + c * cantorFunction c fun n => f (n + 1)) <\n (bif g 0 then 1 else 0) + c * cantorFunction c fun n => g (n + 1)\n[PROOFSTEP]\nrw [hn 0 <| zero_lt_succ n]\n[GOAL]\ncase succ\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝¹ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn✝ : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n✝ → f✝ k = g✝ k\nfn✝ : f✝ n✝ = false\ngn✝ : g✝ n✝ = true\nh3 : c < 1\nn : ℕ\nih :\n ∀ {f g : ℕ → Bool},\n (∀ (k : ℕ), k < n → f k = g k) → f n = false → g n = true → cantorFunction c f < cantorFunction c g\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < succ n → f k = g k\nfn : f (succ n) = false\ngn : g (succ n) = true\n⊢ ((bif g 0 then 1 else 0) + c * cantorFunction c fun n => f (n + 1)) <\n (bif g 0 then 1 else 0) + c * cantorFunction c fun n => g (n + 1)\n[PROOFSTEP]\napply add_lt_add_left\n[GOAL]\ncase succ.bc\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝¹ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn✝ : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n✝ → f✝ k = g✝ k\nfn✝ : f✝ n✝ = false\ngn✝ : g✝ n✝ = true\nh3 : c < 1\nn : ℕ\nih :\n ∀ {f g : ℕ → Bool},\n (∀ (k : ℕ), k < n → f k = g k) → f n = false → g n = true → cantorFunction c f < cantorFunction c g\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < succ n → f k = g k\nfn : f (succ n) = false\ngn : g (succ n) = true\n⊢ (c * cantorFunction c fun n => f (n + 1)) < c * cantorFunction c fun n => g (n + 1)\n[PROOFSTEP]\nrw [mul_lt_mul_left h1]\n[GOAL]\ncase succ.bc\nc : ℝ\nf✝¹ g✝¹ : ℕ → Bool\nn✝¹ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nn✝ : ℕ\nf✝ g✝ : ℕ → Bool\nhn✝ : ∀ (k : ℕ), k < n✝ → f✝ k = g✝ k\nfn✝ : f✝ n✝ = false\ngn✝ : g✝ n✝ = true\nh3 : c < 1\nn : ℕ\nih :\n ∀ {f g : ℕ → Bool},\n (∀ (k : ℕ), k < n → f k = g k) → f n = false → g n = true → cantorFunction c f < cantorFunction c g\nf g : ℕ → Bool\nhn : ∀ (k : ℕ), k < succ n → f k = g k\nfn : f (succ n) = false\ngn : g (succ n) = true\n⊢ (cantorFunction c fun n => f (n + 1)) < cantorFunction c fun n => g (n + 1)\n[PROOFSTEP]\nexact ih (fun k hk => hn _ <| Nat.succ_lt_succ hk) fn gn\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\n⊢ Function.Injective (cantorFunction c)\n[PROOFSTEP]\nintro f g hfg\n[GOAL]\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nhfg : cantorFunction c f = cantorFunction c g\n⊢ f = g\n[PROOFSTEP]\nclassical\nby_contra h\nrevert hfg\nhave : ∃ n, f n ≠ g n := by\n rw [← not_forall]\n intro h'\n apply h\n ext\n apply h'\nlet n := Nat.find this\nhave hn : ∀ k : ℕ, k < n → f k = g k := by\n intro k hk\n apply of_not_not\n exact Nat.find_min this hk\ncases fn : f n\n· apply _root_.ne_of_lt\n refine' increasing_cantorFunction h1 h2 hn fn _\n apply Bool.eq_true_of_not_eq_false\n rw [← fn]\n apply Ne.symm\n exact Nat.find_spec this\n· apply _root_.ne_of_gt\n refine' increasing_cantorFunction h1 h2 (fun k hk => (hn k hk).symm) _ fn\n apply Bool.eq_false_of_not_eq_true\n rw [← fn]\n apply Ne.symm\n exact Nat.find_spec this\n[GOAL]\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nhfg : cantorFunction c f = cantorFunction c g\n⊢ f = g\n[PROOFSTEP]\nby_contra h\n[GOAL]\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nhfg : cantorFunction c f = cantorFunction c g\nh : ¬f = g\n⊢ False\n[PROOFSTEP]\nrevert hfg\n[GOAL]\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\n⊢ cantorFunction c f = cantorFunction c g → False\n[PROOFSTEP]\nhave : ∃ n, f n ≠ g n := by\n rw [← not_forall]\n intro h'\n apply h\n ext\n apply h'\n[GOAL]\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\n⊢ ∃ n, f n ≠ g n\n[PROOFSTEP]\nrw [← not_forall]\n[GOAL]\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\n⊢ ¬∀ (x : ℕ), f x = g x\n[PROOFSTEP]\nintro h'\n[GOAL]\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nh' : ∀ (x : ℕ), f x = g x\n⊢ False\n[PROOFSTEP]\napply h\n[GOAL]\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nh' : ∀ (x : ℕ), f x = g x\n⊢ f = g\n[PROOFSTEP]\next\n[GOAL]\ncase h\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nh' : ∀ (x : ℕ), f x = g x\nx✝ : ℕ\n⊢ f x✝ = g x✝\n[PROOFSTEP]\napply h'\n[GOAL]\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nthis : ∃ n, f n ≠ g n\n⊢ cantorFunction c f = cantorFunction c g → False\n[PROOFSTEP]\nlet n := Nat.find this\n[GOAL]\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nthis : ∃ n, f n ≠ g n\nn : ℕ := Nat.find this\n⊢ cantorFunction c f = cantorFunction c g → False\n[PROOFSTEP]\nhave hn : ∀ k : ℕ, k < n → f k = g k := by\n intro k hk\n apply of_not_not\n exact Nat.find_min this hk\n[GOAL]\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nthis : ∃ n, f n ≠ g n\nn : ℕ := Nat.find this\n⊢ ∀ (k : ℕ), k < n → f k = g k\n[PROOFSTEP]\nintro k hk\n[GOAL]\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nthis : ∃ n, f n ≠ g n\nn : ℕ := Nat.find this\nk : ℕ\nhk : k < n\n⊢ f k = g k\n[PROOFSTEP]\napply of_not_not\n[GOAL]\ncase a\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nthis : ∃ n, f n ≠ g n\nn : ℕ := Nat.find this\nk : ℕ\nhk : k < n\n⊢ ¬¬f k = g k\n[PROOFSTEP]\nexact Nat.find_min this hk\n[GOAL]\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nthis : ∃ n, f n ≠ g n\nn : ℕ := Nat.find this\nhn : ∀ (k : ℕ), k < n → f k = g k\n⊢ cantorFunction c f = cantorFunction c g → False\n[PROOFSTEP]\ncases fn : f n\n[GOAL]\ncase false\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nthis : ∃ n, f n ≠ g n\nn : ℕ := Nat.find this\nhn : ∀ (k : ℕ), k < n → f k = g k\nfn : f n = false\n⊢ cantorFunction c f = cantorFunction c g → False\n[PROOFSTEP]\napply _root_.ne_of_lt\n[GOAL]\ncase false.h\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nthis : ∃ n, f n ≠ g n\nn : ℕ := Nat.find this\nhn : ∀ (k : ℕ), k < n → f k = g k\nfn : f n = false\n⊢ cantorFunction c f < cantorFunction c g\n[PROOFSTEP]\nrefine' increasing_cantorFunction h1 h2 hn fn _\n[GOAL]\ncase false.h\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nthis : ∃ n, f n ≠ g n\nn : ℕ := Nat.find this\nhn : ∀ (k : ℕ), k < n → f k = g k\nfn : f n = false\n⊢ g n = true\n[PROOFSTEP]\napply Bool.eq_true_of_not_eq_false\n[GOAL]\ncase false.h.a\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nthis : ∃ n, f n ≠ g n\nn : ℕ := Nat.find this\nhn : ∀ (k : ℕ), k < n → f k = g k\nfn : f n = false\n⊢ ¬g n = false\n[PROOFSTEP]\nrw [← fn]\n[GOAL]\ncase false.h.a\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nthis : ∃ n, f n ≠ g n\nn : ℕ := Nat.find this\nhn : ∀ (k : ℕ), k < n → f k = g k\nfn : f n = false\n⊢ ¬g n = f n\n[PROOFSTEP]\napply Ne.symm\n[GOAL]\ncase false.h.a.h\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nthis : ∃ n, f n ≠ g n\nn : ℕ := Nat.find this\nhn : ∀ (k : ℕ), k < n → f k = g k\nfn : f n = false\n⊢ f n ≠ g n\n[PROOFSTEP]\nexact Nat.find_spec this\n[GOAL]\ncase true\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nthis : ∃ n, f n ≠ g n\nn : ℕ := Nat.find this\nhn : ∀ (k : ℕ), k < n → f k = g k\nfn : f n = true\n⊢ cantorFunction c f = cantorFunction c g → False\n[PROOFSTEP]\napply _root_.ne_of_gt\n[GOAL]\ncase true.h\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nthis : ∃ n, f n ≠ g n\nn : ℕ := Nat.find this\nhn : ∀ (k : ℕ), k < n → f k = g k\nfn : f n = true\n⊢ cantorFunction c g < cantorFunction c f\n[PROOFSTEP]\nrefine' increasing_cantorFunction h1 h2 (fun k hk => (hn k hk).symm) _ fn\n[GOAL]\ncase true.h\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nthis : ∃ n, f n ≠ g n\nn : ℕ := Nat.find this\nhn : ∀ (k : ℕ), k < n → f k = g k\nfn : f n = true\n⊢ g n = false\n[PROOFSTEP]\napply Bool.eq_false_of_not_eq_true\n[GOAL]\ncase true.h.a\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nthis : ∃ n, f n ≠ g n\nn : ℕ := Nat.find this\nhn : ∀ (k : ℕ), k < n → f k = g k\nfn : f n = true\n⊢ ¬g n = true\n[PROOFSTEP]\nrw [← fn]\n[GOAL]\ncase true.h.a\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nthis : ∃ n, f n ≠ g n\nn : ℕ := Nat.find this\nhn : ∀ (k : ℕ), k < n → f k = g k\nfn : f n = true\n⊢ ¬g n = f n\n[PROOFSTEP]\napply Ne.symm\n[GOAL]\ncase true.h.a.h\nc : ℝ\nf✝ g✝ : ℕ → Bool\nn✝ : ℕ\nh1 : 0 < c\nh2 : c < 1 / 2\nf g : ℕ → Bool\nh : ¬f = g\nthis : ∃ n, f n ≠ g n\nn : ℕ := Nat.find this\nhn : ∀ (k : ℕ), k < n → f k = g k\nfn : f n = true\n⊢ f n ≠ g n\n[PROOFSTEP]\nexact Nat.find_spec this\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\n⊢ #ℝ = 𝔠\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\n⊢ #ℝ ≤ 𝔠\n[PROOFSTEP]\nrw [Real.equivCauchy.cardinal_eq]\n[GOAL]\ncase a\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\n⊢ #(CauSeq.Completion.Cauchy abs) ≤ 𝔠\n[PROOFSTEP]\napply mk_quotient_le.trans\n[GOAL]\ncase a\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\n⊢ #(CauSeq ℚ abs) ≤ 𝔠\n[PROOFSTEP]\napply (mk_subtype_le _).trans_eq\n[GOAL]\ncase a\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\n⊢ #(ℕ → ℚ) = 𝔠\n[PROOFSTEP]\nrw [← power_def, mk_nat, mkRat, aleph0_power_aleph0]\n[GOAL]\ncase a\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\n⊢ 𝔠 ≤ #ℝ\n[PROOFSTEP]\nconvert mk_le_of_injective (cantorFunction_injective _ _)\n[GOAL]\ncase h.e'_3\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\n⊢ 𝔠 = #(ℕ → Bool)\ncase a.convert_1\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\n⊢ ℝ\ncase a.convert_2\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\n⊢ 0 < ?a.convert_1✝\ncase a.convert_3 c : ℝ f g : ℕ → Bool n : ℕ ⊢ ?a.convert_1✝ < 1 / 2\n[PROOFSTEP]\nrw [← power_def, mk_bool, mk_nat, two_power_aleph0]\n[GOAL]\ncase a.convert_1\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\n⊢ ℝ\ncase a.convert_2\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\n⊢ 0 < ?a.convert_1✝\ncase a.convert_3 c : ℝ f g : ℕ → Bool n : ℕ ⊢ ?a.convert_1✝ < 1 / 2\n[PROOFSTEP]\nexact 1 / 3\n[GOAL]\ncase a.convert_2\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\n⊢ 0 < 1 / 3\ncase a.convert_3 c : ℝ f g : ℕ → Bool n : ℕ ⊢ 1 / 3 < 1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase a.convert_3\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\n⊢ 1 / 3 < 1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\n⊢ #↑Set.univ = 𝔠\n[PROOFSTEP]\nrw [mk_univ, mk_real]\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\n⊢ ¬Set.Countable Set.univ\n[PROOFSTEP]\nrw [← le_aleph0_iff_set_countable, not_le, mk_univ_real]\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\n⊢ ℵ₀ < 𝔠\n[PROOFSTEP]\napply cantor\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\n⊢ #↑(Ioi a) = 𝔠\n[PROOFSTEP]\nrefine' le_antisymm (mk_real ▸ mk_set_le _) _\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\n⊢ 𝔠 ≤ #↑(Ioi a)\n[PROOFSTEP]\nrw [← not_lt]\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\n⊢ ¬#↑(Ioi a) < 𝔠\n[PROOFSTEP]\nintro h\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\nh : #↑(Ioi a) < 𝔠\n⊢ False\n[PROOFSTEP]\nrefine' _root_.ne_of_lt _ mk_univ_real\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\nh : #↑(Ioi a) < 𝔠\n⊢ #↑Set.univ < 𝔠\n[PROOFSTEP]\nhave hu : Iio a ∪ { a } ∪ Ioi a = Set.univ :=\n by\n convert @Iic_union_Ioi ℝ _ _\n exact Iio_union_right\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\nh : #↑(Ioi a) < 𝔠\n⊢ Iio a ∪ {a} ∪ Ioi a = Set.univ\n[PROOFSTEP]\nconvert @Iic_union_Ioi ℝ _ _\n[GOAL]\ncase h.e'_2.h.e'_3\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\nh : #↑(Ioi a) < 𝔠\n⊢ Iio a ∪ {a} = Iic a\n[PROOFSTEP]\nexact Iio_union_right\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\nh : #↑(Ioi a) < 𝔠\nhu : Iio a ∪ {a} ∪ Ioi a = Set.univ\n⊢ #↑Set.univ < 𝔠\n[PROOFSTEP]\nrw [← hu]\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\nh : #↑(Ioi a) < 𝔠\nhu : Iio a ∪ {a} ∪ Ioi a = Set.univ\n⊢ #↑(Iio a ∪ {a} ∪ Ioi a) < 𝔠\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (mk_union_le _ _) _\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\nh : #↑(Ioi a) < 𝔠\nhu : Iio a ∪ {a} ∪ Ioi a = Set.univ\n⊢ #↑(Iio a ∪ {a}) + #↑(Ioi a) < 𝔠\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (add_le_add_right (mk_union_le _ _) _) _\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\nh : #↑(Ioi a) < 𝔠\nhu : Iio a ∪ {a} ∪ Ioi a = Set.univ\n⊢ #↑(Iio a) + #↑{a} + #↑(Ioi a) < 𝔠\n[PROOFSTEP]\nhave h2 : (fun x => a + a - x) '' Ioi a = Iio a :=\n by\n convert @image_const_sub_Ioi ℝ _ _ _\n simp\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\nh : #↑(Ioi a) < 𝔠\nhu : Iio a ∪ {a} ∪ Ioi a = Set.univ\n⊢ (fun x => a + a - x) '' Ioi a = Iio a\n[PROOFSTEP]\nconvert @image_const_sub_Ioi ℝ _ _ _\n[GOAL]\ncase h.e'_3.h.e'_3\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\nh : #↑(Ioi a) < 𝔠\nhu : Iio a ∪ {a} ∪ Ioi a = Set.univ\n⊢ a = a + a - a\n[PROOFSTEP]\nsimp\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\nh : #↑(Ioi a) < 𝔠\nhu : Iio a ∪ {a} ∪ Ioi a = Set.univ\nh2 : (fun x => a + a - x) '' Ioi a = Iio a\n⊢ #↑(Iio a) + #↑{a} + #↑(Ioi a) < 𝔠\n[PROOFSTEP]\nrw [← h2]\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\nh : #↑(Ioi a) < 𝔠\nhu : Iio a ∪ {a} ∪ Ioi a = Set.univ\nh2 : (fun x => a + a - x) '' Ioi a = Iio a\n⊢ #↑((fun x => a + a - x) '' Ioi a) + #↑{a} + #↑(Ioi a) < 𝔠\n[PROOFSTEP]\nrefine' add_lt_of_lt (cantor _).le _ h\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\nh : #↑(Ioi a) < 𝔠\nhu : Iio a ∪ {a} ∪ Ioi a = Set.univ\nh2 : (fun x => a + a - x) '' Ioi a = Iio a\n⊢ #↑((fun x => a + a - x) '' Ioi a) + #↑{a} < 𝔠\n[PROOFSTEP]\nrefine' add_lt_of_lt (cantor _).le (mk_image_le.trans_lt h) _\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\nh : #↑(Ioi a) < 𝔠\nhu : Iio a ∪ {a} ∪ Ioi a = Set.univ\nh2 : (fun x => a + a - x) '' Ioi a = Iio a\n⊢ #↑{a} < 𝔠\n[PROOFSTEP]\nrw [mk_singleton]\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\nh : #↑(Ioi a) < 𝔠\nhu : Iio a ∪ {a} ∪ Ioi a = Set.univ\nh2 : (fun x => a + a - x) '' Ioi a = Iio a\n⊢ 1 < 𝔠\n[PROOFSTEP]\nexact one_lt_aleph0.trans (cantor _)\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\n⊢ #↑(Iio a) = 𝔠\n[PROOFSTEP]\nrefine' le_antisymm (mk_real ▸ mk_set_le _) _\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\n⊢ 𝔠 ≤ #↑(Iio a)\n[PROOFSTEP]\nhave h2 : (fun x => a + a - x) '' Iio a = Ioi a := by simp only [image_const_sub_Iio, add_sub_cancel]\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\n⊢ (fun x => a + a - x) '' Iio a = Ioi a\n[PROOFSTEP]\nsimp only [image_const_sub_Iio, add_sub_cancel]\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na : ℝ\nh2 : (fun x => a + a - x) '' Iio a = Ioi a\n⊢ 𝔠 ≤ #↑(Iio a)\n[PROOFSTEP]\nexact mk_Ioi_real a ▸ h2 ▸ mk_image_le\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na b : ℝ\nh : a < b\n⊢ #↑(Ioo a b) = 𝔠\n[PROOFSTEP]\nrefine' le_antisymm (mk_real ▸ mk_set_le _) _\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na b : ℝ\nh : a < b\n⊢ 𝔠 ≤ #↑(Ioo a b)\n[PROOFSTEP]\nhave h1 : #((fun x => x - a) '' Ioo a b) ≤ #(Ioo a b) := mk_image_le\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na b : ℝ\nh : a < b\nh1 : #↑((fun x => x - a) '' Ioo a b) ≤ #↑(Ioo a b)\n⊢ 𝔠 ≤ #↑(Ioo a b)\n[PROOFSTEP]\nrefine' le_trans _ h1\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na b : ℝ\nh : a < b\nh1 : #↑((fun x => x - a) '' Ioo a b) ≤ #↑(Ioo a b)\n⊢ 𝔠 ≤ #↑((fun x => x - a) '' Ioo a b)\n[PROOFSTEP]\nrw [image_sub_const_Ioo, sub_self]\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na b : ℝ\nh : a < b\nh1 : #↑((fun x => x - a) '' Ioo a b) ≤ #↑(Ioo a b)\n⊢ 𝔠 ≤ #↑(Ioo 0 (b - a))\n[PROOFSTEP]\nreplace h := sub_pos_of_lt h\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na b : ℝ\nh1 : #↑((fun x => x - a) '' Ioo a b) ≤ #↑(Ioo a b)\nh : 0 < b - a\n⊢ 𝔠 ≤ #↑(Ioo 0 (b - a))\n[PROOFSTEP]\nhave h2 : #(Inv.inv '' Ioo 0 (b - a)) ≤ #(Ioo 0 (b - a)) := mk_image_le\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na b : ℝ\nh1 : #↑((fun x => x - a) '' Ioo a b) ≤ #↑(Ioo a b)\nh : 0 < b - a\nh2 : #↑(Inv.inv '' Ioo 0 (b - a)) ≤ #↑(Ioo 0 (b - a))\n⊢ 𝔠 ≤ #↑(Ioo 0 (b - a))\n[PROOFSTEP]\nrefine' le_trans _ h2\n[GOAL]\nc : ℝ\nf g : ℕ → Bool\nn : ℕ\na b : ℝ\nh1 : #↑((fun x => x - a) '' Ioo a b) ≤ #↑(Ioo a b)\nh : 0 < b - a\nh2 : #↑(Inv.inv '' Ioo 0 (b - a)) ≤ #↑(Ioo 0 (b - a))\n⊢ 𝔠 ≤ #↑(Inv.inv '' Ioo 0 (b - a))\n[PROOFSTEP]\nrw [image_inv, inv_Ioo_0_left h, mk_Ioi_real]\n", "meta": {"mathlib_filename": "Mathlib.Data.Real.Cardinality", "llama_tokens": 22959, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.870597268408361, "lm_q2_score": 0.6334102636778401, "lm_q1q2_score": 0.5514452453397474}} {"text": "[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹² : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝¹¹ : (i : ι) → AddCommMonoid (s i)\ninst✝¹⁰ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Module R M\nE : Type u_9\ninst✝⁷ : AddCommMonoid E\ninst✝⁶ : Module R E\nF : Type u_10\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : DecidableEq ι\nz : R\nf : (i : ι) → s i\ni : ι\nr : R₁\ninst✝³ : SMul R₁ R\ninst✝² : IsScalarTower R₁ R R\ninst✝¹ : SMul R₁ (s i)\ninst✝ : IsScalarTower R₁ R (s i)\n⊢ tprodCoeff R z (update f i (r • f i)) = tprodCoeff R (r • z) f\n[PROOFSTEP]\nhave h₁ : r • z = r • (1 : R) * z := by rw [smul_mul_assoc, one_mul]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹² : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝¹¹ : (i : ι) → AddCommMonoid (s i)\ninst✝¹⁰ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Module R M\nE : Type u_9\ninst✝⁷ : AddCommMonoid E\ninst✝⁶ : Module R E\nF : Type u_10\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : DecidableEq ι\nz : R\nf : (i : ι) → s i\ni : ι\nr : R₁\ninst✝³ : SMul R₁ R\ninst✝² : IsScalarTower R₁ R R\ninst✝¹ : SMul R₁ (s i)\ninst✝ : IsScalarTower R₁ R (s i)\n⊢ r • z = r • 1 * z\n[PROOFSTEP]\nrw [smul_mul_assoc, one_mul]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹² : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝¹¹ : (i : ι) → AddCommMonoid (s i)\ninst✝¹⁰ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Module R M\nE : Type u_9\ninst✝⁷ : AddCommMonoid E\ninst✝⁶ : Module R E\nF : Type u_10\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : DecidableEq ι\nz : R\nf : (i : ι) → s i\ni : ι\nr : R₁\ninst✝³ : SMul R₁ R\ninst✝² : IsScalarTower R₁ R R\ninst✝¹ : SMul R₁ (s i)\ninst✝ : IsScalarTower R₁ R (s i)\nh₁ : r • z = r • 1 * z\n⊢ tprodCoeff R z (update f i (r • f i)) = tprodCoeff R (r • z) f\n[PROOFSTEP]\nhave h₂ : r • f i = (r • (1 : R)) • f i := (smul_one_smul _ _ _).symm\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹² : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝¹¹ : (i : ι) → AddCommMonoid (s i)\ninst✝¹⁰ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Module R M\nE : Type u_9\ninst✝⁷ : AddCommMonoid E\ninst✝⁶ : Module R E\nF : Type u_10\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : DecidableEq ι\nz : R\nf : (i : ι) → s i\ni : ι\nr : R₁\ninst✝³ : SMul R₁ R\ninst✝² : IsScalarTower R₁ R R\ninst✝¹ : SMul R₁ (s i)\ninst✝ : IsScalarTower R₁ R (s i)\nh₁ : r • z = r • 1 * z\nh₂ : r • f i = (r • 1) • f i\n⊢ tprodCoeff R z (update f i (r • f i)) = tprodCoeff R (r • z) f\n[PROOFSTEP]\nrw [h₁, h₂]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹² : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝¹¹ : (i : ι) → AddCommMonoid (s i)\ninst✝¹⁰ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Module R M\nE : Type u_9\ninst✝⁷ : AddCommMonoid E\ninst✝⁶ : Module R E\nF : Type u_10\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : DecidableEq ι\nz : R\nf : (i : ι) → s i\ni : ι\nr : R₁\ninst✝³ : SMul R₁ R\ninst✝² : IsScalarTower R₁ R R\ninst✝¹ : SMul R₁ (s i)\ninst✝ : IsScalarTower R₁ R (s i)\nh₁ : r • z = r • 1 * z\nh₂ : r • f i = (r • 1) • f i\n⊢ tprodCoeff R z (update f i ((r • 1) • f i)) = tprodCoeff R (r • 1 * z) f\n[PROOFSTEP]\nexact smul_tprodCoeff_aux z f i _\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : R × ((i : ι) → s i) → F\nC0 : ∀ (r : R) (f : (i : ι) → s i) (i : ι), f i = 0 → φ (r, f) = 0\nC0' : ∀ (f : (i : ι) → s i), φ (0, f) = 0\nC_add :\n ∀ [inst : DecidableEq ι] (r : R) (f : (i : ι) → s i) (i : ι) (m₁ m₂ : s i),\n φ (r, update f i m₁) + φ (r, update f i m₂) = φ (r, update f i (m₁ + m₂))\nC_add_scalar : ∀ (r r' : R) (f : (i : ι) → s i), φ (r, f) + φ (r', f) = φ (r + r', f)\nC_smul :\n ∀ [inst : DecidableEq ι] (r : R) (f : (i : ι) → s i) (i : ι) (r' : R), φ (r, update f i (r' • f i)) = φ (r' * r, f)\nx y : FreeAddMonoid (R × ((i : ι) → s i))\nhxy : Eqv R s x y\nr' : R\nf : (i : ι) → s i\ni : ι\nhf : f i = 0\n⊢ ↑(↑FreeAddMonoid.lift φ) (FreeAddMonoid.of (r', f)) = ↑(↑FreeAddMonoid.lift φ) 0\n[PROOFSTEP]\nsimp [FreeAddMonoid.lift_eval_of, C0 r' f i hf]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : R × ((i : ι) → s i) → F\nC0 : ∀ (r : R) (f : (i : ι) → s i) (i : ι), f i = 0 → φ (r, f) = 0\nC0' : ∀ (f : (i : ι) → s i), φ (0, f) = 0\nC_add :\n ∀ [inst : DecidableEq ι] (r : R) (f : (i : ι) → s i) (i : ι) (m₁ m₂ : s i),\n φ (r, update f i m₁) + φ (r, update f i m₂) = φ (r, update f i (m₁ + m₂))\nC_add_scalar : ∀ (r r' : R) (f : (i : ι) → s i), φ (r, f) + φ (r', f) = φ (r + r', f)\nC_smul :\n ∀ [inst : DecidableEq ι] (r : R) (f : (i : ι) → s i) (i : ι) (r' : R), φ (r, update f i (r' • f i)) = φ (r' * r, f)\nx y : FreeAddMonoid (R × ((i : ι) → s i))\nhxy : Eqv R s x y\nf : (i : ι) → s i\n⊢ ↑(↑FreeAddMonoid.lift φ) (FreeAddMonoid.of (0, f)) = ↑(↑FreeAddMonoid.lift φ) 0\n[PROOFSTEP]\nsimp [FreeAddMonoid.lift_eval_of, C0']\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : R × ((i : ι) → s i) → F\nC0 : ∀ (r : R) (f : (i : ι) → s i) (i : ι), f i = 0 → φ (r, f) = 0\nC0' : ∀ (f : (i : ι) → s i), φ (0, f) = 0\nC_add :\n ∀ [inst : DecidableEq ι] (r : R) (f : (i : ι) → s i) (i : ι) (m₁ m₂ : s i),\n φ (r, update f i m₁) + φ (r, update f i m₂) = φ (r, update f i (m₁ + m₂))\nC_add_scalar : ∀ (r r' : R) (f : (i : ι) → s i), φ (r, f) + φ (r', f) = φ (r + r', f)\nC_smul :\n ∀ [inst : DecidableEq ι] (r : R) (f : (i : ι) → s i) (i : ι) (r' : R), φ (r, update f i (r' • f i)) = φ (r' * r, f)\nx y : FreeAddMonoid (R × ((i : ι) → s i))\nhxy : Eqv R s x y\ninst : DecidableEq ι\nz : R\nf : (i : ι) → s i\ni : ι\nm₁ m₂ : s i\n⊢ ↑(↑FreeAddMonoid.lift φ) (FreeAddMonoid.of (z, update f i m₁) + FreeAddMonoid.of (z, update f i m₂)) =\n ↑(↑FreeAddMonoid.lift φ) (FreeAddMonoid.of (z, update f i (m₁ + m₂)))\n[PROOFSTEP]\nsimp [FreeAddMonoid.lift_eval_of, @C_add inst]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : R × ((i : ι) → s i) → F\nC0 : ∀ (r : R) (f : (i : ι) → s i) (i : ι), f i = 0 → φ (r, f) = 0\nC0' : ∀ (f : (i : ι) → s i), φ (0, f) = 0\nC_add :\n ∀ [inst : DecidableEq ι] (r : R) (f : (i : ι) → s i) (i : ι) (m₁ m₂ : s i),\n φ (r, update f i m₁) + φ (r, update f i m₂) = φ (r, update f i (m₁ + m₂))\nC_add_scalar : ∀ (r r' : R) (f : (i : ι) → s i), φ (r, f) + φ (r', f) = φ (r + r', f)\nC_smul :\n ∀ [inst : DecidableEq ι] (r : R) (f : (i : ι) → s i) (i : ι) (r' : R), φ (r, update f i (r' • f i)) = φ (r' * r, f)\nx y : FreeAddMonoid (R × ((i : ι) → s i))\nhxy : Eqv R s x y\nz₁ z₂ : R\nf : (i : ι) → s i\n⊢ ↑(↑FreeAddMonoid.lift φ) (FreeAddMonoid.of (z₁, f) + FreeAddMonoid.of (z₂, f)) =\n ↑(↑FreeAddMonoid.lift φ) (FreeAddMonoid.of (z₁ + z₂, f))\n[PROOFSTEP]\nsimp [FreeAddMonoid.lift_eval_of, C_add_scalar]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : R × ((i : ι) → s i) → F\nC0 : ∀ (r : R) (f : (i : ι) → s i) (i : ι), f i = 0 → φ (r, f) = 0\nC0' : ∀ (f : (i : ι) → s i), φ (0, f) = 0\nC_add :\n ∀ [inst : DecidableEq ι] (r : R) (f : (i : ι) → s i) (i : ι) (m₁ m₂ : s i),\n φ (r, update f i m₁) + φ (r, update f i m₂) = φ (r, update f i (m₁ + m₂))\nC_add_scalar : ∀ (r r' : R) (f : (i : ι) → s i), φ (r, f) + φ (r', f) = φ (r + r', f)\nC_smul :\n ∀ [inst : DecidableEq ι] (r : R) (f : (i : ι) → s i) (i : ι) (r' : R), φ (r, update f i (r' • f i)) = φ (r' * r, f)\nx y : FreeAddMonoid (R × ((i : ι) → s i))\nhxy : Eqv R s x y\ninst : DecidableEq ι\nz : R\nf : (i : ι) → s i\ni : ι\nr' : R\n⊢ ↑(↑FreeAddMonoid.lift φ) (FreeAddMonoid.of (z, update f i (r' • f i))) =\n ↑(↑FreeAddMonoid.lift φ) (FreeAddMonoid.of (r' * z, f))\n[PROOFSTEP]\nsimp [FreeAddMonoid.lift_eval_of, @C_smul inst]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : R × ((i : ι) → s i) → F\nC0 : ∀ (r : R) (f : (i : ι) → s i) (i : ι), f i = 0 → φ (r, f) = 0\nC0' : ∀ (f : (i : ι) → s i), φ (0, f) = 0\nC_add :\n ∀ [inst : DecidableEq ι] (r : R) (f : (i : ι) → s i) (i : ι) (m₁ m₂ : s i),\n φ (r, update f i m₁) + φ (r, update f i m₂) = φ (r, update f i (m₁ + m₂))\nC_add_scalar : ∀ (r r' : R) (f : (i : ι) → s i), φ (r, f) + φ (r', f) = φ (r + r', f)\nC_smul :\n ∀ [inst : DecidableEq ι] (r : R) (f : (i : ι) → s i) (i : ι) (r' : R), φ (r, update f i (r' • f i)) = φ (r' * r, f)\nx✝ y✝ : FreeAddMonoid (R × ((i : ι) → s i))\nhxy : Eqv R s x✝ y✝\nx y : FreeAddMonoid (R × ((i : ι) → s i))\n⊢ ↑(↑FreeAddMonoid.lift φ) (x + y) = ↑(↑FreeAddMonoid.lift φ) (y + x)\n[PROOFSTEP]\nsimp_rw [AddMonoidHom.map_add, add_comm]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nC : (⨂[R] (i : ι), s i) → Prop\nz : ⨂[R] (i : ι), s i\nC1 : ∀ {r : R} {f : (i : ι) → s i}, C (tprodCoeff R r f)\nCp : ∀ {x y : ⨂[R] (i : ι), s i}, C x → C y → C (x + y)\n⊢ C z\n[PROOFSTEP]\nhave C0 : C 0 := by\n have h₁ := @C1 0 0\n rwa [zero_tprodCoeff] at h₁ \n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nC : (⨂[R] (i : ι), s i) → Prop\nz : ⨂[R] (i : ι), s i\nC1 : ∀ {r : R} {f : (i : ι) → s i}, C (tprodCoeff R r f)\nCp : ∀ {x y : ⨂[R] (i : ι), s i}, C x → C y → C (x + y)\n⊢ C 0\n[PROOFSTEP]\nhave h₁ := @C1 0 0\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nC : (⨂[R] (i : ι), s i) → Prop\nz : ⨂[R] (i : ι), s i\nC1 : ∀ {r : R} {f : (i : ι) → s i}, C (tprodCoeff R r f)\nCp : ∀ {x y : ⨂[R] (i : ι), s i}, C x → C y → C (x + y)\nh₁ : C (tprodCoeff R 0 0)\n⊢ C 0\n[PROOFSTEP]\nrwa [zero_tprodCoeff] at h₁ \n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nC : (⨂[R] (i : ι), s i) → Prop\nz : ⨂[R] (i : ι), s i\nC1 : ∀ {r : R} {f : (i : ι) → s i}, C (tprodCoeff R r f)\nCp : ∀ {x y : ⨂[R] (i : ι), s i}, C x → C y → C (x + y)\nC0 : C 0\n⊢ C z\n[PROOFSTEP]\nrefine' AddCon.induction_on z fun x ↦ FreeAddMonoid.recOn x C0 _\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nC : (⨂[R] (i : ι), s i) → Prop\nz : ⨂[R] (i : ι), s i\nC1 : ∀ {r : R} {f : (i : ι) → s i}, C (tprodCoeff R r f)\nCp : ∀ {x y : ⨂[R] (i : ι), s i}, C x → C y → C (x + y)\nC0 : C 0\nx : FreeAddMonoid (R × ((i : ι) → (fun i => s i) i))\n⊢ ∀ (x : R × ((i : ι) → (fun i => s i) i)) (xs : FreeAddMonoid (R × ((i : ι) → (fun i => s i) i))),\n C ↑xs → C ↑(FreeAddMonoid.of x + xs)\n[PROOFSTEP]\nsimp_rw [AddCon.coe_add]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nC : (⨂[R] (i : ι), s i) → Prop\nz : ⨂[R] (i : ι), s i\nC1 : ∀ {r : R} {f : (i : ι) → s i}, C (tprodCoeff R r f)\nCp : ∀ {x y : ⨂[R] (i : ι), s i}, C x → C y → C (x + y)\nC0 : C 0\nx : FreeAddMonoid (R × ((i : ι) → (fun i => s i) i))\n⊢ ∀ (x : R × ((i : ι) → (fun i => s i) i)) (xs : FreeAddMonoid (R × ((i : ι) → (fun i => s i) i))),\n C ↑xs → C (↑(FreeAddMonoid.of x) + ↑xs)\n[PROOFSTEP]\nrefine' fun f y ih ↦ Cp _ ih\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nC : (⨂[R] (i : ι), s i) → Prop\nz : ⨂[R] (i : ι), s i\nC1 : ∀ {r : R} {f : (i : ι) → s i}, C (tprodCoeff R r f)\nCp : ∀ {x y : ⨂[R] (i : ι), s i}, C x → C y → C (x + y)\nC0 : C 0\nx : FreeAddMonoid (R × ((i : ι) → (fun i => s i) i))\nf : R × ((i : ι) → (fun i => s i) i)\ny : FreeAddMonoid (R × ((i : ι) → (fun i => s i) i))\nih : C ↑y\n⊢ C ↑(FreeAddMonoid.of f)\n[PROOFSTEP]\nconvert @C1 f.1 f.2\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹³ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝¹² : (i : ι) → AddCommMonoid (s i)\ninst✝¹¹ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : Module R M\nE : Type u_9\ninst✝⁸ : AddCommMonoid E\ninst✝⁷ : Module R E\nF : Type u_10\ninst✝⁶ : AddCommMonoid F\ninst✝⁵ : Monoid R₁\ninst✝⁴ : DistribMulAction R₁ R\ninst✝³ : SMulCommClass R₁ R R\ninst✝² : Monoid R₂\ninst✝¹ : DistribMulAction R₂ R\ninst✝ : SMulCommClass R₂ R R\nr : R₁\nr' : R\nf : (i : ι) → s i\ni : ι\nhf : f i = 0\n⊢ (fun f => tprodCoeff R (r • f.fst) f.snd) (r', f) = 0\n[PROOFSTEP]\nsimp_rw [zero_tprodCoeff' _ f i hf]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹³ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝¹² : (i : ι) → AddCommMonoid (s i)\ninst✝¹¹ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : Module R M\nE : Type u_9\ninst✝⁸ : AddCommMonoid E\ninst✝⁷ : Module R E\nF : Type u_10\ninst✝⁶ : AddCommMonoid F\ninst✝⁵ : Monoid R₁\ninst✝⁴ : DistribMulAction R₁ R\ninst✝³ : SMulCommClass R₁ R R\ninst✝² : Monoid R₂\ninst✝¹ : DistribMulAction R₂ R\ninst✝ : SMulCommClass R₂ R R\nr : R₁\nf : (i : ι) → s i\n⊢ (fun f => tprodCoeff R (r • f.fst) f.snd) (0, f) = 0\n[PROOFSTEP]\nsimp [zero_tprodCoeff]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹⁴ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝¹³ : (i : ι) → AddCommMonoid (s i)\ninst✝¹² : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : Module R M\nE : Type u_9\ninst✝⁹ : AddCommMonoid E\ninst✝⁸ : Module R E\nF : Type u_10\ninst✝⁷ : AddCommMonoid F\ninst✝⁶ : Monoid R₁\ninst✝⁵ : DistribMulAction R₁ R\ninst✝⁴ : SMulCommClass R₁ R R\ninst✝³ : Monoid R₂\ninst✝² : DistribMulAction R₂ R\ninst✝¹ : SMulCommClass R₂ R R\nr : R₁\ninst✝ : DecidableEq ι\nr' : R\nf : (i : ι) → s i\ni : ι\nm₁ m₂ : s i\n⊢ (fun f => tprodCoeff R (r • f.fst) f.snd) (r', update f i m₁) +\n (fun f => tprodCoeff R (r • f.fst) f.snd) (r', update f i m₂) =\n (fun f => tprodCoeff R (r • f.fst) f.snd) (r', update f i (m₁ + m₂))\n[PROOFSTEP]\nsimp [add_tprodCoeff]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹³ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝¹² : (i : ι) → AddCommMonoid (s i)\ninst✝¹¹ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : Module R M\nE : Type u_9\ninst✝⁸ : AddCommMonoid E\ninst✝⁷ : Module R E\nF : Type u_10\ninst✝⁶ : AddCommMonoid F\ninst✝⁵ : Monoid R₁\ninst✝⁴ : DistribMulAction R₁ R\ninst✝³ : SMulCommClass R₁ R R\ninst✝² : Monoid R₂\ninst✝¹ : DistribMulAction R₂ R\ninst✝ : SMulCommClass R₂ R R\nr : R₁\nr' r'' : R\nf : (i : ι) → s i\n⊢ (fun f => tprodCoeff R (r • f.fst) f.snd) (r', f) + (fun f => tprodCoeff R (r • f.fst) f.snd) (r'', f) =\n (fun f => tprodCoeff R (r • f.fst) f.snd) (r' + r'', f)\n[PROOFSTEP]\nsimp [add_tprodCoeff', mul_add]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹⁴ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝¹³ : (i : ι) → AddCommMonoid (s i)\ninst✝¹² : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : Module R M\nE : Type u_9\ninst✝⁹ : AddCommMonoid E\ninst✝⁸ : Module R E\nF : Type u_10\ninst✝⁷ : AddCommMonoid F\ninst✝⁶ : Monoid R₁\ninst✝⁵ : DistribMulAction R₁ R\ninst✝⁴ : SMulCommClass R₁ R R\ninst✝³ : Monoid R₂\ninst✝² : DistribMulAction R₂ R\ninst✝¹ : SMulCommClass R₂ R R\nr : R₁\ninst✝ : DecidableEq ι\nz : R\nf : (i : ι) → s i\ni : ι\nr' : R\n⊢ (fun f => tprodCoeff R (r • f.fst) f.snd) (z, update f i (r' • f i)) =\n (fun f => tprodCoeff R (r • f.fst) f.snd) (r' * z, f)\n[PROOFSTEP]\nsimp [smul_tprodCoeff, mul_smul_comm]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹³ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝¹² : (i : ι) → AddCommMonoid (s i)\ninst✝¹¹ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : Module R M\nE : Type u_9\ninst✝⁸ : AddCommMonoid E\ninst✝⁷ : Module R E\nF : Type u_10\ninst✝⁶ : AddCommMonoid F\ninst✝⁵ : Monoid R₁\ninst✝⁴ : DistribMulAction R₁ R\ninst✝³ : SMulCommClass R₁ R R\ninst✝² : Monoid R₂\ninst✝¹ : DistribMulAction R₂ R\ninst✝ : SMulCommClass R₂ R R\nx : ⨂[R] (i : ι), s i\nr : R\nf : (i : ι) → s i\n⊢ 1 • tprodCoeff R r f = tprodCoeff R r f\n[PROOFSTEP]\nrw [smul_tprodCoeff', one_smul]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹³ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝¹² : (i : ι) → AddCommMonoid (s i)\ninst✝¹¹ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : Module R M\nE : Type u_9\ninst✝⁸ : AddCommMonoid E\ninst✝⁷ : Module R E\nF : Type u_10\ninst✝⁶ : AddCommMonoid F\ninst✝⁵ : Monoid R₁\ninst✝⁴ : DistribMulAction R₁ R\ninst✝³ : SMulCommClass R₁ R R\ninst✝² : Monoid R₂\ninst✝¹ : DistribMulAction R₂ R\ninst✝ : SMulCommClass R₂ R R\nx z y : ⨂[R] (i : ι), s i\nihz : 1 • z = z\nihy : 1 • y = y\n⊢ 1 • (z + y) = z + y\n[PROOFSTEP]\nsimp_rw [PiTensorProduct.smul_add, ihz, ihy]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹³ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝¹² : (i : ι) → AddCommMonoid (s i)\ninst✝¹¹ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : Module R M\nE : Type u_9\ninst✝⁸ : AddCommMonoid E\ninst✝⁷ : Module R E\nF : Type u_10\ninst✝⁶ : AddCommMonoid F\ninst✝⁵ : Monoid R₁\ninst✝⁴ : DistribMulAction R₁ R\ninst✝³ : SMulCommClass R₁ R R\ninst✝² : Monoid R₂\ninst✝¹ : DistribMulAction R₂ R\ninst✝ : SMulCommClass R₂ R R\nr r' : R₁\nx : ⨂[R] (i : ι), s i\nr'' : R\nf : (i : ι) → s i\n⊢ (r * r') • tprodCoeff R r'' f = r • r' • tprodCoeff R r'' f\n[PROOFSTEP]\nsimp [smul_tprodCoeff', smul_smul]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹³ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝¹² : (i : ι) → AddCommMonoid (s i)\ninst✝¹¹ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : Module R M\nE : Type u_9\ninst✝⁸ : AddCommMonoid E\ninst✝⁷ : Module R E\nF : Type u_10\ninst✝⁶ : AddCommMonoid F\ninst✝⁵ : Monoid R₁\ninst✝⁴ : DistribMulAction R₁ R\ninst✝³ : SMulCommClass R₁ R R\ninst✝² : Monoid R₂\ninst✝¹ : DistribMulAction R₂ R\ninst✝ : SMulCommClass R₂ R R\nr r' : R₁\nx✝ x y : ⨂[R] (i : ι), s i\nihx : (r * r') • x = r • r' • x\nihy : (r * r') • y = r • r' • y\n⊢ (r * r') • (x + y) = r • r' • (x + y)\n[PROOFSTEP]\nsimp_rw [PiTensorProduct.smul_add, ihx, ihy]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹⁴ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝¹³ : (i : ι) → AddCommMonoid (s i)\ninst✝¹² : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : Module R M\nE : Type u_9\ninst✝⁹ : AddCommMonoid E\ninst✝⁸ : Module R E\nF : Type u_10\ninst✝⁷ : AddCommMonoid F\ninst✝⁶ : Monoid R₁\ninst✝⁵ : DistribMulAction R₁ R\ninst✝⁴ : SMulCommClass R₁ R R\ninst✝³ : Monoid R₂\ninst✝² : DistribMulAction R₂ R\ninst✝¹ : SMulCommClass R₂ R R\ninst✝ : SMulCommClass R₁ R₂ R\nr' : R₁\nr'' : R₂\nx : ⨂[R] (i : ι), s i\nxr : R\nxf : (i : ι) → s i\n⊢ r' • r'' • tprodCoeff R xr xf = r'' • r' • tprodCoeff R xr xf\n[PROOFSTEP]\nsimp only [smul_tprodCoeff', smul_comm]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹⁴ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝¹³ : (i : ι) → AddCommMonoid (s i)\ninst✝¹² : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : Module R M\nE : Type u_9\ninst✝⁹ : AddCommMonoid E\ninst✝⁸ : Module R E\nF : Type u_10\ninst✝⁷ : AddCommMonoid F\ninst✝⁶ : Monoid R₁\ninst✝⁵ : DistribMulAction R₁ R\ninst✝⁴ : SMulCommClass R₁ R R\ninst✝³ : Monoid R₂\ninst✝² : DistribMulAction R₂ R\ninst✝¹ : SMulCommClass R₂ R R\ninst✝ : SMulCommClass R₁ R₂ R\nr' : R₁\nr'' : R₂\nx z y : ⨂[R] (i : ι), s i\nihz : r' • r'' • z = r'' • r' • z\nihy : r' • r'' • y = r'' • r' • y\n⊢ r' • r'' • (z + y) = r'' • r' • (z + y)\n[PROOFSTEP]\nsimp_rw [PiTensorProduct.smul_add, ihz, ihy]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹⁵ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝¹⁴ : (i : ι) → AddCommMonoid (s i)\ninst✝¹³ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝¹² : AddCommMonoid M\ninst✝¹¹ : Module R M\nE : Type u_9\ninst✝¹⁰ : AddCommMonoid E\ninst✝⁹ : Module R E\nF : Type u_10\ninst✝⁸ : AddCommMonoid F\ninst✝⁷ : Monoid R₁\ninst✝⁶ : DistribMulAction R₁ R\ninst✝⁵ : SMulCommClass R₁ R R\ninst✝⁴ : Monoid R₂\ninst✝³ : DistribMulAction R₂ R\ninst✝² : SMulCommClass R₂ R R\ninst✝¹ : SMul R₁ R₂\ninst✝ : IsScalarTower R₁ R₂ R\nr' : R₁\nr'' : R₂\nx : ⨂[R] (i : ι), s i\nxr : R\nxf : (i : ι) → s i\n⊢ (r' • r'') • tprodCoeff R xr xf = r' • r'' • tprodCoeff R xr xf\n[PROOFSTEP]\nsimp only [smul_tprodCoeff', smul_assoc]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹⁵ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝¹⁴ : (i : ι) → AddCommMonoid (s i)\ninst✝¹³ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝¹² : AddCommMonoid M\ninst✝¹¹ : Module R M\nE : Type u_9\ninst✝¹⁰ : AddCommMonoid E\ninst✝⁹ : Module R E\nF : Type u_10\ninst✝⁸ : AddCommMonoid F\ninst✝⁷ : Monoid R₁\ninst✝⁶ : DistribMulAction R₁ R\ninst✝⁵ : SMulCommClass R₁ R R\ninst✝⁴ : Monoid R₂\ninst✝³ : DistribMulAction R₂ R\ninst✝² : SMulCommClass R₂ R R\ninst✝¹ : SMul R₁ R₂\ninst✝ : IsScalarTower R₁ R₂ R\nr' : R₁\nr'' : R₂\nx z y : ⨂[R] (i : ι), s i\nihz : (r' • r'') • z = r' • r'' • z\nihy : (r' • r'') • y = r' • r'' • y\n⊢ (r' • r'') • (z + y) = r' • r'' • (z + y)\n[PROOFSTEP]\nsimp_rw [PiTensorProduct.smul_add, ihz, ihy]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹⁰ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁹ : (i : ι) → AddCommMonoid (s i)\ninst✝⁸ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\nE : Type u_9\ninst✝⁵ : AddCommMonoid E\ninst✝⁴ : Module R E\nF : Type u_10\ninst✝³ : AddCommMonoid F\ninst✝² : Semiring R₁\ninst✝¹ : Module R₁ R\ninst✝ : SMulCommClass R₁ R R\nsrc✝ : DistribMulAction R₁ (⨂[R] (i : ι), s i) := distribMulAction'\nr✝ r' : R₁\nx : ⨂[R] (i : ι), s i\nr : R\nf : (i : ι) → s i\n⊢ (r✝ + r') • tprodCoeff R r f = r✝ • tprodCoeff R r f + r' • tprodCoeff R r f\n[PROOFSTEP]\nsimp_rw [smul_tprodCoeff', add_smul, add_tprodCoeff']\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹⁰ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁹ : (i : ι) → AddCommMonoid (s i)\ninst✝⁸ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\nE : Type u_9\ninst✝⁵ : AddCommMonoid E\ninst✝⁴ : Module R E\nF : Type u_10\ninst✝³ : AddCommMonoid F\ninst✝² : Semiring R₁\ninst✝¹ : Module R₁ R\ninst✝ : SMulCommClass R₁ R R\nsrc✝ : DistribMulAction R₁ (⨂[R] (i : ι), s i) := distribMulAction'\nr r' : R₁\nx✝ x y : ⨂[R] (i : ι), s i\nihx : (r + r') • x = r • x + r' • x\nihy : (r + r') • y = r • y + r' • y\n⊢ (r + r') • (x + y) = r • (x + y) + r' • (x + y)\n[PROOFSTEP]\nsimp_rw [PiTensorProduct.smul_add, ihx, ihy, add_add_add_comm]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹⁰ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁹ : (i : ι) → AddCommMonoid (s i)\ninst✝⁸ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\nE : Type u_9\ninst✝⁵ : AddCommMonoid E\ninst✝⁴ : Module R E\nF : Type u_10\ninst✝³ : AddCommMonoid F\ninst✝² : Semiring R₁\ninst✝¹ : Module R₁ R\ninst✝ : SMulCommClass R₁ R R\nsrc✝ : DistribMulAction R₁ (⨂[R] (i : ι), s i) := distribMulAction'\nx : ⨂[R] (i : ι), s i\nr : R\nf : (i : ι) → s i\n⊢ 0 • tprodCoeff R r f = 0\n[PROOFSTEP]\nsimp_rw [smul_tprodCoeff', zero_smul, zero_tprodCoeff]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝¹⁰ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁹ : (i : ι) → AddCommMonoid (s i)\ninst✝⁸ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\nE : Type u_9\ninst✝⁵ : AddCommMonoid E\ninst✝⁴ : Module R E\nF : Type u_10\ninst✝³ : AddCommMonoid F\ninst✝² : Semiring R₁\ninst✝¹ : Module R₁ R\ninst✝ : SMulCommClass R₁ R R\nsrc✝ : DistribMulAction R₁ (⨂[R] (i : ι), s i) := distribMulAction'\nx✝ x y : ⨂[R] (i : ι), s i\nihx : 0 • x = 0\nihy : 0 • y = 0\n⊢ 0 • (x + y) = 0\n[PROOFSTEP]\nsimp_rw [PiTensorProduct.smul_add, ihx, ihy, add_zero]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nx✝ : DecidableEq ι\nf : (i : ι) → s i\ni : ι\nr : R\nx : s i\n⊢ tprodCoeff R 1 (update f i (r • x)) = r • tprodCoeff R 1 (update f i x)\n[PROOFSTEP]\nrw [smul_tprodCoeff', ← smul_tprodCoeff (1 : R) _ i, update_idem, update_same]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nz : R\nf : (i : ι) → s i\n⊢ tprodCoeff R z f = z • ↑(tprod R) f\n[PROOFSTEP]\nhave : z = z • (1 : R) := by simp only [mul_one, Algebra.id.smul_eq_mul]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nz : R\nf : (i : ι) → s i\n⊢ z = z • 1\n[PROOFSTEP]\nsimp only [mul_one, Algebra.id.smul_eq_mul]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nz : R\nf : (i : ι) → s i\nthis : z = z • 1\n⊢ tprodCoeff R z f = z • ↑(tprod R) f\n[PROOFSTEP]\nconv_lhs => rw [this]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nz : R\nf : (i : ι) → s i\nthis : z = z • 1\n| tprodCoeff R z f\n[PROOFSTEP]\nrw [this]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nz : R\nf : (i : ι) → s i\nthis : z = z • 1\n| tprodCoeff R z f\n[PROOFSTEP]\nrw [this]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nz : R\nf : (i : ι) → s i\nthis : z = z • 1\n| tprodCoeff R z f\n[PROOFSTEP]\nrw [this]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nC : (⨂[R] (i : ι), s i) → Prop\nz : ⨂[R] (i : ι), s i\nC1 : ∀ {r : R} {f : (i : ι) → s i}, C (r • ↑(tprod R) f)\nCp : ∀ {x y : ⨂[R] (i : ι), s i}, C x → C y → C (x + y)\n⊢ C z\n[PROOFSTEP]\nsimp_rw [← tprodCoeff_eq_smul_tprod] at C1 \n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nC : (⨂[R] (i : ι), s i) → Prop\nz : ⨂[R] (i : ι), s i\nCp : ∀ {x y : ⨂[R] (i : ι), s i}, C x → C y → C (x + y)\nC1 : ∀ {r : R} {f : (i : ι) → s i}, C (tprodCoeff R r f)\n⊢ C z\n[PROOFSTEP]\nexact PiTensorProduct.induction_on' z @C1 @Cp\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ₁ φ₂ : (⨂[R] (i : ι), s i) →ₗ[R] E\nH : LinearMap.compMultilinearMap φ₁ (tprod R) = LinearMap.compMultilinearMap φ₂ (tprod R)\n⊢ φ₁ = φ₂\n[PROOFSTEP]\nrefine' LinearMap.ext _\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ₁ φ₂ : (⨂[R] (i : ι), s i) →ₗ[R] E\nH : LinearMap.compMultilinearMap φ₁ (tprod R) = LinearMap.compMultilinearMap φ₂ (tprod R)\n⊢ ∀ (x : ⨂[R] (i : ι), s i), ↑φ₁ x = ↑φ₂ x\n[PROOFSTEP]\nrefine' fun z ↦ PiTensorProduct.induction_on' z _ fun {x y} hx hy ↦ by rw [φ₁.map_add, φ₂.map_add, hx, hy]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ₁ φ₂ : (⨂[R] (i : ι), s i) →ₗ[R] E\nH : LinearMap.compMultilinearMap φ₁ (tprod R) = LinearMap.compMultilinearMap φ₂ (tprod R)\nz x y : ⨂[R] (i : ι), s i\nhx : ↑φ₁ x = ↑φ₂ x\nhy : ↑φ₁ y = ↑φ₂ y\n⊢ ↑φ₁ (x + y) = ↑φ₂ (x + y)\n[PROOFSTEP]\nrw [φ₁.map_add, φ₂.map_add, hx, hy]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ₁ φ₂ : (⨂[R] (i : ι), s i) →ₗ[R] E\nH : LinearMap.compMultilinearMap φ₁ (tprod R) = LinearMap.compMultilinearMap φ₂ (tprod R)\nz : ⨂[R] (i : ι), s i\n⊢ ∀ {r : R} {f : (i : ι) → s i}, ↑φ₁ (tprodCoeff R r f) = ↑φ₂ (tprodCoeff R r f)\n[PROOFSTEP]\nintro r f\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ₁ φ₂ : (⨂[R] (i : ι), s i) →ₗ[R] E\nH : LinearMap.compMultilinearMap φ₁ (tprod R) = LinearMap.compMultilinearMap φ₂ (tprod R)\nz : ⨂[R] (i : ι), s i\nr : R\nf : (i : ι) → s i\n⊢ ↑φ₁ (tprodCoeff R r f) = ↑φ₂ (tprodCoeff R r f)\n[PROOFSTEP]\nrw [tprodCoeff_eq_smul_tprod, φ₁.map_smul, φ₂.map_smul]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ₁ φ₂ : (⨂[R] (i : ι), s i) →ₗ[R] E\nH : LinearMap.compMultilinearMap φ₁ (tprod R) = LinearMap.compMultilinearMap φ₂ (tprod R)\nz : ⨂[R] (i : ι), s i\nr : R\nf : (i : ι) → s i\n⊢ r • ↑φ₁ (↑(tprod R) f) = r • ↑φ₂ (↑(tprod R) f)\n[PROOFSTEP]\napply _root_.congr_arg\n[GOAL]\ncase h\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ₁ φ₂ : (⨂[R] (i : ι), s i) →ₗ[R] E\nH : LinearMap.compMultilinearMap φ₁ (tprod R) = LinearMap.compMultilinearMap φ₂ (tprod R)\nz : ⨂[R] (i : ι), s i\nr : R\nf : (i : ι) → s i\n⊢ ↑φ₁ (↑(tprod R) f) = ↑φ₂ (↑(tprod R) f)\n[PROOFSTEP]\nexact MultilinearMap.congr_fun H f\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nz : R\nf : (i : ι) → s i\ni : ι\nhf : f i = 0\n⊢ (fun p => p.fst • ↑φ p.snd) (z, f) = 0\n[PROOFSTEP]\nsimp_rw [map_coord_zero φ i hf, smul_zero]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nf : (i : ι) → s i\n⊢ (fun p => p.fst • ↑φ p.snd) (0, f) = 0\n[PROOFSTEP]\nsimp_rw [zero_smul]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : DecidableEq ι\nz : R\nf : (i : ι) → s i\ni : ι\nm₁ m₂ : s i\n⊢ (fun p => p.fst • ↑φ p.snd) (z, update f i m₁) + (fun p => p.fst • ↑φ p.snd) (z, update f i m₂) =\n (fun p => p.fst • ↑φ p.snd) (z, update f i (m₁ + m₂))\n[PROOFSTEP]\nsimp_rw [← smul_add, φ.map_add]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nz₁ z₂ : R\nf : (i : ι) → s i\n⊢ (fun p => p.fst • ↑φ p.snd) (z₁, f) + (fun p => p.fst • ↑φ p.snd) (z₂, f) = (fun p => p.fst • ↑φ p.snd) (z₁ + z₂, f)\n[PROOFSTEP]\nrw [← add_smul]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : DecidableEq ι\nz : R\nf : (i : ι) → s i\ni : ι\nr : R\n⊢ (fun p => p.fst • ↑φ p.snd) (z, update f i (r • f i)) = (fun p => p.fst • ↑φ p.snd) (r * z, f)\n[PROOFSTEP]\nsimp [φ.map_smul, smul_smul, mul_comm]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nf : (i : ι) → s i\n⊢ ↑(liftAux φ) (↑(tprod R) f) = ↑φ f\n[PROOFSTEP]\nsimp only [liftAux, liftAddHom, tprod_eq_tprodCoeff_one, tprodCoeff, AddCon.coe_mk']\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nf : (i : ι) → s i\n⊢ ↑(AddCon.lift (addConGen (Eqv R fun i => s i)) (↑FreeAddMonoid.lift fun p => p.fst • ↑φ p.snd)\n (_ : addConGen (Eqv R fun i => s i) ≤ AddCon.ker (↑FreeAddMonoid.lift fun p => p.fst • ↑φ p.snd)))\n ↑(FreeAddMonoid.of (1, f)) =\n ↑φ f\n[PROOFSTEP]\nrw [FreeAddMonoid.of, FreeAddMonoid.ofList, Equiv.refl_apply, AddCon.lift_coe]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nf : (i : ι) → s i\n⊢ ↑(↑FreeAddMonoid.lift fun p => p.fst • ↑φ p.snd) [(1, f)] = ↑φ f\n[PROOFSTEP]\ndsimp [FreeAddMonoid.lift, FreeAddMonoid.sumAux]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nf : (i : ι) → s i\n⊢ (FreeAddMonoid.sumAux.match_1 (fun x => E) [1 • ↑φ f] (fun _ => 0) fun x xs =>\n List.foldl (fun x x_1 => x + x_1) x xs) =\n ↑φ f\n[PROOFSTEP]\nshow _ • _ = _\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nf : (i : ι) → s i\n⊢ 1 • ↑φ f = ↑φ f\n[PROOFSTEP]\nrw [one_smul]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nr : R\nx : ⨂[R] (i : ι), s i\n⊢ ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x\n[PROOFSTEP]\nrefine' PiTensorProduct.induction_on' x _ _\n[GOAL]\ncase refine'_1\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nr : R\nx : ⨂[R] (i : ι), s i\n⊢ ∀ {r_1 : R} {f : (i : ι) → s i}, ↑(liftAux φ) (r • tprodCoeff R r_1 f) = r • ↑(liftAux φ) (tprodCoeff R r_1 f)\n[PROOFSTEP]\nintro z f\n[GOAL]\ncase refine'_1\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nr : R\nx : ⨂[R] (i : ι), s i\nz : R\nf : (i : ι) → s i\n⊢ ↑(liftAux φ) (r • tprodCoeff R z f) = r • ↑(liftAux φ) (tprodCoeff R z f)\n[PROOFSTEP]\nrw [smul_tprodCoeff' r z f, liftAux_tprodCoeff, liftAux_tprodCoeff, smul_assoc]\n[GOAL]\ncase refine'_2\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nr : R\nx : ⨂[R] (i : ι), s i\n⊢ ∀ {x y : ⨂[R] (i : ι), s i},\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x →\n ↑(liftAux φ) (r • y) = r • ↑(liftAux φ) y → ↑(liftAux φ) (r • (x + y)) = r • ↑(liftAux φ) (x + y)\n[PROOFSTEP]\nintro z y ihz ihy\n[GOAL]\ncase refine'_2\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nr : R\nx z y : ⨂[R] (i : ι), s i\nihz : ↑(liftAux φ) (r • z) = r • ↑(liftAux φ) z\nihy : ↑(liftAux φ) (r • y) = r • ↑(liftAux φ) y\n⊢ ↑(liftAux φ) (r • (z + y)) = r • ↑(liftAux φ) (z + y)\n[PROOFSTEP]\nrw [smul_add, (liftAux φ).map_add, ihz, ihy, (liftAux φ).map_add, smul_add]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ₁ φ₂ : MultilinearMap R s E\n⊢ (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' := (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n (φ₁ + φ₂) =\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' := (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₁ +\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' := (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₂\n[PROOFSTEP]\next\n[GOAL]\ncase H.H\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ₁ φ₂ : MultilinearMap R s E\nx✝ : (i : ι) → s i\n⊢ ↑(LinearMap.compMultilinearMap\n ((fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' := (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n (φ₁ + φ₂))\n (tprod R))\n x✝ =\n ↑(LinearMap.compMultilinearMap\n ((fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' := (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₁ +\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' := (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₂)\n (tprod R))\n x✝\n[PROOFSTEP]\nsimp [liftAux_tprod]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nr : R\nφ₂ : MultilinearMap R s E\n⊢ AddHom.toFun\n {\n toFun := fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' := (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) },\n map_add' :=\n (_ :\n ∀ (φ₁ φ₂ : MultilinearMap R s E),\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' := (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n (φ₁ + φ₂) =\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₁ +\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₂) }\n (r • φ₂) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n {\n toFun := fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' := (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) },\n map_add' :=\n (_ :\n ∀ (φ₁ φ₂ : MultilinearMap R s E),\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n (φ₁ + φ₂) =\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₁ +\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₂) }\n φ₂\n[PROOFSTEP]\next\n[GOAL]\ncase H.H\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nr : R\nφ₂ : MultilinearMap R s E\nx✝ : (i : ι) → s i\n⊢ ↑(LinearMap.compMultilinearMap\n (AddHom.toFun\n {\n toFun := fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' := (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) },\n map_add' :=\n (_ :\n ∀ (φ₁ φ₂ : MultilinearMap R s E),\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n (φ₁ + φ₂) =\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₁ +\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₂) }\n (r • φ₂))\n (tprod R))\n x✝ =\n ↑(LinearMap.compMultilinearMap\n (↑(RingHom.id R) r •\n AddHom.toFun\n {\n toFun := fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' := (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) },\n map_add' :=\n (_ :\n ∀ (φ₁ φ₂ : MultilinearMap R s E),\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n (φ₁ + φ₂) =\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₁ +\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₂) }\n φ₂)\n (tprod R))\n x✝\n[PROOFSTEP]\nsimp [liftAux_tprod]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\n⊢ (fun φ' => LinearMap.compMultilinearMap φ' (tprod R))\n (AddHom.toFun\n {\n toAddHom :=\n {\n toFun := fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' := (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) },\n map_add' :=\n (_ :\n ∀ (φ₁ φ₂ : MultilinearMap R s E),\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n (φ₁ + φ₂) =\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₁ +\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₂) },\n map_smul' :=\n (_ :\n ∀ (r : R) (φ₂ : MultilinearMap R s E),\n AddHom.toFun\n {\n toFun := fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) },\n map_add' :=\n (_ :\n ∀ (φ₁ φ₂ : MultilinearMap R s E),\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n (φ₁ + φ₂) =\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₁ +\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₂) }\n (r • φ₂) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n {\n toFun := fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) },\n map_add' :=\n (_ :\n ∀ (φ₁ φ₂ : MultilinearMap R s E),\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n (φ₁ + φ₂) =\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₁ +\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₂) }\n φ₂) }.toAddHom\n φ) =\n φ\n[PROOFSTEP]\next\n[GOAL]\ncase H\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nx✝ : (i : ι) → s i\n⊢ ↑((fun φ' => LinearMap.compMultilinearMap φ' (tprod R))\n (AddHom.toFun\n {\n toAddHom :=\n {\n toFun := fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) },\n map_add' :=\n (_ :\n ∀ (φ₁ φ₂ : MultilinearMap R s E),\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n (φ₁ + φ₂) =\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₁ +\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₂) },\n map_smul' :=\n (_ :\n ∀ (r : R) (φ₂ : MultilinearMap R s E),\n AddHom.toFun\n {\n toFun := fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) },\n map_add' :=\n (_ :\n ∀ (φ₁ φ₂ : MultilinearMap R s E),\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n (φ₁ + φ₂) =\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₁ +\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₂) }\n (r • φ₂) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n {\n toFun := fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) },\n map_add' :=\n (_ :\n ∀ (φ₁ φ₂ : MultilinearMap R s E),\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n (φ₁ + φ₂) =\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₁ +\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₂) }\n φ₂) }.toAddHom\n φ))\n x✝ =\n ↑φ x✝\n[PROOFSTEP]\nsimp [liftAux_tprod, LinearMap.compMultilinearMap]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : (⨂[R] (i : ι), s i) →ₗ[R] E\n⊢ AddHom.toFun\n {\n toAddHom :=\n {\n toFun := fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' := (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) },\n map_add' :=\n (_ :\n ∀ (φ₁ φ₂ : MultilinearMap R s E),\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n (φ₁ + φ₂) =\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₁ +\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₂) },\n map_smul' :=\n (_ :\n ∀ (r : R) (φ₂ : MultilinearMap R s E),\n AddHom.toFun\n {\n toFun := fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) },\n map_add' :=\n (_ :\n ∀ (φ₁ φ₂ : MultilinearMap R s E),\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n (φ₁ + φ₂) =\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₁ +\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₂) }\n (r • φ₂) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n {\n toFun := fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) },\n map_add' :=\n (_ :\n ∀ (φ₁ φ₂ : MultilinearMap R s E),\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n (φ₁ + φ₂) =\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₁ +\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₂) }\n φ₂) }.toAddHom\n ((fun φ' => LinearMap.compMultilinearMap φ' (tprod R)) φ) =\n φ\n[PROOFSTEP]\next\n[GOAL]\ncase H.H\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : (⨂[R] (i : ι), s i) →ₗ[R] E\nx✝ : (i : ι) → s i\n⊢ ↑(LinearMap.compMultilinearMap\n (AddHom.toFun\n {\n toAddHom :=\n {\n toFun := fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) },\n map_add' :=\n (_ :\n ∀ (φ₁ φ₂ : MultilinearMap R s E),\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n (φ₁ + φ₂) =\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₁ +\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₂) },\n map_smul' :=\n (_ :\n ∀ (r : R) (φ₂ : MultilinearMap R s E),\n AddHom.toFun\n {\n toFun := fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ : ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) },\n map_add' :=\n (_ :\n ∀ (φ₁ φ₂ : MultilinearMap R s E),\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n (φ₁ + φ₂) =\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₁ +\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₂) }\n (r • φ₂) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n {\n toFun := fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i), ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) },\n map_add' :=\n (_ :\n ∀ (φ₁ φ₂ : MultilinearMap R s E),\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n (φ₁ + φ₂) =\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₁ +\n (fun φ =>\n let src := liftAux φ;\n {\n toAddHom :=\n { toFun := src.toFun,\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (i : ι), s i),\n ZeroHom.toFun (↑src) (x + y) =\n ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (i : ι), s i),\n ↑(liftAux φ) (r • x) = r • ↑(liftAux φ) x) })\n φ₂) }\n φ₂) }.toAddHom\n ((fun φ' => LinearMap.compMultilinearMap φ' (tprod R)) φ))\n (tprod R))\n x✝ =\n ↑(LinearMap.compMultilinearMap φ (tprod R)) x✝\n[PROOFSTEP]\nsimp [liftAux_tprod]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\ne : ι ≃ ι₂\n⊢ LinearMap.comp (↑lift (domDomCongr e.symm (tprod R))) (↑lift (domDomCongr e (tprod R))) = LinearMap.id\n[PROOFSTEP]\next\n[GOAL]\ncase H.H\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\ne : ι ≃ ι₂\nx✝ : ι₂ → M\n⊢ ↑(LinearMap.compMultilinearMap\n (LinearMap.comp (↑lift (domDomCongr e.symm (tprod R))) (↑lift (domDomCongr e (tprod R)))) (tprod R))\n x✝ =\n ↑(LinearMap.compMultilinearMap LinearMap.id (tprod R)) x✝\n[PROOFSTEP]\nsimp only [LinearMap.comp_apply, LinearMap.id_apply, lift_tprod, LinearMap.compMultilinearMap_apply, lift.tprod,\n domDomCongr_apply]\n[GOAL]\ncase H.H\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\ne : ι ≃ ι₂\nx✝ : ι₂ → M\n⊢ (⨂ₜ[R] (i : ι₂), x✝ (↑e (↑e.symm i))) = ↑(tprod R) x✝\n[PROOFSTEP]\ncongr\n[GOAL]\ncase H.H.h.e_6.h\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\ne : ι ≃ ι₂\nx✝ : ι₂ → M\n⊢ (fun i => x✝ (↑e (↑e.symm i))) = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase H.H.h.e_6.h.h\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\ne : ι ≃ ι₂\nx✝¹ : ι₂ → M\nx✝ : ι₂\n⊢ x✝¹ (↑e (↑e.symm x✝)) = x✝¹ x✝\n[PROOFSTEP]\nrw [e.apply_symm_apply]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\ne : ι ≃ ι₂\n⊢ LinearMap.comp (↑lift (domDomCongr e (tprod R))) (↑lift (domDomCongr e.symm (tprod R))) = LinearMap.id\n[PROOFSTEP]\next\n[GOAL]\ncase H.H\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\ne : ι ≃ ι₂\nx✝ : ι → M\n⊢ ↑(LinearMap.compMultilinearMap\n (LinearMap.comp (↑lift (domDomCongr e (tprod R))) (↑lift (domDomCongr e.symm (tprod R)))) (tprod R))\n x✝ =\n ↑(LinearMap.compMultilinearMap LinearMap.id (tprod R)) x✝\n[PROOFSTEP]\nsimp only [LinearMap.comp_apply, LinearMap.id_apply, lift_tprod, LinearMap.compMultilinearMap_apply, lift.tprod,\n domDomCongr_apply]\n[GOAL]\ncase H.H\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\ne : ι ≃ ι₂\nx✝ : ι → M\n⊢ (⨂ₜ[R] (i : ι), x✝ (↑e.symm (↑e i))) = ↑(tprod R) x✝\n[PROOFSTEP]\ncongr\n[GOAL]\ncase H.H.h.e_6.h\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\ne : ι ≃ ι₂\nx✝ : ι → M\n⊢ (fun i => x✝ (↑e.symm (↑e i))) = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase H.H.h.e_6.h.h\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\ne : ι ≃ ι₂\nx✝¹ : ι → M\nx✝ : ι\n⊢ x✝¹ (↑e.symm (↑e x✝)) = x✝¹ x✝\n[PROOFSTEP]\nrw [e.symm_apply_apply]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\ne : ι ≃ ι₂\nf : ι → M\n⊢ ↑(reindex R M e) (↑(tprod R) f) = ⨂ₜ[R] (i : ι₂), f (↑e.symm i)\n[PROOFSTEP]\ndsimp [reindex]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\ne : ι ≃ ι₂\nf : ι → M\n⊢ ↑(↑lift (domDomCongr e.symm (tprod R))) (↑(tprod R) f) = ⨂ₜ[R] (i : ι₂), f (↑e.symm i)\n[PROOFSTEP]\nexact liftAux_tprod _ f\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ✝ : MultilinearMap R s E\ne : ι ≃ ι₂\nφ : MultilinearMap R (fun x => M) E\n⊢ LinearMap.comp (↑lift φ) ↑(reindex R M e) = ↑lift (domDomCongr e.symm φ)\n[PROOFSTEP]\next\n[GOAL]\ncase H.H\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ✝ : MultilinearMap R s E\ne : ι ≃ ι₂\nφ : MultilinearMap R (fun x => M) E\nx✝ : ι → M\n⊢ ↑(LinearMap.compMultilinearMap (LinearMap.comp (↑lift φ) ↑(reindex R M e)) (tprod R)) x✝ =\n ↑(LinearMap.compMultilinearMap (↑lift (domDomCongr e.symm φ)) (tprod R)) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\ne : ι ≃ ι₂\ne' : ι₂ ≃ ι₃\n⊢ LinearEquiv.trans (reindex R M e) (reindex R M e') = reindex R M (e.trans e')\n[PROOFSTEP]\napply LinearEquiv.toLinearMap_injective\n[GOAL]\ncase a\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\ne : ι ≃ ι₂\ne' : ι₂ ≃ ι₃\n⊢ ↑(LinearEquiv.trans (reindex R M e) (reindex R M e')) = ↑(reindex R M (e.trans e'))\n[PROOFSTEP]\next f\n[GOAL]\ncase a.H.H\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\ne : ι ≃ ι₂\ne' : ι₂ ≃ ι₃\nf : ι → M\n⊢ ↑(LinearMap.compMultilinearMap (↑(LinearEquiv.trans (reindex R M e) (reindex R M e'))) (tprod R)) f =\n ↑(LinearMap.compMultilinearMap (↑(reindex R M (e.trans e'))) (tprod R)) f\n[PROOFSTEP]\nsimp only [LinearEquiv.trans_apply, LinearEquiv.coe_coe, reindex_tprod, LinearMap.coe_compMultilinearMap,\n Function.comp_apply, MultilinearMap.domDomCongr_apply, reindex_comp_tprod]\n[GOAL]\ncase a.H.H\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\ne : ι ≃ ι₂\ne' : ι₂ ≃ ι₃\nf : ι → M\n⊢ (⨂ₜ[R] (i : ι₃), f (↑e.symm (↑e'.symm i))) = ⨂ₜ[R] (i : ι₃), f (↑(e.trans e').symm i)\n[PROOFSTEP]\ncongr\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\n⊢ reindex R M (Equiv.refl ι) = LinearEquiv.refl R (⨂[R] (x : ι), M)\n[PROOFSTEP]\napply LinearEquiv.toLinearMap_injective\n[GOAL]\ncase a\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\n⊢ ↑(reindex R M (Equiv.refl ι)) = ↑(LinearEquiv.refl R (⨂[R] (x : ι), M))\n[PROOFSTEP]\next\n[GOAL]\ncase a.H.H\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nx✝ : ι → M\n⊢ ↑(LinearMap.compMultilinearMap (↑(reindex R M (Equiv.refl ι))) (tprod R)) x✝ =\n ↑(LinearMap.compMultilinearMap (↑(LinearEquiv.refl R (⨂[R] (x : ι), M))) (tprod R)) x✝\n[PROOFSTEP]\nrw [reindex_comp_tprod, LinearEquiv.refl_toLinearMap, Equiv.refl_symm]\n[GOAL]\ncase a.H.H\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nx✝ : ι → M\n⊢ ↑(domDomCongr (Equiv.refl ι) (tprod R)) x✝ = ↑(LinearMap.compMultilinearMap LinearMap.id (tprod R)) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : IsEmpty ι\nr : R\nx : ⨂[R] (x : ι), M\n⊢ AddHom.toFun\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x + ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) }\n (r • x) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x + ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) }\n x\n[PROOFSTEP]\nsimp only\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : IsEmpty ι\nr : R\nx : ⨂[R] (x : ι), M\n⊢ ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (r • x) = ↑(RingHom.id R) r • ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x\n[PROOFSTEP]\nexact LinearMap.map_smul _ r x\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : IsEmpty ι\nx : ⨂[R] (x : ι), M\n⊢ (fun r => r • ↑(tprod R) isEmptyElim)\n (AddHom.toFun\n {\n toAddHom :=\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x + ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (x : ι), M),\n AddHom.toFun\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x +\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) }\n (r • x) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x +\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) }\n x) }.toAddHom\n x) =\n x\n[PROOFSTEP]\nrefine x.induction_on ?_ ?_\n[GOAL]\ncase refine_1\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : IsEmpty ι\nx : ⨂[R] (x : ι), M\n⊢ ∀ {r : R} {f : ι → M},\n (fun r => r • ↑(tprod R) isEmptyElim)\n (AddHom.toFun\n {\n toAddHom :=\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x +\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (x : ι), M),\n AddHom.toFun\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x +\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) }\n (r • x) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x +\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) }\n x) }.toAddHom\n (r • ↑(tprod R) f)) =\n r • ↑(tprod R) f\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase refine_1\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : IsEmpty ι\nx✝ : ⨂[R] (x : ι), M\nx : R\ny : ι → M\n⊢ (fun r => r • ↑(tprod R) isEmptyElim)\n (AddHom.toFun\n {\n toAddHom :=\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x + ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (x : ι), M),\n AddHom.toFun\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x +\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) }\n (r • x) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x +\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) }\n x) }.toAddHom\n (x • ↑(tprod R) y)) =\n x • ↑(tprod R) y\n[PROOFSTEP]\nsimp only [map_smulₛₗ, RingHom.id_apply, lift.tprod, constOfIsEmpty_apply, const_apply, smul_eq_mul, mul_one]\n[GOAL]\ncase refine_1\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : IsEmpty ι\nx✝ : ⨂[R] (x : ι), M\nx : R\ny : ι → M\n⊢ x • ↑(tprod R) isEmptyElim = x • ↑(tprod R) y\n[PROOFSTEP]\ncongr\n[GOAL]\ncase refine_1.e_a.h.e_6.h\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : IsEmpty ι\nx✝ : ⨂[R] (x : ι), M\nx : R\ny : ι → M\n⊢ isEmptyElim = y\n[PROOFSTEP]\naesop\n[GOAL]\ncase refine_2\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : IsEmpty ι\nx : ⨂[R] (x : ι), M\n⊢ ∀ {x y : ⨂[R] (i : ι), M},\n (fun r => r • ↑(tprod R) isEmptyElim)\n (AddHom.toFun\n {\n toAddHom :=\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x +\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (x : ι), M),\n AddHom.toFun\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x +\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) }\n (r • x) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x +\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) }\n x) }.toAddHom\n x) =\n x →\n (fun r => r • ↑(tprod R) isEmptyElim)\n (AddHom.toFun\n {\n toAddHom :=\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x +\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (x : ι), M),\n AddHom.toFun\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x +\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) }\n (r • x) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x +\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) }\n x) }.toAddHom\n y) =\n y →\n (fun r => r • ↑(tprod R) isEmptyElim)\n (AddHom.toFun\n {\n toAddHom :=\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x +\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (x : ι), M),\n AddHom.toFun\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x +\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) }\n (r • x) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x +\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) }\n x) }.toAddHom\n (x + y)) =\n x + y\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase refine_2\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : IsEmpty ι\nx : ⨂[R] (x : ι), M\n⊢ ∀ {x y : ⨂[R] (i : ι), M},\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x • ↑(tprod R) isEmptyElim = x →\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y • ↑(tprod R) isEmptyElim = y →\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) • ↑(tprod R) isEmptyElim = x + y\n[PROOFSTEP]\nintro x y hx hy\n[GOAL]\ncase refine_2\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : IsEmpty ι\nx✝ x y : ⨂[R] (i : ι), M\nhx : ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x • ↑(tprod R) isEmptyElim = x\nhy : ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y • ↑(tprod R) isEmptyElim = y\n⊢ ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) • ↑(tprod R) isEmptyElim = x + y\n[PROOFSTEP]\nrw [map_add, add_smul, hx, hy]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : IsEmpty ι\nt : R\n⊢ AddHom.toFun\n {\n toAddHom :=\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x + ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (x : ι), M),\n AddHom.toFun\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x +\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) }\n (r • x) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := ↑(↑lift (constOfIsEmpty R (fun i => M) 1)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) x +\n ↑(↑lift (constOfIsEmpty R (fun i => M) 1)) y) }\n x) }.toAddHom\n ((fun r => r • ↑(tprod R) isEmptyElim) t) =\n t\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : Subsingleton ι\ni₀ : ι\nr : R\nx : ⨂[R] (x : ι), M\n⊢ AddHom.toFun\n { toFun := ↑(↑lift (ofSubsingleton R M i₀)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (ofSubsingleton R M i₀)) (x + y) =\n ↑(↑lift (ofSubsingleton R M i₀)) x + ↑(↑lift (ofSubsingleton R M i₀)) y) }\n (r • x) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := ↑(↑lift (ofSubsingleton R M i₀)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (ofSubsingleton R M i₀)) (x + y) =\n ↑(↑lift (ofSubsingleton R M i₀)) x + ↑(↑lift (ofSubsingleton R M i₀)) y) }\n x\n[PROOFSTEP]\nsimp only\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : Subsingleton ι\ni₀ : ι\nr : R\nx : ⨂[R] (x : ι), M\n⊢ ↑(↑lift (ofSubsingleton R M i₀)) (r • x) = ↑(RingHom.id R) r • ↑(↑lift (ofSubsingleton R M i₀)) x\n[PROOFSTEP]\nexact LinearMap.map_smul _ r x\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : Subsingleton ι\ni₀ : ι\nx : ⨂[R] (x : ι), M\n⊢ (fun m => ⨂ₜ[R] (x : ι), m)\n (AddHom.toFun\n {\n toAddHom :=\n { toFun := ↑(↑lift (ofSubsingleton R M i₀)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (ofSubsingleton R M i₀)) (x + y) =\n ↑(↑lift (ofSubsingleton R M i₀)) x + ↑(↑lift (ofSubsingleton R M i₀)) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (x : ι), M),\n AddHom.toFun\n { toFun := ↑(↑lift (ofSubsingleton R M i₀)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (ofSubsingleton R M i₀)) (x + y) =\n ↑(↑lift (ofSubsingleton R M i₀)) x + ↑(↑lift (ofSubsingleton R M i₀)) y) }\n (r • x) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := ↑(↑lift (ofSubsingleton R M i₀)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (ofSubsingleton R M i₀)) (x + y) =\n ↑(↑lift (ofSubsingleton R M i₀)) x + ↑(↑lift (ofSubsingleton R M i₀)) y) }\n x) }.toAddHom\n x) =\n x\n[PROOFSTEP]\ndsimp only\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : Subsingleton ι\ni₀ : ι\nx : ⨂[R] (x : ι), M\n⊢ (⨂ₜ[R] (x_1 : ι), ↑(↑lift (ofSubsingleton R M i₀)) x) = x\n[PROOFSTEP]\nhave : ∀ (f : ι → M) (z : M), (fun _ : ι ↦ z) = update f i₀ z :=\n by\n intro f z\n ext i\n rw [Subsingleton.elim i i₀, Function.update_same]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : Subsingleton ι\ni₀ : ι\nx : ⨂[R] (x : ι), M\n⊢ ∀ (f : ι → M) (z : M), (fun x => z) = update f i₀ z\n[PROOFSTEP]\nintro f z\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : Subsingleton ι\ni₀ : ι\nx : ⨂[R] (x : ι), M\nf : ι → M\nz : M\n⊢ (fun x => z) = update f i₀ z\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : Subsingleton ι\ni₀ : ι\nx : ⨂[R] (x : ι), M\nf : ι → M\nz : M\ni : ι\n⊢ z = update f i₀ z i\n[PROOFSTEP]\nrw [Subsingleton.elim i i₀, Function.update_same]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : Subsingleton ι\ni₀ : ι\nx : ⨂[R] (x : ι), M\nthis : ∀ (f : ι → M) (z : M), (fun x => z) = update f i₀ z\n⊢ (⨂ₜ[R] (x_1 : ι), ↑(↑lift (ofSubsingleton R M i₀)) x) = x\n[PROOFSTEP]\nrefine x.induction_on ?_ ?_\n[GOAL]\ncase refine_1\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : Subsingleton ι\ni₀ : ι\nx : ⨂[R] (x : ι), M\nthis : ∀ (f : ι → M) (z : M), (fun x => z) = update f i₀ z\n⊢ ∀ {r : R} {f : ι → M}, (⨂ₜ[R] (x : ι), ↑(↑lift (ofSubsingleton R M i₀)) (r • ↑(tprod R) f)) = r • ↑(tprod R) f\n[PROOFSTEP]\nintro r f\n[GOAL]\ncase refine_1\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : Subsingleton ι\ni₀ : ι\nx : ⨂[R] (x : ι), M\nthis : ∀ (f : ι → M) (z : M), (fun x => z) = update f i₀ z\nr : R\nf : ι → M\n⊢ (⨂ₜ[R] (x : ι), ↑(↑lift (ofSubsingleton R M i₀)) (r • ↑(tprod R) f)) = r • ↑(tprod R) f\n[PROOFSTEP]\nsimp only [LinearMap.map_smul, lift.tprod, ofSubsingleton_apply, Function.eval, this f, MultilinearMap.map_smul,\n update_eq_self]\n[GOAL]\ncase refine_2\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : Subsingleton ι\ni₀ : ι\nx : ⨂[R] (x : ι), M\nthis : ∀ (f : ι → M) (z : M), (fun x => z) = update f i₀ z\n⊢ ∀ {x y : ⨂[R] (i : ι), M},\n (⨂ₜ[R] (x_1 : ι), ↑(↑lift (ofSubsingleton R M i₀)) x) = x →\n (⨂ₜ[R] (x : ι), ↑(↑lift (ofSubsingleton R M i₀)) y) = y →\n (⨂ₜ[R] (x_1 : ι), ↑(↑lift (ofSubsingleton R M i₀)) (x + y)) = x + y\n[PROOFSTEP]\nintro x y hx hy\n[GOAL]\ncase refine_2\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : Subsingleton ι\ni₀ : ι\nx✝ : ⨂[R] (x : ι), M\nthis : ∀ (f : ι → M) (z : M), (fun x => z) = update f i₀ z\nx y : ⨂[R] (i : ι), M\nhx : (⨂ₜ[R] (x_1 : ι), ↑(↑lift (ofSubsingleton R M i₀)) x) = x\nhy : (⨂ₜ[R] (x : ι), ↑(↑lift (ofSubsingleton R M i₀)) y) = y\n⊢ (⨂ₜ[R] (x_1 : ι), ↑(↑lift (ofSubsingleton R M i₀)) (x + y)) = x + y\n[PROOFSTEP]\nrw [LinearMap.map_add, this 0 (_ + _), MultilinearMap.map_add, ← this 0 (lift _ _), hx, ← this 0 (lift _ _), hy]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁸ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁷ : (i : ι) → AddCommMonoid (s i)\ninst✝⁶ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nE : Type u_9\ninst✝³ : AddCommMonoid E\ninst✝² : Module R E\nF : Type u_10\ninst✝¹ : AddCommMonoid F\nφ : MultilinearMap R s E\ninst✝ : Subsingleton ι\ni₀ : ι\nt : M\n⊢ AddHom.toFun\n {\n toAddHom :=\n { toFun := ↑(↑lift (ofSubsingleton R M i₀)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (ofSubsingleton R M i₀)) (x + y) =\n ↑(↑lift (ofSubsingleton R M i₀)) x + ↑(↑lift (ofSubsingleton R M i₀)) y) },\n map_smul' :=\n (_ :\n ∀ (r : R) (x : ⨂[R] (x : ι), M),\n AddHom.toFun\n { toFun := ↑(↑lift (ofSubsingleton R M i₀)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (ofSubsingleton R M i₀)) (x + y) =\n ↑(↑lift (ofSubsingleton R M i₀)) x + ↑(↑lift (ofSubsingleton R M i₀)) y) }\n (r • x) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := ↑(↑lift (ofSubsingleton R M i₀)),\n map_add' :=\n (_ :\n ∀ (x y : ⨂[R] (x : ι), M),\n ↑(↑lift (ofSubsingleton R M i₀)) (x + y) =\n ↑(↑lift (ofSubsingleton R M i₀)) x + ↑(↑lift (ofSubsingleton R M i₀)) y) }\n x) }.toAddHom\n ((fun m => ⨂ₜ[R] (x : ι), m) t) =\n t\n[PROOFSTEP]\nsimp only [ofSubsingleton_apply, lift.tprod, Function.eval_apply]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\na b : ⨂[R] (x : ι), M\n⊢ (fun a => ↑lift (↑(↑lift (↑(currySumEquiv R ι (⨂[R] (i : ι ⊕ ι₂), M) M ι₂) (tprod R))) a)) (a + b) =\n (fun a => ↑lift (↑(↑lift (↑(currySumEquiv R ι (⨂[R] (i : ι ⊕ ι₂), M) M ι₂) (tprod R))) a)) a +\n (fun a => ↑lift (↑(↑lift (↑(currySumEquiv R ι (⨂[R] (i : ι ⊕ ι₂), M) M ι₂) (tprod R))) a)) b\n[PROOFSTEP]\nsimp only [LinearEquiv.map_add, LinearMap.map_add]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nr : R\na : ⨂[R] (x : ι), M\n⊢ AddHom.toFun\n { toFun := fun a => ↑lift (↑(↑lift (↑(currySumEquiv R ι (⨂[R] (i : ι ⊕ ι₂), M) M ι₂) (tprod R))) a),\n map_add' :=\n (_ :\n ∀ (a b : ⨂[R] (x : ι), M),\n ↑lift (↑(↑lift (↑(currySumEquiv R ι (⨂[R] (i : ι ⊕ ι₂), M) M ι₂) (tprod R))) (a + b)) =\n ↑lift (↑(↑lift (↑(currySumEquiv R ι (⨂[R] (i : ι ⊕ ι₂), M) M ι₂) (tprod R))) a) +\n ↑lift (↑(↑lift (↑(currySumEquiv R ι (⨂[R] (i : ι ⊕ ι₂), M) M ι₂) (tprod R))) b)) }\n (r • a) =\n ↑(RingHom.id R) r •\n AddHom.toFun\n { toFun := fun a => ↑lift (↑(↑lift (↑(currySumEquiv R ι (⨂[R] (i : ι ⊕ ι₂), M) M ι₂) (tprod R))) a),\n map_add' :=\n (_ :\n ∀ (a b : ⨂[R] (x : ι), M),\n ↑lift (↑(↑lift (↑(currySumEquiv R ι (⨂[R] (i : ι ⊕ ι₂), M) M ι₂) (tprod R))) (a + b)) =\n ↑lift (↑(↑lift (↑(currySumEquiv R ι (⨂[R] (i : ι ⊕ ι₂), M) M ι₂) (tprod R))) a) +\n ↑lift (↑(↑lift (↑(currySumEquiv R ι (⨂[R] (i : ι ⊕ ι₂), M) M ι₂) (tprod R))) b)) }\n a\n[PROOFSTEP]\nsimp only [LinearEquiv.map_smul, LinearMap.map_smul, RingHom.id_apply]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\na : ι → M\nb : ι₂ → M\n⊢ ↑PiTensorProduct.tmul ((⨂ₜ[R] (i : ι), a i) ⊗ₜ[R] ⨂ₜ[R] (i : ι₂), b i) = ⨂ₜ[R] (i : ι ⊕ ι₂), Sum.elim a b i\n[PROOFSTEP]\nerw [TensorProduct.lift.tmul, PiTensorProduct.lift.tprod, PiTensorProduct.lift.tprod]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\na : ι → M\nb : ι₂ → M\n⊢ (↑(↑(↑(currySumEquiv R ι (⨂[R] (i : ι ⊕ ι₂), M) M ι₂) (tprod R)) fun i => a i) fun i => b i) =\n ⨂ₜ[R] (i : ι ⊕ ι₂), Sum.elim a b i\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\n⊢ LinearMap.comp PiTensorProduct.tmul PiTensorProduct.tmulSymm = LinearMap.id\n[PROOFSTEP]\next x\n[GOAL]\ncase H.H\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nx : ι ⊕ ι₂ → M\n⊢ ↑(LinearMap.compMultilinearMap (LinearMap.comp PiTensorProduct.tmul PiTensorProduct.tmulSymm) (tprod R)) x =\n ↑(LinearMap.compMultilinearMap LinearMap.id (tprod R)) x\n[PROOFSTEP]\nshow tmul (tmulSymm (tprod R x)) = tprod R x\n[GOAL]\ncase H.H\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nx : ι ⊕ ι₂ → M\n⊢ ↑PiTensorProduct.tmul (↑PiTensorProduct.tmulSymm (↑(tprod R) x)) = ↑(tprod R) x\n[PROOFSTEP]\nsimp only [tmulSymm_apply, tmul_apply]\n -- Porting note (https://github.com/leanprover-community/mathlib4/issues/5026):\n -- was part of `simp only` above\n[GOAL]\ncase H.H\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nx : ι ⊕ ι₂ → M\n⊢ (⨂ₜ[R] (i : ι ⊕ ι₂), Sum.elim (fun i => x (Sum.inl i)) (fun i => x (Sum.inr i)) i) = ↑(tprod R) x\n[PROOFSTEP]\nerw [Sum.elim_comp_inl_inr]\n[GOAL]\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\n⊢ LinearMap.comp PiTensorProduct.tmulSymm PiTensorProduct.tmul = LinearMap.id\n[PROOFSTEP]\next x y\n[GOAL]\ncase H.H.H.H.H\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nx : ι → M\ny : ι₂ → M\n⊢ ↑(LinearMap.compMultilinearMap\n (↑(LinearMap.compMultilinearMap\n (LinearMap.compr₂ (TensorProduct.mk R (⨂[R] (x : ι), M) (⨂[R] (x : ι₂), M))\n (LinearMap.comp PiTensorProduct.tmulSymm PiTensorProduct.tmul))\n (tprod R))\n x)\n (tprod R))\n y =\n ↑(LinearMap.compMultilinearMap\n (↑(LinearMap.compMultilinearMap\n (LinearMap.compr₂ (TensorProduct.mk R (⨂[R] (x : ι), M) (⨂[R] (x : ι₂), M)) LinearMap.id) (tprod R))\n x)\n (tprod R))\n y\n[PROOFSTEP]\nshow tmulSymm (tmul (tprod R x ⊗ₜ[R] tprod R y)) = tprod R x ⊗ₜ[R] tprod R y\n[GOAL]\ncase H.H.H.H.H\nι : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nR : Type u_4\ninst✝⁷ : CommSemiring R\nR₁ : Type u_5\nR₂ : Type u_6\ns : ι → Type u_7\ninst✝⁶ : (i : ι) → AddCommMonoid (s i)\ninst✝⁵ : (i : ι) → Module R (s i)\nM : Type u_8\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nE : Type u_9\ninst✝² : AddCommMonoid E\ninst✝¹ : Module R E\nF : Type u_10\ninst✝ : AddCommMonoid F\nφ : MultilinearMap R s E\nx : ι → M\ny : ι₂ → M\n⊢ ↑PiTensorProduct.tmulSymm (↑PiTensorProduct.tmul (↑(tprod R) x ⊗ₜ[R] ↑(tprod R) y)) = ↑(tprod R) x ⊗ₜ[R] ↑(tprod R) y\n[PROOFSTEP]\nsimp only [tmul_apply, tmulSymm_apply, Sum.elim_inl, Sum.elim_inr]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.PiTensorProduct", "llama_tokens": 66964, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8652240721511739, "lm_q2_score": 0.6370308082623217, "lm_q1q2_score": 0.5511743900104797}} {"text": "[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\nx y z : M\nx✝¹ : y ∈ powers x\nx✝ : z ∈ powers x\nn₁ : ℕ\nh₁ : x ^ n₁ = y\nn₂ : ℕ\nh₂ : x ^ n₂ = z\n⊢ x ^ (n₁ + n₂) = y * z\n[PROOFSTEP]\nsimp only [pow_add, *]\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\n⊢ IsSubmonoid Set.univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase one_mem\nM : Type u_1\ninst✝¹ : Monoid M\ns : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\n⊢ 1 ∈ Set.univ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mul_mem\nM : Type u_1\ninst✝¹ : Monoid M\ns : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\n⊢ ∀ {a b : M}, a ∈ Set.univ → b ∈ Set.univ → a * b ∈ Set.univ\n[PROOFSTEP]\nsimp\n[GOAL]\nM : Type u_1\ninst✝² : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝¹ : AddMonoid A\nt : Set A\nN : Type u_3\ninst✝ : Monoid N\nf : M → N\nhf : IsMonoidHom f\ns : Set N\nhs : IsSubmonoid s\n⊢ f 1 ∈ s\n[PROOFSTEP]\nrw [IsMonoidHom.map_one hf]\n[GOAL]\nM : Type u_1\ninst✝² : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝¹ : AddMonoid A\nt : Set A\nN : Type u_3\ninst✝ : Monoid N\nf : M → N\nhf : IsMonoidHom f\ns : Set N\nhs : IsSubmonoid s\n⊢ 1 ∈ s\n[PROOFSTEP]\nexact hs.one_mem\n[GOAL]\nM : Type u_1\ninst✝² : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝¹ : AddMonoid A\nt : Set A\nN : Type u_3\ninst✝ : Monoid N\nf : M → N\nhf : IsMonoidHom f\ns : Set N\nhs : IsSubmonoid s\na b : M\nha : f a ∈ s\nhb : f b ∈ s\n⊢ f (a * b) ∈ s\n[PROOFSTEP]\nrw [IsMonoidHom.map_mul' hf]\n[GOAL]\nM : Type u_1\ninst✝² : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝¹ : AddMonoid A\nt : Set A\nN : Type u_3\ninst✝ : Monoid N\nf : M → N\nhf : IsMonoidHom f\ns : Set N\nhs : IsSubmonoid s\na b : M\nha : f a ∈ s\nhb : f b ∈ s\n⊢ f a * f b ∈ s\n[PROOFSTEP]\nexact hs.mul_mem ha hb\n[GOAL]\nM : Type u_1\ninst✝² : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝¹ : AddMonoid A\nt : Set A\nγ : Type u_3\ninst✝ : Monoid γ\nf : M → γ\nhf : IsMonoidHom f\ns : Set M\nhs : IsSubmonoid s\na b : γ\nx✝¹ : a ∈ f '' s\nx✝ : b ∈ f '' s\nx : M\nhx : x ∈ s ∧ f x = a\ny : M\nhy : y ∈ s ∧ f y = b\n⊢ f (x * y) = a * b\n[PROOFSTEP]\nrw [hf.map_mul, hx.2, hy.2]\n[GOAL]\nM : Type u_1\ninst✝² : Monoid M\ns : Set M\nA : Type u_2\ninst✝¹ : AddMonoid A\nt : Set A\nγ : Type u_3\ninst✝ : Monoid γ\nf : M → γ\nhf : IsMonoidHom f\n⊢ IsSubmonoid (Set.range f)\n[PROOFSTEP]\nrw [← Set.image_univ]\n[GOAL]\nM : Type u_1\ninst✝² : Monoid M\ns : Set M\nA : Type u_2\ninst✝¹ : AddMonoid A\nt : Set A\nγ : Type u_3\ninst✝ : Monoid γ\nf : M → γ\nhf : IsMonoidHom f\n⊢ IsSubmonoid (f '' Set.univ)\n[PROOFSTEP]\nexact Univ.isSubmonoid.image hf\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\na : M\nhs : IsSubmonoid s\nh : a ∈ s\n⊢ a ^ 0 ∈ s\n[PROOFSTEP]\nrw [pow_zero]\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\na : M\nhs : IsSubmonoid s\nh : a ∈ s\n⊢ 1 ∈ s\n[PROOFSTEP]\nexact hs.one_mem\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\na : M\nhs : IsSubmonoid s\nh : a ∈ s\nn : ℕ\n⊢ a ^ (n + 1) ∈ s\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\na : M\nhs : IsSubmonoid s\nh : a ∈ s\nn : ℕ\n⊢ a * a ^ n ∈ s\n[PROOFSTEP]\nexact hs.mul_mem h (IsSubmonoid.pow_mem hs h)\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\nhs : IsSubmonoid s\na : M\nl : List M\nh : ∀ (x : M), x ∈ a :: l → x ∈ s\n⊢ a ∈ s ∧ ∀ (x : M), x ∈ l → x ∈ s\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\nhs : IsSubmonoid s\na : M\nl : List M\nh : ∀ (x : M), x ∈ a :: l → x ∈ s\nthis : a * List.prod l ∈ s\n⊢ List.prod (a :: l) ∈ s\n[PROOFSTEP]\nsimpa\n[GOAL]\nM✝ : Type u_1\ninst✝² : Monoid M✝\ns✝ : Set M✝\nA : Type u_2\ninst✝¹ : AddMonoid A\nt : Set A\nM : Type u_3\ninst✝ : CommMonoid M\ns : Set M\nhs : IsSubmonoid s\nm : Multiset M\n⊢ (∀ (a : M), a ∈ m → a ∈ s) → Multiset.prod m ∈ s\n[PROOFSTEP]\nrefine' Quotient.inductionOn m fun l hl => _\n[GOAL]\nM✝ : Type u_1\ninst✝² : Monoid M✝\ns✝ : Set M✝\nA : Type u_2\ninst✝¹ : AddMonoid A\nt : Set A\nM : Type u_3\ninst✝ : CommMonoid M\ns : Set M\nhs : IsSubmonoid s\nm : Multiset M\nl : List M\nhl : ∀ (a : M), a ∈ Quotient.mk (List.isSetoid M) l → a ∈ s\n⊢ Multiset.prod (Quotient.mk (List.isSetoid M) l) ∈ s\n[PROOFSTEP]\nrw [Multiset.quot_mk_to_coe, Multiset.coe_prod]\n[GOAL]\nM✝ : Type u_1\ninst✝² : Monoid M✝\ns✝ : Set M✝\nA : Type u_2\ninst✝¹ : AddMonoid A\nt : Set A\nM : Type u_3\ninst✝ : CommMonoid M\ns : Set M\nhs : IsSubmonoid s\nm : Multiset M\nl : List M\nhl : ∀ (a : M), a ∈ Quotient.mk (List.isSetoid M) l → a ∈ s\n⊢ List.prod l ∈ s\n[PROOFSTEP]\nexact list_prod_mem hs hl\n[GOAL]\nM✝ : Type u_1\ninst✝² : Monoid M✝\ns✝ : Set M✝\nA✝ : Type u_2\ninst✝¹ : AddMonoid A✝\nt : Set A✝\nM : Type u_3\nA : Type u_4\ninst✝ : CommMonoid M\ns : Set M\nhs : IsSubmonoid s\nf : A → M\nm : Multiset A\nhm : Multiset.Nodup m\nx✝ : ∀ (b : A), b ∈ { val := m, nodup := hm } → f b ∈ s\n⊢ ∀ (a : M), a ∈ Multiset.map (fun b => f b) { val := m, nodup := hm }.val → a ∈ s\n[PROOFSTEP]\nsimpa\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt✝ : Set A\ns t : Set M\nht : IsSubmonoid t\nh : s ⊆ t\na : M\nha : a ∈ Closure s\n⊢ a ∈ t\n[PROOFSTEP]\ninduction ha\n[GOAL]\ncase basic\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt✝ : Set A\ns t : Set M\nht : IsSubmonoid t\nh : s ⊆ t\na a✝¹ : M\na✝ : a✝¹ ∈ s\n⊢ a✝¹ ∈ t\n[PROOFSTEP]\nsimp [h _, *, IsSubmonoid.one_mem, IsSubmonoid.mul_mem]\n[GOAL]\ncase one\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt✝ : Set A\ns t : Set M\nht : IsSubmonoid t\nh : s ⊆ t\na : M\n⊢ 1 ∈ t\n[PROOFSTEP]\nsimp [h _, *, IsSubmonoid.one_mem, IsSubmonoid.mul_mem]\n[GOAL]\ncase mul\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt✝ : Set A\ns t : Set M\nht : IsSubmonoid t\nh : s ⊆ t\na a✝² b✝ : M\na✝¹ : InClosure s a✝²\na✝ : InClosure s b✝\na_ih✝¹ : a✝² ∈ t\na_ih✝ : b✝ ∈ t\n⊢ a✝² * b✝ ∈ t\n[PROOFSTEP]\nsimp [h _, *, IsSubmonoid.one_mem, IsSubmonoid.mul_mem]\n[GOAL]\nM : Type u_1\ninst✝² : Monoid M\ns✝ : Set M\nA✝ : Type u_2\ninst✝¹ : AddMonoid A✝\nt : Set A✝\nA : Type u_3\ninst✝ : Monoid A\nf : M → A\nhf : IsMonoidHom f\ns : Set M\n⊢ f '' Closure s ≤ Closure (f '' s)\n[PROOFSTEP]\nrintro _ ⟨x, hx, rfl⟩\n[GOAL]\ncase intro.intro\nM : Type u_1\ninst✝² : Monoid M\ns✝ : Set M\nA✝ : Type u_2\ninst✝¹ : AddMonoid A✝\nt : Set A✝\nA : Type u_3\ninst✝ : Monoid A\nf : M → A\nhf : IsMonoidHom f\ns : Set M\nx : M\nhx : x ∈ Closure s\n⊢ f x ∈ Closure (f '' s)\n[PROOFSTEP]\ninduction' hx with z hz\n[GOAL]\ncase intro.intro.basic\nM : Type u_1\ninst✝² : Monoid M\ns✝ : Set M\nA✝ : Type u_2\ninst✝¹ : AddMonoid A✝\nt : Set A✝\nA : Type u_3\ninst✝ : Monoid A\nf : M → A\nhf : IsMonoidHom f\ns : Set M\nx z : M\nhz : z ∈ s\n⊢ f z ∈ Closure (f '' s)\n[PROOFSTEP]\nsolve_by_elim [subset_closure, Set.mem_image_of_mem]\n[GOAL]\ncase intro.intro.one\nM : Type u_1\ninst✝² : Monoid M\ns✝ : Set M\nA✝ : Type u_2\ninst✝¹ : AddMonoid A✝\nt : Set A✝\nA : Type u_3\ninst✝ : Monoid A\nf : M → A\nhf : IsMonoidHom f\ns : Set M\nx : M\n⊢ f 1 ∈ Closure (f '' s)\n[PROOFSTEP]\nrw [hf.map_one]\n[GOAL]\ncase intro.intro.one\nM : Type u_1\ninst✝² : Monoid M\ns✝ : Set M\nA✝ : Type u_2\ninst✝¹ : AddMonoid A✝\nt : Set A✝\nA : Type u_3\ninst✝ : Monoid A\nf : M → A\nhf : IsMonoidHom f\ns : Set M\nx : M\n⊢ 1 ∈ Closure (f '' s)\n[PROOFSTEP]\napply IsSubmonoid.one_mem (closure.isSubmonoid (f '' s))\n[GOAL]\ncase intro.intro.mul\nM : Type u_1\ninst✝² : Monoid M\ns✝ : Set M\nA✝ : Type u_2\ninst✝¹ : AddMonoid A✝\nt : Set A✝\nA : Type u_3\ninst✝ : Monoid A\nf : M → A\nhf : IsMonoidHom f\ns : Set M\nx a✝² b✝ : M\na✝¹ : InClosure s a✝²\na✝ : InClosure 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 [hf.map_mul]\n[GOAL]\ncase intro.intro.mul\nM : Type u_1\ninst✝² : Monoid M\ns✝ : Set M\nA✝ : Type u_2\ninst✝¹ : AddMonoid A✝\nt : Set A✝\nA : Type u_3\ninst✝ : Monoid A\nf : M → A\nhf : IsMonoidHom f\ns : Set M\nx a✝² b✝ : M\na✝¹ : InClosure s a✝²\na✝ : InClosure 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]\nsolve_by_elim [(closure.isSubmonoid _).mul_mem]\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na : M\nh : a ∈ Closure s\n⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a\n[PROOFSTEP]\ninduction h\n[GOAL]\ncase basic\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na a✝¹ : M\na✝ : a✝¹ ∈ s\n⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a✝¹\ncase one\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na : M\n⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = 1\ncase mul\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na a✝² b✝ : M\na✝¹ : InClosure s a✝²\na✝ : InClosure s b✝\na_ih✝¹ : ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a✝²\na_ih✝ : ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = b✝\n⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a✝² * b✝\n[PROOFSTEP]\ncase basic a ha => exists [a]; simp [ha]\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na✝ a : M\nha : a ∈ s\n⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a\n[PROOFSTEP]\ncase basic a ha => exists [a]; simp [ha]\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na✝ a : M\nha : a ∈ s\n⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a\n[PROOFSTEP]\nexists [a]\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na✝ a : M\nha : a ∈ s\n⊢ (∀ (x : M), x ∈ [a] → x ∈ s) ∧ List.prod [a] = a\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\ncase one\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na : M\n⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = 1\ncase mul\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na a✝² b✝ : M\na✝¹ : InClosure s a✝²\na✝ : InClosure s b✝\na_ih✝¹ : ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a✝²\na_ih✝ : ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = b✝\n⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a✝² * b✝\n[PROOFSTEP]\ncase one => exists []; simp\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na : M\n⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = 1\n[PROOFSTEP]\ncase one => exists []; simp\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na : M\n⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = 1\n[PROOFSTEP]\nexists []\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na : M\n⊢ (∀ (x : M), x ∈ [] → x ∈ s) ∧ List.prod [] = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mul\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na a✝² b✝ : M\na✝¹ : InClosure s a✝²\na✝ : InClosure s b✝\na_ih✝¹ : ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a✝²\na_ih✝ : ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = b✝\n⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a✝² * b✝\n[PROOFSTEP]\ncase mul a b _ _ ha hb =>\n rcases ha with ⟨la, ha, eqa⟩\n rcases hb with ⟨lb, hb, eqb⟩\n exists la ++ lb\n simp [eqa.symm, eqb.symm, or_imp]\n exact fun a => ⟨ha a, hb a⟩\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na✝² a b : M\na✝¹ : InClosure s a\na✝ : InClosure s b\nha : ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a\nhb : ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = b\n⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a * b\n[PROOFSTEP]\ncase mul a b _ _ ha hb =>\n rcases ha with ⟨la, ha, eqa⟩\n rcases hb with ⟨lb, hb, eqb⟩\n exists la ++ lb\n simp [eqa.symm, eqb.symm, or_imp]\n exact fun a => ⟨ha a, hb a⟩\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na✝² a b : M\na✝¹ : InClosure s a\na✝ : InClosure s b\nha : ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a\nhb : ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = b\n⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a * b\n[PROOFSTEP]\nrcases ha with ⟨la, ha, eqa⟩\n[GOAL]\ncase intro.intro\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na✝² a b : M\na✝¹ : InClosure s a\na✝ : InClosure s b\nhb : ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = b\nla : List M\nha : ∀ (x : M), x ∈ la → x ∈ s\neqa : List.prod la = a\n⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a * b\n[PROOFSTEP]\nrcases hb with ⟨lb, hb, eqb⟩\n[GOAL]\ncase intro.intro.intro.intro\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na✝² a b : M\na✝¹ : InClosure s a\na✝ : InClosure s b\nla : List M\nha : ∀ (x : M), x ∈ la → x ∈ s\neqa : List.prod la = a\nlb : List M\nhb : ∀ (x : M), x ∈ lb → x ∈ s\neqb : List.prod lb = b\n⊢ ∃ l, (∀ (x : M), x ∈ l → x ∈ s) ∧ List.prod l = a * b\n[PROOFSTEP]\nexists la ++ lb\n[GOAL]\ncase intro.intro.intro.intro\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na✝² a b : M\na✝¹ : InClosure s a\na✝ : InClosure s b\nla : List M\nha : ∀ (x : M), x ∈ la → x ∈ s\neqa : List.prod la = a\nlb : List M\nhb : ∀ (x : M), x ∈ lb → x ∈ s\neqb : List.prod lb = b\n⊢ (∀ (x : M), x ∈ la ++ lb → x ∈ s) ∧ List.prod (la ++ lb) = a * b\n[PROOFSTEP]\nsimp [eqa.symm, eqb.symm, or_imp]\n[GOAL]\ncase intro.intro.intro.intro\nM : Type u_1\ninst✝¹ : Monoid M\ns✝ : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\ns : Set M\na✝² a b : M\na✝¹ : InClosure s a\na✝ : InClosure s b\nla : List M\nha : ∀ (x : M), x ∈ la → x ∈ s\neqa : List.prod la = a\nlb : List M\nhb : ∀ (x : M), x ∈ lb → x ∈ s\neqb : List.prod lb = b\n⊢ ∀ (x : M), (x ∈ la → x ∈ s) ∧ (x ∈ lb → x ∈ s)\n[PROOFSTEP]\nexact fun a => ⟨ha a, hb a⟩\n[GOAL]\nM✝ : Type u_1\ninst✝² : Monoid M✝\ns✝ : Set M✝\nA : Type u_2\ninst✝¹ : AddMonoid A\nt✝ : Set A\nM : Type u_3\ninst✝ : CommMonoid M\ns t : Set M\nx : M\nhx : x ∈ Closure (s ∪ t)\nL : List M\nHL1✝ : ∀ (x : M), x ∈ L → x ∈ s ∪ t\nHL2 : List.prod L = x\nhd : M\ntl : List M\nih : (∀ (x : M), x ∈ tl → x ∈ s ∪ t) → ∃ y, y ∈ Closure s ∧ ∃ z, z ∈ Closure t ∧ y * z = List.prod tl\nHL1 : ∀ (x : M), x ∈ hd :: tl → x ∈ s ∪ t\ny : M\nhy : y ∈ Closure s\nz : M\nhz : z ∈ Closure t\nhyzx : y * z = List.prod tl\nhs : hd ∈ s\n⊢ hd * y * z = List.prod (hd :: tl)\n[PROOFSTEP]\nrw [mul_assoc, List.prod_cons, ← hyzx]\n[GOAL]\nM✝ : Type u_1\ninst✝² : Monoid M✝\ns✝ : Set M✝\nA : Type u_2\ninst✝¹ : AddMonoid A\nt✝ : Set A\nM : Type u_3\ninst✝ : CommMonoid M\ns t : Set M\nx : M\nhx : x ∈ Closure (s ∪ t)\nL : List M\nHL1✝ : ∀ (x : M), x ∈ L → x ∈ s ∪ t\nHL2 : List.prod L = x\nhd : M\ntl : List M\nih : (∀ (x : M), x ∈ tl → x ∈ s ∪ t) → ∃ y, y ∈ Closure s ∧ ∃ z, z ∈ Closure t ∧ y * z = List.prod tl\nHL1 : ∀ (x : M), x ∈ hd :: tl → x ∈ s ∪ t\ny : M\nhy : y ∈ Closure s\nz : M\nhz : z ∈ Closure t\nhyzx : y * z = List.prod tl\nht : hd ∈ t\n⊢ y * (z * hd) = List.prod (hd :: tl)\n[PROOFSTEP]\nrw [← mul_assoc, List.prod_cons, ← hyzx, mul_comm hd]\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\ns : Set M\nA : Type u_2\ninst✝ : AddMonoid A\nt : Set A\nS : Submonoid M\n⊢ IsSubmonoid ↑S\n[PROOFSTEP]\nrefine' ⟨S.2, S.1.2⟩\n", "meta": {"mathlib_filename": "Mathlib.Deprecated.Submonoid", "llama_tokens": 8685, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7772998611746912, "lm_q2_score": 0.7090191460821871, "lm_q1q2_score": 0.5511204838198821}} {"text": "[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedAddCommGroup Y\ninst✝³ : NormedAddCommGroup Z\ninst✝² : NormedSpace ℝ X\ninst✝¹ : NormedSpace ℝ Y\ninst✝ : NormedSpace ℝ Z\nf : X → Y\nx : X\n⊢ ConformalAt f x ↔ IsConformalMap (fderiv ℝ f x)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedAddCommGroup Y\ninst✝³ : NormedAddCommGroup Z\ninst✝² : NormedSpace ℝ X\ninst✝¹ : NormedSpace ℝ Y\ninst✝ : NormedSpace ℝ Z\nf : X → Y\nx : X\n⊢ ConformalAt f x → IsConformalMap (fderiv ℝ f x)\n[PROOFSTEP]\nrintro ⟨f', hf, hf'⟩\n[GOAL]\ncase mp.intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedAddCommGroup Y\ninst✝³ : NormedAddCommGroup Z\ninst✝² : NormedSpace ℝ X\ninst✝¹ : NormedSpace ℝ Y\ninst✝ : NormedSpace ℝ Z\nf : X → Y\nx : X\nf' : X →L[ℝ] Y\nhf : HasFDerivAt f f' x\nhf' : IsConformalMap f'\n⊢ IsConformalMap (fderiv ℝ f x)\n[PROOFSTEP]\nrwa [hf.fderiv]\n[GOAL]\ncase mpr\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedAddCommGroup Y\ninst✝³ : NormedAddCommGroup Z\ninst✝² : NormedSpace ℝ X\ninst✝¹ : NormedSpace ℝ Y\ninst✝ : NormedSpace ℝ Z\nf : X → Y\nx : X\n⊢ IsConformalMap (fderiv ℝ f x) → ConformalAt f x\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedAddCommGroup Y\ninst✝³ : NormedAddCommGroup Z\ninst✝² : NormedSpace ℝ X\ninst✝¹ : NormedSpace ℝ Y\ninst✝ : NormedSpace ℝ Z\nf : X → Y\nx : X\nH : IsConformalMap (fderiv ℝ f x)\n⊢ ConformalAt f x\n[PROOFSTEP]\nby_cases h : DifferentiableAt ℝ f x\n[GOAL]\ncase pos\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedAddCommGroup Y\ninst✝³ : NormedAddCommGroup Z\ninst✝² : NormedSpace ℝ X\ninst✝¹ : NormedSpace ℝ Y\ninst✝ : NormedSpace ℝ Z\nf : X → Y\nx : X\nH : IsConformalMap (fderiv ℝ f x)\nh : DifferentiableAt ℝ f x\n⊢ ConformalAt f x\n[PROOFSTEP]\nexact ⟨fderiv ℝ f x, h.hasFDerivAt, H⟩\n[GOAL]\ncase neg\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedAddCommGroup Y\ninst✝³ : NormedAddCommGroup Z\ninst✝² : NormedSpace ℝ X\ninst✝¹ : NormedSpace ℝ Y\ninst✝ : NormedSpace ℝ Z\nf : X → Y\nx : X\nH : IsConformalMap (fderiv ℝ f x)\nh : ¬DifferentiableAt ℝ f x\n⊢ ConformalAt f x\n[PROOFSTEP]\nnontriviality X\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedAddCommGroup Y\ninst✝³ : NormedAddCommGroup Z\ninst✝² : NormedSpace ℝ X\ninst✝¹ : NormedSpace ℝ Y\ninst✝ : NormedSpace ℝ Z\nf : X → Y\nx : X\nH : IsConformalMap (fderiv ℝ f x)\nh : ¬DifferentiableAt ℝ f x\n✝ : Nontrivial X\n⊢ ConformalAt f x\n[PROOFSTEP]\nexact absurd (fderiv_zero_of_not_differentiableAt h) H.ne_zero\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedAddCommGroup Y\ninst✝³ : NormedAddCommGroup Z\ninst✝² : NormedSpace ℝ X\ninst✝¹ : NormedSpace ℝ Y\ninst✝ : NormedSpace ℝ Z\nf : X → Y\ng : Y → Z\nx : X\nhg : ConformalAt g (f x)\nhf : ConformalAt f x\n⊢ ConformalAt (g ∘ f) x\n[PROOFSTEP]\nrcases hf with ⟨f', hf₁, cf⟩\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedAddCommGroup Y\ninst✝³ : NormedAddCommGroup Z\ninst✝² : NormedSpace ℝ X\ninst✝¹ : NormedSpace ℝ Y\ninst✝ : NormedSpace ℝ Z\nf : X → Y\ng : Y → Z\nx : X\nhg : ConformalAt g (f x)\nf' : X →L[ℝ] Y\nhf₁ : HasFDerivAt f f' x\ncf : IsConformalMap f'\n⊢ ConformalAt (g ∘ f) x\n[PROOFSTEP]\nrcases hg with ⟨g', hg₁, cg⟩\n[GOAL]\ncase intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedAddCommGroup Y\ninst✝³ : NormedAddCommGroup Z\ninst✝² : NormedSpace ℝ X\ninst✝¹ : NormedSpace ℝ Y\ninst✝ : NormedSpace ℝ Z\nf : X → Y\ng : Y → Z\nx : X\nf' : X →L[ℝ] Y\nhf₁ : HasFDerivAt f f' x\ncf : IsConformalMap f'\ng' : Y →L[ℝ] Z\nhg₁ : HasFDerivAt g g' (f x)\ncg : IsConformalMap g'\n⊢ ConformalAt (g ∘ f) x\n[PROOFSTEP]\nexact ⟨g'.comp f', hg₁.comp x hf₁, cg.comp cf⟩\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.Conformal.NormedSpace", "llama_tokens": 1994, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8031738057795402, "lm_q2_score": 0.685949467848392, "lm_q1q2_score": 0.5509366446642433}} {"text": "[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\nx y z : ℤ_[p]\nhz : Polynomial.eval x F - Polynomial.eval y F = z * (x - y)\n⊢ ‖Polynomial.eval x F - Polynomial.eval y F‖ = ‖z‖ * ‖x - y‖\n[PROOFSTEP]\nsimp [hz]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\nx y z : ℤ_[p]\nhz : Polynomial.eval x F - Polynomial.eval y F = z * (x - y)\n⊢ ‖z‖ * ‖x - y‖ ≤ 1 * ‖x - y‖\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\nx y z : ℤ_[p]\nhz : Polynomial.eval x F - Polynomial.eval y F = z * (x - y)\n⊢ ‖z‖ ≤ 1\n[PROOFSTEP]\napply PadicInt.norm_le_one\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\nx y z : ℤ_[p]\nhz : Polynomial.eval x F - Polynomial.eval y F = z * (x - y)\n⊢ 1 * ‖x - y‖ = ‖x - y‖\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nncs : CauSeq ℤ_[p] norm\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nncs_der_val :\n ∀ (n : ℕ), ‖Polynomial.eval (↑ncs n) (↑Polynomial.derivative F)‖ = ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n⊢ Tendsto (fun i => ‖Polynomial.eval (↑ncs i) (↑Polynomial.derivative F)‖) atTop\n (𝓝 ‖Polynomial.eval a (↑Polynomial.derivative F)‖)\n[PROOFSTEP]\nconvert @tendsto_const_nhds ℝ ℕ _ _ _\n[GOAL]\ncase h.e'_3.h\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nncs : CauSeq ℤ_[p] norm\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nncs_der_val :\n ∀ (n : ℕ), ‖Polynomial.eval (↑ncs n) (↑Polynomial.derivative F)‖ = ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nx✝ : ℕ\n⊢ ‖Polynomial.eval (↑ncs x✝) (↑Polynomial.derivative F)‖ = ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\nrw [ncs_der_val]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nncs : CauSeq ℤ_[p] norm\nF : Polynomial ℤ_[p]\nhnorm : Tendsto (fun i => ‖Polynomial.eval (↑ncs i) F‖) atTop (𝓝 0)\n⊢ Tendsto (fun e => ‖Polynomial.eval (↑ncs e) F - 0‖) atTop (𝓝 0)\n[PROOFSTEP]\nsimpa using hnorm\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nh : ‖Polynomial.eval a (↑Polynomial.derivative F)‖ = 0\n⊢ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 = 0\n[PROOFSTEP]\nsimp [*, sq]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ T_gen p F a = ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\n[PROOFSTEP]\nsimp [T_gen, ← PadicInt.norm_def]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ T_gen p F a < 1\n[PROOFSTEP]\nhave h := (div_lt_one (deriv_sq_norm_pos hnorm)).2 hnorm\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nh : ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 < 1\n⊢ T_gen p F a < 1\n[PROOFSTEP]\nrw [T_def]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nh : ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 < 1\n⊢ ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 < 1\n[PROOFSTEP]\nexact h\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ ‖Polynomial.eval a F‖ ≤ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 * T_gen p F a ^ 2 ^ 0\n[PROOFSTEP]\nsimp [T_def, mul_div_cancel' _ (ne_of_gt (deriv_sq_norm_pos hnorm))]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\nz : ℤ_[p]\nhz : ih_gen n z\n⊢ ‖↑(Polynomial.eval z F)‖ / ‖↑(Polynomial.eval z (↑Polynomial.derivative F))‖ =\n ‖Polynomial.eval z F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\nsimp [hz.1]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\nz : ℤ_[p]\nhz : ih_gen n z\n⊢ ‖Polynomial.eval z F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ≤\n ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 * T_gen p F a ^ 2 ^ n /\n ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\nz : ℤ_[p]\nhz : ih_gen n z\n⊢ ‖Polynomial.eval z F‖ ≤ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 * T_gen p F a ^ 2 ^ n\n[PROOFSTEP]\napply hz.2\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nhz1 : ‖z1‖ = ‖Polynomial.eval z F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nn : ℕ\nhz : ih_gen n z\n⊢ ‖z' - z‖ = ‖z1‖\n[PROOFSTEP]\nsimp only [sub_eq_add_neg, add_assoc, hz', add_add_neg_cancel'_right, norm_neg]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nhz1 : ‖z1‖ = ‖Polynomial.eval z F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nn : ℕ\nhz : ih_gen n z\n⊢ ‖Polynomial.eval z F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ≤\n ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 * T_gen p F a ^ 2 ^ n /\n ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nhz1 : ‖z1‖ = ‖Polynomial.eval z F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nn : ℕ\nhz : ih_gen n z\n⊢ ‖Polynomial.eval z F‖ ≤ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 * T_gen p F a ^ 2 ^ n\n[PROOFSTEP]\napply hz.2\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nn : ℕ\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\n⊢ { q // Polynomial.eval z' F = q * z1 ^ 2 }\n[PROOFSTEP]\nhave hdzne : F.derivative.eval z ≠ 0 := mt norm_eq_zero.2 (by rw [hz.1]; apply deriv_norm_ne_zero; assumption)\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nn : ℕ\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\n⊢ ¬‖Polynomial.eval z (↑Polynomial.derivative F)‖ = 0\n[PROOFSTEP]\nrw [hz.1]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nn : ℕ\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\n⊢ ¬‖Polynomial.eval a (↑Polynomial.derivative F)‖ = 0\n[PROOFSTEP]\napply deriv_norm_ne_zero\n[GOAL]\ncase hnorm\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nn : ℕ\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\n⊢ ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\n[PROOFSTEP]\nassumption\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nn : ℕ\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\nhdzne : Polynomial.eval z (↑Polynomial.derivative F) ≠ 0\n⊢ { q // Polynomial.eval z' F = q * z1 ^ 2 }\n[PROOFSTEP]\nhave hdzne' : (↑(F.derivative.eval z) : ℚ_[p]) ≠ 0 := fun h => hdzne (Subtype.ext_iff_val.2 h)\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nn : ℕ\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\nhdzne : Polynomial.eval z (↑Polynomial.derivative F) ≠ 0\nhdzne' : ↑(Polynomial.eval z (↑Polynomial.derivative F)) ≠ 0\n⊢ { q // Polynomial.eval z' F = q * z1 ^ 2 }\n[PROOFSTEP]\nobtain ⟨q, hq⟩ := F.binomExpansion z (-z1)\n[GOAL]\ncase mk\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nn : ℕ\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\nhdzne : Polynomial.eval z (↑Polynomial.derivative F) ≠ 0\nhdzne' : ↑(Polynomial.eval z (↑Polynomial.derivative F)) ≠ 0\nq : ℤ_[p]\nhq :\n Polynomial.eval (z + -z1) F = Polynomial.eval z F + Polynomial.eval z (↑Polynomial.derivative F) * -z1 + q * (-z1) ^ 2\n⊢ { q // Polynomial.eval z' F = q * z1 ^ 2 }\n[PROOFSTEP]\nhave : ‖(↑(F.derivative.eval z) * (↑(F.eval z) / ↑(F.derivative.eval z)) : ℚ_[p])‖ ≤ 1 :=\n by\n rw [padicNormE.mul]\n exact mul_le_one (PadicInt.norm_le_one _) (norm_nonneg _) h1\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nn : ℕ\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\nhdzne : Polynomial.eval z (↑Polynomial.derivative F) ≠ 0\nhdzne' : ↑(Polynomial.eval z (↑Polynomial.derivative F)) ≠ 0\nq : ℤ_[p]\nhq :\n Polynomial.eval (z + -z1) F = Polynomial.eval z F + Polynomial.eval z (↑Polynomial.derivative F) * -z1 + q * (-z1) ^ 2\n⊢ ‖↑(Polynomial.eval z (↑Polynomial.derivative F)) *\n (↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)))‖ ≤\n 1\n[PROOFSTEP]\nrw [padicNormE.mul]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nn : ℕ\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\nhdzne : Polynomial.eval z (↑Polynomial.derivative F) ≠ 0\nhdzne' : ↑(Polynomial.eval z (↑Polynomial.derivative F)) ≠ 0\nq : ℤ_[p]\nhq :\n Polynomial.eval (z + -z1) F = Polynomial.eval z F + Polynomial.eval z (↑Polynomial.derivative F) * -z1 + q * (-z1) ^ 2\n⊢ ‖↑(Polynomial.eval z (↑Polynomial.derivative F))‖ *\n ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤\n 1\n[PROOFSTEP]\nexact mul_le_one (PadicInt.norm_le_one _) (norm_nonneg _) h1\n[GOAL]\ncase mk\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nn : ℕ\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\nhdzne : Polynomial.eval z (↑Polynomial.derivative F) ≠ 0\nhdzne' : ↑(Polynomial.eval z (↑Polynomial.derivative F)) ≠ 0\nq : ℤ_[p]\nhq :\n Polynomial.eval (z + -z1) F = Polynomial.eval z F + Polynomial.eval z (↑Polynomial.derivative F) * -z1 + q * (-z1) ^ 2\nthis :\n ‖↑(Polynomial.eval z (↑Polynomial.derivative F)) *\n (↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)))‖ ≤\n 1\n⊢ { q // Polynomial.eval z' F = q * z1 ^ 2 }\n[PROOFSTEP]\nhave : F.derivative.eval z * -z1 = -F.eval z := by\n calc\n F.derivative.eval z * -z1 = F.derivative.eval z * -⟨↑(F.eval z) / ↑(F.derivative.eval z), h1⟩ := by rw [hzeq]\n _ = -(F.derivative.eval z * ⟨↑(F.eval z) / ↑(F.derivative.eval z), h1⟩) := (mul_neg _ _)\n _ = -⟨F.derivative.eval z * (F.eval z / (F.derivative.eval z : ℤ_[p]) : ℚ_[p]), this⟩ :=\n (Subtype.ext <| by simp only [PadicInt.coe_neg, PadicInt.coe_mul, Subtype.coe_mk])\n _ = -F.eval z := by simp only [mul_div_cancel' _ hdzne', Subtype.coe_eta]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nn : ℕ\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\nhdzne : Polynomial.eval z (↑Polynomial.derivative F) ≠ 0\nhdzne' : ↑(Polynomial.eval z (↑Polynomial.derivative F)) ≠ 0\nq : ℤ_[p]\nhq :\n Polynomial.eval (z + -z1) F = Polynomial.eval z F + Polynomial.eval z (↑Polynomial.derivative F) * -z1 + q * (-z1) ^ 2\nthis :\n ‖↑(Polynomial.eval z (↑Polynomial.derivative F)) *\n (↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)))‖ ≤\n 1\n⊢ Polynomial.eval z (↑Polynomial.derivative F) * -z1 = -Polynomial.eval z F\n[PROOFSTEP]\ncalc\n F.derivative.eval z * -z1 = F.derivative.eval z * -⟨↑(F.eval z) / ↑(F.derivative.eval z), h1⟩ := by rw [hzeq]\n _ = -(F.derivative.eval z * ⟨↑(F.eval z) / ↑(F.derivative.eval z), h1⟩) := (mul_neg _ _)\n _ = -⟨F.derivative.eval z * (F.eval z / (F.derivative.eval z : ℤ_[p]) : ℚ_[p]), this⟩ :=\n (Subtype.ext <| by simp only [PadicInt.coe_neg, PadicInt.coe_mul, Subtype.coe_mk])\n _ = -F.eval z := by simp only [mul_div_cancel' _ hdzne', Subtype.coe_eta]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nn : ℕ\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\nhdzne : Polynomial.eval z (↑Polynomial.derivative F) ≠ 0\nhdzne' : ↑(Polynomial.eval z (↑Polynomial.derivative F)) ≠ 0\nq : ℤ_[p]\nhq :\n Polynomial.eval (z + -z1) F = Polynomial.eval z F + Polynomial.eval z (↑Polynomial.derivative F) * -z1 + q * (-z1) ^ 2\nthis :\n ‖↑(Polynomial.eval z (↑Polynomial.derivative F)) *\n (↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)))‖ ≤\n 1\n⊢ Polynomial.eval z (↑Polynomial.derivative F) * -z1 =\n Polynomial.eval z (↑Polynomial.derivative F) *\n -{ val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\n[PROOFSTEP]\nrw [hzeq]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nn : ℕ\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\nhdzne : Polynomial.eval z (↑Polynomial.derivative F) ≠ 0\nhdzne' : ↑(Polynomial.eval z (↑Polynomial.derivative F)) ≠ 0\nq : ℤ_[p]\nhq :\n Polynomial.eval (z + -z1) F = Polynomial.eval z F + Polynomial.eval z (↑Polynomial.derivative F) * -z1 + q * (-z1) ^ 2\nthis :\n ‖↑(Polynomial.eval z (↑Polynomial.derivative F)) *\n (↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)))‖ ≤\n 1\n⊢ ↑(-(Polynomial.eval z (↑Polynomial.derivative F) *\n { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 })) =\n ↑(-{\n val :=\n ↑(Polynomial.eval z (↑Polynomial.derivative F)) *\n (↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))),\n property := this })\n[PROOFSTEP]\nsimp only [PadicInt.coe_neg, PadicInt.coe_mul, Subtype.coe_mk]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nn : ℕ\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\nhdzne : Polynomial.eval z (↑Polynomial.derivative F) ≠ 0\nhdzne' : ↑(Polynomial.eval z (↑Polynomial.derivative F)) ≠ 0\nq : ℤ_[p]\nhq :\n Polynomial.eval (z + -z1) F = Polynomial.eval z F + Polynomial.eval z (↑Polynomial.derivative F) * -z1 + q * (-z1) ^ 2\nthis :\n ‖↑(Polynomial.eval z (↑Polynomial.derivative F)) *\n (↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)))‖ ≤\n 1\n⊢ -{\n val :=\n ↑(Polynomial.eval z (↑Polynomial.derivative F)) *\n (↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))),\n property := this } =\n -Polynomial.eval z F\n[PROOFSTEP]\nsimp only [mul_div_cancel' _ hdzne', Subtype.coe_eta]\n[GOAL]\ncase mk\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nn : ℕ\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\nhdzne : Polynomial.eval z (↑Polynomial.derivative F) ≠ 0\nhdzne' : ↑(Polynomial.eval z (↑Polynomial.derivative F)) ≠ 0\nq : ℤ_[p]\nhq :\n Polynomial.eval (z + -z1) F = Polynomial.eval z F + Polynomial.eval z (↑Polynomial.derivative F) * -z1 + q * (-z1) ^ 2\nthis✝ :\n ‖↑(Polynomial.eval z (↑Polynomial.derivative F)) *\n (↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)))‖ ≤\n 1\nthis : Polynomial.eval z (↑Polynomial.derivative F) * -z1 = -Polynomial.eval z F\n⊢ { q // Polynomial.eval z' F = q * z1 ^ 2 }\n[PROOFSTEP]\nexact ⟨q, by simpa only [sub_eq_add_neg, this, hz', add_right_neg, neg_sq, zero_add] using hq⟩\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nhz' : z' = z - z1\nn : ℕ\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\nhdzne : Polynomial.eval z (↑Polynomial.derivative F) ≠ 0\nhdzne' : ↑(Polynomial.eval z (↑Polynomial.derivative F)) ≠ 0\nq : ℤ_[p]\nhq :\n Polynomial.eval (z + -z1) F = Polynomial.eval z F + Polynomial.eval z (↑Polynomial.derivative F) * -z1 + q * (-z1) ^ 2\nthis✝ :\n ‖↑(Polynomial.eval z (↑Polynomial.derivative F)) *\n (↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)))‖ ≤\n 1\nthis : Polynomial.eval z (↑Polynomial.derivative F) * -z1 = -Polynomial.eval z F\n⊢ Polynomial.eval z' F = q * z1 ^ 2\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg, this, hz', add_right_neg, neg_sq, zero_add] using hq\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nn : ℕ\nhz : ih_gen n z\nq : ℤ_[p]\nheq : Polynomial.eval z' F = q * z1 ^ 2\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\n⊢ ‖Polynomial.eval z' F‖ ≤ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 * T_gen p F a ^ 2 ^ (n + 1)\n[PROOFSTEP]\ncalc\n ‖F.eval z'‖ = ‖q‖ * ‖z1‖ ^ 2 := by simp [heq]\n _ ≤ 1 * ‖z1‖ ^ 2 := by gcongr; apply PadicInt.norm_le_one\n _ = ‖F.eval z‖ ^ 2 / ‖F.derivative.eval a‖ ^ 2 := by simp [hzeq, hz.1, div_pow]\n _ ≤ (‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n) ^ 2 / ‖F.derivative.eval a‖ ^ 2 :=\n by\n gcongr\n exact hz.2\n _ = (‖F.derivative.eval a‖ ^ 2) ^ 2 * (T ^ 2 ^ n) ^ 2 / ‖F.derivative.eval a‖ ^ 2 := by simp only [mul_pow]\n _ = ‖F.derivative.eval a‖ ^ 2 * (T ^ 2 ^ n) ^ 2 := (div_sq_cancel _ _)\n _ = ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ (n + 1) := by\n rw [← pow_mul, pow_succ' 2]\n -- Porting note: unsupported option eqn_compiler.zeta\n -- set_option eqn_compiler.zeta true\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nn : ℕ\nhz : ih_gen n z\nq : ℤ_[p]\nheq : Polynomial.eval z' F = q * z1 ^ 2\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\n⊢ ‖Polynomial.eval z' F‖ = ‖q‖ * ‖z1‖ ^ 2\n[PROOFSTEP]\nsimp [heq]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nn : ℕ\nhz : ih_gen n z\nq : ℤ_[p]\nheq : Polynomial.eval z' F = q * z1 ^ 2\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\n⊢ ‖q‖ * ‖z1‖ ^ 2 ≤ 1 * ‖z1‖ ^ 2\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nn : ℕ\nhz : ih_gen n z\nq : ℤ_[p]\nheq : Polynomial.eval z' F = q * z1 ^ 2\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\n⊢ ‖q‖ ≤ 1\n[PROOFSTEP]\napply PadicInt.norm_le_one\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nn : ℕ\nhz : ih_gen n z\nq : ℤ_[p]\nheq : Polynomial.eval z' F = q * z1 ^ 2\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\n⊢ 1 * ‖z1‖ ^ 2 = ‖Polynomial.eval z F‖ ^ 2 / ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\n[PROOFSTEP]\nsimp [hzeq, hz.1, div_pow]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nn : ℕ\nhz : ih_gen n z\nq : ℤ_[p]\nheq : Polynomial.eval z' F = q * z1 ^ 2\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\n⊢ ‖Polynomial.eval z F‖ ^ 2 / ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 ≤\n (‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 * T_gen p F a ^ 2 ^ n) ^ 2 /\n ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.hab\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nn : ℕ\nhz : ih_gen n z\nq : ℤ_[p]\nheq : Polynomial.eval z' F = q * z1 ^ 2\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\n⊢ ‖Polynomial.eval z F‖ ≤ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 * T_gen p F a ^ 2 ^ n\n[PROOFSTEP]\nexact hz.2\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nn : ℕ\nhz : ih_gen n z\nq : ℤ_[p]\nheq : Polynomial.eval z' F = q * z1 ^ 2\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\n⊢ (‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 * T_gen p F a ^ 2 ^ n) ^ 2 /\n ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 =\n (‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2) ^ 2 * (T_gen p F a ^ 2 ^ n) ^ 2 /\n ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\n[PROOFSTEP]\nsimp only [mul_pow]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz z' z1 : ℤ_[p]\nn : ℕ\nhz : ih_gen n z\nq : ℤ_[p]\nheq : Polynomial.eval z' F = q * z1 ^ 2\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nhzeq : z1 = { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\n⊢ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 * (T_gen p F a ^ 2 ^ n) ^ 2 =\n ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 * T_gen p F a ^ 2 ^ (n + 1)\n[PROOFSTEP]\nrw [← pow_mul, pow_succ' 2]\n -- Porting note: unsupported option eqn_compiler.zeta\n -- set_option eqn_compiler.zeta true\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\nz : ℤ_[p]\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nz1 : ℤ_[p] := { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\nz' : ℤ_[p] := z - z1\n⊢ ‖z1‖ = ‖Polynomial.eval z F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\nsimp [hz.1]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\nz : ℤ_[p]\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nz1 : ℤ_[p] := { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\nz' : ℤ_[p] := z - z1\nhdist :\n ‖Polynomial.eval z' (↑Polynomial.derivative F) - Polynomial.eval z (↑Polynomial.derivative F)‖ <\n ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n⊢ ‖Polynomial.eval z' (↑Polynomial.derivative F)‖ = ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← hz.1, ← norm_neg (F.derivative.eval z)] at hdist \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\nz : ℤ_[p]\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nz1 : ℤ_[p] := { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\nz' : ℤ_[p] := z - z1\nhdist :\n ‖Polynomial.eval z' (↑Polynomial.derivative F) + -Polynomial.eval z (↑Polynomial.derivative F)‖ <\n ‖-Polynomial.eval z (↑Polynomial.derivative F)‖\n⊢ ‖Polynomial.eval z' (↑Polynomial.derivative F)‖ = ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\nhave := PadicInt.norm_eq_of_norm_add_lt_right hdist\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\nz : ℤ_[p]\nhz : ih_gen n z\nh1 : ‖↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F))‖ ≤ 1\nz1 : ℤ_[p] := { val := ↑(Polynomial.eval z F) / ↑(Polynomial.eval z (↑Polynomial.derivative F)), property := h1 }\nz' : ℤ_[p] := z - z1\nhdist :\n ‖Polynomial.eval z' (↑Polynomial.derivative F) + -Polynomial.eval z (↑Polynomial.derivative F)‖ <\n ‖-Polynomial.eval z (↑Polynomial.derivative F)‖\nthis : ‖Polynomial.eval z' (↑Polynomial.derivative F)‖ = ‖-Polynomial.eval z (↑Polynomial.derivative F)‖\n⊢ ‖Polynomial.eval z' (↑Polynomial.derivative F)‖ = ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\nrwa [norm_neg, hz.1] at this \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\n⊢ ‖newton_seq (n + 1) - newton_seq n‖ =\n ‖Polynomial.eval (newton_seq n) F‖ / ‖Polynomial.eval (newton_seq n) (↑Polynomial.derivative F)‖\n[PROOFSTEP]\nrw [newton_seq_gen, newton_seq_gen, newton_seq_aux, ih_n]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\n⊢ ‖↑(let_fun h1 :=\n (_ :\n ‖↑(Polynomial.eval (↑(newton_seq_aux hnorm n)) F) /\n ↑(Polynomial.eval (↑(newton_seq_aux hnorm n)) (↑Polynomial.derivative F))‖ ≤\n 1);\n let z1 :=\n {\n val :=\n ↑(Polynomial.eval (↑(newton_seq_aux hnorm n)) F) /\n ↑(Polynomial.eval (↑(newton_seq_aux hnorm n)) (↑Polynomial.derivative F)),\n property := h1 };\n let z' := ↑(newton_seq_aux hnorm n) - z1;\n { val := z', property := (_ : ih_gen (n + 1) z') }) -\n ↑(newton_seq_aux hnorm n)‖ =\n ‖Polynomial.eval (↑(newton_seq_aux hnorm n)) F‖ /\n ‖Polynomial.eval (↑(newton_seq_aux hnorm n)) (↑Polynomial.derivative F)‖\n[PROOFSTEP]\nsimp [sub_eq_add_neg, add_comm]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\n⊢ ‖Polynomial.eval (newton_seq n) F‖ / ‖Polynomial.eval (newton_seq n) (↑Polynomial.derivative F)‖ =\n ‖Polynomial.eval (newton_seq n) F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\nrw [newton_seq_deriv_norm]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ T_gen p F a > 0\n[PROOFSTEP]\nrw [T_def]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 > 0\n[PROOFSTEP]\nexact div_pos (norm_pos_iff.2 hnsol) (deriv_sq_norm_pos hnorm)\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\n⊢ 2 ≤ 2 ^ (n + 1)\n[PROOFSTEP]\nhave := pow_le_pow (by norm_num : 1 ≤ 2) (Nat.le_add_left _ _ : 1 ≤ n + 1)\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\n⊢ 1 ≤ 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\nthis : 2 ^ 1 ≤ 2 ^ (n + 1)\n⊢ 2 ≤ 2 ^ (n + 1)\n[PROOFSTEP]\nsimpa using this\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\nthis : 2 ≤ 2 ^ (n + 1)\n⊢ 1 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\nthis : 2 ≤ 2 ^ (n + 1)\n⊢ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 1 =\n ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\nrw [T_gen, sq, pow_one, norm_div, ← mul_div_assoc, PadicInt.padic_norm_e_of_padicInt, PadicInt.coe_mul, padicNormE.mul]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\nthis : 2 ≤ 2 ^ (n + 1)\n⊢ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * ‖Polynomial.eval a F‖ /\n (‖↑(Polynomial.eval a (↑Polynomial.derivative F))‖ * ‖↑(Polynomial.eval a (↑Polynomial.derivative F))‖) =\n ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\napply mul_div_mul_left\n[GOAL]\ncase hc\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\nthis : 2 ≤ 2 ^ (n + 1)\n⊢ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ≠ 0\n[PROOFSTEP]\napply deriv_norm_ne_zero\n[GOAL]\ncase hc.hnorm\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\nthis : 2 ≤ 2 ^ (n + 1)\n⊢ ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\n[PROOFSTEP]\nassumption\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn : ℕ\n⊢ ‖newton_seq (n + 0) - newton_seq n‖ ≤ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n\n[PROOFSTEP]\nsimp [T_pow_nonneg, mul_nonneg]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn k : ℕ\n⊢ 2 ^ n ≤ 2 ^ (n + k)\n[PROOFSTEP]\napply pow_le_pow\n[GOAL]\ncase ha\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn k : ℕ\n⊢ 1 ≤ 2\ncase h\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn k : ℕ\n⊢ n ≤ n + k\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn k : ℕ\n⊢ n ≤ n + k\n[PROOFSTEP]\napply Nat.le_add_right\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn k : ℕ\nthis : 2 ^ n ≤ 2 ^ (n + k)\n⊢ ‖newton_seq (n + (k + 1)) - newton_seq n‖ = ‖newton_seq (n + k + 1) - newton_seq n‖\n[PROOFSTEP]\nrw [add_assoc]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn k : ℕ\nthis : 2 ^ n ≤ 2 ^ (n + k)\n⊢ ‖newton_seq (n + k + 1) - newton_seq n‖ =\n ‖newton_seq (n + k + 1) - newton_seq (n + k) + (newton_seq (n + k) - newton_seq n)‖\n[PROOFSTEP]\nrw [← sub_add_sub_cancel]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn k : ℕ\nhnk : n ≤ k\n⊢ ‖newton_seq k - newton_seq n‖ ≤ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n\n[PROOFSTEP]\nhave hex : ∃ m, k = n + m := exists_eq_add_of_le hnk\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn k : ℕ\nhnk : n ≤ k\nhex : ∃ m, k = n + m\n⊢ ‖newton_seq k - newton_seq n‖ ≤ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n\n[PROOFSTEP]\nlet ⟨_, hex'⟩ := hex\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn k : ℕ\nhnk : n ≤ k\nhex : ∃ m, k = n + m\nw✝ : ℕ\nhex' : k = n + w✝\n⊢ ‖newton_seq k - newton_seq n‖ ≤ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n\n[PROOFSTEP]\nrw [hex']\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nn k : ℕ\nhnk : n ≤ k\nhex : ∃ m, k = n + m\nw✝ : ℕ\nhex' : k = n + w✝\n⊢ ‖newton_seq (n + w✝) - newton_seq n‖ ≤ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n\n[PROOFSTEP]\napply newton_seq_dist_aux\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n_h : 0 < 1\n⊢ ‖newton_seq 1 - a‖ = ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\nsimp [sub_eq_add_neg, add_assoc, newton_seq_gen, newton_seq_aux, ih_n]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nk : ℕ\n_h : 0 < k + 2\n⊢ ‖newton_seq (k + 2) - newton_seq (k + 1)‖ < ‖newton_seq (k + 1) - a‖\n[PROOFSTEP]\nrw [newton_seq_dist_to_a (k + 1) (succ_pos _)]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nk : ℕ\n_h : 0 < k + 2\n⊢ ‖newton_seq (k + 2) - newton_seq (k + 1)‖ < ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\napply newton_seq_succ_dist_weak\n[GOAL]\ncase hnsol\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nk : ℕ\n_h : 0 < k + 2\n⊢ Polynomial.eval a F ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nk : ℕ\n_h : 0 < k + 2\nhlt : ‖newton_seq (k + 2) - newton_seq (k + 1)‖ < ‖newton_seq (k + 1) - a‖\nhne' : ‖newton_seq (k + 2) - newton_seq (k + 1)‖ ≠ ‖newton_seq (k + 1) - a‖\n⊢ ‖newton_seq (k + 2) - a‖ = ‖newton_seq (k + 2) - newton_seq (k + 1) + (newton_seq (k + 1) - a)‖\n[PROOFSTEP]\nrw [← sub_add_sub_cancel]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ Tendsto (fun n => ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n) atTop (𝓝 0)\n[PROOFSTEP]\nrw [← mul_zero ‖F.derivative.eval a‖]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ Tendsto (fun n => ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n) atTop\n (𝓝 (‖Polynomial.eval a (↑Polynomial.derivative F)‖ * 0))\n[PROOFSTEP]\nexact\n tendsto_const_nhds.mul\n (Tendsto.comp (tendsto_pow_atTop_nhds_0_of_lt_1 (norm_nonneg _) (T_lt_one hnorm))\n (Nat.tendsto_pow_atTop_atTop_of_one_lt (by norm_num)))\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ 1 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ ∀ {ε : ℝ}, ε > 0 → ∃ N, ∀ {n : ℕ}, n ≥ N → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n < ε\n[PROOFSTEP]\nhave := bound' hnorm\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nthis : Tendsto (fun n => ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n) atTop (𝓝 0)\n⊢ ∀ {ε : ℝ}, ε > 0 → ∃ N, ∀ {n : ℕ}, n ≥ N → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n < ε\n[PROOFSTEP]\nsimp [Tendsto, nhds] at this \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nthis :\n ∀ (i : Set ℝ),\n 0 ∈ i →\n IsOpen i → ∃ a_3, ∀ (b : ℕ), a_3 ≤ b → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ b ∈ i\n⊢ ∀ {ε : ℝ}, ε > 0 → ∃ N, ∀ {n : ℕ}, n ≥ N → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n < ε\n[PROOFSTEP]\nintro ε hε\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nthis :\n ∀ (i : Set ℝ),\n 0 ∈ i →\n IsOpen i → ∃ a_3, ∀ (b : ℕ), a_3 ≤ b → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ b ∈ i\nε : ℝ\nhε : ε > 0\n⊢ ∃ N, ∀ {n : ℕ}, n ≥ N → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n < ε\n[PROOFSTEP]\ncases' this (ball 0 ε) (mem_ball_self hε) isOpen_ball with N hN\n[GOAL]\ncase intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nthis :\n ∀ (i : Set ℝ),\n 0 ∈ i →\n IsOpen i → ∃ a_3, ∀ (b : ℕ), a_3 ≤ b → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ b ∈ i\nε : ℝ\nhε : ε > 0\nN : ℕ\nhN : ∀ (b : ℕ), N ≤ b → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ b ∈ ball 0 ε\n⊢ ∃ N, ∀ {n : ℕ}, n ≥ N → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n < ε\n[PROOFSTEP]\nexists N\n[GOAL]\ncase intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nthis :\n ∀ (i : Set ℝ),\n 0 ∈ i →\n IsOpen i → ∃ a_3, ∀ (b : ℕ), a_3 ≤ b → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ b ∈ i\nε : ℝ\nhε : ε > 0\nN : ℕ\nhN : ∀ (b : ℕ), N ≤ b → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ b ∈ ball 0 ε\n⊢ ∀ {n : ℕ}, n ≥ N → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n < ε\n[PROOFSTEP]\nintro n hn\n[GOAL]\ncase intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nthis :\n ∀ (i : Set ℝ),\n 0 ∈ i →\n IsOpen i → ∃ a_3, ∀ (b : ℕ), a_3 ≤ b → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ b ∈ i\nε : ℝ\nhε : ε > 0\nN : ℕ\nhN : ∀ (b : ℕ), N ≤ b → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ b ∈ ball 0 ε\nn : ℕ\nhn : n ≥ N\n⊢ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n < ε\n[PROOFSTEP]\nsimpa [abs_of_nonneg T_nonneg] using hN _ hn\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ Tendsto (fun n => ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2 * T_gen p F a ^ 2 ^ n) atTop (𝓝 0)\n[PROOFSTEP]\nrw [← mul_zero ‖F.derivative.eval a‖, sq]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ Tendsto\n (fun n =>\n ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * ‖Polynomial.eval a (↑Polynomial.derivative F)‖ *\n T_gen p F a ^ 2 ^ n)\n atTop (𝓝 (‖Polynomial.eval a (↑Polynomial.derivative F)‖ * 0))\n[PROOFSTEP]\nsimp only [mul_assoc]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ Tendsto\n (fun n =>\n ‖Polynomial.eval a (↑Polynomial.derivative F)‖ *\n (‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n))\n atTop (𝓝 (‖Polynomial.eval a (↑Polynomial.derivative F)‖ * 0))\n[PROOFSTEP]\napply Tendsto.mul\n[GOAL]\ncase hf\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ Tendsto (fun x => ‖Polynomial.eval a (↑Polynomial.derivative F)‖) atTop\n (𝓝 ‖Polynomial.eval a (↑Polynomial.derivative F)‖)\n[PROOFSTEP]\napply tendsto_const_nhds\n[GOAL]\ncase hg\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ Tendsto (fun x => ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ x) atTop (𝓝 0)\n[PROOFSTEP]\napply bound'\n[GOAL]\ncase hg.hnorm\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\n[PROOFSTEP]\nassumption\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ IsCauSeq norm newton_seq\n[PROOFSTEP]\nintro ε hε\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nε : ℝ\nhε : ε > 0\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → ‖newton_seq j - newton_seq i‖ < ε\n[PROOFSTEP]\ncases' bound hnorm hε with N hN\n[GOAL]\ncase intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nε : ℝ\nhε : ε > 0\nN : ℕ\nhN : ∀ {n : ℕ}, n ≥ N → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n < ε\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → ‖newton_seq j - newton_seq i‖ < ε\n[PROOFSTEP]\nexists N\n[GOAL]\ncase intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nε : ℝ\nhε : ε > 0\nN : ℕ\nhN : ∀ {n : ℕ}, n ≥ N → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n < ε\n⊢ ∀ (j : ℕ), j ≥ N → ‖newton_seq j - newton_seq N‖ < ε\n[PROOFSTEP]\nintro j hj\n[GOAL]\ncase intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nε : ℝ\nhε : ε > 0\nN : ℕ\nhN : ∀ {n : ℕ}, n ≥ N → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n < ε\nj : ℕ\nhj : j ≥ N\n⊢ ‖newton_seq j - newton_seq N‖ < ε\n[PROOFSTEP]\napply lt_of_le_of_lt\n[GOAL]\ncase intro.a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nε : ℝ\nhε : ε > 0\nN : ℕ\nhN : ∀ {n : ℕ}, n ≥ N → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n < ε\nj : ℕ\nhj : j ≥ N\n⊢ ‖newton_seq j - newton_seq N‖ ≤ ?intro.b\n[PROOFSTEP]\napply newton_seq_dist hnorm hj\n[GOAL]\ncase intro.a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nε : ℝ\nhε : ε > 0\nN : ℕ\nhN : ∀ {n : ℕ}, n ≥ N → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n < ε\nj : ℕ\nhj : j ≥ N\n⊢ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ N < ε\n[PROOFSTEP]\napply hN\n[GOAL]\ncase intro.a.a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nε : ℝ\nhε : ε > 0\nN : ℕ\nhN : ∀ {n : ℕ}, n ≥ N → ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n < ε\nj : ℕ\nhj : j ≥ N\n⊢ N ≥ N\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ ‖soln - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\nrw [soln_dist_to_a, div_lt_iff]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ ‖Polynomial.eval a F‖ <\n ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\nrwa [sq] at hnorm \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ 0 < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\napply deriv_norm_pos\n[GOAL]\ncase hnorm\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hnsol\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\n⊢ Polynomial.eval a F ≠ 0\n[PROOFSTEP]\nexact hnsol\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz : ℤ_[p]\nhev : Polynomial.eval z F = 0\nhnlt : ‖z - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n⊢ ‖z - soln‖ = ‖z - a + (a - soln)‖\n[PROOFSTEP]\nrw [sub_add_sub_cancel]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz : ℤ_[p]\nhev : Polynomial.eval z F = 0\nhnlt : ‖z - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nsoln_dist : ‖z - soln‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z - soln\nq : ℤ_[p]\nhq :\n Polynomial.eval (soln + h) F =\n Polynomial.eval soln F + Polynomial.eval soln (↑Polynomial.derivative F) * h + q * h ^ 2\n⊢ 0 = Polynomial.eval (soln + h) F\n[PROOFSTEP]\nsimp [hev]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz : ℤ_[p]\nhev : Polynomial.eval z F = 0\nhnlt : ‖z - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nsoln_dist : ‖z - soln‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z - soln\nq : ℤ_[p]\nhq :\n Polynomial.eval (soln + h) F =\n Polynomial.eval soln F + Polynomial.eval soln (↑Polynomial.derivative F) * h + q * h ^ 2\n⊢ Polynomial.eval (soln + h) F = Polynomial.eval soln (↑Polynomial.derivative F) * h + q * h ^ 2\n[PROOFSTEP]\nrw [hq, eval_soln, zero_add]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz : ℤ_[p]\nhev : Polynomial.eval z F = 0\nhnlt : ‖z - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nsoln_dist : ‖z - soln‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z - soln\nq : ℤ_[p]\nhq :\n Polynomial.eval (soln + h) F =\n Polynomial.eval soln F + Polynomial.eval soln (↑Polynomial.derivative F) * h + q * h ^ 2\n⊢ Polynomial.eval soln (↑Polynomial.derivative F) * h + q * h ^ 2 =\n (Polynomial.eval soln (↑Polynomial.derivative F) + q * h) * h\n[PROOFSTEP]\nrw [sq, right_distrib, mul_assoc]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz : ℤ_[p]\nhev : Polynomial.eval z F = 0\nhnlt : ‖z - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nsoln_dist : ‖z - soln‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z - soln\nq : ℤ_[p]\nhq :\n Polynomial.eval (soln + h) F =\n Polynomial.eval soln F + Polynomial.eval soln (↑Polynomial.derivative F) * h + q * h ^ 2\nthis✝ : (Polynomial.eval soln (↑Polynomial.derivative F) + q * h) * h = 0\nhne : ¬h = 0\nthis : Polynomial.eval soln (↑Polynomial.derivative F) + q * h = 0\n⊢ Polynomial.eval soln (↑Polynomial.derivative F) = -q * h\n[PROOFSTEP]\nsimpa using eq_neg_of_add_eq_zero_left this\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz : ℤ_[p]\nhev : Polynomial.eval z F = 0\nhnlt : ‖z - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nsoln_dist : ‖z - soln‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z - soln\nq : ℤ_[p]\nhq :\n Polynomial.eval (soln + h) F =\n Polynomial.eval soln F + Polynomial.eval soln (↑Polynomial.derivative F) * h + q * h ^ 2\nthis✝¹ : (Polynomial.eval soln (↑Polynomial.derivative F) + q * h) * h = 0\nhne : ¬h = 0\nthis✝ : Polynomial.eval soln (↑Polynomial.derivative F) + q * h = 0\nthis : Polynomial.eval soln (↑Polynomial.derivative F) = -q * h\n⊢ ‖Polynomial.eval soln (↑Polynomial.derivative F)‖ = ‖-q * h‖\n[PROOFSTEP]\nrw [this]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz : ℤ_[p]\nhev : Polynomial.eval z F = 0\nhnlt : ‖z - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nsoln_dist : ‖z - soln‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z - soln\nq : ℤ_[p]\nhq :\n Polynomial.eval (soln + h) F =\n Polynomial.eval soln F + Polynomial.eval soln (↑Polynomial.derivative F) * h + q * h ^ 2\nthis✝¹ : (Polynomial.eval soln (↑Polynomial.derivative F) + q * h) * h = 0\nhne : ¬h = 0\nthis✝ : Polynomial.eval soln (↑Polynomial.derivative F) + q * h = 0\nthis : Polynomial.eval soln (↑Polynomial.derivative F) = -q * h\n⊢ ‖-q * h‖ ≤ 1 * ‖h‖\n[PROOFSTEP]\nrw [PadicInt.norm_mul]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz : ℤ_[p]\nhev : Polynomial.eval z F = 0\nhnlt : ‖z - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nsoln_dist : ‖z - soln‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z - soln\nq : ℤ_[p]\nhq :\n Polynomial.eval (soln + h) F =\n Polynomial.eval soln F + Polynomial.eval soln (↑Polynomial.derivative F) * h + q * h ^ 2\nthis✝¹ : (Polynomial.eval soln (↑Polynomial.derivative F) + q * h) * h = 0\nhne : ¬h = 0\nthis✝ : Polynomial.eval soln (↑Polynomial.derivative F) + q * h = 0\nthis : Polynomial.eval soln (↑Polynomial.derivative F) = -q * h\n⊢ ‖-q‖ * ‖h‖ ≤ 1 * ‖h‖\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_right (PadicInt.norm_le_one _) (norm_nonneg _)\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz : ℤ_[p]\nhev : Polynomial.eval z F = 0\nhnlt : ‖z - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nsoln_dist : ‖z - soln‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z - soln\nq : ℤ_[p]\nhq :\n Polynomial.eval (soln + h) F =\n Polynomial.eval soln F + Polynomial.eval soln (↑Polynomial.derivative F) * h + q * h ^ 2\nthis✝¹ : (Polynomial.eval soln (↑Polynomial.derivative F) + q * h) * h = 0\nhne : ¬h = 0\nthis✝ : Polynomial.eval soln (↑Polynomial.derivative F) + q * h = 0\nthis : Polynomial.eval soln (↑Polynomial.derivative F) = -q * h\n⊢ 1 * ‖h‖ = ‖z - soln‖\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz : ℤ_[p]\nhev : Polynomial.eval z F = 0\nhnlt : ‖z - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nsoln_dist : ‖z - soln‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z - soln\nq : ℤ_[p]\nhq :\n Polynomial.eval (soln + h) F =\n Polynomial.eval soln F + Polynomial.eval soln (↑Polynomial.derivative F) * h + q * h ^ 2\nthis✝¹ : (Polynomial.eval soln (↑Polynomial.derivative F) + q * h) * h = 0\nhne : ¬h = 0\nthis✝ : Polynomial.eval soln (↑Polynomial.derivative F) + q * h = 0\nthis : Polynomial.eval soln (↑Polynomial.derivative F) = -q * h\n⊢ ‖z - soln‖ < ‖Polynomial.eval soln (↑Polynomial.derivative F)‖\n[PROOFSTEP]\nrw [soln_deriv_norm]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz : ℤ_[p]\nhev : Polynomial.eval z F = 0\nhnlt : ‖z - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nsoln_dist : ‖z - soln‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z - soln\nq : ℤ_[p]\nhq :\n Polynomial.eval (soln + h) F =\n Polynomial.eval soln F + Polynomial.eval soln (↑Polynomial.derivative F) * h + q * h ^ 2\nthis✝¹ : (Polynomial.eval soln (↑Polynomial.derivative F) + q * h) * h = 0\nhne : ¬h = 0\nthis✝ : Polynomial.eval soln (↑Polynomial.derivative F) + q * h = 0\nthis : Polynomial.eval soln (↑Polynomial.derivative F) = -q * h\n⊢ ‖z - soln‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\napply soln_dist\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nhnsol : Polynomial.eval a F ≠ 0\nz : ℤ_[p]\nhev : Polynomial.eval z F = 0\nhnlt : ‖z - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nsoln_dist : ‖z - soln‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z - soln\nq : ℤ_[p]\nhq :\n Polynomial.eval (soln + h) F =\n Polynomial.eval soln F + Polynomial.eval soln (↑Polynomial.derivative F) * h + q * h ^ 2\nthis✝ : (Polynomial.eval soln (↑Polynomial.derivative F) + q * h) * h = 0\nthis : h = 0\n⊢ z - soln = 0\n[PROOFSTEP]\nrw [← this]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nha : Polynomial.eval a F = 0\nz' : ℤ_[p]\nhz' : Polynomial.eval z' F = 0\nhnormz' : ‖z' - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z' - a\nq : ℤ_[p]\nhq : Polynomial.eval (a + h) F = Polynomial.eval a F + Polynomial.eval a (↑Polynomial.derivative F) * h + q * h ^ 2\n⊢ 0 = Polynomial.eval (a + (z' - a)) F\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nha : Polynomial.eval a F = 0\nz' : ℤ_[p]\nhz' : Polynomial.eval z' F = 0\nhnormz' : ‖z' - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z' - a\nq : ℤ_[p]\nhq : Polynomial.eval (a + h) F = Polynomial.eval a F + Polynomial.eval a (↑Polynomial.derivative F) * h + q * h ^ 2\n⊢ 0 = Polynomial.eval (z' - a + a) F\n[PROOFSTEP]\nsimp [hz']\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nha : Polynomial.eval a F = 0\nz' : ℤ_[p]\nhz' : Polynomial.eval z' F = 0\nhnormz' : ‖z' - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z' - a\nq : ℤ_[p]\nhq : Polynomial.eval (a + h) F = Polynomial.eval a F + Polynomial.eval a (↑Polynomial.derivative F) * h + q * h ^ 2\n⊢ Polynomial.eval (a + h) F = Polynomial.eval a (↑Polynomial.derivative F) * h + q * h ^ 2\n[PROOFSTEP]\nrw [hq, ha, zero_add]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nha : Polynomial.eval a F = 0\nz' : ℤ_[p]\nhz' : Polynomial.eval z' F = 0\nhnormz' : ‖z' - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z' - a\nq : ℤ_[p]\nhq : Polynomial.eval (a + h) F = Polynomial.eval a F + Polynomial.eval a (↑Polynomial.derivative F) * h + q * h ^ 2\n⊢ Polynomial.eval a (↑Polynomial.derivative F) * h + q * h ^ 2 =\n (Polynomial.eval a (↑Polynomial.derivative F) + q * h) * h\n[PROOFSTEP]\nrw [sq, right_distrib, mul_assoc]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nha : Polynomial.eval a F = 0\nz' : ℤ_[p]\nhz' : Polynomial.eval z' F = 0\nhnormz' : ‖z' - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z' - a\nq : ℤ_[p]\nhq : Polynomial.eval (a + h) F = Polynomial.eval a F + Polynomial.eval a (↑Polynomial.derivative F) * h + q * h ^ 2\nthis✝ : (Polynomial.eval a (↑Polynomial.derivative F) + q * h) * h = 0\nhne : ¬h = 0\nthis : Polynomial.eval a (↑Polynomial.derivative F) + q * h = 0\n⊢ Polynomial.eval a (↑Polynomial.derivative F) = -q * h\n[PROOFSTEP]\nsimpa using eq_neg_of_add_eq_zero_left this\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nha : Polynomial.eval a F = 0\nz' : ℤ_[p]\nhz' : Polynomial.eval z' F = 0\nhnormz' : ‖z' - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z' - a\nq : ℤ_[p]\nhq : Polynomial.eval (a + h) F = Polynomial.eval a F + Polynomial.eval a (↑Polynomial.derivative F) * h + q * h ^ 2\nthis✝¹ : (Polynomial.eval a (↑Polynomial.derivative F) + q * h) * h = 0\nhne : ¬h = 0\nthis✝ : Polynomial.eval a (↑Polynomial.derivative F) + q * h = 0\nthis : Polynomial.eval a (↑Polynomial.derivative F) = -q * h\n⊢ ‖Polynomial.eval a (↑Polynomial.derivative F)‖ = ‖q‖ * ‖h‖\n[PROOFSTEP]\nsimp [this]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nha : Polynomial.eval a F = 0\nz' : ℤ_[p]\nhz' : Polynomial.eval z' F = 0\nhnormz' : ‖z' - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z' - a\nq : ℤ_[p]\nhq : Polynomial.eval (a + h) F = Polynomial.eval a F + Polynomial.eval a (↑Polynomial.derivative F) * h + q * h ^ 2\nthis✝¹ : (Polynomial.eval a (↑Polynomial.derivative F) + q * h) * h = 0\nhne : ¬h = 0\nthis✝ : Polynomial.eval a (↑Polynomial.derivative F) + q * h = 0\nthis : Polynomial.eval a (↑Polynomial.derivative F) = -q * h\n⊢ ‖q‖ * ‖h‖ ≤ 1 * ‖h‖\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nha : Polynomial.eval a F = 0\nz' : ℤ_[p]\nhz' : Polynomial.eval z' F = 0\nhnormz' : ‖z' - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z' - a\nq : ℤ_[p]\nhq : Polynomial.eval (a + h) F = Polynomial.eval a F + Polynomial.eval a (↑Polynomial.derivative F) * h + q * h ^ 2\nthis✝¹ : (Polynomial.eval a (↑Polynomial.derivative F) + q * h) * h = 0\nhne : ¬h = 0\nthis✝ : Polynomial.eval a (↑Polynomial.derivative F) + q * h = 0\nthis : Polynomial.eval a (↑Polynomial.derivative F) = -q * h\n⊢ ‖q‖ ≤ 1\n[PROOFSTEP]\napply PadicInt.norm_le_one\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nha : Polynomial.eval a F = 0\nz' : ℤ_[p]\nhz' : Polynomial.eval z' F = 0\nhnormz' : ‖z' - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z' - a\nq : ℤ_[p]\nhq : Polynomial.eval (a + h) F = Polynomial.eval a F + Polynomial.eval a (↑Polynomial.derivative F) * h + q * h ^ 2\nthis✝¹ : (Polynomial.eval a (↑Polynomial.derivative F) + q * h) * h = 0\nhne : ¬h = 0\nthis✝ : Polynomial.eval a (↑Polynomial.derivative F) + q * h = 0\nthis : Polynomial.eval a (↑Polynomial.derivative F) = -q * h\n⊢ 1 * ‖h‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\nsimpa\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nha : Polynomial.eval a F = 0\nz' : ℤ_[p]\nhz' : Polynomial.eval z' F = 0\nhnormz' : ‖z' - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\nh : ℤ_[p] := z' - a\nq : ℤ_[p]\nhq : Polynomial.eval (a + h) F = Polynomial.eval a F + Polynomial.eval a (↑Polynomial.derivative F) * h + q * h ^ 2\nthis✝ : (Polynomial.eval a (↑Polynomial.derivative F) + q * h) * h = 0\nthis : h = 0\n⊢ z' - a = 0\n[PROOFSTEP]\nrw [← this]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nha : Polynomial.eval a F = 0\n⊢ ‖a - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖\n[PROOFSTEP]\nsimp [deriv_ne_zero hnorm]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nF : Polynomial ℤ_[p]\na : ℤ_[p]\nhnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2\nha : ¬Polynomial.eval a F = 0\n⊢ ∃ z,\n Polynomial.eval z F = 0 ∧\n ‖z - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ∧\n ‖Polynomial.eval z (↑Polynomial.derivative F)‖ = ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ∧\n ∀ (z' : ℤ_[p]), Polynomial.eval z' F = 0 → ‖z' - a‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ → z' = z\n[PROOFSTEP]\nexact\n ⟨soln_gen hnorm, eval_soln hnorm, soln_dist_to_a_lt_deriv hnorm ha, soln_deriv_norm hnorm, fun z =>\n soln_unique hnorm ha z⟩\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.Padics.Hensel", "llama_tokens": 33000, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8688267864276108, "lm_q2_score": 0.6334102636778401, "lm_q1q2_score": 0.5503238038814835}} {"text": "[GOAL]\nn : ℕ\n⊢ hermite (n + 1) = X * hermite n - ↑derivative (hermite n)\n[PROOFSTEP]\nrw [hermite]\n[GOAL]\nn : ℕ\n⊢ hermite n = (fun p => X * p - ↑derivative p)^[n] 1\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\n⊢ hermite Nat.zero = (fun p => X * p - ↑derivative p)^[Nat.zero] 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nn : ℕ\nih : hermite n = (fun p => X * p - ↑derivative p)^[n] 1\n⊢ hermite (Nat.succ n) = (fun p => X * p - ↑derivative p)^[Nat.succ n] 1\n[PROOFSTEP]\nrw [Function.iterate_succ_apply', ← ih, hermite_succ]\n[GOAL]\n⊢ hermite 1 = X\n[PROOFSTEP]\nrw [hermite_succ, hermite_zero]\n[GOAL]\n⊢ X * ↑C 1 - ↑derivative (↑C 1) = X\n[PROOFSTEP]\nsimp only [map_one, mul_one, derivative_one, sub_zero]\n[GOAL]\nn : ℕ\n⊢ coeff (hermite (n + 1)) 0 = -coeff (hermite n) 1\n[PROOFSTEP]\nsimp [coeff_derivative]\n[GOAL]\nn k : ℕ\n⊢ coeff (hermite (n + 1)) (k + 1) = coeff (hermite n) k - (↑k + 2) * coeff (hermite n) (k + 2)\n[PROOFSTEP]\nrw [hermite_succ, coeff_sub, coeff_X_mul, coeff_derivative, mul_comm]\n[GOAL]\nn k : ℕ\n⊢ coeff (hermite n) k - (↑(k + 1) + 1) * coeff (hermite n) (k + 1 + 1) =\n coeff (hermite n) k - (↑k + 2) * coeff (hermite n) (k + 2)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nn k : ℕ\nhnk : n < k\n⊢ coeff (hermite n) k = 0\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_lt hnk\n[GOAL]\ncase intro\nn k : ℕ\nhnk : n < n + k + 1\n⊢ coeff (hermite n) (n + k + 1) = 0\n[PROOFSTEP]\nclear hnk\n[GOAL]\ncase intro\nn k : ℕ\n⊢ coeff (hermite n) (n + k + 1) = 0\n[PROOFSTEP]\ninduction' n with n ih generalizing k\n[GOAL]\ncase intro.zero\nk✝ k : ℕ\n⊢ coeff (hermite Nat.zero) (Nat.zero + k + 1) = 0\n[PROOFSTEP]\napply coeff_C\n[GOAL]\ncase intro.succ\nk✝ n : ℕ\nih : ∀ (k : ℕ), coeff (hermite n) (n + k + 1) = 0\nk : ℕ\n⊢ coeff (hermite (Nat.succ n)) (Nat.succ n + k + 1) = 0\n[PROOFSTEP]\nhave : n + k + 1 + 2 = n + (k + 2) + 1 := by ring\n[GOAL]\nk✝ n : ℕ\nih : ∀ (k : ℕ), coeff (hermite n) (n + k + 1) = 0\nk : ℕ\n⊢ n + k + 1 + 2 = n + (k + 2) + 1\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.succ\nk✝ n : ℕ\nih : ∀ (k : ℕ), coeff (hermite n) (n + k + 1) = 0\nk : ℕ\nthis : n + k + 1 + 2 = n + (k + 2) + 1\n⊢ coeff (hermite (Nat.succ n)) (Nat.succ n + k + 1) = 0\n[PROOFSTEP]\nrw [Nat.succ_eq_add_one, coeff_hermite_succ_succ, add_right_comm, this, ih k, ih (k + 2), mul_zero, sub_zero]\n[GOAL]\nn : ℕ\n⊢ coeff (hermite n) n = 1\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\n⊢ coeff (hermite Nat.zero) Nat.zero = 1\n[PROOFSTEP]\napply coeff_C\n[GOAL]\ncase succ\nn : ℕ\nih : coeff (hermite n) n = 1\n⊢ coeff (hermite (Nat.succ n)) (Nat.succ n) = 1\n[PROOFSTEP]\nrw [coeff_hermite_succ_succ, ih, coeff_hermite_of_lt, mul_zero, sub_zero]\n[GOAL]\ncase succ\nn : ℕ\nih : coeff (hermite n) n = 1\n⊢ n < n + 2\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ degree (hermite n) = ↑n\n[PROOFSTEP]\nrw [degree_eq_of_le_of_coeff_ne_zero]\n[GOAL]\ncase pn\nn : ℕ\n⊢ degree (hermite n) ≤ ↑n\ncase p1 n : ℕ ⊢ coeff (hermite n) n ≠ 0\n[PROOFSTEP]\nsimp_rw [degree_le_iff_coeff_zero, Nat.cast_lt]\n[GOAL]\ncase pn\nn : ℕ\n⊢ ∀ (m : ℕ), n < m → coeff (hermite n) m = 0\n[PROOFSTEP]\nrintro m hnm\n[GOAL]\ncase pn\nn m : ℕ\nhnm : n < m\n⊢ coeff (hermite n) m = 0\n[PROOFSTEP]\nexact coeff_hermite_of_lt hnm\n[GOAL]\ncase p1\nn : ℕ\n⊢ coeff (hermite n) n ≠ 0\n[PROOFSTEP]\nsimp [coeff_hermite_self n]\n[GOAL]\nn : ℕ\n⊢ leadingCoeff (hermite n) = 1\n[PROOFSTEP]\nrw [← coeff_natDegree, natDegree_hermite, coeff_hermite_self]\n[GOAL]\nn k : ℕ\nhnk : Odd (n + k)\n⊢ coeff (hermite n) k = 0\n[PROOFSTEP]\ninduction' n with n ih generalizing k\n[GOAL]\ncase zero\nn k✝ : ℕ\nhnk✝ : Odd (n + k✝)\nk : ℕ\nhnk : Odd (Nat.zero + k)\n⊢ coeff (hermite Nat.zero) k = 0\n[PROOFSTEP]\nrw [Nat.zero_eq, zero_add k] at hnk \n[GOAL]\ncase zero\nn k✝ : ℕ\nhnk✝ : Odd (n + k✝)\nk : ℕ\nhnk : Odd k\n⊢ coeff (hermite Nat.zero) k = 0\n[PROOFSTEP]\nexact coeff_hermite_of_lt hnk.pos\n[GOAL]\ncase succ\nn✝ k✝ : ℕ\nhnk✝ : Odd (n✝ + k✝)\nn : ℕ\nih : ∀ {k : ℕ}, Odd (n + k) → coeff (hermite n) k = 0\nk : ℕ\nhnk : Odd (Nat.succ n + k)\n⊢ coeff (hermite (Nat.succ n)) k = 0\n[PROOFSTEP]\ncases' k with k\n[GOAL]\ncase succ.zero\nn✝ k : ℕ\nhnk✝ : Odd (n✝ + k)\nn : ℕ\nih : ∀ {k : ℕ}, Odd (n + k) → coeff (hermite n) k = 0\nhnk : Odd (Nat.succ n + Nat.zero)\n⊢ coeff (hermite (Nat.succ n)) Nat.zero = 0\n[PROOFSTEP]\nrw [Nat.succ_add_eq_succ_add] at hnk \n[GOAL]\ncase succ.zero\nn✝ k : ℕ\nhnk✝ : Odd (n✝ + k)\nn : ℕ\nih : ∀ {k : ℕ}, Odd (n + k) → coeff (hermite n) k = 0\nhnk : Odd (n + Nat.succ Nat.zero)\n⊢ coeff (hermite (Nat.succ n)) Nat.zero = 0\n[PROOFSTEP]\nrw [coeff_hermite_succ_zero, ih hnk, neg_zero]\n[GOAL]\ncase succ.succ\nn✝ k✝ : ℕ\nhnk✝ : Odd (n✝ + k✝)\nn : ℕ\nih : ∀ {k : ℕ}, Odd (n + k) → coeff (hermite n) k = 0\nk : ℕ\nhnk : Odd (Nat.succ n + Nat.succ k)\n⊢ coeff (hermite (Nat.succ n)) (Nat.succ k) = 0\n[PROOFSTEP]\nrw [coeff_hermite_succ_succ, ih, ih, mul_zero, sub_zero]\n[GOAL]\ncase succ.succ\nn✝ k✝ : ℕ\nhnk✝ : Odd (n✝ + k✝)\nn : ℕ\nih : ∀ {k : ℕ}, Odd (n + k) → coeff (hermite n) k = 0\nk : ℕ\nhnk : Odd (Nat.succ n + Nat.succ k)\n⊢ Odd (n + (k + 2))\n[PROOFSTEP]\nrwa [Nat.succ_add_eq_succ_add] at hnk \n[GOAL]\ncase succ.succ\nn✝ k✝ : ℕ\nhnk✝ : Odd (n✝ + k✝)\nn : ℕ\nih : ∀ {k : ℕ}, Odd (n + k) → coeff (hermite n) k = 0\nk : ℕ\nhnk : Odd (Nat.succ n + Nat.succ k)\n⊢ Odd (n + k)\n[PROOFSTEP]\nrw [(by rw [Nat.succ_add, Nat.add_succ] : n.succ + k.succ = n + k + 2)] at hnk \n[GOAL]\nn✝ k✝ : ℕ\nhnk✝ : Odd (n✝ + k✝)\nn : ℕ\nih : ∀ {k : ℕ}, Odd (n + k) → coeff (hermite n) k = 0\nk : ℕ\nhnk : Odd (Nat.succ n + Nat.succ k)\n⊢ Nat.succ n + Nat.succ k = n + k + 2\n[PROOFSTEP]\nrw [Nat.succ_add, Nat.add_succ]\n[GOAL]\ncase succ.succ\nn✝ k✝ : ℕ\nhnk✝ : Odd (n✝ + k✝)\nn : ℕ\nih : ∀ {k : ℕ}, Odd (n + k) → coeff (hermite n) k = 0\nk : ℕ\nhnk : Odd (n + k + 2)\n⊢ Odd (n + k)\n[PROOFSTEP]\nexact (Nat.odd_add.mp hnk).mpr even_two\n[GOAL]\nx✝ : ℕ\n⊢ coeff (hermite (2 * 0 + x✝)) x✝ = (-1) ^ 0 * ↑(2 * 0 - 1)‼ * ↑(Nat.choose (2 * 0 + x✝) x✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ coeff (hermite (2 * (n + 1) + 0)) 0 = (-1) ^ (n + 1) * ↑(2 * (n + 1) - 1)‼ * ↑(Nat.choose (2 * (n + 1) + 0) 0)\n[PROOFSTEP]\nconvert coeff_hermite_succ_zero (2 * n + 1) using 1\n -- porting note: ring_nf did not solve the goal on line 165\n[GOAL]\ncase h.e'_3\nn : ℕ\n⊢ (-1) ^ (n + 1) * ↑(2 * (n + 1) - 1)‼ * ↑(Nat.choose (2 * (n + 1) + 0) 0) = -coeff (hermite (2 * n + 1)) 1\n[PROOFSTEP]\nrw [coeff_hermite_explicit n 1, (by rw [Nat.left_distrib, mul_one, Nat.succ_sub_one] : 2 * (n + 1) - 1 = 2 * n + 1),\n Nat.doubleFactorial_add_one, Nat.choose_zero_right, Nat.choose_one_right, pow_succ]\n[GOAL]\nn : ℕ\n⊢ 2 * (n + 1) - 1 = 2 * n + 1\n[PROOFSTEP]\nrw [Nat.left_distrib, mul_one, Nat.succ_sub_one]\n[GOAL]\ncase h.e'_3\nn : ℕ\n⊢ -1 * (-1) ^ n * ↑((2 * n + 1) * (2 * n - 1)‼) * ↑1 = -((-1) ^ n * ↑(2 * n - 1)‼ * ↑(2 * n + 1))\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_3\nn : ℕ\n⊢ -1 * (-1) ^ n * ((2 * ↑n + 1) * ↑(2 * n - 1)‼) * 1 = -((-1) ^ n * ↑(2 * n - 1)‼ * (2 * ↑n + 1))\n[PROOFSTEP]\nring\n[GOAL]\nn k : ℕ\n⊢ coeff (hermite (2 * (n + 1) + (k + 1))) (k + 1) =\n (-1) ^ (n + 1) * ↑(2 * (n + 1) - 1)‼ * ↑(Nat.choose (2 * (n + 1) + (k + 1)) (k + 1))\n[PROOFSTEP]\nlet hermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * (2 * n - 1)‼ * Nat.choose (2 * n + k) k\n[GOAL]\nn k : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\n⊢ coeff (hermite (2 * (n + 1) + (k + 1))) (k + 1) =\n (-1) ^ (n + 1) * ↑(2 * (n + 1) - 1)‼ * ↑(Nat.choose (2 * (n + 1) + (k + 1)) (k + 1))\n[PROOFSTEP]\nhave hermite_explicit_recur :\n ∀ n k : ℕ, hermite_explicit (n + 1) (k + 1) = hermite_explicit (n + 1) k - (k + 2) * hermite_explicit n (k + 2) :=\n by\n intro n k\n simp only\n -- Factor out (-1)'s.\n rw [mul_comm (↑k + _ : ℤ), sub_eq_add_neg]\n nth_rw 3 [neg_eq_neg_one_mul]\n simp only [mul_assoc, ← mul_add, pow_succ]\n congr 2\n -- Factor out double factorials.\n norm_cast\n -- porting note: ring_nf did not solve the goal on line 186\n rw [(by rw [Nat.left_distrib, mul_one, Nat.succ_sub_one] : 2 * (n + 1) - 1 = 2 * n + 1), Nat.doubleFactorial_add_one,\n mul_comm (2 * n + 1)]\n simp only [mul_assoc, ← mul_add]\n congr 1\n -- Match up binomial coefficients using `Nat.choose_succ_right_eq`.\n rw [(by ring : 2 * (n + 1) + (k + 1) = 2 * n + 1 + (k + 1) + 1), (by ring : 2 * (n + 1) + k = 2 * n + 1 + (k + 1)),\n (by ring : 2 * n + (k + 2) = 2 * n + 1 + (k + 1))]\n rw [Nat.choose, Nat.choose_succ_right_eq (2 * n + 1 + (k + 1)) (k + 1), Nat.add_sub_cancel, Int.negSucc_eq]\n -- porting note: ring could not solve the goal so the lines 195, 198-200 were added.\n ring_nf\n simp only [sub_eq_add_neg, ← neg_mul, ← right_distrib _ _ ((-(1 : ℤ)) ^ n), ← neg_add]\n norm_cast\n simp only [← add_assoc, add_comm]\n[GOAL]\nn k : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\n⊢ ∀ (n k : ℕ), hermite_explicit (n + 1) (k + 1) = hermite_explicit (n + 1) k - (↑k + 2) * hermite_explicit n (k + 2)\n[PROOFSTEP]\nintro n k\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ hermite_explicit (n + 1) (k + 1) = hermite_explicit (n + 1) k - (↑k + 2) * hermite_explicit n (k + 2)\n[PROOFSTEP]\nsimp only\n -- Factor out (-1)'s.\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ (-1) ^ (n + 1) * ↑(2 * (n + 1) - 1)‼ * ↑(Nat.choose (2 * (n + 1) + (k + 1)) (k + 1)) =\n (-1) ^ (n + 1) * ↑(2 * (n + 1) - 1)‼ * ↑(Nat.choose (2 * (n + 1) + k) k) -\n (↑k + 2) * ((-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + (k + 2)) (k + 2)))\n[PROOFSTEP]\nrw [mul_comm (↑k + _ : ℤ), sub_eq_add_neg]\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ (-1) ^ (n + 1) * ↑(2 * (n + 1) - 1)‼ * ↑(Nat.choose (2 * (n + 1) + (k + 1)) (k + 1)) =\n (-1) ^ (n + 1) * ↑(2 * (n + 1) - 1)‼ * ↑(Nat.choose (2 * (n + 1) + k) k) +\n -((-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + (k + 2)) (k + 2)) * (↑k + 2))\n[PROOFSTEP]\nnth_rw 3 [neg_eq_neg_one_mul]\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ (-1) ^ (n + 1) * ↑(2 * (n + 1) - 1)‼ * ↑(Nat.choose (2 * (n + 1) + (k + 1)) (k + 1)) =\n (-1) ^ (n + 1) * ↑(2 * (n + 1) - 1)‼ * ↑(Nat.choose (2 * (n + 1) + k) k) +\n -((-1 * 1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + (k + 2)) (k + 2)) * (↑k + 2))\n[PROOFSTEP]\nsimp only [mul_assoc, ← mul_add, pow_succ]\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ -1 * ((-1) ^ n * (↑(2 * (n + 1) - 1)‼ * ↑(Nat.choose (2 * (n + 1) + (k + 1)) (k + 1)))) =\n -1 * ((-1) ^ n * (↑(2 * (n + 1) - 1)‼ * ↑(Nat.choose (2 * (n + 1) + k) k))) +\n -((-1 * 1) ^ n * (↑(2 * n - 1)‼ * (↑(Nat.choose (2 * n + (k + 2)) (k + 2)) * (↑k + 2))))\n[PROOFSTEP]\ncongr 2\n -- Factor out double factorials.\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ -1 * ((-1) ^ n * (↑(2 * (n + 1) - 1)‼ * ↑(Nat.choose (2 * (n + 1) + (k + 1)) (k + 1)))) =\n -1 * ((-1) ^ n * (↑(2 * (n + 1) - 1)‼ * ↑(Nat.choose (2 * (n + 1) + k) k))) +\n -((-1 * 1) ^ n * (↑(2 * n - 1)‼ * (↑(Nat.choose (2 * n + (k + 2)) (k + 2)) * (↑k + 2))))\n[PROOFSTEP]\nnorm_cast\n -- porting note: ring_nf did not solve the goal on line 186\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ Int.negSucc 0 * (Int.negSucc 0 ^ n * ↑((2 * (n + 1) - 1)‼ * Nat.choose (2 * (n + 1) + (k + 1)) (k + 1))) =\n Int.negSucc 0 * (Int.negSucc 0 ^ n * ↑((2 * (n + 1) - 1)‼ * Nat.choose (2 * (n + 1) + k) k)) +\n -((Int.negSucc 0 * 1) ^ n * ↑((2 * n - 1)‼ * (Nat.choose (2 * n + (k + 2)) (k + 2) * (k + 2))))\n[PROOFSTEP]\nrw [(by rw [Nat.left_distrib, mul_one, Nat.succ_sub_one] : 2 * (n + 1) - 1 = 2 * n + 1), Nat.doubleFactorial_add_one,\n mul_comm (2 * n + 1)]\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ 2 * (n + 1) - 1 = 2 * n + 1\n[PROOFSTEP]\nrw [Nat.left_distrib, mul_one, Nat.succ_sub_one]\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ Int.negSucc 0 * (Int.negSucc 0 ^ n * ↑((2 * n - 1)‼ * (2 * n + 1) * Nat.choose (2 * (n + 1) + (k + 1)) (k + 1))) =\n Int.negSucc 0 * (Int.negSucc 0 ^ n * ↑((2 * n - 1)‼ * (2 * n + 1) * Nat.choose (2 * (n + 1) + k) k)) +\n -((Int.negSucc 0 * 1) ^ n * ↑((2 * n - 1)‼ * (Nat.choose (2 * n + (k + 2)) (k + 2) * (k + 2))))\n[PROOFSTEP]\nsimp only [mul_assoc, ← mul_add]\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ Int.negSucc 0 * (Int.negSucc 0 ^ n * ↑((2 * n - 1)‼ * ((2 * n + 1) * Nat.choose (2 * (n + 1) + (k + 1)) (k + 1)))) =\n Int.negSucc 0 * (Int.negSucc 0 ^ n * ↑((2 * n - 1)‼ * ((2 * n + 1) * Nat.choose (2 * (n + 1) + k) k))) +\n -((Int.negSucc 0 * 1) ^ n * ↑((2 * n - 1)‼ * (Nat.choose (2 * n + (k + 2)) (k + 2) * (k + 2))))\n[PROOFSTEP]\ncongr 1\n -- Match up binomial coefficients using `Nat.choose_succ_right_eq`.\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ Int.negSucc 0 * (Int.negSucc 0 ^ n * ↑((2 * n - 1)‼ * ((2 * n + 1) * Nat.choose (2 * (n + 1) + (k + 1)) (k + 1)))) =\n Int.negSucc 0 * (Int.negSucc 0 ^ n * ↑((2 * n - 1)‼ * ((2 * n + 1) * Nat.choose (2 * (n + 1) + k) k))) +\n -((Int.negSucc 0 * 1) ^ n * ↑((2 * n - 1)‼ * (Nat.choose (2 * n + (k + 2)) (k + 2) * (k + 2))))\n[PROOFSTEP]\nrw [(by ring : 2 * (n + 1) + (k + 1) = 2 * n + 1 + (k + 1) + 1), (by ring : 2 * (n + 1) + k = 2 * n + 1 + (k + 1)),\n (by ring : 2 * n + (k + 2) = 2 * n + 1 + (k + 1))]\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ 2 * (n + 1) + (k + 1) = 2 * n + 1 + (k + 1) + 1\n[PROOFSTEP]\nring\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ 2 * (n + 1) + k = 2 * n + 1 + (k + 1)\n[PROOFSTEP]\nring\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ 2 * n + (k + 2) = 2 * n + 1 + (k + 1)\n[PROOFSTEP]\nring\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ Int.negSucc 0 * (Int.negSucc 0 ^ n * ↑((2 * n - 1)‼ * ((2 * n + 1) * Nat.choose (2 * n + 1 + (k + 1) + 1) (k + 1)))) =\n Int.negSucc 0 * (Int.negSucc 0 ^ n * ↑((2 * n - 1)‼ * ((2 * n + 1) * Nat.choose (2 * n + 1 + (k + 1)) k))) +\n -((Int.negSucc 0 * 1) ^ n * ↑((2 * n - 1)‼ * (Nat.choose (2 * n + 1 + (k + 1)) (k + 2) * (k + 2))))\n[PROOFSTEP]\nrw [Nat.choose, Nat.choose_succ_right_eq (2 * n + 1 + (k + 1)) (k + 1), Nat.add_sub_cancel, Int.negSucc_eq]\n -- porting note: ring could not solve the goal so the lines 195, 198-200 were added.\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ -(↑0 + 1) *\n ((-(↑0 + 1)) ^ n *\n ↑((2 * n - 1)‼ *\n ((2 * n + 1) * (Nat.choose (2 * n + 1 + (k + 1)) k + Nat.choose (2 * n + 1 + (k + 1)) (k + 1))))) =\n -(↑0 + 1) * ((-(↑0 + 1)) ^ n * ↑((2 * n - 1)‼ * ((2 * n + 1) * Nat.choose (2 * n + 1 + (k + 1)) k))) +\n -((-(↑0 + 1) * 1) ^ n * ↑((2 * n - 1)‼ * (Nat.choose (2 * n + 1 + (k + 1)) (k + 1) * (2 * n + 1))))\n[PROOFSTEP]\nring_nf\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ -(↑(n * (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) k * 2 + n * (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) (1 + k) * 2 +\n (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) k +\n (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) (1 + k)) *\n (-1) ^ n) =\n -(↑(n * (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) k * 2 + (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) k) * (-1) ^ n) -\n ↑(n * (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) (1 + k) * 2 + (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) (1 + k)) *\n (-1) ^ n\n[PROOFSTEP]\nsimp only [sub_eq_add_neg, ← neg_mul, ← right_distrib _ _ ((-(1 : ℤ)) ^ n), ← neg_add]\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ -↑(n * (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) k * 2 + n * (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) (1 + k) * 2 +\n (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) k +\n (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) (1 + k)) *\n (-1) ^ n =\n -(↑(n * (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) k * 2 + (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) k) +\n ↑(n * (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) (1 + k) * 2 +\n (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) (1 + k))) *\n (-1) ^ n\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nn✝ k✝ : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nn k : ℕ\n⊢ -↑(n * (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) k * 2 + n * (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) (1 + k) * 2 +\n (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) k +\n (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) (1 + k)) *\n Int.negSucc 0 ^ n =\n -↑(n * (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) k * 2 + (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) k +\n (n * (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) (1 + k) * 2 +\n (n * 2 - 1)‼ * Nat.choose (2 + n * 2 + k) (1 + k))) *\n Int.negSucc 0 ^ n\n[PROOFSTEP]\nsimp only [← add_assoc, add_comm]\n[GOAL]\nn k : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nhermite_explicit_recur :\n ∀ (n k : ℕ), hermite_explicit (n + 1) (k + 1) = hermite_explicit (n + 1) k - (↑k + 2) * hermite_explicit n (k + 2)\n⊢ coeff (hermite (2 * (n + 1) + (k + 1))) (k + 1) =\n (-1) ^ (n + 1) * ↑(2 * (n + 1) - 1)‼ * ↑(Nat.choose (2 * (n + 1) + (k + 1)) (k + 1))\n[PROOFSTEP]\nchange _ = hermite_explicit _ _\n[GOAL]\nn k : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nhermite_explicit_recur :\n ∀ (n k : ℕ), hermite_explicit (n + 1) (k + 1) = hermite_explicit (n + 1) k - (↑k + 2) * hermite_explicit n (k + 2)\n⊢ coeff (hermite (2 * (n + 1) + (k + 1))) (k + 1) = hermite_explicit (n + 1) (k + 1)\n[PROOFSTEP]\nrw [← add_assoc, coeff_hermite_succ_succ, hermite_explicit_recur]\n[GOAL]\nn k : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nhermite_explicit_recur :\n ∀ (n k : ℕ), hermite_explicit (n + 1) (k + 1) = hermite_explicit (n + 1) k - (↑k + 2) * hermite_explicit n (k + 2)\n⊢ coeff (hermite (2 * (n + 1) + k)) k - (↑k + 2) * coeff (hermite (2 * (n + 1) + k)) (k + 2) =\n hermite_explicit (n + 1) k - (↑k + 2) * hermite_explicit n (k + 2)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nn k : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nhermite_explicit_recur :\n ∀ (n k : ℕ), hermite_explicit (n + 1) (k + 1) = hermite_explicit (n + 1) k - (↑k + 2) * hermite_explicit n (k + 2)\n⊢ coeff (hermite (2 * (n + 1) + k)) k = hermite_explicit (n + 1) k\n[PROOFSTEP]\nrw [coeff_hermite_explicit (n + 1) k]\n[GOAL]\ncase e_a.e_a\nn k : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nhermite_explicit_recur :\n ∀ (n k : ℕ), hermite_explicit (n + 1) (k + 1) = hermite_explicit (n + 1) k - (↑k + 2) * hermite_explicit n (k + 2)\n⊢ coeff (hermite (2 * (n + 1) + k)) (k + 2) = hermite_explicit n (k + 2)\n[PROOFSTEP]\nrw [(by ring : 2 * (n + 1) + k = 2 * n + (k + 2)), coeff_hermite_explicit n (k + 2)]\n -- porting note: Lean 3 worked this out automatically\n[GOAL]\nn k : ℕ\nhermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)\nhermite_explicit_recur :\n ∀ (n k : ℕ), hermite_explicit (n + 1) (k + 1) = hermite_explicit (n + 1) k - (↑k + 2) * hermite_explicit n (k + 2)\n⊢ 2 * (n + 1) + k = 2 * n + (k + 2)\n[PROOFSTEP]\nring\n[GOAL]\nn k : ℕ\nhnk : Even (n + k)\n⊢ coeff (hermite n) k = (-1) ^ ((n - k) / 2) * ↑(n - k - 1)‼ * ↑(Nat.choose n k)\n[PROOFSTEP]\ncases' le_or_lt k n with h_le h_lt\n[GOAL]\ncase inl\nn k : ℕ\nhnk : Even (n + k)\nh_le : k ≤ n\n⊢ coeff (hermite n) k = (-1) ^ ((n - k) / 2) * ↑(n - k - 1)‼ * ↑(Nat.choose n k)\n[PROOFSTEP]\nrw [Nat.even_add, ← Nat.even_sub h_le] at hnk \n[GOAL]\ncase inl\nn k : ℕ\nhnk : Even (n - k)\nh_le : k ≤ n\n⊢ coeff (hermite n) k = (-1) ^ ((n - k) / 2) * ↑(n - k - 1)‼ * ↑(Nat.choose n k)\n[PROOFSTEP]\nobtain ⟨m, hm⟩ := hnk\n[GOAL]\ncase inl.intro\nn k : ℕ\nh_le : k ≤ n\nm : ℕ\nhm : n - k = m + m\n⊢ coeff (hermite n) k = (-1) ^ ((n - k) / 2) * ↑(n - k - 1)‼ * ↑(Nat.choose n k)\n[PROOFSTEP]\nrw [(by linarith [by rwa [Nat.sub_eq_iff_eq_add h_le] at hm ] : n = 2 * m + k), Nat.add_sub_cancel,\n Nat.mul_div_cancel_left _ (Nat.succ_pos 1), coeff_hermite_explicit]\n[GOAL]\nn k : ℕ\nh_le : k ≤ n\nm : ℕ\nhm : n - k = m + m\n⊢ n = 2 * m + k\n[PROOFSTEP]\nlinarith [by rwa [Nat.sub_eq_iff_eq_add h_le] at hm ]\n[GOAL]\nn k : ℕ\nh_le : k ≤ n\nm : ℕ\nhm : n - k = m + m\n⊢ ?m.206711\n[PROOFSTEP]\nrwa [Nat.sub_eq_iff_eq_add h_le] at hm \n[GOAL]\ncase inr\nn k : ℕ\nhnk : Even (n + k)\nh_lt : n < k\n⊢ coeff (hermite n) k = (-1) ^ ((n - k) / 2) * ↑(n - k - 1)‼ * ↑(Nat.choose n k)\n[PROOFSTEP]\nsimp [Nat.choose_eq_zero_of_lt h_lt, coeff_hermite_of_lt h_lt]\n[GOAL]\nn k : ℕ\n⊢ coeff (hermite n) k = if Even (n + k) then (-1) ^ ((n - k) / 2) * ↑(n - k - 1)‼ * ↑(Nat.choose n k) else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nn k : ℕ\nh : Even (n + k)\n⊢ coeff (hermite n) k = (-1) ^ ((n - k) / 2) * ↑(n - k - 1)‼ * ↑(Nat.choose n k)\ncase neg n k : ℕ h : ¬Even (n + k) ⊢ coeff (hermite n) k = 0\n[PROOFSTEP]\nexact coeff_hermite_of_even_add h\n[GOAL]\ncase neg\nn k : ℕ\nh : ¬Even (n + k)\n⊢ coeff (hermite n) k = 0\n[PROOFSTEP]\nexact coeff_hermite_of_odd_add (Nat.odd_iff_not_even.mpr h)\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Polynomial.Hermite.Basic", "llama_tokens": 12641, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7905303186696748, "lm_q2_score": 0.6959583187272711, "lm_q1q2_score": 0.5501761514842808}} {"text": "[GOAL]\nx y : ℝ\nh :\n ((∀ (k : ℤ), x ≠ (2 * ↑k + 1) * π / 2) ∧ ∀ (l : ℤ), y ≠ (2 * ↑l + 1) * π / 2) ∨\n (∃ k, x = (2 * ↑k + 1) * π / 2) ∧ ∃ l, y = (2 * ↑l + 1) * π / 2\n⊢ tan (x + y) = (tan x + tan y) / (1 - tan x * tan y)\n[PROOFSTEP]\nsimpa only [← Complex.ofReal_inj, Complex.ofReal_sub, Complex.ofReal_add, Complex.ofReal_div, Complex.ofReal_mul,\n Complex.ofReal_tan] using @Complex.tan_add (x : ℂ) (y : ℂ) (by convert h <;> norm_cast)\n[GOAL]\nx y : ℝ\nh :\n ((∀ (k : ℤ), x ≠ (2 * ↑k + 1) * π / 2) ∧ ∀ (l : ℤ), y ≠ (2 * ↑l + 1) * π / 2) ∨\n (∃ k, x = (2 * ↑k + 1) * π / 2) ∧ ∃ l, y = (2 * ↑l + 1) * π / 2\n⊢ ((∀ (k : ℤ), ↑x ≠ (2 * ↑k + 1) * ↑π / 2) ∧ ∀ (l : ℤ), ↑y ≠ (2 * ↑l + 1) * ↑π / 2) ∨\n (∃ k, ↑x = (2 * ↑k + 1) * ↑π / 2) ∧ ∃ l, ↑y = (2 * ↑l + 1) * ↑π / 2\n[PROOFSTEP]\nconvert h\n[GOAL]\ncase h.e'_1.h.e'_1.h.h.a\nx y : ℝ\nh :\n ((∀ (k : ℤ), x ≠ (2 * ↑k + 1) * π / 2) ∧ ∀ (l : ℤ), y ≠ (2 * ↑l + 1) * π / 2) ∨\n (∃ k, x = (2 * ↑k + 1) * π / 2) ∧ ∃ l, y = (2 * ↑l + 1) * π / 2\na✝ : ℤ\n⊢ ↑x = (2 * ↑a✝ + 1) * ↑π / 2 ↔ x = (2 * ↑a✝ + 1) * π / 2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h.e'_1.h.e'_2.h.h.a\nx y : ℝ\nh :\n ((∀ (k : ℤ), x ≠ (2 * ↑k + 1) * π / 2) ∧ ∀ (l : ℤ), y ≠ (2 * ↑l + 1) * π / 2) ∨\n (∃ k, x = (2 * ↑k + 1) * π / 2) ∧ ∃ l, y = (2 * ↑l + 1) * π / 2\na✝ : ℤ\n⊢ ↑y = (2 * ↑a✝ + 1) * ↑π / 2 ↔ y = (2 * ↑a✝ + 1) * π / 2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h.e'_2.h.e'_1.h.e'_2.h.a\nx y : ℝ\nh :\n ((∀ (k : ℤ), x ≠ (2 * ↑k + 1) * π / 2) ∧ ∀ (l : ℤ), y ≠ (2 * ↑l + 1) * π / 2) ∨\n (∃ k, x = (2 * ↑k + 1) * π / 2) ∧ ∃ l, y = (2 * ↑l + 1) * π / 2\nx✝ : ℤ\n⊢ ↑x = (2 * ↑x✝ + 1) * ↑π / 2 ↔ x = (2 * ↑x✝ + 1) * π / 2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h.e'_2.h.e'_2.h.e'_2.h.a\nx y : ℝ\nh :\n ((∀ (k : ℤ), x ≠ (2 * ↑k + 1) * π / 2) ∧ ∀ (l : ℤ), y ≠ (2 * ↑l + 1) * π / 2) ∨\n (∃ k, x = (2 * ↑k + 1) * π / 2) ∧ ∃ l, y = (2 * ↑l + 1) * π / 2\nx✝ : ℤ\n⊢ ↑y = (2 * ↑x✝ + 1) * ↑π / 2 ↔ y = (2 * ↑x✝ + 1) * π / 2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nx : ℝ\n⊢ tan (2 * x) = ↑2 * tan x / (↑1 - tan x ^ 2)\n[PROOFSTEP]\nhave := @Complex.tan_two_mul x\n[GOAL]\nx : ℝ\nthis : Complex.tan (2 * ↑x) = 2 * Complex.tan ↑x / (1 - Complex.tan ↑x ^ 2)\n⊢ tan (2 * x) = ↑2 * tan x / (↑1 - tan x ^ 2)\n[PROOFSTEP]\nnorm_cast at *\n[GOAL]\nθ : ℝ\n⊢ tan θ ≠ 0 ↔ ∀ (k : ℤ), θ ≠ ↑k * π / 2\n[PROOFSTEP]\nrw [← Complex.ofReal_ne_zero, Complex.ofReal_tan, Complex.tan_ne_zero_iff]\n[GOAL]\nθ : ℝ\n⊢ (∀ (k : ℤ), ↑θ ≠ ↑k * ↑π / 2) ↔ ∀ (k : ℤ), θ ≠ ↑k * π / 2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nθ : ℝ\n⊢ tan θ = 0 ↔ ∃ k, θ = ↑k * π / 2\n[PROOFSTEP]\nrw [← not_iff_not, not_exists, ← Ne, tan_ne_zero_iff]\n[GOAL]\nn : ℤ\n⊢ ∃ k, ↑n * π / 2 = ↑k * π / 2\n[PROOFSTEP]\nuse n\n[GOAL]\n⊢ ContinuousOn tan {x | cos x ≠ 0}\n[PROOFSTEP]\nsuffices ContinuousOn (fun x => sin x / cos x) {x | cos x ≠ 0}\n by\n have h_eq : (fun x => sin x / cos x) = tan := by ext1 x; rw [tan_eq_sin_div_cos]\n rwa [h_eq] at this \n[GOAL]\nthis : ContinuousOn (fun x => sin x / cos x) {x | cos x ≠ 0}\n⊢ ContinuousOn tan {x | cos x ≠ 0}\n[PROOFSTEP]\nhave h_eq : (fun x => sin x / cos x) = tan := by ext1 x; rw [tan_eq_sin_div_cos]\n[GOAL]\nthis : ContinuousOn (fun x => sin x / cos x) {x | cos x ≠ 0}\n⊢ (fun x => sin x / cos x) = tan\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nthis : ContinuousOn (fun x => sin x / cos x) {x | cos x ≠ 0}\nx : ℝ\n⊢ sin x / cos x = tan x\n[PROOFSTEP]\nrw [tan_eq_sin_div_cos]\n[GOAL]\nthis : ContinuousOn (fun x => sin x / cos x) {x | cos x ≠ 0}\nh_eq : (fun x => sin x / cos x) = tan\n⊢ ContinuousOn tan {x | cos x ≠ 0}\n[PROOFSTEP]\nrwa [h_eq] at this \n[GOAL]\n⊢ ContinuousOn (fun x => sin x / cos x) {x | cos x ≠ 0}\n[PROOFSTEP]\nexact continuousOn_sin.div continuousOn_cos fun x => id\n[GOAL]\n⊢ ContinuousOn tan (Ioo (-(π / 2)) (π / 2))\n[PROOFSTEP]\nrefine' ContinuousOn.mono continuousOn_tan fun x => _\n[GOAL]\nx : ℝ\n⊢ x ∈ Ioo (-(π / 2)) (π / 2) → x ∈ {x | cos x ≠ 0}\n[PROOFSTEP]\nsimp only [and_imp, mem_Ioo, mem_setOf_eq, Ne.def]\n[GOAL]\nx : ℝ\n⊢ -(π / 2) < x → x < π / 2 → ¬cos x = 0\n[PROOFSTEP]\nrw [cos_eq_zero_iff]\n[GOAL]\nx : ℝ\n⊢ -(π / 2) < x → x < π / 2 → ¬∃ k, x = (2 * ↑k + 1) * π / 2\n[PROOFSTEP]\nrintro hx_gt hx_lt ⟨r, hxr_eq⟩\n[GOAL]\ncase intro\nx : ℝ\nhx_gt : -(π / 2) < x\nhx_lt : x < π / 2\nr : ℤ\nhxr_eq : x = (2 * ↑r + 1) * π / 2\n⊢ False\n[PROOFSTEP]\ncases' le_or_lt 0 r with h h\n[GOAL]\ncase intro.inl\nx : ℝ\nhx_gt : -(π / 2) < x\nhx_lt : x < π / 2\nr : ℤ\nhxr_eq : x = (2 * ↑r + 1) * π / 2\nh : 0 ≤ r\n⊢ False\n[PROOFSTEP]\nrw [lt_iff_not_ge] at hx_lt \n[GOAL]\ncase intro.inl\nx : ℝ\nhx_gt : -(π / 2) < x\nhx_lt : ¬x ≥ π / 2\nr : ℤ\nhxr_eq : x = (2 * ↑r + 1) * π / 2\nh : 0 ≤ r\n⊢ False\n[PROOFSTEP]\nrefine' hx_lt _\n[GOAL]\ncase intro.inl\nx : ℝ\nhx_gt : -(π / 2) < x\nhx_lt : ¬x ≥ π / 2\nr : ℤ\nhxr_eq : x = (2 * ↑r + 1) * π / 2\nh : 0 ≤ r\n⊢ x ≥ π / 2\n[PROOFSTEP]\nrw [hxr_eq, ← one_mul (π / 2), mul_div_assoc, ge_iff_le, mul_le_mul_right (half_pos pi_pos)]\n[GOAL]\ncase intro.inl\nx : ℝ\nhx_gt : -(π / 2) < x\nhx_lt : ¬x ≥ π / 2\nr : ℤ\nhxr_eq : x = (2 * ↑r + 1) * π / 2\nh : 0 ≤ r\n⊢ 1 ≤ 2 * ↑r + 1\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase intro.inr\nx : ℝ\nhx_gt : -(π / 2) < x\nhx_lt : x < π / 2\nr : ℤ\nhxr_eq : x = (2 * ↑r + 1) * π / 2\nh : r < 0\n⊢ False\n[PROOFSTEP]\nrw [lt_iff_not_ge] at hx_gt \n[GOAL]\ncase intro.inr\nx : ℝ\nhx_gt : ¬-(π / 2) ≥ x\nhx_lt : x < π / 2\nr : ℤ\nhxr_eq : x = (2 * ↑r + 1) * π / 2\nh : r < 0\n⊢ False\n[PROOFSTEP]\nrefine' hx_gt _\n[GOAL]\ncase intro.inr\nx : ℝ\nhx_gt : ¬-(π / 2) ≥ x\nhx_lt : x < π / 2\nr : ℤ\nhxr_eq : x = (2 * ↑r + 1) * π / 2\nh : r < 0\n⊢ -(π / 2) ≥ x\n[PROOFSTEP]\nrw [hxr_eq, ← one_mul (π / 2), mul_div_assoc, ge_iff_le, neg_mul_eq_neg_mul, mul_le_mul_right (half_pos pi_pos)]\n[GOAL]\ncase intro.inr\nx : ℝ\nhx_gt : ¬-(π / 2) ≥ x\nhx_lt : x < π / 2\nr : ℤ\nhxr_eq : x = (2 * ↑r + 1) * π / 2\nh : r < 0\n⊢ 2 * ↑r + 1 ≤ -1\n[PROOFSTEP]\nhave hr_le : r ≤ -1 := by rwa [Int.lt_iff_add_one_le, ← le_neg_iff_add_nonpos_right] at h \n[GOAL]\nx : ℝ\nhx_gt : ¬-(π / 2) ≥ x\nhx_lt : x < π / 2\nr : ℤ\nhxr_eq : x = (2 * ↑r + 1) * π / 2\nh : r < 0\n⊢ r ≤ -1\n[PROOFSTEP]\nrwa [Int.lt_iff_add_one_le, ← le_neg_iff_add_nonpos_right] at h \n[GOAL]\ncase intro.inr\nx : ℝ\nhx_gt : ¬-(π / 2) ≥ x\nhx_lt : x < π / 2\nr : ℤ\nhxr_eq : x = (2 * ↑r + 1) * π / 2\nh : r < 0\nhr_le : r ≤ -1\n⊢ 2 * ↑r + 1 ≤ -1\n[PROOFSTEP]\nrw [← le_sub_iff_add_le, mul_comm, ← le_div_iff]\n[GOAL]\ncase intro.inr\nx : ℝ\nhx_gt : ¬-(π / 2) ≥ x\nhx_lt : x < π / 2\nr : ℤ\nhxr_eq : x = (2 * ↑r + 1) * π / 2\nh : r < 0\nhr_le : r ≤ -1\n⊢ ↑r ≤ (-1 - 1) / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro.inr\nx : ℝ\nhx_gt : ¬-(π / 2) ≥ x\nhx_lt : x < π / 2\nr : ℤ\nhxr_eq : x = (2 * ↑r + 1) * π / 2\nh : r < 0\nhr_le : r ≤ -1\n⊢ ↑r ≤ -1\n[PROOFSTEP]\nrw [← Int.cast_one, ← Int.cast_neg]\n[GOAL]\ncase intro.inr\nx : ℝ\nhx_gt : ¬-(π / 2) ≥ x\nhx_lt : x < π / 2\nr : ℤ\nhxr_eq : x = (2 * ↑r + 1) * π / 2\nh : r < 0\nhr_le : r ≤ -1\n⊢ ↑r ≤ ↑(-1)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase intro.inr\nx : ℝ\nhx_gt : ¬-(π / 2) ≥ x\nhx_lt : x < π / 2\nr : ℤ\nhxr_eq : x = (2 * ↑r + 1) * π / 2\nh : r < 0\nhr_le : r ≤ -1\n⊢ 0 < 2\n[PROOFSTEP]\nexact zero_lt_two\n[GOAL]\nthis : -(π / 2) < π / 2\n⊢ Tendsto (fun x => tan ↑x) atBot atBot\n[PROOFSTEP]\nrw [tendsto_comp_coe_Ioo_atBot this]\n[GOAL]\nthis : -(π / 2) < π / 2\n⊢ Tendsto tan (𝓝[Ioi (-(π / 2))] (-(π / 2))) atBot\n[PROOFSTEP]\nexact tendsto_tan_neg_pi_div_two\n[GOAL]\nthis : -(π / 2) < π / 2\n⊢ Tendsto (fun x => tan ↑x) atTop atTop\n[PROOFSTEP]\nrw [tendsto_comp_coe_Ioo_atTop this]\n[GOAL]\nthis : -(π / 2) < π / 2\n⊢ Tendsto tan (𝓝[Iio (π / 2)] (π / 2)) atTop\n[PROOFSTEP]\nexact tendsto_tan_pi_div_two\n[GOAL]\nx : ℝ\n⊢ cos (arctan x) ^ 2 = ↑1 / (↑1 + x ^ 2)\n[PROOFSTEP]\nrw_mod_cast [one_div, ← inv_one_add_tan_sq (cos_arctan_pos x).ne', tan_arctan]\n[GOAL]\nx : ℝ\n⊢ sin (arctan x) = x / sqrt (↑1 + x ^ 2)\n[PROOFSTEP]\nrw_mod_cast [← tan_div_sqrt_one_add_tan_sq (cos_arctan_pos x), tan_arctan]\n[GOAL]\nx : ℝ\n⊢ cos (arctan x) = ↑1 / sqrt (↑1 + x ^ 2)\n[PROOFSTEP]\nrw_mod_cast [one_div, ← inv_sqrt_one_add_tan_sq (cos_arctan_pos x), tan_arctan]\n[GOAL]\nx : ℝ\nh : x ∈ Ioo (-1) 1\n⊢ arcsin x = arctan (x / sqrt (↑1 - x ^ 2))\n[PROOFSTEP]\nrw_mod_cast [arctan_eq_arcsin, div_pow, sq_sqrt, one_add_div, div_div, ← sqrt_mul, mul_div_cancel', sub_add_cancel,\n sqrt_one, div_one]\n[GOAL]\ncase hb\nx : ℝ\nh : x ∈ Ioo (↑(Int.negSucc 0)) 1\n⊢ 1 - x ^ 2 ≠ 0\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase hx\nx : ℝ\nh : x ∈ Ioo (↑(Int.negSucc 0)) 1\n⊢ 0 ≤ 1 - x ^ 2\n[PROOFSTEP]\nsimp at h \n[GOAL]\nx : ℝ\nh : x ∈ Ioo (↑(Int.negSucc 0)) 1\n⊢ 1 - x ^ 2 ≠ 0\n[PROOFSTEP]\nsimp at h \n[GOAL]\nx : ℝ\nh : x ∈ Ioo (↑(Int.negSucc 0)) 1\n⊢ 0 ≤ 1 - x ^ 2\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase hb\nx : ℝ\nh : -1 < x ∧ x < 1\n⊢ 1 - x ^ 2 ≠ 0\n[PROOFSTEP]\nnlinarith [h.1, h.2]\n[GOAL]\ncase hx\nx : ℝ\nh : -1 < x ∧ x < 1\n⊢ 0 ≤ 1 - x ^ 2\n[PROOFSTEP]\nnlinarith [h.1, h.2]\n[GOAL]\nx : ℝ\nh : -1 < x ∧ x < 1\n⊢ 1 - x ^ 2 ≠ 0\n[PROOFSTEP]\nnlinarith [h.1, h.2]\n[GOAL]\nx : ℝ\nh : -1 < x ∧ x < 1\n⊢ 0 ≤ 1 - x ^ 2\n[PROOFSTEP]\nnlinarith [h.1, h.2]\n[GOAL]\n⊢ arctan 0 = 0\n[PROOFSTEP]\nsimp [arctan_eq_arcsin]\n[GOAL]\nx y : ℝ\nh : tan x = y\nhx : x ∈ Ioo (-(π / 2)) (π / 2)\n⊢ tan (arctan y) = tan x\n[PROOFSTEP]\nrw [tan_arctan, h]\n[GOAL]\n⊢ π / 4 ∈ Ioo (-(π / 2)) (π / 2)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\n⊢ -(π / 2) < π / 4\n[PROOFSTEP]\nlinarith [pi_pos]\n[GOAL]\ncase right\n⊢ π / 4 < π / 2\n[PROOFSTEP]\nlinarith [pi_pos]\n[GOAL]\nx : ℝ\n⊢ arctan (-x) = -arctan x\n[PROOFSTEP]\nsimp [arctan_eq_arcsin, neg_div]\n[GOAL]\nx : ℝ\nh : 0 ≤ x\n⊢ arctan x = arccos (sqrt (↑1 + x ^ 2))⁻¹\n[PROOFSTEP]\nrw [arctan_eq_arcsin, arccos_eq_arcsin]\n[GOAL]\nx : ℝ\nh : 0 ≤ x\n⊢ arcsin (x / sqrt (↑1 + x ^ 2)) = arcsin (sqrt (1 - (sqrt (↑1 + x ^ 2))⁻¹ ^ 2))\nx : ℝ h : 0 ≤ x ⊢ 0 ≤ (sqrt (↑1 + x ^ 2))⁻¹\n[PROOFSTEP]\nswap\n[GOAL]\nx : ℝ\nh : 0 ≤ x\n⊢ 0 ≤ (sqrt (↑1 + x ^ 2))⁻¹\n[PROOFSTEP]\nexact inv_nonneg.2 (sqrt_nonneg _)\n[GOAL]\nx : ℝ\nh : 0 ≤ x\n⊢ arcsin (x / sqrt (↑1 + x ^ 2)) = arcsin (sqrt (1 - (sqrt (↑1 + x ^ 2))⁻¹ ^ 2))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nx : ℝ\nh : 0 ≤ x\n⊢ x / sqrt (↑1 + x ^ 2) = sqrt (1 - (sqrt (↑1 + x ^ 2))⁻¹ ^ 2)\n[PROOFSTEP]\nrw_mod_cast [← sqrt_inv, sq_sqrt, ← one_div, one_sub_div, add_sub_cancel', sqrt_div, sqrt_sq h]\n[GOAL]\ncase e_a.hx\nx : ℝ\nh : 0 ≤ x\n⊢ 0 ≤ x ^ 2\ncase e_a\nx : ℝ\nh : 0 ≤ x\n⊢ 1 + x ^ 2 ≠ 0\ncase e_a x : ℝ h : 0 ≤ x ⊢ 0 ≤ (1 + x ^ 2)⁻¹\n[PROOFSTEP]\nall_goals positivity\n[GOAL]\ncase e_a.hx\nx : ℝ\nh : 0 ≤ x\n⊢ 0 ≤ x ^ 2\n[PROOFSTEP]\npositivity\n[GOAL]\ncase e_a\nx : ℝ\nh : 0 ≤ x\n⊢ 1 + x ^ 2 ≠ 0\n[PROOFSTEP]\npositivity\n[GOAL]\ncase e_a\nx : ℝ\nh : 0 ≤ x\n⊢ 0 ≤ (1 + x ^ 2)⁻¹\n[PROOFSTEP]\npositivity\n[GOAL]\nx : ℝ\nh : 0 < x\n⊢ arccos x = arctan (sqrt (↑1 - x ^ 2) / x)\n[PROOFSTEP]\nrw [arccos, eq_comm]\n[GOAL]\nx : ℝ\nh : 0 < x\n⊢ arctan (sqrt (↑1 - x ^ 2) / x) = π / 2 - arcsin x\n[PROOFSTEP]\nrefine' arctan_eq_of_tan_eq _ ⟨_, _⟩\n[GOAL]\ncase refine'_1\nx : ℝ\nh : 0 < x\n⊢ tan (π / 2 - arcsin x) = sqrt (↑1 - x ^ 2) / x\n[PROOFSTEP]\nrw_mod_cast [tan_pi_div_two_sub, tan_arcsin, inv_div]\n[GOAL]\ncase refine'_2\nx : ℝ\nh : 0 < x\n⊢ -(π / 2) < π / 2 - arcsin x\n[PROOFSTEP]\nlinarith only [arcsin_le_pi_div_two x, pi_pos]\n[GOAL]\ncase refine'_3\nx : ℝ\nh : 0 < x\n⊢ π / 2 - arcsin x < π / 2\n[PROOFSTEP]\nlinarith only [arcsin_pos.2 h]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan", "llama_tokens": 6686, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8267117940706734, "lm_q2_score": 0.665410558746814, "lm_q1q2_score": 0.5501027568151479}}